Remove ENABLE_SSSE3_ON_ATOM.
[glibc.git] / nptl / ChangeLog
bloba9a0168357c78002519ed8006ca992d2c03b17aa
1 2009-08-25  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/x86_64/tls.h (RTLD_ENABLE_FOREIGN_CALL): Store old value
4         of the field in local variables.
5         (RTLD_FINALIZE_FOREIGN_CALL): Restore rtld_must_xmm_save from local
6         variable and don't unconditionally clear it.
8 2009-08-24  Ulrich Drepper  <drepper@redhat.com>
10         * pthread_create.c (start_thread): Hint to the kernel that memory for
11         the stack can be reused.  We do not mark all the memory.  The part
12         still in use and some reserve are kept.
14 2009-08-23  Ulrich Drepper  <drepper@redhat.com>
16         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Clean up namespace.
18 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
21         directives.
23 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
25         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
26         directives.
27         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
29 2009-08-10  Andreas Schwab  <schwab@redhat.com>
31         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
32         (__pthread_cond_signal): Don't clobber register used for syscall
33         number.
35 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
37         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
38         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
40         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
41         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
42         register.
44 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
46         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
47         enabled by the special *_asynccancel functions.
48         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
49         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
51         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
53 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
55         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
56         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
57         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
58         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
59         since we can assume the special __*_{en,dis}able_asynccancel
60         functions.
61         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
62         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
63         and PTHREAD_CANCELED.
65 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
67         * descr.h: Better definition of *_BITMASK macros for cancellation.
69 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
71         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
73         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
74         dynamic linker might have to save.
75         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
76         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
77         printing.
79         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
81 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
83         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
84         New function.
85         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
86         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
87         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
88         requeue_pi for robust mutexes.
89         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
90         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
91         Don't only skip __pthread_mutex_cond_lock.  Call instead
92         __pthread_mutex_cond_lock_adjust.
93         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
95         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
96         optimization of PI mutex handling.
98 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
100         [BZ #10418]
101         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
102         instead of of _acq variants of cmpxchg.
104 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
106         * sysdeps/x86_64/configure.in: New file.
108         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
109         path when not using absolute timeout futex.
111 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
113         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
114         optimizations of last changes.
115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
117 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
120         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
122         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
124         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
125         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
128         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
129         (__pthread_cond_timedwait): Make more robust.
131 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
133         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
134         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
135         directly use absolute timeout.
137         * tst-sem5.c (do_test): Add test for premature timeout.
138         * Makefile: Linu tst-sem5 with librt.
140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
141         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
142         directly use absolute timeout.
143         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
144         (pthread_rwlock_timedrdlock): Likewise.
146         * tst-cond11.c (run_test): Add test to check that the timeout is
147         long enough.
149         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
150         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
151         directly use absolute timeout.
153         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
154         (__pthread_cond_wait): Convert to using exception handler instead of
155         registered unwind buffer.
156         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
157         (__pthread_cond_timedwait): Likewise.
159 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
161         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
162         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
163         use absolute timeout.
165         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
166         handling of uncontested semaphore.
168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
169         (__condvar_cleanup): Rewrite to use cfi directives instead of
170         hand-coded unwind tables.
171         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
172         Likewise.
173         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
174         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
175         Likewise.
177 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
179         * Makefile (libpthread-routines): Add pthread_sigqueue.
180         * Versions: Add pthread_sigqueue for GLIBC_2.11.
181         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
182         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
184 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
186         [BZ #10262]
187         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
188         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
189         cannot be assumed.
190         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
192 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
194         * libc-cancellation.c: Move __libc_cleanup_routine to...
195         * libc-cleanup.c: ...here.  New file.
196         * Makefile (routines): Add libc-cleanup.
198         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
199         test.
200         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
201         * sysdeps/pthread/librt-cancellation.c: Likewise.
203         [BZ #9924]
204         * nptl-init.c: Renamed from init.c.
205         * Makefile: Change all occurences of init.c to nptl-init.c.
207 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
209         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
210         to test when deciding on the delay.
211         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
212         * pthread_cancel.c: Close race between deciding on sending a signal
213         and setting the CANCELING_BIT bit.
215         * cancellation.c (__pthread_disable_asynccancel): Don't return if
216         thread is canceled.
217         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
219 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
221         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
222         is available.
223         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
224         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
225         * sysdeps/i386/tls.h: Likewise.
226         (tcbhead_t): Add __private_tm member.
228 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
230         * sem_open.c (sem_open): Rewrite initialization of initsem to
231         avoid warnings.
233         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
234         Avoid warning by using may_alias attribute on ptrhack.
236 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
238         [BZ #10090]
239         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
240         Check policy and priority for validity.
241         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
243 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
245         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
246         (__pthread_cond_timedwait): Change to use cfi directives instead of
247         hand-coded unwind sections.
249 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
251         * init.c (nptl_freeres): Compile only for SHARED.
253 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
255         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
256         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
257         FUTEX_BITSET_MATCH_ANY.
259 2009-02-27  Roland McGrath  <roland@redhat.com>
261         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
262         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
264 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
266         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
267         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
268         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
269         200112L to 200809L.
271 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
273         * sysdeps/pthread/pthread.h: The robust mutex functions are in
274         POSIX 2008.
276 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
278         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
279         Unify name of include protector macro.
281 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
283         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
284         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
286 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
288         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
289         pointer variables.
291         * allocatestack.c (__free_stacks): Renamed from free_stacks.
292         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
293         * init.c (nptl_freeres): New function.
294         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
295         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
296         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
297         variable.
298         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
299         load DSO.  Assign last.
300         (__unwind_freeres): New function.
302         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
303         for better debugging.  No need to use stack_list_add here.
305 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
307         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
308         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
309         instead of computing relative timeout.
310         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
311         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
313 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
315         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
317 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
319         * sysdeps/pthread/list.h (list_add): Initialize new element first.
320         (list_add_tail): Removed.
322 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
324         * (in_flight_stack): New variable.
325         (stack_list_del): New function.  Use instead of list_del.
326         (stack_list_add): New function.  Use instead of list_add when adding to
327         stack_cache and stack_used lists.
328         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
329         when the fork call interrupted another thread.
331 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
333         * init.c (__pthread_initialize_minimal_internal): Optimize test
334         FUTEX_CLOCK_REALTIME a bit.
336 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
338         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
339         only passing five parameters to FUTEX_WAIT_BITSET call.
341         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
342         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
343         instead of computing relative timeout.
345 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
347         * init.c (__pthread_initialize_minimal_internal): Check for
348         FUTEX_CLOCK_REALTIME flag.
349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
350         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
351         relative timeout.
353         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
354         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
355         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
356         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
357         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
358         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
360 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
362         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
363         loop body instead of ; to avoid gcc warnings.
364         (pthread_cleanup_pop_restore_np): Likewise.
365         Patch by Caolán McNamara <caolanm@redhat.com>.
367 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
369         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
370         fast path here, for robust/PI/PP mutexes call
371         __pthread_mutex_lock_full.  Don't use switch, instead use a series
372         of ifs according to their probability.
373         (__pthread_mutex_lock_full): New function.
374         * pthread_mutex_unlock.c: Include assert.h.
375         (__pthread_mutex_unlock_usercnt): Handle only the
376         fast path here, for robust/PI/PP mutexes call
377         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
378         of ifs according to their probability.
379         (__pthread_mutex_unlock_full): New function.
380         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
381         (__pthread_mutex_lock_full): Define.
383 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
385         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
386         implementation.  Add necessary padding and.
387         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
388         words.
390 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
392         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
393         and FUTEX_WAKE_BITSET.
395 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
397         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
398         and FUTEX_WAKE_BITSET.
399         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
400         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
401         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
404 2008-11-25  Roland McGrath  <roland@redhat.com>
406         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
407         Subdirectories moved to ports repository as
408         sysdeps/.../nptl subdirectories.
410 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
412         [BZ #7008]
413         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
414         of old value.
415         * pthread_cond_init.c (__pthread_cond_init): Fix
416         cond->__data.__nwaiters initialization.
417         * Makefile (tests): Add tst-cond23.
418         * tst-cond23.c: New test.
420 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
422         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
423         arguments.
424         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
425         arguments.
427 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
429         [BZ #6955]
430         * pthread_mutex_lock.c: Add support for private PI mutexes.
431         * pthread_mutex_timedlock.c: Likewise.
432         * pthread_mutex_trylock.c: Likewise.
433         * pthread_mutex_unlock.c: Likewise.
434         Patch mostly by Ben Jackson <ben@ben.com>.
436 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
438         [BZ #6843]
439         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
440         Increase stack size for helper thread.
442 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
444         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
445         assembly with a clobber list for access registers a0 and a1.
447 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
449         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
450         to force runp->refcntr to be read from memory.
452 2008-09-08  Richard Guenther  <rguenther@suse.de>
454         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
455         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
456         lll_timedlock, lll_robust_timedlock, lll_unlock,
457         lll_robust_unlock): Promote private to int.
459 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
461         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
462         ARCH_RETRY_MMAP definitions.
463         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
464         Define MAP_STACK when not defined.
465         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
466         handling of ARCH_RETRY_MMAP.
468 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
470         * tst-align2.c (f): Print message that f is reached.
472 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
474         [BZ #6740]
475         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
476         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
478 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
480         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
481         SOCK_CLOEXEC if possible.
483 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
485         * Makefile (tests): Add tst-rwlock2a.
486         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
487         * tst-rwlock2a.c: New file.
489 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
491         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
493 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
495         * sysdeps/pthread/pthread.h: Fix typo in comment.
497 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
499         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
500         of CPU set to the kernel.
502 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
504         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
505         cfi directives.
506         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
509         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
511         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
513 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
516         cfi directives.
517         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
518         Likewise.
519         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
520         Likewise.
521         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
522         Likewise.
524 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
526         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
528 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
530         David S. Miller  <davem@davemloft.net>
532         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
534 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
537         __pshared correctly.
538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
539         Likewise.
540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
541         Likewise.
542         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
543         Likewise.
544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
545         Likewise.
546         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
548 2008-04-14  David S. Miller  <davem@davemloft.net>
550         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
551         (__old_sem_wait): Fix argument to lll_futex_wait().
553 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
555         * pthread_create.c: Require pthread_mutex_trylock and
556         pthread_key_delete for libgcc.
558 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
560         [BZ #6020]
561         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
562         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
563         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
565 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
567         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
568         <linux/limits.h> has defined it.
569         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
570         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
571         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
572         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
574 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
576         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
577         of ASSEMBLER.
578         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
579         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
581 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
583         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
584         HAVE_DL_DISCOVER_OSVERSION.
585         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
586         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
588 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
590         [BZ #5778]
591         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
592         _POSIX_CHOWN_RESTRICTED value to zero.
594 2008-01-31  Roland McGrath  <roland@redhat.com>
596         * Makefile (omit-deps): Variable removed.
598 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
600         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
601         unnecessary addr32 prefix.
603 2008-01-29  Roland McGrath  <roland@redhat.com>
605         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
607 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
609         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
611 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
613         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
614         a scratch register.
615         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
616         (__lll_lock_wait_private): Fix typo.
617         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
618         (pthread_barrier_wait): Likewise.  Adjust XADD use.
619         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
620         Adjust XADD use.
621         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
622         (pthread_rwlock_timedrdlock): Return correct return value.
623         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
624         (pthread_rwlock_timedwrlock): Likewise.
626 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
628         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
629         thread returns the program exits with an error code.
631 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
633         * pthread-errnos.sym: Add EOVERFLOW.
634         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
635         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
636         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
637         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
639 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
641         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
642         parameter.  Passed it as permission to mmap.
643         * allocatestack.c (allocate_stack): Pass prot as second parameter
644         to ARCH_RETRY_MMAP.
646 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
648         * tst-basic7.c: Allocate memory for the stack.
650         [BZ #5465]
651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
652         (__pthread_cond_timedwait): Don't use VDSO.
653         Patch by Michal Januszewski.
655 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
657         [BZ #5455]
658         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
659         Allow label before pthread_cleanup_pop.
660         (pthread_cleanup_pop_restore_np): Likewise.
662 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
664         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
665         Store 2 before returning ETIMEDOUT.
667 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
670         Store 2 before returning ETIMEDOUT.
671         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
672         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
673         (__lll_lock_wait_private): Optimize.
674         (__lll_lock_wait): Likewise.
676 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
678         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
679         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
680         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
682 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
684         [BZ #5240]
685         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
686         If we time out, try one last time to lock the futex to avoid
687         losing a wakeup signal.
688         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
689         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
691         [BZ #5245]
692         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
693         if necessary.
695 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
697         [BZ #5245]
698         * allocatestack.c (allocate_stack): Change ENOMEM error in case
699         mmap failed to EAGAIN.
700         * Makefile (tests): Add tst-basic7.
701         * tst-basic7.c: New file.
703 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
705         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
706         Use __linkin_atfork.
708 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
710         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
711         missing line continuations.
712         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
713         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
715 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
717         [BZ #5220]
718         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
719         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
720         (struct timer): Add next element.
721         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
722         enqueue timer structure into __active_timer_sigev_thread list.
723         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
724         remove timer struct from __active_timer_sigev_thread.
725         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
726         Before using timer structure make sure it is still on the
727         __active_timer_sigev_thread list.  Keep lock until done.
728         Define __active_timer_sigev_thread and
729         __active_timer_sigev_thread_lock.
731 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
733         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
734         Redefine thread_atfork for use of ATFORK_MEM.
735         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
736         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
737         function.
738         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
739         Use atomic operation when removing first element of list.
741 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
743         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
744         routine instead of an alias to __new_sem_post.
746 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
748         * init.c (__pthread_initialize_minimal): Initialize word to appease
749         valgrind.
751 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
753         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
754         libc.so just clear NAME.
755         (__libc_rwlock_fini): Nop inside of libc.so.
756         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
757         all zeros.
759 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
761         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
762         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
763         unlocking failed.
764         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
766 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
768         [BZ #4938]
769         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
770         reclaimed stack if necessary.
771         * Makefile (tests): Add tst-tsd6.
772         * tst-tsd6.c: New file.
774 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
776         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
777         Add private argument.
779 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
781         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
782         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
784 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
786         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
787         (__lll_robust_timedlock): Pass private as last argument to
788         __lll_robust_timedlock_wait.
789         (__lll_unlock): Fix a pasto.
791 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
793         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
794         sparc_old_sem): New structs.
795         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
796         (__sem_wait_cleanup): New function.
797         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
798         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
799         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
800         lll_futex_wait.
801         (__old_sem_wait): New function.
802         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
803         nptl/sysdeps/unix/sysv/linux/sparc version.
804         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
805         Likewise.
806         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
807         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
808         (__new_sem_trywait): Use sparc_old_sem structure.
809         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
810         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
811         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
812         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
813         lll_futex_timed_wait.
814         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
815         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
816         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
817         lll_futex_wake.
818         (__old_sem_post): New function.
819         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
820         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
821         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
822         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
823         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
824         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
826 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
828         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
829         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
830         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
831         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
832         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
833         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
834         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
835         Use FUTEX_WAKE_OP.
836         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
837         kernel-features.h and tcb-offsets.h.
838         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
839         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
840         process private.
841         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
842         tcb-offsets.h.
843         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
844         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
845         process private.
846         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
847         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
851         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
854 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
856         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
857         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
858         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
859         lll_futex_timed_wait.
861         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
862         __lll_robust_unlock): Rewrite as macros instead of inline functions.
863         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
864         __lll_robust_unlock, __lll_wait_tid): Likewise.
866 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
868         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
869         Fix a pasto.
870         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
871         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
872         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
873         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
875         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
876         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
878         kernel-features.h.
879         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
880         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
881         process private.  Switch DW_CFA_advance_loc1 and some
882         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
884         (__pthread_cond_timedwait, __condvar_tw_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_loc{1,2} and some
887         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
888         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
889         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
890         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
891         Likewise.
892         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
893         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
894         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
895         Likewise.
896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
897         (__pthread_cond_broadcast): Compare %r8 instead of
898         dep_mutex-cond_*(%rdi) with $-1.
899         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
900         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
901         of oring.
903 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
905         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
907 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
909         * allocatestack.c: Include kernel-features.h.
910         * pthread_create.c: Likewise.
911         * pthread_mutex_init.c: Likewise.
912         * init.c: Likewise.
913         * pthread_cond_timedwait.c: Likewise.
914         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
915         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
916         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
917         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
918         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
920         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
921         Likewise.
922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
923         Likewise.
924         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
925         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
926         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
927         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
929 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
931         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
932         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
933         byte elements.  One of them is the new __shared element.
934         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
935         adjust names of other padding elements.
936         * sysdeps/unix/sysv/linux/s390/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/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
942         Renamed __pad1 element to __shared, adjust names of other padding
943         elements.
944         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
945         (pthread_rwlock_t): Likewise.
946         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
947         typo.
949 2007-08-09  Anton Blanchard  <anton@samba.org>
951         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
953 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
955         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
956         <kernel-features.h>.
957         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
959 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
961         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
962         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
963         dealing with robust mutexes.
964         * pthread_mutex_timedlock.c: Likewise.
965         * pthread_mutex_trylock.c: Likewise.
966         * pthread_mutex_unlock.c: Likewise.
967         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
969 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
971         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
972         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
973         (PTHREAD_MUTEX_PSHARED): Define.
974         * pthread_mutex_init.c (__pthread_mutex_init): Set
975         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
976         mutexes.
977         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
978         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
979         as second argument to lll_lock.
980         (LLL_MUTEX_TRYLOCK): Take mutex as argument
981         instead of its __data.__lock field.
982         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
983         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
984         to lll_robust_lock.
985         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
986         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
987         instead of mutex->__data.__kind directly, pass
988         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
989         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
990         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
991         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
992         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
993         to lll_timedlock, lll_robust_timedlock, lll_unlock and
994         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
995         of mutex->__data.__kind directly.
996         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
997         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
998         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
999         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
1000         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
1001         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
1002         and lll_futex_wake.
1003         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
1004         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
1005         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
1006         directly.
1007         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
1008         Take mutex as argument instead of its __data.__lock field, pass
1009         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
1010         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
1011         __data.__lock field.
1012         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
1013         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
1014         to lll_robust_cond_lock.
1015         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
1016         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1017         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1018         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1019         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1020         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1021         lll_futex_wait.
1022         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1023         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1024         lll_futex_wake.
1025         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1026         pshared variable, pass it to lll_lock, lll_unlock,
1027         lll_futex_timedwait and lll_futex_wake.
1028         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1029         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1030         and lll_futex_wake.
1031         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1032         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1033         macro.
1034         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1035         lll_futex_wake_unlock): Likewise.
1036         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1037         Likewise.
1038         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1039         lll_futex_wake_unlock): Likewise.
1040         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1041         Likewise.
1042         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1043         lll_futex_wake_unlock): Likewise.
1044         (lll_futex_wake): Fix a typo.
1045         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1046         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1047         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1048         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1049         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1051         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1052         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1053         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1054         (__pthread_cond_timedwait): Likewise.
1055         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1056         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1058 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1060         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1061         Don't use CGOTSETUP and CGOTRESTORE macros.
1062         (CGOTSETUP, CGOTRESTORE): Remove.
1063         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1064         @local symbol.
1066 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1068         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1069         definitions for private futexes.
1070         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1071         kernel-features.h and lowlevellock.h.  Use private futexes if
1072         they are available.
1073         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1074         (__lll_mutex_lock_wait): Rename to
1075         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1076         (__lll_mutex_timedlock_wait): Rename to ...
1077         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1078         Don't compile in for libc.so.
1079         (__lll_mutex_unlock_wake): Rename to ...
1080         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1081         (__lll_timedwait_tid): Use __NR_gettimeofday.
1082         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1083         the header from assembler.  Renamed all lll_mutex_* resp.
1084         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1085         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1086         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1087         Define.
1088         (__lll_lock_wait_private): Add prototype.
1089         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1090         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1091         __lll_unlock_wake): Likewise.
1092         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1093         if private is constant LLL_PRIVATE.
1094         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1095         lll_timedlock, lll_robust_timedlock): Add private argument.
1096         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1097         if private is constant LLL_PRIVATE.
1098         (lll_robust_unlock, lll_robust_dead): Add private argument.
1099         (lll_lock_t): Remove.
1100         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1101         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1102         lll_cond_wake, lll_cond_broadcast): Remove.
1103         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1104         kernel-features.h and lowlevellock.h.
1105         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1106         (LOAD_FUTEX_WAIT): Define.
1107         (__lll_robust_mutex_lock_wait): Rename to ...
1108         (__lll_robust_lock_wait): ... this.  Add private argument.
1109         Use LOAD_FUTEX_WAIT macro.
1110         (__lll_robust_mutex_timedlock_wait): Rename to ...
1111         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1112         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1113         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1114         lowlevellock.h.
1115         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1116         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1117         __lll_mutex_{lock,unlock}_*.
1118         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1119         lowlevellock.h and pthread-errnos.h.
1120         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1121         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1122         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1123         __lll_mutex_{lock,unlock}_*.
1124         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1125         lowlevellock.h and pthread-errnos.h.
1126         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1127         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1128         __lll_mutex_{lock,unlock}_*.
1129         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1130         lowlevellock.h.
1131         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1132         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1133         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1134         (__condvar_tw_cleanup): Likewise.
1135         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1136         lowlevellock.h.
1137         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1138         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1139         __lll_mutex_{lock,unlock}_*.
1140         ( __condvar_w_cleanup): Likewise.
1141         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1142         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1144         lowlevellock.h.
1145         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1146         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1147         __lll_mutex_{lock,unlock}_*.
1148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1149         lowlevellock.h.
1150         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1151         FUTEX_PRIVATE_FLAG): Remove.
1152         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1153         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1154         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1155         lowlevellock.h.
1156         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1157         FUTEX_PRIVATE_FLAG): Remove.
1158         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1159         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1160         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1161         lowlevellock.h.
1162         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1163         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1164         __lll_mutex_{lock,unlock}_*.
1165         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1166         lowlevellock.h.
1167         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1168         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1169         __lll_mutex_{lock,unlock}_*.
1170         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1171         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1172         (__new_sem_post): Use standard initial exec code sequences.
1173         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1174         lowlevellock.h.
1175         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1176         FUTEX_PRIVATE_FLAG): Remove.
1177         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1178         exec code sequences.
1179         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1180         (__new_sem_trywait): Use standard initial exec code sequences.
1181         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1182         (__new_sem_wait): Use standard initial exec code sequences.
1184 2007-07-31  Anton Blanchard  <anton@samba.org>
1186         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1187         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1188         atomic_full_barrier.
1190 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1192         * allocatestack.c (stack_cache_lock): Change type to int.
1193         (get_cached_stack, allocate_stack, __deallocate_stack,
1194         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1195         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1196         as second argument to lll_lock and lll_unlock macros on
1197         stack_cache_lock.
1198         * pthread_create.c (__find_in_stack_list): Likewise.
1199         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1200         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1201         as second argument.
1202         * descr.h (struct pthread): Change lock and setxid_futex field
1203         type to int.
1204         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1205         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1206         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1207         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1208         Likewise.
1209         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1210         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1211         * pthreadP.h (__attr_list_lock): Change type to int.
1212         * pthread_attr_init.c (__attr_list_lock): Likewise.
1213         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1214         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1215         lll_{,un}lock.
1216         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1217         also for lll_futex_{wake,wait}.
1218         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1219         a pointer to const.
1220         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1221         LLL_SHARED as second argument to lll_{,un}lock.
1222         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1223         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1224         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1225         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1226         Likewise.
1227         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1228         as second argument to lll_{,un}lock macros on pd->lock.
1229         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1230         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1231         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1232         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1233         Likewise.
1234         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1235         Likewise.
1236         * pthread_once.c (once_lock): Change type to int.
1237         (__pthread_once): Pass LLL_PRIVATE as second argument to
1238         lll_{,un}lock macros on once_lock.
1239         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1240         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1241         rwlock->__data.__shared as second argument to them and similarly
1242         for lll_futex_w*.
1243         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1244         Likewise.
1245         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1246         Likewise.
1247         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1248         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1249         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1250         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1251         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1252         to lll_{,un}lock macros on __sem_mappings_lock.
1253         * sem_open.c (check_add_mapping): Likewise.
1254         (__sem_mappings_lock): Change type to int.
1255         * semaphoreP.h (__sem_mappings_lock): Likewise.
1256         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1257         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1258         instead of lll_*mutex_*, pass LLL_SHARED as last
1259         argument.
1260         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1261         pass LLL_SHARED as last argument.
1262         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1263         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1264         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1265         pass LLL_SHARED as last argument.
1266         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1267         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1268         LLL_SHARED as last argument.
1269         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1270         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1271         Similarly.
1272         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1273         __libc_lock_lock_recursive, __libc_lock_unlock,
1274         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1275         argument to lll_{,un}lock.
1276         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1277         _IO_lock_unlock): Likewise.
1278         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1279         compound literal.
1280         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1281         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1282         __fork_lock.
1283         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1284         free_mem): Likewise.
1285         (__fork_lock): Change type to int.
1286         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1287         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1288         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1289         lll_futex_wake.
1290         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1291         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1292         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1293         New function.
1294         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1295         pass it through to lll_futex_*wait, only compile in when
1296         IS_IN_libpthread.
1297         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1298         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1299         argument and pass it through to lll_futex_*wait.
1300         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1301         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1302         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1303         inline functions to __lll_* resp. __lll_robust_*.
1304         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1305         (lll_mutex_dead): Add private argument.
1306         (__lll_lock_wait_private): New prototype.
1307         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1308         __lll_robust_lock_timedwait): Add private argument to prototypes.
1309         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1310         call __lll_lock_wait_private, otherwise pass private to
1311         __lll_lock_wait.
1312         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1313         __lll_robust_timedlock): Add private argument, pass it to
1314         __lll_*wait functions.
1315         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1316         call __lll_unlock_wake_private, otherwise pass private to
1317         __lll_unlock_wake.
1318         (__lll_robust_unlock): Add private argument, pass it to
1319         __lll_robust_unlock_wake.
1320         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1321         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1322         argument, pass it through to __lll_* inline function.
1323         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1324         (lll_lock_t): Remove.
1325         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1326         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1327         lll_cond_wake, lll_cond_broadcast): Remove.
1328         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1329         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1330         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1331         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1332         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1333         the header from assembler.  Renamed all lll_mutex_* resp.
1334         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1335         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1336         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1337         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1338         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1339         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1340         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1341         Remove prototype.
1342         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1343         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1344         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1345         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1346         MULTIPLE_THREADS_OFFSET as another asm operand.
1347         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1348         MULTIPLE_THREADS_OFFSET as last asm operand, call
1349         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1350         otherwise pass private as another argument to __lll_lock_wait.
1351         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1352         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1353         private as another argument to __lll_*lock_wait call.
1354         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1355         MULTIPLE_THREADS_OFFSET as another asm operand, call
1356         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1357         otherwise pass private as another argument to __lll_unlock_wake.
1358         (lll_robust_unlock): Add private argument, pass private as another
1359         argument to __lll_unlock_wake.
1360         (lll_robust_dead): Add private argument, use __lll_private_flag
1361         macro.
1362         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1363         LLL_MUTEX_LOCK_INITIALIZER.
1364         (lll_lock_t): Remove.
1365         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1366         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1367         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1368         lll_cond_wake, lll_cond_broadcast): Remove.
1369         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1370         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1371         2007-05-2{3,9} changes.
1372         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1373         kernel-features.h and lowlevellock.h.
1374         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1375         (LOAD_FUTEX_WAIT): Rewritten.
1376         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1377         define.
1378         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1379         (__lll_mutex_lock_wait): Rename to ...
1380         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1381         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1382         (__lll_mutex_timedlock_wait): Rename to ...
1383         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1384         contains private argument.  Don't compile in for libc.so.
1385         (__lll_mutex_unlock_wake): Rename to ...
1386         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1387         Don't compile in for libc.so.
1388         (__lll_timedwait_tid): Use __NR_gettimeofday.
1389         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1390         kernel-features.h and lowlevellock.h.
1391         (LOAD_FUTEX_WAIT): Define.
1392         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1393         define.
1394         (__lll_robust_mutex_lock_wait): Rename to ...
1395         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1396         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1397         macro.
1398         (__lll_robust_mutex_timedlock_wait): Rename to ...
1399         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1400         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1401         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1402         lowlevellock.h.
1403         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1404         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1405         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1406         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1407         to __lll_lock_wait in %edx.
1408         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1409         Include lowlevellock.h and pthread-errnos.h.
1410         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1411         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1412         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1413         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1414         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1415         __lll_unlock_wake.
1416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1417         Include lowlevellock.h and pthread-errnos.h.
1418         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1419         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1420         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1421         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1422         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1423         __lll_unlock_wake.
1424         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1425         Include lowlevellock.h.
1426         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1427         Don't define.
1428         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1429         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1430         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1431         __lll_unlock_wake.  Use __NR_gettimeofday.
1432         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1433         Include lowlevellock.h.
1434         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1435         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1436         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1437         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1438         and __lll_unlock_wake.
1439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1440         Include lowlevellock.h.
1441         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1442         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1443         MUTEX(%ebx) address in %edx rather than %ecx to
1444         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1445         and __lll_unlock_wake.  Move return value from %ecx to %edx
1446         register.
1447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1448         Include lowlevellock.h.
1449         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1450         Don't define.
1451         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1452         MUTEX(%ebp) address in %edx rather than %ecx to
1453         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1454         and __lll_unlock_wake.  Move return value from %ecx to %edx
1455         register.  Use __NR_gettimeofday.
1456         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1457         Include lowlevellock.h.
1458         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1459         Don't define.
1460         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1461         MUTEX(%ebp) address in %edx rather than %ecx to
1462         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1463         and __lll_unlock_wake.  Move return value from %ecx to %edx
1464         register.  Use __NR_gettimeofday.
1465         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1466         Include lowlevellock.h.
1467         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1468         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1469         MUTEX(%edi) address in %edx rather than %ecx to
1470         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1471         and __lll_unlock_wake.
1472         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1473         Include lowlevellock.h.
1474         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1475         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1476         MUTEX(%ebx) address in %edx rather than %ecx to
1477         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1478         and __lll_unlock_wake.  Move return value from %ecx to %edx
1479         register.
1480         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1481         lowlevellock.h.
1482         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1483         define.
1484         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1485         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1486         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1487         lowlevellock.h.
1488         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1489         (sem_timedwait): Use __NR_gettimeofday.
1490         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1491         lowlevellock.h.
1492         (LOCK): Don't define.
1493         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1494         lowlevellock.h.
1495         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1496         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1497         are waiters.
1498         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1499         2007-05-2{3,9} changes.
1500         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1501         kernel-features.h and lowlevellock.h.
1502         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1503         (LOAD_FUTEX_WAIT): Rewritten.
1504         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1505         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1506         (__lll_mutex_lock_wait): Rename to ...
1507         (__lll_lock_wait): ... this.  %esi is now private argument.
1508         Don't compile in for libc.so.
1509         (__lll_mutex_timedlock_wait): Rename to ...
1510         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1511         Don't compile in for libc.so.
1512         (__lll_mutex_unlock_wake): Rename to ...
1513         (__lll_unlock_wake): ... this.  %esi contains private argument.
1514         Don't compile in for libc.so.
1515         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1516         kernel-features.h and lowlevellock.h.
1517         (LOAD_FUTEX_WAIT): Define.
1518         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1519         (__lll_robust_mutex_lock_wait): Rename to ...
1520         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1521         Use LOAD_FUTEX_WAIT macro.
1522         (__lll_robust_mutex_timedlock_wait): Rename to ...
1523         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1524         private, use LOAD_FUTEX_WAIT macro.
1525         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1526         lowlevellock.h.
1527         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1528         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1529         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1530         __lll_lock_wait and __lll_unlock_wake.
1531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1532         Include lowlevellock.h and pthread-errnos.h.
1533         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1534         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1535         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1536         pass LLL_SHARED in %esi to both __lll_lock_wait and
1537         __lll_unlock_wake.
1538         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1539         Include lowlevellock.h and pthread-errnos.h.
1540         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1541         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1542         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1543         pass LLL_SHARED in %esi to both __lll_lock_wait and
1544         __lll_unlock_wake.
1545         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1546         Include lowlevellock.h.
1547         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1548         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1549         pass LLL_SHARED in %esi to both __lll_lock_wait and
1550         __lll_unlock_wake.
1551         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1552         Include lowlevellock.h.
1553         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1554         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1555         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1556         and __lll_unlock_wake.
1557         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1558         Include lowlevellock.h.
1559         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1560         Don't define.
1561         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1562         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1563         and __lll_unlock_wake.
1564         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1565         Include lowlevellock.h.
1566         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1567         Don't define.
1568         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1569         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1570         and __lll_unlock_wake.
1571         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1572         Include lowlevellock.h.
1573         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1574         Don't define.
1575         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1576         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1577         and __lll_unlock_wake.
1578         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1579         Include lowlevellock.h.
1580         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1581         Don't define.
1582         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1583         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1584         and __lll_unlock_wake.
1585         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1586         Include lowlevellock.h.
1587         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1588         Don't define.
1589         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1590         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1591         and __lll_unlock_wake.
1592         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1593         lowlevellock.h.
1594         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1595         define.
1596         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1597         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1598         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1599         lowlevellock.h.
1600         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1601         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1602         lowlevellock.h.
1603         (LOCK): Don't define.
1604         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1605         lowlevellock.h.
1606         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1607         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1608         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1609         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1610         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1611         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1612         (__lll_lock_wait_private): New function.
1613         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1614         it to lll_futex_*wait.  Don't compile in for libc.so.
1615         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1616         Remove.
1617         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1618         (struct sparc_pthread_barrier): Remove.
1619         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1620         struct sparc_pthread_barrier.  Pass
1621         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1622         and lll_futex_wait macros.
1623         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1624         Remove.
1625         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1626         Include sparc pthread_barrier_wait.c instead of generic one.
1628 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1630         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1632         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1633         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1634         %ecx.
1635         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1636         (pthread_rwlock_timedwrlock): Likewise.
1637         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1638         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1640 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1642         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1644 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1646         * tst-locale2.c (useless): Add return statement.
1648 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1650         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1651         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1652         * pthread_create.c (start_thread): Likewise.
1653         * init.c (sighandler_setxid): Likewise.
1654         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1655         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1656         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1657         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1658         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1659         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1660         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1661         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1662         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1663         Likewise.
1664         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1665         Likewise.
1666         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1667         Likewise.
1668         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1669         __rtld_notify): Likewise.
1670         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1671         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1672         __pthread_once): Likewise.
1673         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1674         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1675         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1676         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1677         (lll_futex_wait): Add private argument, define as wrapper around
1678         lll_futex_timed_wait.
1679         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1680         use __lll_private_flag macro.
1681         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1682         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1683         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1684         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1685         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1686         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1687         (lll_futex_wait): Add private argument, define as wrapper around
1688         lll_futex_timed_wait.
1689         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1690         use __lll_private_flag macro.
1691         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1692         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1693         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1694         Define.
1695         (lll_futex_timed_wait, lll_futex_wake): Use it.
1696         (lll_private_futex_wait, lll_private_futex_timed_wait,
1697         lll_private_futex_wake): Removed.
1698         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1699         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1700         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1701         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1702         (lll_futex_wait): Add private argument, define as wrapper around
1703         lll_futex_timed_wait.
1704         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1705         use __lll_private_flag macro.
1706         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1707         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1708         to lll_futex_*.
1709         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1710         (lll_private_futex_wait, lll_private_futex_timed_wait,
1711         lll_private_futex_wake): Removed.
1712         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1713         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1714         (lll_private_futex_wait, lll_private_futex_timed_wait,
1715         lll_private_futex_wake): Removed.
1716         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1717         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1718         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1719         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1720         (lll_futex_wait): Add private argument, define as wrapper around
1721         lll_futex_timed_wait.
1722         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1723         use __lll_private_flag macro.
1724         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1725         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1726         to lll_futex_*.
1727         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1728         Define.
1729         (lll_futex_timed_wait, lll_futex_wake): Use it.
1730         (lll_private_futex_wait, lll_private_futex_timed_wait,
1731         lll_private_futex_wake): Removed.
1733 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1735         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1736         of the structure for sparc32.
1738 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1740         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1742 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1744         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1745         code used when private futexes are assumed.
1746         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1747         Likewise.
1749 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1751         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1752         (__lll_private_flag): Define.
1753         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1754         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1755         __lll_private_flag.
1756         (lll_private_futex_wait, lll_private_futex_timedwait,
1757         lll_private_futex_wake): Define as wrapper around non-_private
1758         macros.
1759         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1760         (__lll_private_flag): Define.
1761         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1762         (lll_private_futex_wait, lll_private_futex_timedwait,
1763         lll_private_futex_wake): Define as wrapper around non-_private
1764         macros.
1766 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1768         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1769         parameter to lll_futex_wait call.
1770         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1772         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1773         Replace lll_futex_wait with lll_private_futex_wait.
1774         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1775         Add LLL_SHARED parameter to lll_futex_wake().
1777         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1778         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1779         lll_private_futex_wake.
1780         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1781         bit from private parm before syscall.
1782         (lll_futex_timed_wait): Likewise.
1783         (lll_futex_wake): Likewise.
1784         (lll_futex_wake_unlock): Likewise.
1785         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1786         (lll_robust_mutex_unlock): Likewise.
1787         (lll_mutex_unlock_force): Likewise.
1788         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1790 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1792         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1793         compilation when unconditionally using private futexes.
1794         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1795         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1796         Likewise.
1797         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1798         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1800 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1802         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1803         Define.
1805 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1807         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1808         kernel-features.h.
1810 2007-05-16  Roland McGrath  <roland@redhat.com>
1812         * init.c (__nptl_initial_report_events): New variable.
1813         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1814         to that.
1816 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1818         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1819         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1821 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1823         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1824         implementation.
1826 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1828         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1829         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1830         * pthread_mutex_timedlock.c: Likewise.
1831         * pthread_mutex_trylock.c: Likewise.
1832         * pthread_mutex_unlock.c: Likewise.
1834 2007-06-17  Andreas Schwab  <schwab@suse.de>
1836         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1837         sections.
1839 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1841         * allocatestack.c (allocate_stack): Make code compile if
1842         __ASSUME_PRIVATE_FUTEX is set.
1844 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1847         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1849         (__pthread_rwlock_wrlock): Likewise.
1850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1851         (pthread_rwlock_timedrdlock): Likewise.
1852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1853         (pthread_rwlock_timedwrlock): Likewise.
1854         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1855         (__pthread_rwlock_unlock): Likewise.
1857 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1859         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1860         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1861         Split __flags into __flags, __shared, __pad1 and __pad2.
1862         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1863         futexes if they are available.
1864         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1865         in libc-lowlevellock.S allow using private futexes.
1866         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1867         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1868         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1869         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1870         lll_private_futex_timed_wait and lll_private_futex_wake.
1871         (lll_robust_mutex_unlock): Fix typo.
1872         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1873         field in futex command setup.
1874         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1875         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1876         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1877         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1878         if they are available.  Remove clear_once_control.
1879         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1880         futexes if they are available.
1881         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1882         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1883         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1884         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1885         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1886         Wake only when there are waiters.
1887         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1888         support.  Indicate that there are waiters.  Remove unnecessary
1889         extra cancellation test.
1890         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1891         left-over duplication of __sem_wait_cleanup.
1893 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1895         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1896         parameter to lll_futex_wait, lll_futex_timed_wait, and
1897         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1898         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1899         lll_private_futex_wake.
1900         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1901         * allocatestack.c: Adjust use of lll_futex_* macros.
1902         * init.c: Likewise.
1903         * lowlevellock.h: Likewise.
1904         * pthread_barrier_wait.c: Likewise.
1905         * pthread_cond_broadcast.c: Likewise.
1906         * pthread_cond_destroy.c: Likewise.
1907         * pthread_cond_signal.c: Likewise.
1908         * pthread_cond_timedwait.c: Likewise.
1909         * pthread_cond_wait.c: Likewise.
1910         * pthread_create.c: Likewise.
1911         * pthread_mutex_lock.c: Likewise.
1912         * pthread_mutex_setprioceiling.c: Likewise.
1913         * pthread_mutex_timedlock.c: Likewise.
1914         * pthread_mutex_unlock.c: Likewise.
1915         * pthread_rwlock_timedrdlock.c: Likewise.
1916         * pthread_rwlock_timedwrlock.c: Likewise.
1917         * pthread_rwlock_unlock.c: Likewise.
1918         * sysdeps/alpha/tls.h: Likewise.
1919         * sysdeps/i386/tls.h: Likewise.
1920         * sysdeps/ia64/tls.h: Likewise.
1921         * sysdeps/powerpc/tls.h: Likewise.
1922         * sysdeps/pthread/aio_misc.h: Likewise.
1923         * sysdeps/pthread/gai_misc.h: Likewise.
1924         * sysdeps/s390/tls.h: Likewise.
1925         * sysdeps/sh/tls.h: Likewise.
1926         * sysdeps/sparc/tls.h: Likewise.
1927         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1928         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1929         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1930         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1931         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1932         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1933         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1934         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1935         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1936         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1937         Likewise.
1938         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1939         * sysdeps/x86_64/tls.h: Likewise.
1941 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1943         * pthread_getattr_np.c: No need to install a cancellation handler,
1944         this is no cancellation point.
1945         * pthread_getschedparam.c: Likewise.
1946         * pthread_setschedparam.c: Likewise.
1947         * pthread_setschedprio.c: Likewise.
1948         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1949         lll_unlock_wake_cb.
1950         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1951         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1952         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1953         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1954         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1955         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1956         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1957         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1958         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1959         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1961         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1963         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1964         whether there are more than one thread makes no sense here since
1965         we only call the slow path if the locks are taken.
1966         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1968         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1969         COND_NWAITERS_SHIFT.
1970         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1971         COND_CLOCK_BITS.
1972         * pthread_cond_init.c: Likewise.
1973         * pthread_cond_timedwait.c: Likewise.
1974         * pthread_cond_wait.c: Likewise.
1975         * pthread_condattr_getclock.c: Likewise.
1976         * pthread_condattr_setclock.c: Likewise.
1977         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1978         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1979         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1980         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1983 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1985         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1986         unistd.h.
1988         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1989         insn suffix.
1990         (THREAD_GSCOPE_GET_FLAG): Remove.
1991         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1992         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1993         changes.
1994         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1995         (THREAD_GSCOPE_GET_FLAG): Remove.
1996         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1997         instead of THREAD_GSCOPE_GET_FLAG.
1998         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1999         it.
2000         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2001         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2002         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2003         THREAD_GSCOPE_WAIT): Define.
2004         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2005         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2006         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2007         THREAD_GSCOPE_WAIT): Define.
2008         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2009         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2010         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2011         THREAD_GSCOPE_WAIT): Define.
2012         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2013         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2014         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2015         THREAD_GSCOPE_WAIT): Define.
2017 2007-05-24  Richard Henderson  <rth@redhat.com>
2019         * descr.h (struct pthread): Add header.gscope_flag.
2020         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2021         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2022         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2023         THREAD_GSCOPE_WAIT): Define.
2025 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2027         * init.c: Make it compile with older kernel headers.
2029         * tst-initializers1.c: Show through exit code which test failed.
2031         * pthread_rwlock_init.c: Also initialize __shared field.
2032         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2033         element in rwlock structure into four byte elements.  One of them is
2034         the new __shared element.
2035         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2036         Likewise.
2037         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2038         __shared, adjust names of other padding elements.
2039         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2040         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2041         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2042         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2043         FUTEX_PRIVATE_FLAG.
2044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2045         futex to use private operations if possible.
2046         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2047         Likewise.
2048         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2049         Likewise.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2051         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2053         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2054         Likewise.
2055         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2056         Likewise.
2057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2058         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2060 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2062         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2063         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2064         * pthread_rwlock_timedrdlock.c: Likewise.
2065         * pthread_rwlock_tryrdlock.c: Likewise.
2067         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2068         optimization.
2070         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2071         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2072         duplication of __sem_wait_cleanup.
2074         * allocatestack.c: Revert last change.
2075         * init.c: Likewise.
2076         * sysdeps/i386/tls.h: Likewise.
2077         * sysdeps/x86_64/tls.h: Likewise.
2078         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2079         header structure.
2080         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2082         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2083         Add private field.
2084         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2085         * pthread_barrier_init.c: Set private flag if pshared and private
2086         futexes are supported.
2087         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2088         private field in futex command setup.
2089         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2091 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2093         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2094         support.
2095         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2096         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2097         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2098         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2099         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2101         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2102         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2103         fields in the structure.
2104         (__old_sem_init): New function.
2105         * sem_open.c: Initialize all fields of the structure.
2106         * sem_getvalue.c: Adjust for renamed element.
2107         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2108         (gen-as-const-headers): Add structsem.sym.
2109         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2110         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2111         struct new_sem.  Add struct old_sem.
2112         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2113         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2114         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2115         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2116         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2117         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2118         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2119         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2120         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2121         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2122         * tst-sem10.c: New file.
2123         * tst-sem11.c: New file.
2124         * tst-sem12.c: New file.
2125         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2126         of struct sem.
2128 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2129             Jakub Jelinek  <jakub@redhat.com>
2131         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2132         Move __pthread_enable_asynccancel right before futex syscall.
2133         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2134         Likewise.
2136 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2138         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2139         THREAD_COPY_PRIVATE_FUTEX): Define.
2140         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2141         THREAD_COPY_PRIVATE_FUTEX): Define.
2142         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2143         * init.c (__pthread_initialize_minimal_internal): Use
2144         THREAD_SET_PRIVATE_FUTEX.
2146         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2147         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2148         THREAD_GSCOPE_FLAG_WAIT): Define.
2149         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2150         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2151         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2152         PTR_DEMANGLE.
2153         (THREAD_GSCOPE_GET_FLAG): Define.
2154         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2155         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2156         instead of ->header.gscope_flag directly.
2158 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2160         * init.c (__pthread_initialize_minimal_internal): Check whether
2161         private futexes are available.
2162         * allocatestack.c (allocate_stack): Copy private_futex field from
2163         current thread into the new stack.
2164         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2165         futexes if they are available.
2166         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2167         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2168         in libc-lowlevellock.S allow using private futexes.
2169         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2170         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2171         FUTEX_PRIVATE_FLAG.
2172         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2173         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2174         if they are available.
2175         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2176         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2177         * sysdeps/i386/tcb-offsets.sym: Likewise.
2178         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2179         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2181 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2183         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2184         Remove ptr_wait_lookup_done again.
2185         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2186         (__pthread_initialize_minimal_internal): Initialize
2187         _dl_wait_lookup_done pointer in _rtld_global directly.
2188         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2189         Remove code to code _dl_wait_lookup_done.
2190         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2191         encrypted for now.
2193 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2195         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2196         pthread_mutex_init failed with ENOTSUP.
2198 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2200         * allocatestack.c (__wait_lookup_done): New function.
2201         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2202         Add ptr_wait_lookup_done.
2203         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2204         * pthreadP.h: Declare __wait_lookup_done.
2205         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2206         Define macros to implement reference handling of global scope.
2207         * sysdeps/x86_64/tls.h: Likewise.
2208         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2209         Initialize GL(dl_wait_lookup_done).
2211 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2213         [BZ #4512]
2214         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2215         is detected.
2216         * pthread_mutex_timedlock.c: Likewise.
2217         * pthread_mutex_trylock.c: Likewise.
2218         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2220         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2221         * tst-robust9.c: New file.
2222         * tst-robustpi9.c: New file.
2224         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2225         unnecessary extra cancellation test.
2227 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2229         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2230         extra cancellation test.
2231         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2233 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2235         * descr.h (struct pthread): Rearrange members to fill hole in
2236         64-bit layout.
2238         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2239         (__pthread_setaffinity_new): If syscall was successful and
2240         RESET_VGETCPU_CACHE is defined, use it before returning.
2241         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2243 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2245         [BZ #4455]
2246         * tst-align2.c: Include stackinfo.h.
2247         * tst-getpid1.c: Likewise.
2249 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2251         [BZ #4455]
2252         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2253         * tst-getpid1.c (do_test): Likewise.
2255         [BZ #4456]
2256         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2257         (allocate_stack): Likewise.
2259 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2261         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2262         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2263         (__lll_robust_timedlock_wait): Likewise.
2264         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2266 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2268         [BZ #4465]
2269         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2270         * tst-cancel4.c (tf_fdatasync): New test.
2272 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2274         [BZ #4392]
2275         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2276         check mutexes like normal mutexes.
2278         [BZ #4306]
2279         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2280         Initialize the whole sigevent structure to appease valgrind.
2282 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2285         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2287 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2289         * tst-locale1.c: Avoid warnings.
2290         * tst-locale2.c: Likewise.
2292 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2294         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2295         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2297 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2299         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2300         __extern_always_inline where appropriate.
2301         * sysdeps/pthread/pthread.h: Likewise.
2303 2007-03-13  Richard Henderson  <rth@redhat.com>
2305         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2306         separate cfi regions for the two subsections.
2308 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2310         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2311         new thread, don't just decrement it.
2312         Patch by Suzuki K P <suzuki@in.ibm.com>.
2314 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2316         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2317         PTHFCT_CALL definition.
2319 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2321         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2322         available, don't use it.
2324 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2326         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2327         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2328         call into the kernel to delay.
2330 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2332         * tst-initializers1.c: We want to test the initializers as seen
2333         outside of libc, so undefined _LIBC.
2335         * pthread_join.c (cleanup): Avoid warning.
2337 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2339         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2340         (__lll_timedwait_tid): Add unwind info.
2342         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2343         function table, mangle the pointers.
2344         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2345         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2346         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2347         demangle pointers before use.
2348         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2349         demangle pointer.
2350         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2351         * sysdeps/pthread/setxid.h: Likewise.
2353 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2355         * tst-rwlock7.c: Show some more information in case of correct
2356         behavior.
2358 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2360         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2361         (lll_futex_timed_wait): Undo part of last change, don't negate
2362         return value.
2364 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2366         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2367         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2369 2006-12-28  David S. Miller  <davem@davemloft.net>
2371         * shlib-versions: Fix sparc64 linux target specification.
2373 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2375         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2376         Adjust include path for pthread_barrier_wait.c move.
2378 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2380         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2381         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2383 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2385         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2386         6 argument cancellable syscalls.
2387         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2388         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2389         6 argument cancellable syscalls.
2390         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2392 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2394         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2395         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2397 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2399         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2400         __sync_lock_release instead of __sync_lock_release_si.
2402 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2404         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2405         Define.
2406         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2407         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2408         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2409         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2410         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2411         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2412         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2413         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2414         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2415         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2416         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2418 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2420         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2421         * pthread_barrier_wait.c: ...here.
2422         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2423         * pthread_cond_broadcast.c: ...here.
2424         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2425         * pthread_cond_signal.c: ...here.
2426         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2427         * pthread_cond_timedwait.c: ...here.
2428         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2429         * pthread_cond_wait.c: ...here.
2430         * sysdeps/pthread/pthread_once.c: Move to...
2431         * pthread_once.c: ...here.
2432         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2433         * pthread_rwlock_rdlock.c: ...here.
2434         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2435         * pthread_rwlock_timedrdlock.c: ...here.
2436         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2437         * pthread_rwlock_timedwrlock.c: ...here.
2438         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2439         * pthread_rwlock_unlock.c: ...here.
2440         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2441         * pthread_rwlock_wrlock.c: ...here.
2442         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2443         * pthread_spin_destroy.c: ...here.
2444         * sysdeps/pthread/pthread_spin_init.c: Move to...
2445         * pthread_spin_init.c: ...here.
2446         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2447         * pthread_spin_unlock.c: ...here.
2448         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2449         * pthread_getcpuclockid.c: ...here.
2451         * init.c: USE_TLS support is now always enabled.
2452         * tst-tls5.h: Likewise.
2453         * sysdeps/alpha/tls.h: Likewise.
2454         * sysdeps/i386/tls.h: Likewise.
2455         * sysdeps/ia64/tls.h: Likewise.
2456         * sysdeps/powerpc/tls.h: Likewise.
2457         * sysdeps/s390/tls.h: Likewise.
2458         * sysdeps/sh/tls.h: Likewise.
2459         * sysdeps/sparc/tls.h: Likewise.
2460         * sysdeps/x86_64/tls.h: Likewise.
2462 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2464         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2465         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2466         failed.
2468         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2469         Define to THREAD_SELF->header.multiple_threads.
2470         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2471         Likewise.
2472         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2473         Likewise.
2474         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2475         (SINGLE_THREAD_P): Likewise.
2476         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2477         (SINGLE_THREAD_P): Likewise.
2478         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2479         (SINGLE_THREAD_P): Likewise.
2480         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2481         (SINGLE_THREAD_P): Likewise.
2482         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2483         Likewise.
2484         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2485         (SINGLE_THREAD_P): Likewise.
2486         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2487         (SINGLE_THREAD_P): Likewise.
2488         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2489         Likewise.
2491 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2493         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2494         by default rather than 2_3_3.
2496 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2498         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2499         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2500         atomic_* instead of catomic_* macros.
2502 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2504         [BZ #3285]
2505         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2506         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2507         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2508         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2509         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2510         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2511         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2512         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2513         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2514         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2515         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2516         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2517         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2519 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2521         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2522         cancelable syscalls with six parameters.
2524         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2525         operations instead of atomic_*.
2527 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2529         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2531 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2533         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2534         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2535         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2536         New file.
2537         * pthread_attr_setstack.c: Allow overwriting the version number of the
2538         new symbol.
2539         * pthread_attr_setstacksize.c: Likewise.
2540         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2541         it.
2542         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2543         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2545 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2547         [BZ #3251]
2548         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2549         Patch by Petr Baudis.
2551 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2553         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2555         * tst-cancel2.c (tf): Loop as long as something was written.
2557 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2559         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2560         mutexes wake all mutexes.
2561         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2562         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2563         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2565 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2567         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2568         to guarantee the thread is always canceled.
2570 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2572         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2573         Include stdlib.h.
2574         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2575         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2577         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2578         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2580 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2582         [BZ #3123]
2583         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2584         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2585         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2587         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2588         * Makefile (tests): Add tst-cond22.
2589         * tst-cond22.c: New file.
2591 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2593         [BZ #3124]
2594         * descr.h (struct pthread): Add parent_cancelhandling.
2595         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2596         cancelhandling value to child.
2597         * pthread_create.c (start_thread): If parent thread was canceled
2598         reset the SIGCANCEL mask.
2599         * Makefile (tests): Add tst-cancel25.
2600         * tst-cancel25.c: New file.
2602 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2603             Ulrich Drepper  <drepper@redhat.com>
2605         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2606         counterp if it is already zero.
2607         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2609 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2610             Roland McGrath  <roland@redhat.com>
2612         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2613         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2614         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2615         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2616         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2617         lll_robust_mutex_timedlock, lll_mutex_unlock,
2618         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2619         Add _L_*_ symbols around the subsection.
2620         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2621         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2623 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2624             Roland McGrath  <roland@redhat.com>
2626         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2627         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2628         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2629         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2630         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2631         lll_robust_mutex_timedlock, lll_mutex_unlock,
2632         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2633         Add _L_*_ symbols around the subsection.
2634         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2635         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2637 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2639         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2640         change because it can disturb too much existing code.  If real hard
2641         reader preference is needed we'll introduce another type.
2642         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2643         (pthread_rwlock_timedwrlock): Likewise.
2644         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2645         Likewise.
2647 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2649         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2650         reader preference.
2651         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2652         (pthread_rwlock_timedwrlock): Likewise.
2653         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2654         Likewise.
2656 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2658         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2659         Only define ifdef SHARED.
2661 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2663         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2664         (free_stacks): ...here.
2665         (__free_stack_cache): New function.
2666         * pthreadP.h: Declare __free_stack_cache.
2667         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2668         ptr_freeres.
2669         * init.c (pthread_functions): Initialize ptr_freeres.
2670         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2671         New freeres function.
2673 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2675         [BZ #3018]
2676         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2678 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2680         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2681         _XOPEN_REALTIME_THREADS.
2683 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2685         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2686         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2687         HAVE_CLOCK_GETTIME_VSYSCALL.
2688         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2690 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2692         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2693         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2694         * descr.h (struct priority_protection_data): New type.
2695         (struct pthread): Add tpp field.
2696         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2697         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2698         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2699         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2700         TPP mutexes.
2701         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2702         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2703         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2704         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2705         * tpp.c: New file.
2706         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2707         boosted by TPP.
2708         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2709         * pthread_mutexattr_getprioceiling.c
2710         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2711         in the SCHED_FIFO priority range.
2712         * pthread_mutexattr_setprioceiling.c
2713         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2714         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2715         if mutex is not TPP.  Ceiling is now in __data.__lock.
2716         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2717         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2718         is now in __data.__lock.  Add locking.
2719         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2720         * Makefile (libpthread-routines): Add tpp.
2721         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2722         * tst-tpp.h: New file.
2723         * tst-mutexpp1.c: New file.
2724         * tst-mutexpp6.c: New file.
2725         * tst-mutexpp10.c: New file.
2726         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2727         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2729 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2731         [BZ #2843]
2732         * pthread_join.c (pthread_join): Account for self being canceled
2733         when checking for deadlocks.
2734         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2735         (tf1): Don't print anything after pthread_join returns, this would be
2736         another cancellation point.
2737         (tf2): Likewise.
2738         * tst-join6.c: New file.
2739         * Makefile (tests): Add tst-join6.
2741 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2743         [BZ #2892]
2744         * pthread_setspecific.c (__pthread_setspecific): Check
2745         out-of-range index before checking for unused key.
2747         * sysdeps/pthread/gai_misc.h: New file.
2749 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2751         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2752         file.  Don't use sysctl.
2753         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2754         overwrite the file if this is likely not true.
2756 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2758         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2759         * Makefile (tests): Add tst-getpid3.
2760         * tst-getpid3.c: New file.
2762 2006-07-30  Roland McGrath  <roland@redhat.com>
2764         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2766         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2767         (pause_not_cancel): New macro.
2768         (nanosleep_not_cancel): New macro.
2769         (sigsuspend_not_cancel): New macro.
2770         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2771         nanosleep_not_cancel macro from <not-cancel.h>.
2772         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2773         macro from <not-cancel.h>.
2775 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2776             Jakub Jelinek  <jakub@redhat.com>
2778         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2779         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2780         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2781         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2782         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2783         * pthread_mutex_lock.c: Likewise.
2784         * pthread_mutex_timedlock.c: Likewise.
2785         * pthread_mutex_trylock.c: Likewise.
2786         * pthread_mutex_unlock.c: Likewise.
2787         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2788         all mutexes.
2789         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2791         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2792         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2793         pthread-pi-defines.sym.
2794         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2795         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2797         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2798         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2799         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2800         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2801         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2802         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2803         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2804         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2805         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2806         * tst-mutex2.c: Likewise.
2807         * tst-mutex3.c: Likewise.
2808         * tst-mutex4.c: Likewise.
2809         * tst-mutex5.c: Likewise.
2810         * tst-mutex6.c: Likewise.
2811         * tst-mutex7.c: Likewise.
2812         * tst-mutex7a.c: Likewise.
2813         * tst-mutex8.c: Likewise.
2814         * tst-mutex9.c: Likewise.
2815         * tst-robust1.c: Likewise.
2816         * tst-robust7.c: Likewise.
2817         * tst-robust8.c: Likewise.
2818         * tst-mutexpi1.c: New file.
2819         * tst-mutexpi2.c: New file.
2820         * tst-mutexpi3.c: New file.
2821         * tst-mutexpi4.c: New file.
2822         * tst-mutexpi5.c: New file.
2823         * tst-mutexpi6.c: New file.
2824         * tst-mutexpi7.c: New file.
2825         * tst-mutexpi7a.c: New file.
2826         * tst-mutexpi8.c: New file.
2827         * tst-mutexpi9.c: New file.
2828         * tst-robust1.c: New file.
2829         * tst-robust2.c: New file.
2830         * tst-robust3.c: New file.
2831         * tst-robust4.c: New file.
2832         * tst-robust5.c: New file.
2833         * tst-robust6.c: New file.
2834         * tst-robust7.c: New file.
2835         * tst-robust8.c: New file.
2836         * Makefile (tests): Add the new tests.
2838         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2839         * pthread_mutex_destroy.c: Remove unneeded label.
2841 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2843         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2844         computations to compile time.
2846 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2848         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2850 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2852         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2854 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2856         * pthread_key_create.c (__pthread_key_create): Do away with
2857         __pthread_keys_lock.
2859         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2860         (__kernel_cpumask_size): Mark as hidden.
2861         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2863         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2864         * semaphoreP.h (__sem_mappings_lock): Likewise.
2866 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2868         * pthread_atfork.c: Mark __dso_handle as hidden.
2870 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2872         [BZ #2644]
2873         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2874         the reload problem.  Change the one path in pthread_cancel_init
2875         which causes the problem.  Force gcc to reload.  Simplify callers.
2876         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2877         (_Unwind_GetBSP): Undo last patch.
2879 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2881         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2882         function pointer is reloaded after pthread_cancel_init calls.
2884         [BZ #2644]
2885         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2886         pointers are reloaded after pthread_cancel_init calls.
2888 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2890         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2891         __always_inline.
2893 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2895         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2896         Allocate new object which is passed to timer_sigev_thread so that
2897         the timer can be deleted before the new thread is scheduled.
2899 2006-04-26  Roland McGrath  <roland@redhat.com>
2901         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2903 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2906         suffix for conditional jumps.
2907         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2908         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2909         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2910         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2911         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2912         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2914         * init.c (sigcancel_handler): Compare with correct PID even if the
2915         thread is in the middle of a fork call.
2916         (sighandler_setxid): Likewise.
2917         Reported by Suzuki K P <suzuki@in.ibm.com> .
2919 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2921         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2923 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2925         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2926         fails [Coverity CID 105].
2928 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2930         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2932 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2934         [BZ #2505]
2935         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2936         Define __lll_rel_instr using lwsync.
2938 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2940         * allocatestack.c (allocate_stack): Always initialize robust_head.
2941         * descr.h: Define struct robust_list_head.
2942         (struct pthread): Use robust_list_head in robust mutex list definition.
2943         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2944         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2945         (__pthread_initialize_minimal_internal): Register robust_list with
2946         the kernel.
2947         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2948         Declare __set_robust_list_avail.
2949         * pthread_create.c (start_thread): Register robust_list of new thread.
2950         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2951         waiters.
2952         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2953         number of users, it's unreliable.
2954         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2955         set_robust_list syscall is available.
2956         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2957         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2958         Set robust_head.list_op_pending before trying to lock a robust mutex.
2959         * pthread_mutex_timedlock.c: Likewise.
2960         * pthread_mutex_trylock.c: Likewise.
2961         * pthread_mutex_unlock.c: Likewise for unlocking.
2962         * Makefile (tests): Add tst-robust8.
2963         * tst-robust8.c: New file.
2965 2006-03-08  Andreas Schwab  <schwab@suse.de>
2967         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2968         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2970 2006-03-05  Roland McGrath  <roland@redhat.com>
2972         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2973         and $config_os doesn't match *linux*.
2975 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2977         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2978         Use __syscall_error.
2979         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2980         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2981         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2982         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2983         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2984         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2986 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2988         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2990 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2992         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2993         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2994         mutex.
2995         (__lll_robust_timedlock_wait): Likewise.
2996         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2997         (__lll_robust_lock_wait): Likewise.
2998         (__lll_robust_timedlock_wait): Likewise.
2999         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
3000         (__lll_robust_lock_wait): Likewise.
3001         (__lll_robust_timedlock_wait): Likewise.
3003 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
3005         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
3006         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3007         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3008         lll_robust_mutex_unlock): Define.
3009         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3011 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
3013         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
3014         instead of <clone.S>.
3016 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3018         * Makefile (libpthread-routines): Add
3019         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3020         and pthread_mutex_[sg]etprioceiling.
3021         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3022         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3023         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3024         pthread_mutex_setprioceiling.
3025         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3026         PTHREAD_PRIO_PROTECT): New enum values.
3027         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3028         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3029         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3030         prototypes.
3031         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3032         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3033         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3034         Define.
3035         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3036         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3037         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3038         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3039         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3040         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3041         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3042         protocol mutexes.
3043         * pthread_mutex_getprioceiling.c: New file.
3044         * pthread_mutex_setprioceiling.c: New file.
3045         * pthread_mutexattr_getprioceiling.c: New file.
3046         * pthread_mutexattr_setprioceiling.c: New file.
3047         * pthread_mutexattr_getprotocol.c: New file.
3048         * pthread_mutexattr_setprotocol.c: New file.
3050 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3052         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3054 2006-02-27  Roland McGrath  <roland@redhat.com>
3056         * sysdeps/pthread/Subdirs: List nptl here too.
3057         * configure (libc_add_on_canonical): New variable.
3059         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3061         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3062         self to get main source tree's file.
3063         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3064         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3065         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3066         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3067         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3068         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3069         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3070         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3071         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3072         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3073         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3074         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3075         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3077         * Makefile: Use $(sysdirs) in vpath directive.
3079         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3080         (CPPFLAGS-timer_routines.c): Likewise.
3082         * Makeconfig (includes): Variable removed.
3084 2006-02-26  Roland McGrath  <roland@redhat.com>
3086         * sysdeps/generic/pt-raise.c: Moved to ...
3087         * pt-raise.c: ... here.
3088         * sysdeps/generic/lowlevellock.h: Moved to ...
3089         * lowlevellock.h: ... here.
3091 2006-02-23  Roland McGrath  <roland@redhat.com>
3093         * descr.h (struct pthread): Add final member `end_padding'.
3094         (PTHREAD_STRUCT_END_PADDING): Use it.
3096 2006-02-20  Roland McGrath  <roland@redhat.com>
3098         * sysdeps/mips: Directory removed, saved in ports repository.
3099         * sysdeps/unix/sysv/linux/mips: Likewise.
3101 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3103         * tst-robust1.c: Add second mutex to check that the mutex list is
3104         handled correctly.
3106 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3108         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3109         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3110         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3111         lll_robust_mutex_unlock): New macros.
3112         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3113         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3114         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3115         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3116         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3118 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3120         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3121         definitions.
3122         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3124 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3126         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3127         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3128         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3129         (lll_robust_mutex_unlock): Likewise.
3131 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3133         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3134         Set robust_list.__next rather than robust_list.
3135         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3136         (__pthread_list_t): New typedef.
3137         (pthread_mutex_t): Replace __next and __prev fields with __list.
3138         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3139         (__pthread_list_t): New typedef.
3140         (pthread_mutex_t): Replace __next and __prev fields with __list.
3141         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3142         (__pthread_list_t, __pthread_slist_t): New typedefs.
3143         (pthread_mutex_t): Replace __next and __prev fields with __list.
3144         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3145         (__pthread_list_t, __pthread_slist_t): New typedefs.
3146         (pthread_mutex_t): Replace __next and __prev fields with __list.
3147         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3148         (__pthread_list_t, __pthread_slist_t): New typedefs.
3149         (pthread_mutex_t): Replace __next and __prev fields with __list.
3150         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3151         (__pthread_slist_t): New typedef.
3152         (pthread_mutex_t): Replace __next field with __list.
3154 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3156         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3157         PTHREAD_MUTEX_OWNERDEAD.
3158         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3159         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3160         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3161         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3162         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3163         to PTHREAD_MUTEX_INCONSISTENT.
3164         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3165         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3166         * pthread_mutex_trylock.c: Likewise.
3167         * pthread_mutex_timedlock.c: Likewise.
3168         * pthread_mutex_unlock.c: Likewise.
3169         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3170         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3171         lowlevelrobustlock.sym.
3172         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3173         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3174         definitions.
3175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3176         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3177         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3178         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3179         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3181 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3183         * allocatestack.c (allocate_stack): Initialize robust_list.
3184         * init.c (__pthread_initialize_minimal_internal): Likewise.
3185         * descr.h (struct xid_command): Pretty printing.
3186         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3187         robust_list.  Adjust macros.
3188         * pthread_create.c (start_thread): Adjust robust_list handling.
3189         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3190         but the owner for all robust mutex types.
3191         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3192         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3193         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3194         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3196         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3197         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3199 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3201         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3202         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3204 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3206         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3207         Return status.
3208         (lll_futex_timed_wait): Define.
3210 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3212         * tst-cancel4.c: Test ppoll.
3214 2006-01-18  Andreas Jaeger  <aj@suse.de>
3216         [BZ #2167]
3217         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3218         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3219         by Jim Gifford <patches@jg555.com>.
3221 2006-01-13  Richard Henderson  <rth@redhat.com>
3223         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3225 2006-01-10  Roland McGrath  <roland@redhat.com>
3227         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3228         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3229         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3230         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3231         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3232         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3233         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3234         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3235         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3236         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3238 2006-01-09  Roland McGrath  <roland@redhat.com>
3240         * tst-initializers1-c89.c: New file.
3241         * tst-initializers1-c99.c: New file.
3242         * tst-initializers1-gnu89.c: New file.
3243         * tst-initializers1-gnu99.c: New file.
3244         * Makefile (tests): Add them.
3245         (CFLAGS-tst-initializers1-c89.c): New variable.
3246         (CFLAGS-tst-initializers1-c99.c): New variable.
3247         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3248         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3250         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3251         Use __extension__ on anonymous union definition.
3252         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3253         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3254         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3255         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3256         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3258 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3260         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3261         Don't give the union a name because it changes the mangled name.
3262         Instead name the struct for __data.
3263         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3264         Likewise.
3265         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3266         Likewise.
3268 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3270         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3271         stack bias to mc_ftp field.
3273 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3275         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3276         being too clever and reloading the futex value where it shouldn't.
3278 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3280         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3281         correct type.
3283 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3285         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3286         Add cfi directives.
3288 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3290         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3291         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3292         rename in tcbhead_t.
3294         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3295         Don't give the union a name because it changes the mangled name.
3296         Instead name the struct for __data.
3297         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3298         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3299         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3300         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3301         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3302         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3304 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3306         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3307         Return status.
3308         (lll_futex_timed_wait): Define.
3309         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3310         * sysdeps/pthread/aio_misc.h: New file.
3312 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3314         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3316 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3318         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3319         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3320         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3322 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3324         * tst-cancel24.cc: Use C headers instead of C++ headers.
3326 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3328         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3329         sparc-linux configured glibc.
3330         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3331         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3332         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3333         atomic_compare_and_exchange_val_24_acq instead of
3334         atomic_compare_and_exchange_val_acq.
3335         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3336         instead of atomic_exchange_rel.
3337         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3338         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3339         file.
3340         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3341         file.
3342         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3343         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3344         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3345         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3346         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3347         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3348         New file.
3349         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3350         New file.
3351         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3352         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3353         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3354         file.
3355         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3356         file.
3357         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3359 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3361         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3362         mutex initializers.
3364 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3366         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3367         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3368         THREAD_COPY_POINTER_GUARD): Define.
3369         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3370         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3372 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3374         * version.c: Update copyright year.
3376 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3378         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3379         .eh_frame section, use cfi_* directives.
3380         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3382 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3384         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3385         now.
3387 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3389         * sysdeps/pthread/sigaction.c: Removed.
3390         * sigaction.c: New file.
3391         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3393 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3395         * Makefile (tests): Add tst-signal7.
3396         * tst-signal7.c: New file.
3398 2005-12-27  Roland McGrath  <roland@redhat.com>
3400         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3401         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3402         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3403         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3404         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3405         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3406         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3407         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3408         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3409         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3410         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3412 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3414         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3415         and __prev field to pthread_mutex_t.
3416         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3417         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3418         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3419         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3420         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3421         to pthread_mutex_t.
3423 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3425         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3426         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3427         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3428         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3429         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3430         and PTHREAD_MUTEXATTR_FLAG_BITS.
3431         * descr.h (struct pthread): Add robust_list field and define
3432         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3433         * pthread_mutexattr_getrobust.c: New file.
3434         * pthread_mutexattr_setrobust.c: New file.
3435         * pthread_mutex_consistent.c: New file.
3436         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3437         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3438         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3439         Adjust pthread_mutex_t initializers.
3440         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3441         field to pthread_mutex_t.
3442         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3443         and __prev field to pthread_mutex_t.
3444         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3445         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3446         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3447         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3448         * pthread_mutexattr_gettype.c: Likewise.
3449         * pthread_mutexattr_setpshared.c: Likewise.
3450         * pthread_mutexattr_settype.c: Likewise.
3451         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3452         Initialize mutex kind according to robust flag.
3453         * pthread_mutex_lock.c: Implement local robust mutex.
3454         * pthread_mutex_timedlock.c: Likewise.
3455         * pthread_mutex_trylock.c: Likewise.
3456         * pthread_mutex_unlock.c: Likewise.
3457         * pthread_create.c (start_thread): Mark robust mutexes which remained
3458         locked as dead.
3459         * tst-robust1.c: New file.
3460         * tst-robust2.c: New file.
3461         * tst-robust3.c: New file.
3462         * tst-robust4.c: New file.
3463         * tst-robust5.c: New file.
3464         * tst-robust6.c: New file.
3465         * tst-robust7.c: New file.
3466         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3467         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3468         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3469         tst-robust5, tst-robust6, and tst-robust7.
3471         * tst-typesizes.c: New file.
3472         * Makefile (tests): Add tst-typesizes.
3474         * tst-once3.c: More debug output.
3476 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3478         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3479         missing after last change.
3481         * version.c: Update copyright year.
3483 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3485         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3486         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3487         * pthread_mutex_trylock.c: Likewise.
3488         * pthread_mutex_timedlock.c: Likewise.
3489         * pthread_mutex_unlock.c: Likewise.
3491 2005-12-22  Roland McGrath  <roland@redhat.com>
3493         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3494         so that #include_next's search location is not reset to the -I..
3495         directory where <nptl/...> can be found.
3497 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3499         [BZ #1913]
3500         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3501         Fix unwind info.  Remove useless branch prediction prefix.
3502         * tst-cancel24.cc: New file.
3503         * Makefile: Add rules to build and run tst-cancel24.
3505 2005-12-21  Roland McGrath  <roland@redhat.com>
3507         * libc-cancellation.c: Use <> rather than "" #includes.
3508         * pt-cleanup.c: Likewise.
3509         * pthread_create.c: Likewise.
3510         * pthread_join.c: Likewise.
3511         * pthread_timedjoin.c: Likewise.
3512         * pthread_tryjoin.c: Likewise.
3513         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3514         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3515         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3516         * unwind.c: Likewise.
3518 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3520         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3521         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3522         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3523         THREAD_COPY_POINTER_GUARD): Define.
3525 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3527         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3528         rather than one.
3529         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3530         THREAD_COPY_POINTER_GUARD): Define.
3531         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3532         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3533         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3534         THREAD_COPY_POINTER_GUARD): Define.
3535         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3536         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3537         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3538         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3539         Use PTR_DEMANGLE for B0 if defined.
3541 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3543         * pthread_create.c (__pthread_create_2_1): Use
3544         THREAD_COPY_POINTER_GUARD if available.
3545         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3546         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3547         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3548         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3549         * sysdeps/x86_64/tls.h: Likewise.
3551 2005-12-15  Roland McGrath  <roland@redhat.com>
3553         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3555 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3557         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3558         sysdeps/generic.
3559         * errno-loc.c: New file.
3561 2005-12-12  Roland McGrath  <roland@redhat.com>
3563         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3564         adjustments before choosing stack size.  Update minimum stack size
3565         calculation to match allocate_stack change.
3567 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3569         * allocatestack.c (allocate_stack): Don't demand that there is an
3570         additional full page available on the stack beside guard, TLS, the
3571         minimum stack.
3573 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3575         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3576         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3578         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3579         compiling 32-bit code we must define __cleanup_fct_attribute.
3581 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3583         [BZ #1920]
3584         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3585         __attribute__ instead of __attribute.
3586         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3587         (__cleanup_fct_attribute): Likewise.
3589 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3591         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3592         a write barrier before writing libgcc_s_getcfa.
3594 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3596         * sysdeps/unix/sysv/linux/configure: Removed.
3598 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3600         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3601         optional init_array/fini_array support.
3603 2005-10-24  Roland McGrath  <roland@redhat.com>
3605         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3606         versioned_symbol use.
3608 2005-10-16  Roland McGrath  <roland@redhat.com>
3610         * init.c (__pthread_initialize_minimal_internal): Even when using a
3611         compile-time default stack size, apply the minimum that allocate_stack
3612         will require, and round up to page size.
3614 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3616         * Makefile ($(test-modules)): Remove static pattern rule.
3618 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3619             Ulrich Drepper  <drepper@redhat.com>
3621         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3622         alignment in callback function.
3623         * Makefile: Add rules to build and run tst-align3.
3624         * tst-align3.c: New file.
3626 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3628         * allocatestack.c (setxid_signal_thread): Add
3629         INTERNAL_SYSCALL_DECL (err).
3631 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3633         * allocatestack.c (setxid_signal_thread): Need to use
3634         atomic_compare_and_exchange_bool_acq.
3636 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3637             Jakub Jelinek  <jakub@redhat.com>
3639         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3640         CANCEL_RESTMASK.
3641         (struct pthread): Move specific_used field to avoid padding.
3642         Add setxid_futex field.
3643         * init.c (sighandler_setxid): Reset setxid flag and release the
3644         setxid futex.
3645         * allocatestack.c (setxid_signal_thread): New function.  Broken
3646         out of the bodies of the two loops in __nptl_setxid.  For undetached
3647         threads check whether they are exiting and if yes, don't send a signal.
3648         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3649         * pthread_create.c (start_thread): For undetached threads, check
3650         whether setxid bit is set.  If yes, wait until signal has been
3651         processed.
3653         * allocatestack.c (STACK_VARIABLES): Initialize them.
3654         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3656 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3658         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3659         waiters, awake all waiters on the associated mutex.
3661 2005-09-22  Roland McGrath  <roland@redhat.com>
3663         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3664         ../sysdeps/x86_64/hp-timing.h).
3666 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3668         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3669         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3670         (lll_futex_wake_unlock): Define.
3671         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3672         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3673         (lll_futex_wake_unlock): Define.
3674         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3675         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3676         (lll_futex_wake_unlock): Define.
3677         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3678         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3679         (lll_futex_wake_unlock): Define.
3680         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3681         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3682         (lll_futex_wake_unlock): Define.
3683         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3684         lll_futex_wake_unlock.
3685         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3686         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3687         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3689         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3690         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3692 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3694         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3695         Fix typo in register name.
3697 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3699         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3700         Use __sigfillset.  Document that sigfillset does the right thing wrt
3701         to SIGSETXID.
3703 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3705         [BZ #1102]
3706         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3707         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3708         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3709         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3710         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3711         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3712         in the structure.
3713         * Makefile (tests): Add tst-initializers1.
3714         (CFLAGS-tst-initializers1.c): Set.
3715         * tst-initializers1.c: New test.
3717 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3719         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3720         Make sure __flags are located at offset 48 from the start of the
3721         structure.
3723 2005-07-02  Roland McGrath  <roland@redhat.com>
3725         * Makeconfig: Comment fix.
3727 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3729         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3730         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3731         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3732         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3733         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3734         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3735         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3736         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3737         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3738         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3740 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3742         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3743         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3744         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3745         fields.
3746         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3747         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3748         field.  Put in sysinfo field unconditionally.
3749         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3750         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3751         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3752         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3753         fields.
3754         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3755         * pthread_create.c (__pthread_create_2_1): Use
3756         THREAD_COPY_STACK_GUARD macro.
3757         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3758         tests.
3759         * tst-stackguard1.c: New file.
3760         * tst-stackguard1-static.c: New file.
3762 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3764         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3765         Invoke CGOTSETUP and CGOTRESTORE.
3766         (CGOTSETUP, CGOTRESTORE): Define.
3768 2005-05-29  Richard Henderson  <rth@redhat.com>
3770         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3771         (tf_write, tf_writev): Use it.
3772         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3773         the system minimum.
3775 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3777         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3778         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3779         __librt_*_asynccancel@local.
3781 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3783         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3784         all occurrences of JUMPTARGET.  Instead append @local to labels.
3786 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3788         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3789         size/alignment of struct pthread rather than tcbhead_t.
3790         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3791         Likewise.
3792         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3793         Likewise.
3794         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3795         Likewise.
3797 2005-05-19  Richard Henderson  <rth@redhat.com>
3799         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3800         __sync_val_compare_and_swap, not explicit _si variant.
3801         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3803 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3805         [BZ #915]
3806         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3808 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3810         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3811         .eh_frame section, use cfi_* directives.
3813 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3815         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3816         of "" includes.
3818 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3820         [BZ #1075]
3821         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3822         aio_write blocks.
3824 2005-04-27  Roland McGrath  <roland@redhat.com>
3826         * Makefile (tests): Remove tst-clock2.
3828         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3829         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3830         translating to the kernel clockid_t for our own process/thread clock.
3832         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3834 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3836         * old_pthread_cond_init.c: Include <errno.h>.
3837         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3838         process shared or uses clock other than CLOCK_REALTIME.
3839         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3841 2005-04-13  David S. Miller  <davem@davemloft.net>
3843         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3844         * sysdeps/sparc/sparc64/clone.S: New file.
3846 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3848         [BZ #1102]
3849         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3850         __inline instead of inline.
3851         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3853 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3855         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3856         functionally equivalent, but shorter instructions.
3857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3858         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3859         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3860         Likewise.
3861         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3862         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3863         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3864         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3866         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3867         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3868         Likewise.
3869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3870         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3871         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3872         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3873         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3875 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3877         * sysdeps/mips/Makefile: New file.
3878         * sysdeps/mips/nptl-sysdep.S: New file.
3879         * sysdeps/mips/tcb-offsets.sym: New file.
3880         * sysdeps/mips/pthread_spin_lock.S: New file.
3881         * sysdeps/mips/pthread_spin_trylock.S: New file.
3882         * sysdeps/mips/pthreaddef.h: New file.
3883         * sysdeps/mips/tls.h: New file.
3884         * sysdeps/mips/jmpbuf-unwind.h: New file.
3885         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3886         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3887         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3888         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3889         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3890         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3891         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3892         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3893         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3894         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3896 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3898         [BZ #1112]
3899         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3900         variable to scerr.
3902 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3904         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3906 2005-02-25  Roland McGrath  <roland@redhat.com>
3908         * alloca_cutoff.c: Correct license text.
3909         * tst-unload.c: Likewise.
3910         * sysdeps/pthread/allocalim.h: Likewise.
3911         * sysdeps/pthread/pt-initfini.c: Likewise.
3912         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3913         * sysdeps/pthread/bits/sigthread.h: Likewise.
3914         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3915         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3917 2005-02-16  Roland McGrath  <roland@redhat.com>
3919         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3920         Use unsigned int * for ptr_nthreads.
3922 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3924         [BZ #721]
3925         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3926         gcc4.
3928 2005-02-07  Richard Henderson  <rth@redhat.com>
3930         [BZ #787]
3931         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3932         argument.
3934 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3936         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3937         order of arguments in invocation of atomic_add_zero.
3939 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3941         [BZ #737]
3942         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3943         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3944         at least gotntpoff relocation and addition.
3945         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3946         Likewise.
3947         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3948         Likewise.
3949         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3950         Likewise.
3952 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3954         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3955         entry for static tls deallocation fix.
3956         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3957         also contains information whether the memory pointed to is static
3958         TLS or not.
3959         * sysdeps/i386/tls.h: Likewise.
3960         * sysdeps/ia64/tls.h: Likewise.
3961         * sysdeps/powerpc/tls.h: Likewise.
3962         * sysdeps/s390/tls.h: Likewise.
3963         * sysdeps/sh/tls.h: Likewise.
3964         * sysdeps/sparc/tls.h: Likewise.
3965         * sysdeps/x86_64/tls.h: Likewise.
3967 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3969         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3971 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3973         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3974         %esp.
3975         * Makefile (tests): Add tst-align2.
3976         * tst-align2.c: New test.
3977         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3978         -mpreferred-stack-boundary=4.
3980 2004-12-18  Roland McGrath  <roland@redhat.com>
3982         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3983         New file removed withdrawn for the moment.
3985 2004-12-17  Richard Henderson  <rth@redhat.com>
3987         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3988         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3990 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3992         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3993         Increased PTHREAD_STACK_MIN.
3995         * tst-context1.c (stacks): Use bigger stack size.
3997 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3999         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
4000         * sysdeps/sparc/tcb-offsets.sym: Add TID.
4002 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
4004         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
4005         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
4006         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4008 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4010         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4012 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4014         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4015         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4017         * tst-getpid1.c: If child crashes, report this first.  Print which
4018         signal.
4020 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4022         * init.c (__pthread_initialize_minimal_internal): Also unblock
4023         SIGSETXID.
4025 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4027         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4028         _POSIX_THREAD_CPUTIME): Define to 0.
4029         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4030         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4031         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4032         __timer_signal_thread_tclk): Remove.
4033         (init_module): Remove their initialization.
4034         (thread_cleanup): Remove their cleanup assertions.
4035         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4036         __timer_signal_thread_tclk): Remove.
4037         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4038         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4039         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4041 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4043         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4044         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4046         * Makefile (tests): Add tst-getpid2.
4047         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4048         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4049         * tst-getpid2.c: New test.
4051 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4053         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4055 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4057         * Makefile (tests): Add tst-getpid1.
4058         * tst-getpid1.c: New file.
4059         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4060         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4062 2004-12-02  Roland McGrath  <roland@redhat.com>
4064         * Makefile (libpthread-nonshared): Variable removed.
4065         ($(objpfx)libpthread_nonshared.a): Target removed.
4066         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4067         These are now handled by generic magic from
4068         libpthread-static-only-routines being set.
4070 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4072         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4073         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4074         _POSIX_THREAD_PRIO_PROTECT): Define.
4075         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4076         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4077         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4079 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4081         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4082         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4083         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4084         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4085         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4086         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4087         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4089 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4091         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4093         * Makefile (libpthread-routines): Add pthread_setschedprio.
4094         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4095         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4096         * pthread_setschedprio.c: New file.
4098 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4100         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4101         * pthread_cancel.c (pthread_create): Likewise.
4103         * Makefile (libpthread-routines): Add vars.
4104         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4105         * init.c (__default_stacksize, __is_smp): Remove.
4106         * vars.c: New file.
4107         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4108         and define a wrapper macro.
4109         (PTHREAD_STATIC_FN_REQUIRE): Define.
4110         * allocatestack.c (__find_thread_by_id): Undefine.
4111         * pthread_create (__pthread_keys): Remove.
4112         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4113         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4114         PTHREAD_STATIC_FN_REQUIRE.
4116 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4118         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4119         parameter to REGISTER macro.
4121 2004-11-17  Roland McGrath  <roland@redhat.com>
4123         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4124         Make sure SIGCANCEL is blocked as well.
4126 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4128         * sysdeps/pthread/setxid.h: New file.
4129         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4130         (struct xid_command): Add forward decl.
4131         (struct pthread_functions): Change return type of __nptl_setxid hook
4132         to int.
4133         * pthreadP.h (__nptl_setxid): Change return type to int.
4134         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4135         calling thread, return its return value and set errno on failure.
4136         * descr.h (struct xid_command): Change id type to long array.
4138         * Makefile: Add rules to build and test tst-setuid1 and
4139         tst-setuid1-static.
4140         * tst-setuid1.c: New test.
4141         * tst-setuid1-static.c: New test.
4143 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4145         * Makefile (tests): Add tst-exit3.
4146         * tst-exit3.c: New test.
4148 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4150         * Makefile (tests): Add tst-exit2.
4151         * tst-exit2.c: New file.
4153 2004-11-09  Roland McGrath  <roland@redhat.com>
4155         [BZ #530]
4156         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4157         here, before calling clone.
4158         * pthread_create.c (start_thread): Don't do it here.
4160 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4162         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4164 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4166         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4167         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4168         assembler warning.
4170 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4172         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4173         if sched_priority is not between minprio and maxprio.
4175 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4177         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4178         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4180         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4181         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4183 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4185         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4186         not-cancelable I/O functions.
4188 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4190         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4191         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4192         make sure 2 is stored in the futex and we looked at the old value.
4193         Fix a few other problems to return the correct value.
4195 2004-10-14  Richard Henderson  <rth@redhat.com>
4197         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4198         make gcc4 happy.
4200 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4202         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4203         of pthread-functions.h and pthreaddef.h.
4204         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4206         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4207         Change __data.__nwaiters from int to unsigned int.
4209         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4210         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4212         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4213         before return type.
4215         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4216         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4218 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4220         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4221         test fails, remove message queue.
4222         (tf_msgsnd): Likewise.
4224 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4226         * tst-clock1.c: Change #ifdef to #if defined.
4227         * tst-clock2.c: Likewise.
4228         * tst-cond11.c: Likewise.
4230         * sysdeps/pthread/timer_create.c (timer_create): Use
4231         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4232         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4233         THREAD_CPUTIME.
4235 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4237         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4238         _POSIX_THREAD_CPUTIME): Define to 0.
4240 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4242         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4243         and _POSIX_THREAD_CPUTIME to zero.
4244         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4245         * tst-barrier2.c: Fix testing for POSIX feature.
4246         * tst-clock1.c: Likewise.
4247         * tst-clock2.c: Likewise.
4248         * tst-cond11.c: Likewise.
4249         * tst-cond4.c: Likewise.
4250         * tst-cond6.c: Likewise.
4251         * tst-flock2.c: Likewise.
4252         * tst-mutex4.c: Likewise.
4253         * tst-mutex9.c: Likewise.
4254         * tst-rwlock12.c: Likewise.
4255         * tst-rwlock4.c: Likewise.
4256         * tst-signal1.c: Likewise.
4257         * tst-spin2.c: Likewise.
4258         * sysdeps/pthread/posix-timer.h: Likewise.
4259         * sysdeps/pthread/timer_create.c: Likewise.
4260         * sysdeps/pthread/timer_routines.c: Likewise.
4262 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4264         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4265         (__lll_mutex_timedlock_wait): Address futex correctly.
4267         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4268         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4269         make sure 2 is stored in the futex and we looked at the old value.
4270         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4271         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4272         which might very well made the code not working at all before.
4273         [BZ #417]
4275 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4277         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4278         allow SIGSETXID to be sent.
4279         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4280         for SIGSETXID to be defined.
4281         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4282         SIGSETXID cannot be blocked.
4284         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4285         Add __extension__ to long long types.
4286         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4287         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4288         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4289         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4290         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4291         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4292         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4294 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4296         * descr.h (struct pthread): Add stopped_start field.
4297         * sysdeps/pthread/createthread.c (create_thread): Set
4298         start_stopped flag in descriptor for new thread appropriately.
4299         * pthread_create.c (start_thread): Only take lock to be stopped on
4300         startup if stopped_start flag says so.
4302 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4304         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4305         is created detached and if yes, do not try to free the stack in case
4306         the thread creation failed.
4307         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4308         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4309         case there has been no error.  [BZ #405]
4311         * pthread_create.c (start_thread): Don't wait for scheduler data
4312         etc to be set at the beginning of the function.  The cancellation
4313         infrastructure must have been set up.  And enable async
4314         cancellation before potentially going to sleep.  [BZ #401]
4316 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4318         * Versions: Remove exports for pthread_set*id_np functions.
4319         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4320         for now.
4321         * Makefile: Don't build pthread_set*id code for now.
4323 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4325         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4326         internal use.
4327         * allocatestack.c (__nptl_setxid): New function.
4328         * descr.h (struct xid_command): Define type.
4329         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4330         (sighandler_setxid): New function.
4331         (__pthread_initialize_minimal): Register sighandler_setxid for
4332         SIGCANCEL.
4333         * pt-allocrtsig.c: Update comment.
4334         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4335         Declare __nptl_setxid.
4336         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4337         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4338         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4339         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4340         and pthread_setresuid_np.
4341         * pthread_setgid_np.c: New file.
4342         * pthread_setuid_np.c: New file.
4343         * pthread_setegid_np.c: New file.
4344         * pthread_seteuid_np.c: New file.
4345         * pthread_setregid_np.c: New file.
4346         * pthread_setreuid_np.c: New file.
4347         * pthread_setresgid_np.c: New file.
4348         * pthread_setresuid_np.c: New file.
4349         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4350         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4351         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4352         and pthread_setresuid_np.
4353         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4354         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4355         pthread_setregid, and pthread_setresgid.
4357 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4359         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4360         ENOMEM when out of memory.
4362 2004-09-10  Roland McGrath  <roland@redhat.com>
4364         [BZ #379]
4365         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4366         code, since we don't try to use the broken CLONE_STOPPED any more.
4367         * pthread_create.c (start_thread): Likewise.
4369 2004-09-15  Richard Henderson  <rth@redhat.com>
4371         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4373 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4375         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4376         (__libc_unwind_longjmp): Delete macro and declare as function.
4377         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4378         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4379         nptl directory.
4380         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4381         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4382         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4384 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4386         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4387         for __USE_XOPEN2K.
4388         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4389         types also for __USE_XOPEN2K.
4390         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4391         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4392         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4393         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4394         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4395         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4396         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4397         [BZ #320]
4399 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4401         * sysdeps/pthread/pthread.h
4402         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4403         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4404         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4405         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4406         [BZ #375]
4408 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4410         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4411         PSEUDO to be used with . prefix.
4413         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4414         Use atomic_increment instead of atomic_exchange_and_add.
4415         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4416         Likewise.
4417         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4418         Likewise.
4419         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4420         Likewise.
4422         * allocatestack.c (allocate_stack): Use atomic_increment_val
4423         instead of atomic_exchange_and_add.
4424         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4425         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4426         Likewise.
4427         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4428         Likewise.
4430         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4431         the initialization function might throw.
4433 2005-09-05  Richard Henderson  <rth@redhat.com>
4435         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4436         Move definition inside libpthread, libc, librt check.  Provide
4437         definition for rtld.
4439 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4441         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4442         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4443         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4444         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4445         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4446         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4447         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4448         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4449         * unwind.c: Use it.
4451         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4452         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4453         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4454         Likewise.
4455         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4456         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4457         this is the last waiter, signal pthread_cond_destroy caller and
4458         avoid using the pthread_cond_t structure after unlock.
4459         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4460         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4461         Read clock type from the least significant bits of __nwaiters instead
4462         of __clock.
4463         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4464         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4466 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4468         [BZ #342]
4469         * Makefile (tests): Add tst-cond20 and tst-cond21.
4470         * tst-cond20.c: New test.
4471         * tst-cond21.c: New test.
4472         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4473         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4474         it unsigned int.
4475         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4476         Likewise.
4477         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4478         (pthread_cond_t): Likewise.
4479         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4480         Likewise.
4481         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4482         Likewise.
4483         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4484         Likewise.
4485         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4486         (cond_nwaiters): New.
4487         (clock_bits): New.
4488         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4489         if there are waiters not signalled yet.
4490         Wait until all already signalled waiters wake up.
4491         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4492         __nwaiters.  If pthread_cond_destroy has been called and this is the
4493         last waiter, signal pthread_cond_destroy caller and avoid using
4494         the pthread_cond_t structure after unlock.
4495         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4496         decrement it when leaving.  If pthread_cond_destroy has been called
4497         and this is the last waiter, signal pthread_cond_destroy caller.
4498         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4499         Likewise.  Read clock type from the least significant bits of
4500         __nwaiters instead of __clock.
4501         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4502         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4503         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4504         clock type just from the last COND_CLOCK_BITS bits of value.
4505         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4506         instead of __clock, just from second bit of condattr's value.
4508 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4510         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4511         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4512         != 64.
4513         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4515 2004-08-15  Roland McGrath  <roland@frob.com>
4517         * pthread_atfork.c: Update copyright terms including special exception
4518         for these trivial files, which are statically linked into executables
4519         that use dynamic linking for the significant library code.
4521 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4523         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4524         pthread_rwlock_rdlock.
4525         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4526         Decrease __nr_readers_queued after reacquiring lock.
4527         * sysdeps/pthread/pthread_rwlock_timedrdlock
4528         (pthread_rwlock_timedrdlock): Likewise.
4529         Reported by Bob Cook <bobcook47@hotmail.com>.
4531 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4533         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4534         before pthread_barrier_wait.
4536 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4539         Remove unnecessary exception handling data.
4541 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4543         [BZ #284]
4544         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4545         instead of clockid_t.
4547 2004-07-21  Roland McGrath  <roland@redhat.com>
4549         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4551 2004-07-19  Roland McGrath  <roland@redhat.com>
4553         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4555 2004-07-02  Roland McGrath  <roland@redhat.com>
4557         * configure: Don't exit.
4559 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4561         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4562         (__pthread_cond_timedwait): Check for invalid nanosecond in
4563         timeout value.
4565 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4567         * Makefile: Add rules to build and run tst-fini1.
4568         * tst-fini1.c: New file.
4569         * tst-fini1mod.c: New file.
4571 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4573         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4574         if no cancellation support is needed.
4575         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4576         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4577         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4578         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4579         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4580         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4581         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4582         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4583         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4585         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4586         only if not already defined.
4588 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4590         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4591         constraint "m" instead of "0" for futex.
4593         * shlib-versions: Add powerpc64-.*-linux.*.
4595 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4597         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4598         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4599         for valid tv_nsec.
4600         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4601         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4602         bits.
4604 2004-06-29  Roland McGrath  <roland@redhat.com>
4606         * Banner: NPTL no longer has its own version number.
4607         * Makefile (nptl-version): Variable removed.
4608         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4609         using $(version), the glibc version number.
4611 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4613         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4614         Fix branch offset for a PLT entry.
4615         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4616         Likewise.
4617         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4618         Likewise.
4619         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4620         Likewise.
4621         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4622         Likewise.
4624 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4626         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4627         unconditionally.
4629 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4631         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4632         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4633         instead of tv_sec.
4634         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4635         (pthread_rwlock_timedrdlock): Likewise.
4637 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4639         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4640         Set __r7 to val, not mutex.
4642 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4644         * Makefile: Add rules to build tst-rwlock14.
4645         * tst-rwlock14.c: New file.
4647 2004-06-24  Boris Hu  <boris.hu@intel.com>
4649         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4650         check.
4651         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4653 2004-06-19  Andreas Jaeger  <aj@suse.de>
4655         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4656         assembler in last patch.
4658 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4660         * sysdeps/pthread/pthread_cond_timedwait.c
4661         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4663         (__pthread_cond_timedwait): Check for invalid nanosecond in
4664         timeout value.
4665         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4666         * tst-cond19.c: New file.
4667         * Makefile: Add rules to build and run tst-cond19.
4669 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4671         * tst-context1.c (GUARD_PATTERN): Defined.
4672         (tst_context_t): Define struct containing ucontext_t & guard words.
4673         (ctx): Declare as an array of tst_context_t.
4674         (fct): Verify uc_link & guard words are still valid.
4675         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4677 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4679         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4680         Add __data.__futex field, reshuffle __data.__clock.
4681         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4682         (__pthread_cond_signal): Increment __futex at the same time as
4683         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4684         address of low 32-bits of __wakeup_seq to futex syscall.
4685         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4686         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4687         releasing internal lock to FUTEX_WAIT.
4688         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4689         (__pthread_cond_timedwait): Likewise.
4690         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4691         (FUTEX_CMP_REQUEUE): Define.
4692         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4693         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4694         Pass __futex value from before the unlock and __futex address instead
4695         of address of low 32-bits of __wakeup_seq to futex syscall.
4696         Fallback to FUTEX_WAKE all on any errors.
4698 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4700         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4701         comment typo.
4702         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4703         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4704         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4705         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4706         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4708 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4710         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4711         Add memory clobber to inline assembly.
4712         (__lll_mutex_trylock): Likewise.
4713         (__lll_mutex_cond_trylock): Likewise.
4715 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4717         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4718         Pass val argument as 6th system call argument in %r7.
4720 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4722         * Makefile (tests): Add tst-cond16.
4723         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4724         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4725         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4726         Add __data.__futex field, reshuffle __data.__clock.
4727         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4728         (__pthread_cond_signal): Increment __futex at the same time as
4729         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4730         address of low 32-bits of __wakeup_seq to futex syscall.
4731         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4732         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4733         releasing internal lock to FUTEX_WAIT.
4734         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4735         (__pthread_cond_timedwait): Likewise.
4736         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4737         (FUTEX_CMP_REQUEUE): Define.
4738         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4739         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4740         Pass __futex value from before the unlock and __futex address instead
4741         of address of low 32-bits of __wakeup_seq to futex syscall.
4742         Fallback to FUTEX_WAKE all on any errors.
4743         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4744         Define.
4745         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4746         internally.  Return non-zero if error, zero if success.
4747         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4748         Add __data.__futex field, reshuffle __data.__clock.
4749         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4750         Define.
4751         (lll_futex_requeue): Add val argument, return 1 unconditionally
4752         for the time being.
4753         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4754         Add __data.__futex field, reshuffle __data.__clock.
4755         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4756         Define.
4757         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4758         internally.  Return non-zero if error, zero if success.
4759         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4760         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4761         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4762         Define.
4763         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4764         internally.  Return non-zero if error, zero if success.
4765         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4766         Add __data.__futex field, reshuffle __data.__clock.
4767         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4768         Define.
4769         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4770         internally.  Return non-zero if error, zero if success.
4771         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4772         Add __data.__futex field, reshuffle __data.__clock.
4773         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4774         Add __data.__futex field, reshuffle __data.__clock.
4775         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4776         Increment __futex at the same time as __wakeup_seq or __total_seq.
4777         Pass address of __futex instead of address of low 32-bits of
4778         __wakeup_seq to futex syscall.
4779         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4780         Pass __futex value from before releasing internal lock
4781         to FUTEX_WAIT.
4782         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4783         Likewise.  Avoid unnecessary shadowing of variables.
4784         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4785         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4786         unlock and __futex address instead of address of low 32-bits of
4787         __wakeup_seq to futex_requeue macro, adjust for new return value
4788         meaning.
4789         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4790         (__pthread_cond_signal): Increment __futex at the same time as
4791         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4792         address of low 32-bits of __wakeup_seq to futex syscall.
4793         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4794         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4795         releasing internal lock to FUTEX_WAIT.
4796         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4797         (__pthread_cond_timedwait): Likewise.
4798         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4799         (FUTEX_CMP_REQUEUE): Define.
4800         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4801         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4802         Pass __futex value from before the unlock and __futex address instead
4803         of address of low 32-bits of __wakeup_seq to futex syscall.
4804         Fallback to FUTEX_WAKE all on any errors.
4806 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4808         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4809         Add nop to align the end of critical section.
4810         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4812 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4814         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4815         Add __broadcast_seq field.
4816         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4817         all waiters as woken with woken_seq and bump broadcast counter.
4818         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4819         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4820         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4821         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4823 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4825         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4826         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4827         Reported by Kaz Kojima.
4829 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4831         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4833 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4835         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4836         __broadcast_seq with bc_seq after acquiring internal lock instead of
4837         before it.
4839 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4841         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4842         compilation.
4843         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4844         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4845         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4846         (pthread_cond_t): Add __data.__broadcast_seq field.
4847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4848         (FRAME_SIZE): Define.
4849         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4850         Comment typo fixes.
4851         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4852         Define.
4853         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4854         typo fixes.
4855         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4856         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4857         fixes.
4859 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4861         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4862         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4863         Add __broadcast_seq field.
4864         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4865         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4866         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4867         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4868         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4870         all waiters as woken with woken_seq and bump broadcast counter.
4871         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4873         __broadcast_seq field.
4874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4875         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4876         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4877         * pthread_cond_init.c: Initialize __broadcast_seq field.
4878         * Makefile (tests): Add tst-cond17 and tst-cond18.
4879         Add .NOTPARALLEL goal.
4880         * tst-cond16.c: New file.  From Jakub.
4881         * tst-cond17.c: New file.  From Jakub.
4882         * tst-cond18.c: New file.  From Jakub.
4884 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4886         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4887         unwind info.
4889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4890         Parametrize frame size.  Correct some unwind info.
4891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4893 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4895         * tst-stack3.c: Note testing functionality beyond POSIX.
4897 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4899         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4900         Change conditional from ifdef to if.
4902 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4904         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4905         SYSDEP_CANCEL_ERROR): Define.
4906         (PSEUDO): Use it.
4908 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4910         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4912 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4914         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4916 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4918         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4919         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4920         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4921         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4923 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4925         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4926         thread has all signals blocked.
4928 2004-04-18  Andreas Jaeger  <aj@suse.de>
4930         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4931         (SEM_VALUE_MAX): Add missing brace.
4933 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4935         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4936         in rt subdir.
4937         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4938         * sysdeps/pthread/tst-mqueue8x.c: New test.
4939         * tst-cancel4.c: Update comment about message queues.
4941         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4942         return it_value { 0, 0 }.
4943         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4944         like SIGEV_SIGNAL.
4945         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4946         assertion for SIGEV_NONE.
4947         (thread_attr_compare): Compare all attributes, not just a partial
4948         subset.
4950 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4952         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4954 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4956         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4957         Just use a plain number.
4958         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4959         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4960         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4961         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4962         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4963         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4964         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4966 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4968         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4969         frame info.
4970         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4972 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4974         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4975         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4976         of calling sigwaitinfo.
4978 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4980         * allocatestack.c (allocate_stack): Set reported_guardsize
4981         unconditionally.
4982         * pthread_getattr_np.c (pthread_getattr_np): Use
4983         reported_guardsize instead of guardsize.
4984         * descr.h (struct pthread): Add reported_guardsize field.
4986 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4988         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4990 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4992         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4994 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4996         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4997         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4998         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4999         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
5000         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
5001         Define.
5002         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5003         (_POSIX_MESSAGE_PASSING): Define.
5004         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5005         (_POSIX_MESSAGE_PASSING): Define.
5006         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5007         (_POSIX_MESSAGE_PASSING): Define.
5009 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5011         * tst-context1.c (fct): Check whether correct stack is used.
5013 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5015         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5016         matching constraints for asm mem parameters.
5018         * tst-clock2.c (tf): Don't define unless needed.
5020 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5022         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5023         $(gnulib).
5025 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5027         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5028         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5029         * pthreadP.h: Declare __nptl_deallocate_tsd.
5030         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5031         Adjust caller.
5033         * Makefile (tests): Add tst-tsd5.
5034         * tst-tsd5.c: New file.
5036 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5038         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5039         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5040         is SHLIB_COMPAT check.
5041         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5042         (__pthread_attr_getaffinity_old): Likewise.
5043         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5044         (__pthread_getaffinity_old): Likewise.
5045         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5046         (__pthread_setaffinity_old): Likewise.
5048 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5050         * allocatestack.c (_make_stacks_executable): Call
5051         _dl_make_stack_executable first.
5053 2004-03-24  Roland McGrath  <roland@redhat.com>
5055         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5056         constraint instead of "0".
5058 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5060         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5061         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5063         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5064         code to avoid warning.
5066 2004-03-24  Andreas Jaeger  <aj@suse.de>
5068         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5069         (__pthread_attr_setaffinity_old): Remove const.
5071 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5073         * sysdeps/unix/sysv/linux/smp.h: New file.
5074         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5075         * init.c: Define __is_smp.
5076         (__pthread_initialize_minimal_internal): Call is_smp_system to
5077         initialize __is_smp.
5078         * pthreadP.h: Declare __is_smp.
5079         Define MAX_ADAPTIVE_COUNT is necessary.
5080         * pthread_mutex_init.c: Add comment regarding __spins field.
5081         * pthread_mutex_lock.c: Implement adaptive mutex type.
5082         * pthread_mutex_timedlock.c: Likewise.
5083         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5084         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5085         Add __spins field.
5086         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5087         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5088         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5089         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5090         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5091         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5092         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5093         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5094         lll_mutex_cond_trylock.
5095         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5096         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5097         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5098         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5099         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5100         Define BUSY_WAIT_NOP.
5101         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5102         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5104         * tst-mutex5.c: Add support for testing adaptive mutexes.
5105         * tst-mutex7.c: Likewise.
5106         * tst-mutex5a.c: New file.
5107         * tst-mutex7a.c: New file.
5108         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5111         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5112         vgettimeofday call might destroy the content.
5114         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5115         @pause in the loop.
5117         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5118         No need to restrict type of ret.  Make it int.  Add comment.
5120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5121         Remove unnecessary setne instruction.
5123 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5125         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5126         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5127         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5128         If realloc fails, break out of the loop.
5130 2004-03-20  Andreas Jaeger  <aj@suse.de>
5132         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5133         (__pthread_setaffinity_old): Fix interface.
5134         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5135         (__pthread_getaffinity_old): Likewise.
5137         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5138         (__pthread_setaffinity_new): Remove duplicate declaration.
5140 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5142         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5143         the return value to a safe register.
5144         (CDISABLE): Set the function argument correctly.
5146 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5148         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5149         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5150         Rewrite so that only one locked memory operation per round is needed.
5151         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5152         (pthread_barrier_wait): After wakeup, release lock only when the
5153         last thread stopped using the barrier object.
5154         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5155         (__pthread_cond_wait): Don't store mutex address if the current
5156         value is ~0l.  Add correct cleanup support and unwind info.
5157         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5158         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5159         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5160         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5161         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5162         Add correct cleanup support and unwind info.
5163         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5164         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5165         information for syscall wrappers.
5167 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5169         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5170         cpusetsize field, remove next.
5171         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5172         parameter for size of the CPU set.
5173         (pthread_setaffinity_np): Likewise.
5174         (pthread_attr_getaffinity_np): Likewise.
5175         (pthread_attr_setaffinity_np): Likewise.
5176         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5177         interface change, keep compatibility code.
5178         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5179         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5180         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5181         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5182         __pthread_getaffinity_np.
5183         * Versions: Add version for changed interfaces.
5184         * tst-attr3.c: Adjust test for interface change.
5185         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5186         increasing buffer sizes.
5187         * pthread_attr_destroy.c: Remove unused list handling.
5188         * pthread_attr_init.c: Likewise.
5190 2004-03-17  Roland McGrath  <roland@redhat.com>
5192         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5193         first argument to clock_getres so we ever enable kernel timers.
5195 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5197         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5199 2004-03-12  Richard Henderson  <rth@redhat.com>
5201         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5202         oldvalue from CENABLE to CDISABLE.
5204 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5206         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5207         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5208         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5209         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5211 2004-03-11  Richard Henderson  <rth@redhat.com>
5213         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5214         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5215         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5217 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5219         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5220         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5221         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5223 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5225         * forward.c (__pthread_cond_broadcast_2_0,
5226         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5227         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5228         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5230 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5232         * sysdeps/sh/tcb-offsets.sym: Add PID.
5233         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5234         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5236 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5238         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5239         include <sysdep-cancel.h>, vfork is no cancellation point.
5240         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5241         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5242         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5244 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5246         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5247         libc_hidden_def.
5248         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5249         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5250         Likewise.
5251         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5252         Likewise.
5253         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5254         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5255         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5256         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5257         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5259         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5260         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5261         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5262         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5263         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5264         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5266         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5267         a local register for saving old PID.  Negate PID in parent upon exit.
5269         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5270         tcb-offsets.h.
5271         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5272         before syscall, set to the old value in the parent afterwards.
5273         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5274         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5275         tcb-offsets.h.
5276         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5277         before syscall, set to the old value in the parent afterwards.
5278         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5279         * sysdeps/s390/tcb-offsets.sym: Add PID.
5281         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5282         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5283         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5284         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5285         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5286         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5288 2004-03-10  Andreas Schwab  <schwab@suse.de>
5290         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5291         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5292         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5294 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5296         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5297         * tst-cancel21.c (do_one_test): Likewise.
5298         Reported by Gordon Jin <gordon.jin@intel.com>.
5300 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5302         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5303         if non-zero and set to INT_MIN if zero.
5304         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5305         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5306         (SAVE_PID, RESTORE_PID): Define.
5307         (__vfork): Use it.
5308         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5309         Use relative path to avoid including NPTL i386/vfork.S.
5310         (SAVE_PID, RESTORE_PID): Define.
5311         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5312         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5313         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5314         tst-vfork2x.
5315         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5316         * tst-vfork1.c: New test.
5317         * tst-vfork2.c: New test.
5318         * tst-vfork1x.c: New test.
5319         * tst-vfork2x.c: New test.
5321 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5323         * sysdeps/i386/tcb-offsets.sym: Add PID.
5324         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5325         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5326         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5328 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5330         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5332 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5334         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5335         _rtld_global_ro.
5337 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5339         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5340         _rtld_global_ro.
5342         * tst-once4.c: Remove unnecessary macro definition.
5344         * tst-mutex7.c (do_test): Limit thread stack size.
5345         * tst-once2.c (do_test): Likewise.
5346         * tst-tls3.c (do_test): Likewise.
5347         * tst-tls1.c (do_test): Likewise.
5348         * tst-signal3.c (do_test): Likewise.
5349         * tst-kill6.c (do_test): Likewise.
5350         * tst-key4.c (do_test): Likewise.
5351         * tst-join4.c (do_test): Likewise.
5352         * tst-fork1.c (do_test): Likewise.
5353         * tst-context1.c (do_test): Likewise.
5354         * tst-cond2.c (do_test): Likewise.
5355         * tst-cond10.c (do_test): Likewise.
5356         * tst-clock2.c (do_test): Likewise.
5357         * tst-cancel10.c (do_test): Likewise.
5358         * tst-basic2.c (do_test): Likewise.
5359         * tst-barrier4.c (do_test): Likewise.
5361 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5363         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5365 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5367         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5368         (__pthread_cond_timedwait): Optimize wakeup test.
5369         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5370         (__pthread_cond_wait): Likewise.
5371         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5372         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5373         Likewise.
5375 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5377         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5378         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5379         the atomic instruction needed.
5380         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5381         (__lll_mutex_lock_wait): Likewise.
5383 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5385         * Makefile (tests): Add tst-cond14 and tst-cond15.
5386         * tst-cond14.c: New file.
5387         * tst-cond15.c: New file.
5389 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5391         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5392         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5393         needs to be implemented differently to be useful.
5395 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5397         * pthread_attr_setschedparam.c: Don't test priority against limits
5398         here.  Set ATTR_FLAG_SCHED_SET flag.
5399         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5400         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5401         from parent thread to child.  If attribute is used and scheduling
5402         parameters are not inherited, copy parameters from attribute or
5403         compute them.  Check priority value.
5404         * pthread_getschedparam.c: If the parameters aren't known yet get
5405         them from the kernel.
5406         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5407         ATTR_FLAG_POLICY_SET flag for thread.
5408         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5409         and ATTR_FLAG_POLICY_SET.
5411         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5413         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5414         fail if stack address hasn't been set.  Just return 0.
5416 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5418         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5419         libpthread for the files in this list.
5420         (CFLAGS-tst-unload): Removed.
5421         * tst-unload.c (do_test): Don't use complete path for
5422         LIBPHREAD_SO.
5424         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5425         tst-_res1mod2.
5427 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5429         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5430         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5431         operation per round is needed.
5432         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5433         (__lll_mutex_lock_wait): Likewise.
5435 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5437         * tst-cancel9.c (cleanup): Don't print to stderr.
5439 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5441         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5443 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5445         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5446         (__syscall_error_handler2): Call CDISABLE.
5447         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5448         (__syscall_error_handler2): Call CDISABLE.
5450         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5451         Release lock before the loop, don't reacquire it.
5453         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5455 2004-02-19  Andreas Schwab  <schwab@suse.de>
5457         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5458         Fix last change.
5460 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5462         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5463         (pthread_barrier_wait): After wakeup, release lock only when the
5464         last thread stopped using the barrier object.
5465         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5466         (pthread_barrier_wait): Likewise.
5467         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5468         Likewise.
5469         * Makefile (tests): Add tst-barrier4.
5470         * tst-barrier4.c: New file.
5472         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5473         (__pthread_cond_timedwait): Perform timeout test while holding
5474         internal lock to prevent wakeup race.
5475         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5476         * sysdeps/pthread/pthread_cond_timedwait.c
5477         (__pthread_cond_timedwait): Likewise.
5478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5479         (__pthread_cond_timedwait): Likewise.
5481 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5483         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5484         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5485         * Makefile (tests): Add tst-rwlock13.
5486         * tst-rwlock13.c: New test.
5488 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5491         (__condvar_tw_cleanup): Little optimization.
5492         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5494 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5496         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5497         libpthread as "lib" parameter to SHLIB_COMPAT.
5498         (__novmx_siglongjmp): Fix typo in function name.
5499         (__novmx_longjmp): Fix typo in function name.
5501 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5503         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5504         __builtin_expect.
5506         * sysdeps/generic/pt-longjmp.c: Moved to...
5507         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5509 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5511         * Makefile (libpthread-routines): Add pt-cleanup.
5512         * pt-longjmp.c: Removed.
5513         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5514         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5515         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5516         Version longjmp, siglongjmp for GLIBC_2.3.4.
5517         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5519 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5521         * sysdeps/pthread/pthread_cond_timedwait.c
5522         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5523         Reuse code.  Add __builtin_expects.
5525         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5526         (__pthread_cond_timedwait): Get internal lock in case timeout has
5527         passed before the futex syscall.
5528         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5530 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5532         * allocatestack.c: Pretty printing.
5534         * sysdeps/pthread/createthread.c (create_thread): Don't add
5535         CLONE_DETACHED bit if it is not necessary.
5537 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5539         * pthread_getattr_np.c: Include ldsodefs.h.
5541 2004-01-16  Richard Henderson  <rth@redhat.com>
5543         * allocatestack.c: Don't declare __libc_stack_end.
5544         * init.c (__pthread_initialize_minimal_internal): Likewise.
5545         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5547 2004-01-15  Richard Henderson  <rth@redhat.com>
5549         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5550         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5551         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5552         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5553         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5554         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5555         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5556         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5558 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5560         * init.c (pthread_functions): Make array const.
5562 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5564         * allocatestack.c (__make_stacks_executable): Change interface.
5565         Check parameters.  Pass parameter on to libc counterpart.
5566         * pthreadP.h: Change declaration.
5568 2004-01-13  Richard Henderson  <rth@redhat.com>
5570         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5571         prototype form.
5572         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5573         Likewise.
5575         * sysdeps/alpha/Makefile: New file.
5576         * sysdeps/alpha/tcb-offsets.sym: New file.
5577         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5578         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5580         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5581         on powerpc version.
5583 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5585         * Makefile (tests): Add tst-backtrace1.
5586         * tst-backtrace1.c: New test.
5588 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5590         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5591         register as second parameter to the REGISTER macro.
5592         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5593         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5594         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5595         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5596         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5597         of thread register as second parameter to REGISTER macro in 64 case.
5599 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5601         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5602         (CFLAGS-getpid.o): Defined.
5603         (CFLAGS-getpid.os): Defined.
5605 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5607         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5608         returned for main thread does not overlap with any other VMA.
5609         Patch by Jakub Jelinek.
5611 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5613         * tst-raise1.c: Include stdio.h.
5615 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5617         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5618         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5619         If pid is 0, set it to selftid.
5620         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5621         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5622         != 0, return self->tid without doing a syscall.
5623         * descr.h (struct pthread): Move pid field after tid.
5625         * Makefile (tests): Add tst-raise1.
5626         * tst-raise1.c: New file.
5628 2003-12-23  Roland McGrath  <roland@redhat.com>
5630         * tst-oddstacklimit.c: New file.
5631         * Makefile (tests): Add it.
5632         (tst-oddstacklimit-ENV): New variable.
5634         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5635         value up to page size for __default_stacksize.
5637 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5639         * Makefile (tests): Add tst-eintr5.
5640         * tst-eintr5.c: New file.
5642         * eintr.c (eintr_source): Prevent sending signal to self.
5644         * tst-eintr2.c (tf1): Improve error message.
5646 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5648         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5649         * sysdeps/unix/sysv/linux/getpid.c: New file.
5650         * pthread_cancel.c: Add comment explaining use of PID field.
5651         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5652         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5653         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5654         temporarily to signal the field must not be relied on and updated
5655         by getpid().
5656         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5657         temporarily negative.
5658         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5660 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5662         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5663         (eintr_source): If ARG != NULL, use pthread_kill.
5664         * tst-eintr1.c: Adjust for this change.
5665         * tst-eintr2.c: Likewise.
5666         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5667         * tst-eintr3.c: New file.
5668         * tst-eintr4.c: New file.
5670 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5672         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5673         if CANCELSTATE_BITMASK is set.
5674         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5675         Likewise.
5677         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5678         (tests-reverse): Add tst-cancel23.
5679         * tst-cancel22.c: New test.
5680         * tst-cancel23.c: New test.
5682 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5684         * tst-eintr1.c: Better error messages.
5686         * Makefile (tests): Add tst-eintr2.
5687         * tst-eintr2.c: New file.
5689 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5691         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5692         (CFLAGS-tst-cancelx21.c): Set.
5693         * tst-cancel21.c: New test.
5694         * tst-cancelx21.c: New test.
5696         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5697         comparison operand.
5698         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5699         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5700         * pt-longjmp.c: Include jmpbuf-unwind.h.
5701         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5702         _JMPBUF_UNWINDS.  Adjust compared pointers.
5703         * init.c (__pthread_initialize_minimal_internal): Initialize
5704         pd->stackblock_size.
5705         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5706         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5707         * sysdeps/i386/jmpbuf-unwind.h: New file.
5708         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5709         * sysdeps/s390/jmpbuf-unwind.h: New file.
5710         * sysdeps/sh/jmpbuf-unwind.h: New file.
5711         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5712         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5713         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5714         (_JMPBUF_CFA_UNWINDS): Remove.
5715         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5717 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5719         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5720         (CFLAGS-tst-cancelx20.c): Set.
5721         * tst-cancel20.c: New test.
5722         * tst-cancelx20.c: New test.
5724 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5726         * init.c (__pthread_initialize_minimal_internal): Don't treat
5727         architectures with separate register stack special here when
5728         computing default stack size.
5730 2003-12-17  Roland McGrath  <roland@redhat.com>
5732         * Makefile (tst-cancelx7-ARGS): New variable.
5733         Reportd by Greg Schafer <gschafer@zip.com.au>.
5735 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5737         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5738         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5739         (tst-stack3-ENV): Set.
5740         ($(objpfx)tst-stack3-mem): New.
5741         * tst-stack3.c: New test.
5743 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5745         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5746         Add unwind directives.  Drop unused .regstk directive.
5747         (_fini_EPILOG_BEGINS): Add unwind directives.
5749 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5751         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5752         Assume parameter is a pointer.
5753         (lll_futex_wake): Likewise.
5754         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5755         Likewise.
5756         (lll_futex_wake): Likewise.
5757         Reported by Boris Hu.
5758         * sysdeps/unix/sysv/linux/unregister-atfork.c
5759         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5761         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5763 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5765         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5766         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5767         __rtld_lock_initialize for ld.so lock.
5768         Patch in part by Adam Li <adam.li@intel.com>.
5770 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5772         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5773         in $(gnulib).  Also, remove stale comment.
5775 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5777         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5778         advantage of new syscall stub and optimize accordingly.
5780         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5781         from SYS_futex, to match expectations of
5782         sysdep.h:DO_INLINE_SYSCALL.
5783         (lll_futex_clobbers): Remove.
5784         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5785         (lll_futex_wake): Likewise.
5786         (lll_futex_requeue): Likewise.
5787         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5788         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5789         Jelinek).
5790         (__lll_mutex_lock): Likewise.
5791         (__lll_mutex_cond_lock): Likewise.
5792         (__lll_mutex_timed_lock): Likewise.
5793         (__lll_mutex_unlock): Likewise.
5794         (__lll_mutex_unlock_force): Likewise.
5796         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5797         comes before the include of <sysdep.h>.
5798         (THREAD_SELF_SYSINFO): New macro.
5799         (THREAD_SYSINFO): Likewise.
5800         (INIT_SYSINFO): New macro.
5801         (TLS_INIT_TP): Call INIT_SYSINFO.
5803         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5805         * sysdeps/pthread/createthread.c (create_thread): Use
5806         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5807         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5808         THREAD_SELF_SYSINFO instead of open code.
5809         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5810         (THREAD_SYSINFO): Likewise.
5812         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5814         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5816 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5818         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5819         instead of .init.  Patch by David Mosberger.
5821 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5823         * sysdeps/pthread/configure.in: Remove broken declaration in C
5824         cleanup handling check.
5826 2003-11-30  Andreas Jaeger  <aj@suse.de>
5828         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5829         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5830         Likewise.
5832 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5834         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5835         * pthread_attr_destroy.c: Include shlib-compat.h.
5836         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5837         is set in iattr->flags.
5838         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5840 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5842         * Makefile (distribute): Add tst-cleanup4aux.c.
5844         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5845         include.
5847 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5849         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5850         pthread_cond_signal.
5852         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5853         store mutex address if the current value is ~0l.
5854         * sysdeps/pthread/pthread_cond_timedwait.c
5855         (__pthread_cond_timedwait): Likewise.
5856         * sysdeps/pthread/pthread_cond_broadcast.c
5857         (__pthread_cond_broadcast): Don't use requeue for pshared
5858         condvars.
5860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5861         (__pthread_cond_wait): Don't store mutex address if the current
5862         value is ~0l.
5863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5864         (__pthread_cond_timedwait): Likewise.
5865         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5866         (__pthread_cond_broadcast): Don't use requeue for pshared
5867         condvars.
5869         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5870         element with ~0l for pshared condvars, with NULL otherwise.
5872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5873         (__pthread_cond_wait): Don't store mutex address if the current
5874         value is ~0l.
5875         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5876         (__pthread_cond_timedwait): Likewise.
5877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5878         (__pthread_cond_broadcast): Don't use requeue for pshared
5879         condvars.
5881         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5882         * tst-cond12.c: New file.
5883         * tst-cond13.c: New file.
5885 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5887         * sysdeps/pthread/configure.in: Make missing forced unwind support
5888         fatal.
5890 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5892         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5894 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5896         * Makefile: Add magic to clean up correctly.
5898 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5900         * unwind.c (FRAME_LEFT): Define.
5901         (unwind_stop): Handle old style cleanups here.
5902         (__pthread_unwind): Handle old style cleanups only if
5903         !HAVE_FORCED_UNWIND.
5904         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5905         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5906         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5907         ($(objpfx)tst-cleanupx4): Likewise.
5908         * tst-cleanup4.c: New test.
5909         * tst-cleanup4aux.c: New.
5910         * tst-cleanupx4.c: New test.
5912 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5914         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5915         lll_mutex_*lock macros to skip atomic operations on some archs.
5917 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5919         * sysdeps/pthread/tst-timer.c (main): Initialize
5920         sigev2.sigev_value as well.
5922 2003-10-15  Roland McGrath  <roland@redhat.com>
5924         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5925         is missing.
5926         * sysdeps/pthread/configure: Regenerated.
5928 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5930         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5931         locking macros.  No distinction between normal and mutex locking
5932         anymore.
5933         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5934         Merge bits from lowlevelmutex.S we still need.
5935         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5936         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5937         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5938         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5939         new mutex implementation.
5940         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5941         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5942         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5943         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5945         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5946         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5947         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5948         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5949         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5950         symbol for entry point to avoid cancellation.
5952 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5954         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5955         changes.
5956         (SAVE_OLDTYPE_0): Fix a typo.
5958 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5960         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5961         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5963 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5965         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5966         correct offset.
5968 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5970         * Makefile (tests): Add tst-cancel19.
5971         * tst-cancel19.c: New test.
5973 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5975         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5976         restoring of the old cancellation type.
5978 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5980         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5982 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5984         * sysdeps/pthread/malloc-machine.h: New file
5986 2003-09-24  Roland McGrath  <roland@redhat.com>
5988         * allocatestack.c (__make_stacks_executable): Don't ignore return
5989         value from _dl_make_stack_executable.
5991 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5993         * allocatestack.c (__make_stacks_executable): Also change
5994         permission of the currently unused stacks.
5996         * allocatestack.c (change_stack_perm): Split out from
5997         __make_stacks_executable.
5998         (allocate_stack): If the required permission changed between the time
5999         we started preparing the stack and queueing it, change the permission.
6000         (__make_stacks_executable): Call change_stack_perm.
6002         * Makefile: Build tst-execstack-mod locally.
6003         * tst-execstack-mod.c: New file.
6005 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6007         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6009 2003-09-23  Roland McGrath  <roland@redhat.com>
6011         * tst-execstack.c: New file.
6012         * Makefile (tests): Add it.
6013         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6014         (LDFLAGS-tst-execstack): New variable.
6016         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6017         whether to use PROT_EXEC for stack mmap.
6018         (__make_stacks_executable): New function.
6019         * pthreadP.h: Declare it.
6020         * init.c (__pthread_initialize_minimal_internal): Set
6021         GL(dl_make_stack_executable_hook) to that.
6023 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6025         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6026         recommendation from AMD re avoidance of lock prefix.
6028 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6030         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6031         lll_futex_timed_wait instead of lll_futex_wait.
6032         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6033         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6034         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6035         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6036         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6037         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6038         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6039         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6040         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6041         Completely revamp the locking macros.  No distinction between
6042         normal and mutex locking anymore.
6043         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6044         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6045         __lll_lock_timedwait): Fix prototypes.
6046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6047         __lll_lock_timedwait): Likewise.
6048         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6049         macros, add __builtin_expect.
6050         (lll_mutex_timedlock): Likewise.  Fix return value.
6051         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6052         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6053         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6054         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6055         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6056         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6057         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6058         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6060 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6062         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6063         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6064         operation if possible.
6066         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6067         like jumping over the lock prefix.
6069 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6071         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6072         locking macros.  No distinction between normal and mutex locking
6073         anymore.
6074         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6075         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6076         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6077         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6078         locking.  Merge bits from lowlevelmutex.S we still need.
6079         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6080         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6081         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6082         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6083         * Makefile (routines): Remove libc-lowlevelmutex.
6084         (libpthread-rountines): Remove lowlevelmutex.
6085         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6086         for new mutex implementation.
6087         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6089         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6090         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6091         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6092         Likewise.
6093         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6094         Likewise.
6095         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6096         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6097         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6098         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6100         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6101         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6102         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6103         Likewise.
6104         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6105         Likewise.
6106         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6107         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6109         Don't use requeue.
6110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6111         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6113 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6115         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6116         in parameters of asm with output parameters.
6118         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6119         type of DECR parameter to int.
6120         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6122 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6124         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6125         guardsize for each thread.
6127 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6129         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6130         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6131         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6133         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6134         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6135         NULL.
6136         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6137         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6138         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6139         (pthread_getaffinity_np): Add hidden_def.
6141         * Makefile (tests): Add tst-attr3.
6142         * tst-attr3.c: New test.
6144         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6146 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6148         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6149         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6151 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6153         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6154         * tst-align.c: Include tst-stack-align.h.
6155         (tf, do_test): Use TEST_STACK_ALIGN macro.
6157 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6159         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6160         variable.
6162 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6164         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6165         stack-related values for the initial thread.
6167 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6169         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6171 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6173         * pthread_mutex_lock.c: Minor code rearrangements.
6175 2003-09-05  Roland McGrath  <roland@redhat.com>
6177         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6178         Instead, include ../nptl_db/db_info.c to do its magic.
6179         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6180         (__pthread_pthread_key_2ndlevel_size): Likewise.
6181         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6182         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6183         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6184         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6185         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6186         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6187         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6188         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6189         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6190         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6191         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6192         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6193         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6194         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6195         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6196         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6197         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6199 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6201         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6202         of pthread_t to be compatible with LT.
6203         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6204         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6205         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6206         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6207         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6208         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6209         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6211 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6213         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6215 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6217         * unwind-forcedunwind.c: Move to...
6218         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6219         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6220         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6221         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6222         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6223         * unwind.c: Include jmpbuf-unwind.h.
6224         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6226 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6228         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6229         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6230         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6231         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6232         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6233         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6234         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6235         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6236         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6237         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6238         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6239         function.
6240         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6241         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6242         * Makefile (tests): Add tst-stack2.
6243         * tst-stack2.c: New test.
6244         * tst-stack1.c: Include limits.h and sys/param.h.
6245         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6247         * pthread_condattr_setpshared.c: Include errno.h.
6248         (pthread_condattr_setpshared): Return EINVAL if pshared
6249         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6251         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6252         defined symbol for entry point to avoid cancellation.
6253         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6254         Likewise.
6255         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6256         Likewise.
6257         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6258         Likewise.
6259         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6260         Likewise.
6261         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6262         Likewise.
6263         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6264         __close_nocancel, __read_nocancel, __write_nocancel,
6265         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6266         libpthread.so or librt.so, define to corresponding function
6267         without _nocancel suffix.
6268         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6269         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6270         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6272         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6274 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6276         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6277         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6279         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6280         in subsections has a symbol associated with it.
6282         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6283         defined symbol for entry point to avoid cancellation.
6284         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6286 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6288         * Makefile (tests): Add tst-tls5.
6289         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6290         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6291         ($(objpfx)tst-tls5): New.
6292         ($(objpfx)tst-tls6.out): Likewise.
6293         (tests): Depend on $(objpfx)tst-tls6.out.
6294         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6295         (do_test): Check pthread_self () return value alignment.
6296         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6297         (tf): Check pthread_self () return value alignment.
6298         * tst-tls5.c: New test.
6299         * tst-tls5.h: New.
6300         * tst-tls5mod.c: New.
6301         * tst-tls5moda.c: New.
6302         * tst-tls5modb.c: New.
6303         * tst-tls5modc.c: New.
6304         * tst-tls5modd.c: New.
6305         * tst-tls5mode.c: New.
6306         * tst-tls5modf.c: New.
6307         * tst-tls6.sh: New test.
6309         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6310         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6311         * init.c (pthread_functions): Initialize them.
6312         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6313         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6314         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6315         pthread_cond_timedwait@@GLIBC_2.3.2.
6317 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6319         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6320         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6321         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6322         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6323         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6324         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6326         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6328         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6329         _POSIX_THREAD_PRIORITY_SCHEDULING.
6330         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6332 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6334         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6335         nested function, use static inline function from libio.h.
6336         Code by Richard Henderson.
6338         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6339         weak.
6341 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6343         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6344         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6345         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6346         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6347         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6348         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6349         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6350         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6351         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6352         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6353         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6354         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6355         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6356         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6357         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6358         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6359         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6360         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6361         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6362         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6363         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6364         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6365         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6366         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6367         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6368         * sysdeps/sparc/tls.h: New file.
6369         * sysdeps/sparc/tcb-offsets.sym: New file.
6370         * sysdeps/sparc/Makefile: New file.
6371         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6372         * init.c [__sparc__] (__NR_set_tid_address): Define.
6374 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6376         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6377         _IO_release_lock): Define.
6379 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6381         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6382         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6384 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6386         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6387         (__pthread_cleanup_class): Add missing return types of member
6388         functions.
6390 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6392         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6393         (lll_mutex_unlock_force): Add memory barrier between store and futex
6394         syscall.
6396 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6398         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6399         tempmsg in first loop.
6401 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6403         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6404         _POSIX_THREAD_PRIORITY_SCHEDULING.
6405         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6407 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6409         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6410         (__rtld_lock_default_lock_recursive,
6411         __rtld_lock_default_unlock_recursive): Define.
6412         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6413         __rtld_lock_unlock_recursive): Define using
6414         GL(_dl_rtld_*lock_recursive).
6415         * init.c (__pthread_initialize_minimal_internal): Initialize
6416         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6417         Lock GL(_dl_load_lock) the same number of times as
6418         GL(_dl_load_lock) using non-mt implementation was nested.
6420         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6421         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6423 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6425         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6426         PIPE_BUF.
6428 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6430         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6432 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6434         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6435         to first syscall error check.  Move syscall error check for tkill
6436         into __ASSUME_CLONE_STOPPED #ifdef.
6438 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6440         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6441         is not defined, do explicit synchronization.
6442         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6443         is not defined also unlock pd->lock for non-debugging case in case
6444         it is necessary.
6445         * pthread_create.c (start_thread): Always get and release pd->lock
6446         if __ASSUME_CLONE_STOPPED is not defined.
6447         (start_thread_debug): Removed.  Adjust users.
6448         * allocatestack.c (allocate_stack): Always initialize lock if
6449         __ASSUME_CLONE_STOPPED is not defined.
6450         * Makefile (tests): Add tst-sched1.
6451         * tst-sched1.c: New file.
6453         * sysdeps/pthread/createthread.c (do_clone): Only use
6454         sched_setschduler and pass correct parameters.
6456 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6458         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6459         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6460         PTHREAD_STACK_MIN in comments.
6462 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6464         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6465         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6466         argument.
6467         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6468         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6469         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6470         (__pthread_cleanup_upto): Fix prototype.
6471         (_longjmp_unwind): Adjust caller.
6472         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6473         Change second argument to const struct pointer.
6474         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6475         * tst-sem9.c (main): Likewise.
6476         * unwind.c: Include string.h for strlen prototype.
6478 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6481         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6482         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6483         Define HAVE_CMOV.
6484         Patch by Nicholas Miell <nmiell@attbi.com>.
6486 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6488         * init.c (__pthread_initialize_minimal_internal): Initialize
6489         GL(dl_init_static_tls).
6490         * pthreadP.h (__pthread_init_static_tls): New prototype.
6491         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6492         New functions.
6493         * Makefile (tests): Add tst-tls4.
6494         (modules-names): Add tst-tls4moda and tst-tls4modb.
6495         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6496         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6497         tst-tls4modb.so.
6498         * tst-tls4.c: New file.
6499         * tst-tls4moda.c: New file.
6500         * tst-tls4modb.c: New file.
6502 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6504         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6505         before __timer_dealloc.
6506         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6507         Don't call list_unlink.
6509 2003-07-29  Roland McGrath  <roland@redhat.com>
6511         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6513 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6515         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6516         Don't reuse struct aiocb A if it failed.
6517         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6518         not just one byte, as that does not block.
6520 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6522         * sysdeps/pthread/unwind-resume.c: New file.
6523         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6524         unwind-resume in csu subdir.
6525         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6526         exceptions.
6527         (librt-sysdep_routines, librt-shared-only-routines): Add
6528         rt-unwind-resume.
6529         * sysdeps/pthread/rt-unwind-resume.c: New file.
6530         * unwind-forcedunwind.c: New file.
6531         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6532         (libpthread-shared-only-routines): Likewise.
6533         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6534         * pthreadP.h (pthread_cancel_init): New prototype.
6535         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6537         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6538         attr argument const struct pthread_attr *.
6540         * res.c (__res_state): Return __resp.
6541         * descr.h: Include resolv.h.
6542         (struct pthread): Add res field.
6543         * pthread_create.c: Include resolv.h.
6544         (start_thread): Initialize __resp.
6545         * Makefile (tests): Add tst-_res1.
6546         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6547         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6548         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6549         libpthread.
6550         * tst-_res1.c: New file.
6551         * tst-_res1mod1.c: New file.
6552         * tst-_res1mod2.c: New file.
6554 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6556         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6558         * Makefile: Define various *-no-z-defs variables for test DSOs
6559         which has undefined symbols.
6561 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6563         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6564         Retry if the stwcx fails to store once_control.
6566 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6568         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6569         pthread_attr_setaffinity.
6570         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6571         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6572         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6573         * pthread_attr_destroy.c: Free cpuset element if allocated.
6574         * pthread_create.c: Pass iattr as additional parameter to
6575         create_thread.
6576         * sysdeps/pthread/createthread.c: If attribute is provided and
6577         a new thread is created with affinity set or scheduling parameters,
6578         start thread with CLONE_STOPPED.
6579         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6580         pthread_attr_setaffinity.
6581         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6582         cpuset element.
6584 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6586         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6588 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6590         * sysdeps/pthread/configure.in: Require CFI directives also for
6591         ppc and s390.
6593 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6595         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6596         Add cfi directives.
6598 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6600         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6601         CLEANUP_JMP_BUF.
6602         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6603         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6604         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6605         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6606         not self pointer in __writer.  Compare with TID to determine
6607         deadlocks.
6608         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6610         Likewise.
6611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6612         Likewise.
6613         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6614         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6615         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6616         macros also when compiling librt.
6618 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6620         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6621         -fasynchronous-unwind-tables.
6622         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6623         (PSEUDO): Add cfi directives.
6624         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6625         Likewise.
6626         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6627         Likewise.
6629 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6631         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6632         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6633         * unwind.c (__pthread_unwind_next): Add hidden_def.
6634         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6635         Likewise.
6636         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6637         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6638         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6639         Likewise.
6640         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6641         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6642         Likewise.
6643         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6644         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6645         __pthread_unregister_cancel and __pthread_unwind_next.
6647 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6649         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6650         different symbol for the cancellation syscall wrapper and
6651         non-cancellation syscall wrapper.
6652         (PSEUDO_END): Define.
6654 2003-07-05  Richard Henderson  <rth@redhat.com>
6656         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6657         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6658         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6659         return actual return value from the syscall, not 0.
6661 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6663         * descr.h (struct pthread): Add pid field.
6664         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6665         (__reclaim_stacks): Likewise.
6666         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6667         also check for PID of the signal source.
6668         (__pthread_initialize_minimal_internal): Also initialize pid field
6669         of initial thread's descriptor.
6670         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6671         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6672         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6673         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6674         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6676 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6678         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6679         Fix use of parameter.
6680         (__libc_cleanup_pop): Likewise.
6682 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6684         * init.c (sigcancel_handler): Change parameters to match handler
6685         for SA_SIGACTION.  Check signal number and code to recognize
6686         invalid invocations.
6688 2003-07-03  Roland McGrath  <roland@redhat.com>
6690         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6691         Apply sizeof (struct pthread) bias to r13 value.
6693 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6695         * sysdeps/pthread/configure.in: Require CFI directives.
6697         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6698         definition.
6699         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6700         libpthread compilation.
6701         * unwind.c (__pthread_unwind): Add hidden_def.
6702         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6704 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6706         * libc-cancellation.c (__libc_cleanup_routine): Define.
6707         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6708         (__pthread_cleanup_pop): Define.
6710 2003-07-01  Richard Henderson  <rth@redhat.com>
6712         * sysdeps/alpha/elf/pt-initfini.c: New file.
6713         * sysdeps/alpha/pthread_spin_lock.S: New file.
6714         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6715         * sysdeps/alpha/pthreaddef.h: New file.
6716         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6717         * sysdeps/alpha/tls.h: New file.
6718         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6719         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6720         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6721         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6722         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6723         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6724         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6725         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6726         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6727         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6729 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6731         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6732         cleanup support and unwind info.
6734 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6736         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6737         Use correct cleanup handler registration.  Add unwind info.
6738         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6739         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6740         * tst-once3.c: Add cleanup handler and check it is called.
6741         * tst-once4.c: Likewise.
6742         * tst-oncex3.c: New file.
6743         * tst-oncex4.c: New file.
6744         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6746 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6748         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6750 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6752         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6753         (tf_msgsnd): Likewise.
6755         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6756         premature returns a bit more.
6758 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6760         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6761         definition to the front.
6763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6764         the cleanup functions to make the names unique.  Fix dwarf opcode
6765         un unwind table.
6766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6767         functions to make the names unique.  Fix CFA offset for two blocks.
6769 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6771         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6772         missing closing braces.
6773         Patch by Christophe Saout <christophe@saout.de>.
6775 2003-06-24  Roland McGrath  <roland@redhat.com>
6777         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6779 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6781         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6782         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6784         * pthreadP.h: Declare __find_thread_by_id.
6785         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6786         * pthread_clock_gettime.c: Allow using other thread's clock.
6787         * pthread_clock_settime.c: Likewise.
6788         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6789         * Makefile: Add rules to build and run tst-clock2.
6790         * tst-clock2.c: New file.
6792 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6795         to use exception-based cleanup handler.
6796         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6798         * tst-cond8.c (ch): Announce that we are done.
6800         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6802         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6803         Also test aio_suspend with timeout value.
6805 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6807         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6808         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6809         attribute_hidden.
6811         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6812         (__pthread_mutex_lock_internal): Likewise.
6813         (__pthread_mutex_unlock_internal): Likewise.
6814         (__pthread_mutex_unlock_usercnt): Declare.
6815         * pthread_mutex_destroy.c: Always fail if used in any way.
6816         * pthread_mutex_init.c: Update comment.
6817         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6818         * pthread_mutex_timedlock.c: Adjust __nusers.
6819         * pthread_mutex_trylock.c: Adjust __nusers.
6820         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6821         and public interfaces are wrapper with pass additional parameter.
6822         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6823         parameter zero.
6824         * tst-mutex8.c: New file.
6825         * Makefile (tests): Add tst-mutex8.
6826         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6827         __pthread_mutex_unlock_usercnt.
6828         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6830         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6831         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6833         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6834         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6835         Add __nusers.
6836         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6837         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6838         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6839         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6840         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6842         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6843         * pthread_mutex_timedlock.c: Likewise.
6844         * pthread_mutex_trylock.c: Adjust __nusers.
6845         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6846         * tst-mutex9.c: New file.
6847         * Makefile (tests): Add tst-mutex9.
6848         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6849         * sysdeps/ia64/tls.h: Likewise.
6850         * sysdeps/powerpc/tls.h: Likewise.
6851         * sysdeps/s390/tls.h: Likewise.
6852         * sysdeps/sh/tls.h: Likewise.
6853         * sysdeps/x86_64/tls.h: Likewise.
6854         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6855         Change type of __owner.
6856         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6857         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6858         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6859         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6860         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6862 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6864         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6865         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6867         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6868         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6869         instead of nr to lll_futex_wake.  Only set errno and return -1
6870         if err < 0.
6872         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6873         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6874         return actual return value from the syscall, not 0.
6876 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6878         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6879         find a random value.
6880         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6881         errno==EIDRM.
6883         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6884         compat_timer_settime.
6885         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6886         compat_timer_gettime.
6887         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6888         compat_timer_getoverrun.
6889         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6890         compat_timer_delete.
6892         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6893         error-checking mutex detect busy mutexes.
6895 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6897         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6898         Add ax to clobber list.
6899         (lll_mutex_cond_lock): Likewise.
6900         (lll_mutex_unlock): Likewise.
6901         (lll_lock): Likewise.
6902         (lll_unlock): Likewise.
6904         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6905         * tst-cancel18.c: New file.
6906         * tst-cancelx18.c: New file.
6908         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6909         and tcdrain.
6911         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6912         * tst-cancel17.c: New file.
6913         * tst-cancelx17.c: New file.
6915         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6916         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6917         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6919         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6921 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6923         * sysdeps/pthread/createthread.c (create_thread): Set
6924         header.multiple_threads unconditionally.
6925         * allocatestack.c (allocate_stack): Likewise.
6926         * descr.h (struct pthread): Add header.multiple_threads
6927         unconditionally.
6928         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6929         Define for librt.  #error if neither libpthread, libc nor librt.
6930         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6931         Likewise.
6932         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6933         CDISABLE): Likewise.
6934         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6935         CDISABLE): Likewise.
6936         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6937         CDISABLE): Likewise.
6938         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6939         CDISABLE): Likewise.  Access header.multiple_threads outside of
6940         libc and libpthread.
6941         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6942         Likewise.
6943         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6944         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6946 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6948         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6949         Also test early cancellation before the thread reaches the cancellation
6950         point.
6952         * Makefile: Compile forward.c with exceptions.
6954         * sysdeps/unix/sysv/linux/sleep.c: New file.
6956 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6958         * Makefile: Add CFLAGS definition to compile function wrappers
6959         duplicated from libc with exceptions.
6960         * tst-cancel4.c: Also check cancellation handlers.
6962         * Makefile: Add rules to build and run tst-cancel16 and
6963         tst-cancelx16.  Add missing CFLAGS definitions.
6964         * tst-cancel16.c: New file.
6965         * tst-cancelx16.c: New file.
6967 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6969         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6970         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6971         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6972         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6974         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6975         (LIBC_CANCEL_RESET): Likewise.
6976         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6977         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6978         librt-cancellation.
6979         (CFLAGS-libcrt-cancellation.c): Define.
6980         * sysdeps/pthread/librt-cancellation.c: New file.
6981         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6982         macros also when compiling librt.
6983         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6984         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6985         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6986         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6987         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6988         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6989         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6991         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6992         compat_timer_create.
6994 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6996         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6998         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6999         __register_atfork.
7000         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7001         Add libc_hidden_def.
7003 2003-06-13  Roland McGrath  <roland@redhat.com>
7005         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7006         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7008 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7010         * allocatestack.c (queue_stack): Always inline.
7011         * ptreadhP.h (__do_cancel): Likewise.
7013 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7015         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7016         a typo.
7018 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7021         (__pthread_cond_signal): Remove incorrect second addition for
7022         cond_lock!=0.
7024 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7027         (__pthread_cond_signal): Use correct futex pointer in
7028         __lll_mutex_lock_wait call.
7030         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7031         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7033 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7035         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7036         cancelable.
7037         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7038         Likewise.
7040         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7041         hand-written CFI generation code.  Since ENTRY/END also initiated
7042         CFI frames this caused two CFI sets to be generated.
7044 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7046         * cleanup_routine.c: New file.
7047         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7048         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7049         cleanup handling.
7050         * Makefile (libpthread-routines): Add cleanup_routine.
7051         Add more CFLAGS variables to compile with exceptions.  Add comments
7052         why which file needs unwind tables.
7053         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7054         tests.
7055         * tst-cancelx1.c: New file.
7056         * tst-cancelx2.c: New file.
7057         * tst-cancelx3.c: New file.
7058         * tst-cancelx4.c: New file.
7059         * tst-cancelx5.c: New file.
7060         * tst-cancelx6.c: New file.
7061         * tst-cancelx7.c: New file.
7062         * tst-cancelx8.c: New file.
7063         * tst-cancelx9.c: New file.
7064         * tst-cancelx10.c: New file.
7065         * tst-cancelx11.c: New file.
7066         * tst-cancelx12.c: New file.
7067         * tst-cancelx13.c: New file.
7068         * tst-cancelx14.c: New file.
7069         * tst-cancelx15.c: New file.
7070         * tst-cleanupx0.c: New file.
7071         * tst-cleanupx0.expect: New file.
7072         * tst-cleanupx1.c: New file.
7073         * tst-cleanupx2.c: New file.
7074         * tst-cleanupx3.c: New file.
7076         * tst-cleanup0.c: Make standard compliant.
7077         * tst-cleanup1.c: Likewise.
7079         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7080         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7081         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7082         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7083         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7085         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7086         CLEANUP_JMP_BUF.
7087         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7088         * tst-cancel12.c: New file.
7089         * tst-cancel13.c: New file.
7090         * tst-cancel14.c: New file.
7091         * tst-cancel15.c: New file.
7092         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7093         and tst-cancel15.
7095         * tst-cancel1.c: Add some comments.
7097         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7098         timeout correctly.
7100 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7102         * Makefile (CFLAGS-pthread_cancel.c): Define.
7104 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7106         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7107         Change type of __writer element to int.
7108         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7109         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7110         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7111         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7112         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7113         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7114         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7115         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7116         Compare with TID to determine deadlocks.
7117         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7118         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7119         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7120         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7121         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7122         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7123         Likewise.
7124         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7125         Likewise.
7126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7127         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7128         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7129         Likewise.
7130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7131         Likewise.
7132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7133         * Makefile (tests): Add tst-rwlock12.
7134         * tst-rwlock12.c: New file.
7136 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7138         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7139         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7140         Remove bogus hidden_proto.
7141         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7142         Likewise.
7143         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7144         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7145         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7146         ___lll_mutex_timedlock): Likewise.
7148 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7151         (__pthread_cond_signal): Add some code to eventually handle
7152         cond_lock!=0.
7154 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7156         * Makefile (tests): Add tst-exec4.
7157         (tst-exec4-ARGS): Define.
7158         * tst-exec4.c: New file.
7160 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7162         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7163         Also fail if tv_nsec < 0.
7164         (__lll_timedwait_tid): Likewise.
7165         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7166         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7167         Likewise.
7168         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7169         Likewise.
7170         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7171         Likewise.
7172         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7173         Likewise.
7174         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7175         Likewise.
7176         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7177         Likewise.
7179         * Makefile (tests): Add tst-sem8 and tst-sem9.
7180         * tst-sem8.c: New file.
7181         * tst-sem9.c: New file.
7182         * sem_open.c: Fix creation of in_use record if the file exists but
7183         no internal record.
7185         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7186         definitions.
7188         * sysdeps/pthread/timer_create.c (timer_create): In case
7189         evp==NULL, assign timer ID to sival_ptr.
7191         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7192         struct pthread_unwind_buf *.
7193         (struct pthread): Likewise for cleanup_jmp_buf element.
7195         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7196         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7197         * unwind.c (__pthread_unwind_next): Likewise.
7199 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7201         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7202         (lll_futex_timed_wait): Use int for futex value parameter.
7203         (lll_futex_wake): Likewise.
7204         (lll_futex_requeue): Likewise.
7206         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7207         Replace one memory operation with one register operation.
7209         * tst-join4.c (do_test): Fix error message.
7211         * tst-rwlock6.c (do_test): Use correct format specifier.
7213         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7214         (__lll_mutex_lock_wait): Replace one memory operation with one
7215         register operation.
7216         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7217         (__lll_mutex_lock_wait): Likewise.
7219         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7220         (__lll_mutex_cond_lock): Add one to value parameter of
7221         __lll_lock_wait to reflect reality in the futex syscall.
7222         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7223         (lll_mutex_cond_lock): Likewise.
7225 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7227         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7228         New function.
7229         (lll_mutex_cond_lock): Define.
7231 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7233         * Makefile (tests): Add tst-signal6.
7234         * tst-signal6.c: New file.
7236         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7237         (__lll_mutex_unlock_force): New function
7238         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7240         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7241         (__lll_mutex_unlock_force): New function.
7242         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7244         * tst-rwlock7.c (do_test): Use correct format specifier.
7246         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7247         Find break parameter in correct asm argument.
7249 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7251         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7252         Remove out4.
7253         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7254         error occured.
7255         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7256         Add __mutex.
7257         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7258         lll_futex_requeue, lll_mutex_unlock_force): Define.
7260 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7262         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7263         (pthread_cond_t): Add __mutex.
7264         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7265         lll_futex_requeue, lll_mutex_unlock_force): Define.
7267 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7269         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7270         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7271         Add __mutex field.
7272         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7273         Define.
7274         (lll_futex_wait, lll_futex_wake): Define.
7275         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7276         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7277         FUTEX_REQUEUE instead of FUTEX_WAIT.
7278         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7279         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7280         mutex which was used in condvar structure.  Call
7281         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7282         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7284         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7285         include tcb-offsets.h.  Read wakeup value in locked region.
7286         Use the value of gbr register as THREAD_ID.
7287         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7288         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7289         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7291         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7292         macros.
7294 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7296         * sysdeps/pthread/pthread_cond_broadcast.c
7297         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7299 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7302         typo in register name.
7303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7304         correctly.  Actually use requeue.  Little optimization.
7305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7306         mutex address early.  Handle cancellation state as 32-bit value.
7307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7308         Remove unnecessary label.
7310 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7312         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7313         instead of FUTEX_WAIT.
7314         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7317         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7319         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7320         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7321         of __pthread_mutex_lock_internal.
7322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7323         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7324         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7325         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7326         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7328         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7329         Add pthread_mutex_cond_lock.
7330         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7331         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7332         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7333         lll_mutex_cond_lock.
7334         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7335         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7336         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7337         Add __mutex field.
7338         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7339         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7341         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7342         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7344         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7345         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7346         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7347         macro don't define aliases.
7349         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7350         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7351         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7352         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7353         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7355         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7357         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7359 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7361         * sem_open.c: Fix one endless loop.  Implement correct semantics
7362         wrt opening the same semaphore more then once.
7363         * sem_close.c: Adjust for sem_open change.
7364         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7365         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7366         * Makefile (tests): Add tst-sem7.
7367         * tst-sem7.c: New file.
7369 2003-05-16  Roland McGrath  <roland@redhat.com>
7371         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7372         uninitialized variable braino.
7374 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7376         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7377         test for syscall availability.
7379         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7380         __no_posix_timers to -1 if the syscalls don't exist.
7382         * pthread_join.c (pthread_join): Set tid field of the joined
7383         thread to -1.  This isn't necessary but helps to recognize some
7384         error conditions with almost no cost.
7386         * allocatestack.c (FREE_P): Also negative values indicate an
7387         unused stack.
7389         * unwind.c: Include <unistd.h>.
7391 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7393         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7395 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7397         * Makefile (crti-objs, crtn-objs): New variables.
7398         (omit-deps, extra-objs): Add crtn.
7399         ($(objpfx)libpthread.so): Depend on both crti and crtn
7400         and links to them in multidir.
7401         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7403 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7405         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7406         (lll_mutex_unlock): Use atomic_exchange_rel.
7408 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7410         * cond-perf.c (cons): Add missing locking around setting of alldone.
7412 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7414         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7415         related macros.
7416         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7418 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7420         * tst-sem6.c: New file.
7421         * Makefile (tests): Add tst-sem6.
7423         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7424         Use atomic_exchange_rel instead of atomic_exchange.
7425         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7426         Likewise.
7428         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7429         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7430         vsyscall is possible.
7432         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7433         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7434         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7435         pthread_setaffinity_np.
7436         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7437         and pthread_setaffinity_np.
7438         * Makefile (libpthread-routines): Add pthread_getaffinity and
7439         pthread_setaffinity.
7441         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7442         use it in case mmap to allocate the stack fails.
7443         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7444         ARCH_MAP_FLAGS here.
7445         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7446         ARCH_RETRY_MMAP.
7448 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7450         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7451         handler implementation.  It is now lockless in fork().
7452         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7453         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7454         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7455         declare the __fork_*_lists.
7456         (struct fork_handler): Include pointers to all three functions.
7457         Add next, refcntr and need_signal elements.
7458         (__fork_handlers): New declaration.
7459         (__register_atfork_malloc): Remove declaration.
7460         (HAVE_register_atfork_malloc): Remove definition.
7461         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7462         __pthread_child_handler variable.
7463         (__libc_pthread_init): Use __register_atfork instead of explicitly
7464         adding to the list.
7465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7466         and lll_futex_wake.
7467         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7469         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7470         function must never be reached.
7472         * cond-perf.c: New file.
7474 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7476         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7478 2003-05-04  Roland McGrath  <roland@redhat.com>
7480         * Makefile ($(objpfx)../libc.so): New target.
7482 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7484         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7485         (pthread_condattr_t): Size is only an int, don't use long for
7486         alignment.
7487         (pthread_mutexattr_t): Likewise.
7488         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7489         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7490         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7492 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7494         * sysdeps/i386/tls.h: Define THREAD_ID.
7495         * sysdeps/ia64/tls.h: Likewise.
7496         * sysdeps/powerpc/tls.h: Likewise.
7497         * sysdeps/s390/tls.h: Likewise.
7498         * sysdeps/sh/tls.h: Likewise.
7499         * sysdeps/x86_64/tls.h: Likewise.
7500         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7501         record ownership.
7502         * pthread_mutex_timedlock.c: Likewise.
7503         * pthread_mutex_trylock.c: Likewise.
7504         * pthread_mutex_unlock.c: Likewise.
7505         * pthread_rwlock_trywrlock.c: Likewise.
7506         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7507         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7508         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7509         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7511         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7512         flag.
7514 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7516         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7517         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7518         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7519         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7520         Make __align long long instead of long.
7521         (pthread_rwlock_t): Formatting.
7522         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7523         (pthread_rwlock_t): Formatting.
7524         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7525         (pthread_cond_t): Make __align long long instead of long.
7526         (pthread_rwlock_t): Move __flags field to the same position as in
7527         linuxthreads.
7529 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7531         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7532         * tst-rwlock7.c (do_test): Likewise.
7534 2003-04-26  Roland McGrath  <roland@redhat.com>
7536         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7538 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7540         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7541         sizeof (struct pthread).
7542         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7543         1 struct pthread.
7544         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7545         to 0.
7546         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7547         struct pthread.
7548         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7549         to 32-bit bytes.
7550         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7551         tcbp.
7552         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7553         unneccessarily.
7554         (NO_TLS_OFFSET): Define.
7555         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7556         add TLS_TCB_SIZE unnecessarily.
7558 2003-04-22  Roland McGrath  <roland@redhat.com>
7560         * Makeconfig (shared-thread-library): Reverse link order to work
7561         around linker bug.
7563 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7565         * semaphore.h: Fix typo in comment.
7567 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7569         * sysdeps/pthread/sigfillset.c: New file.
7571         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7572         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7573         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7574         * sysdeps/pthread/sigaction.c: Likewise.
7575         * sysdeps/pthread/sigprocmask.c: New file.
7576         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7577         __SIGRTMIN+1.
7578         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7579         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7580         in this case.
7582 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7584         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7585         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7587         * sysdeps/unix/sysv/linux/unregister-atfork.c
7588         (__unregister_atfork): Don't free memory not allocated dynamically.
7590         * semaphore.h: Remove __THROW marker from cancellation points.
7591         * nptl/sysdeps/pthread/pthread.h: Likewise.
7593 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7595         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7596         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7597         __THROW.
7599 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7601         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7603 2003-04-15  Roland McGrath  <roland@redhat.com>
7605         * forward.c (__pthread_unwind): Tweak to avoid warning.
7607 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7609         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7611 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7613         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7614         overflow CFA advance instructions.
7615         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7617 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7619         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7620         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7621         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7622         defined.
7624         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7625         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7627         DW_CFA_advance_loc for .Laddl-.Lsubl.
7629 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7631         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7632         position-independent unwind data for static libraries.
7633         Add missing unwind info.  Add comments.
7635         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7636         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7637         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7640 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7642         * Makefile: Make sure all cancellation points are compiled with
7643         exception and asynchronous unwind tables.
7645         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7646         which mishandles loading of global object addresses in PIC.
7647         (THREAD_SETMEM_NC): Likewise.
7649 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7651         * pthread.h: Define new data structure for cleanup buffer.  Declare
7652         new cleanup handler interfaces.
7653         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7654         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7655         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7656         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7657         it.  Declare old cleanup handler installation functions.
7658         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7659         handling.
7660         * cleanup_defer.c: Likewise.
7661         * cleanup_compat.c: New file.  Old cleanup code.
7662         * cleanup_def_compat.c: New file.  Old cleanup code.
7663         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7664         if own thread descriptor.
7665         * unwind.c: New file.
7666         * forward.c: Add __pthread_unwind.
7667         * init.c (pthread_functions): Add __pthread_unwind.
7668         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7669         Add ptr___pthread_unwind.
7670         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7671         and unwind function.
7672         * Makefile (libpthread-routines): Add cleanup_compat,
7673         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7674         table generation if necessary.
7675         * version.c: Record whether unwind support is compiled in.
7676         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7677         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7678         handler interfaces.
7679         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7680         complication to generate unwind information for syscall wrappers.
7681         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7682         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7683         __cleanup_fct_attribute.
7685         * Makefile: Add rules to build and run tst-cleanup0.
7686         * tst-cleanup0.c: New file.
7687         * tst-cleanup0.expect: New file.
7689         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7690         caller.  Optimize to avoid often unecessary local variable.
7692 2003-04-11  Roland McGrath  <roland@redhat.com>
7694         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7695         sets variable `multidir'; include that.
7696         (generated): Add it.
7697         ($(objpfx)$(multidir)/crti.o): New target.
7698         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7700 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7702         * tst-attr2.c (do_test): Add cast to avoid warning.
7703         * tst-mutex4.c (do_test): Likewise.
7705 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7707         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7708         in child.
7710 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7712         * Makefile (tests): Add tst-detach1.
7713         * tst-detach1.c: New file.
7715 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7717         * sysdeps/pthread/pthread.h: Remove duplicate
7718         pthread_cleanup_{push,pop} definitions.
7720         * tst-barrier2.c: Eliminate warnings.
7721         * tst-cancel4.c: Likewise.
7722         * tst-cond4.c: Likewise.
7723         * tst-cond6.c: Likewise.
7724         * tst-detach1.c: Likewise.
7725         * tst-rwlock4.c: Likewise.
7726         * tst-rwlock6.c: Likewise.
7727         * tst-rwlock7.c: Likewise.
7728         * tst-sem3.c: Likewise.
7729         * tst-spin2.c: Likewise.
7730         * tst-umask1.c: Likewise.
7732 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7734         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7736 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7738         * descr.h (struct pthread): Move cancelhandling member to the front.
7740 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7742         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7743         malloc_parent, and malloc_child statically.
7744         (__register_atfork_malloc): New function.
7745         (free_mem): Don't free any of the malloc_* variables on the list.
7746         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7747         Define HAVE_register_atfork_malloc.
7749 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7751         * sysdeps/pthread/createthread.c (create_thread): Add some more
7752         comments explaining when to set multiple_threads and when not.
7754         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7755         THREAD_ATOMIC_BIT_SET if not already defined.
7756         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7757         THREAD_ATOMIC_BIT_SET:
7758         * sysdeps/x86_64/tls.h: Likewise.
7759         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7760         THREAD_ATOMIC_CMPXCHG_VAL.
7761         (_pthread_cleanup_pop_restore): Likewise.
7762         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7763         (__pthread_enable_asynccancel_2): Likewise.
7764         (__pthread_disable_asynccancel): Likewise.
7765         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7766         (__libc_disable_asynccancel): Likewise.
7767         * init.c (sigcancel_handler): Likewise.
7768         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7769         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7771 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7773         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7774         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7775         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7776         * Makefile (tests): Add tst-cancel11.
7777         * tst-cancel11.c: New file.
7779 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7781         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7782         round, not the first.  Use specific_used flag instead of local
7783         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7784         (__free_tcb): Don't call deallocate_tsd here.
7785         (start_thread): Call deallocate_tsd here.
7786         * pthread_setspecific.c: Set specific_used flag really only when
7787         needed.
7788         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7789         * tst-tsd3.c: New file.
7790         * tst-tsd4.c: New file.
7792 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7794         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7795         Use atomic_exchange_and_add instead of __lll_add.
7796         (__lll_mutex_timedlock): Likewise.
7797         Patch by Ian Wienand.
7799 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7801         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7802         (SINGLE_THREAD_P): Fix typo.
7803         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7805 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7807         * Makefile (tests): Add tst-align.
7808         * tst-align.c: New file.
7809         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7811         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7812         function correctly.
7814         * tst-tsd2.c: Add casts to avoid warnings.
7816 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7818         * descr.h (struct pthread): Move most often used elements to the front.
7820 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7822         * Makefile (libpthread-routines): Add pthread_atfork.
7823         (libpthread-static-only-routines): Add pthread_atfork.
7825 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7827         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7828         of TLS_DTV_AT_TP.
7829         (INSTALL_DTV): Add parens.
7830         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7831         Use passed descr instead of THREAD_SELF.
7832         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7833         (__lll_mutex_timedlock_wait): Correct expected value after
7834         spurious wakeup.
7835         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7836         Release lock before waking up the waiters.
7837         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7838         criteria.  Reorderstruct passed to cleanup handler.  Fix
7839         handling of cancellation and failung pthread_mutex_unlock call.
7840         Use __pthread_enable_asynccancel_2 instead of
7841         __pthread_enable_asynccancel.
7842         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7843         Return result of lock re-get if it fails.
7844         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7845         for __pthread_cleanup_push.
7846         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7847         completely broken rwlock implementation.
7848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7851         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7853         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7854         versioned_symbol macro.
7855         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7856         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7858 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7860         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7861         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7862         and __helper_tid.
7863         (struct timer): Remove th and bar field.
7864         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7865         debugging code.  Create only one helper thread.
7866         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7867         helper thread.
7868         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7869         Renamed.  Define statically.  Use thread info from siginfo.
7870         (__helper_once): New variable.
7871         (__helper_tid): New variable.
7872         (__reset_helper_control): New function.
7873         (__start_helper_thread): New function.
7875         * pthread_create.c (start_thread): Don't use setjmp inside
7876         __builtin_expect to work around gcc bug.
7878         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7879         timer_delete syscall fails, but not with ENOSYS, set
7880         __no_posix_timers.
7882         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7883         (timer_settime): Fix typo.
7884         * sysdeps/unix/sysv/linux/timer_getoverr.c
7885         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7887 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7890         offset of cleanupbuf.__prev.
7892 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7894         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7895         of included file.
7897 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7899         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7900         NULL provide default definition to syscall.
7902 2003-03-25  Roland McGrath  <roland@redhat.com>
7904         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7905         (timer_id2ptr): Fix typo.
7907 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7909         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7910         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7911         * sysdeps/ia64/pthreaddef.h: Likewise.
7912         * sysdeps/powerpc/pthreaddef.h: Likewise.
7913         * sysdeps/s390/pthreaddef.h: Likewise.
7914         * sysdeps/sh/pthreaddef.h: Likewise.
7915         * sysdeps/x86_64/pthreaddef.h: Likewise.
7916         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7917         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7918         being changed.
7919         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7920         SIGTIMER is not unblocked.
7921         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7922         RT signal taken.
7923         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7924         be send.
7925         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7926         pass pointer through as ID.
7927         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7928         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7929         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7930         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7931         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7932         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7933         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7934         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7935         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7936         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7937         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7938         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7939         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7940         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7941         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7942         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7943         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7944         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7945         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7946         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7947         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7948         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7949         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7950         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7951         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7952         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7953         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7954         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7955         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7956         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7957         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7958         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7959         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7961         * pthreadP.h: Remove FRAME_LEFT definition.
7962         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7963         already left frame.  Programs which have this problem are not POSIX
7964         compliant.
7965         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7967 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7969         * sysdeps/pthread/tst-timer.c: Check return values of the
7970         functions we test.
7972 2003-03-23  Roland McGrath  <roland@redhat.com>
7974         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7975         * tst-tls3mod.c: Likewise.
7976         * tst-tls1.c: Likewise.
7977         * tst-tls2.c: Likewise.
7979         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7980         undefined behavior.
7982         * tst-join5.c (tf1, tf2): Add a cast.
7984         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7986         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7987         Don't test anything.
7988         * tst-cond4.c: Likewise.
7989         * tst-cond6.c: Likewise.
7990         * tst-flock2.c: Likewise.
7991         * tst-mutex4.c: Likewise.
7992         * tst-rwlock4.c: Likewise.
7993         * tst-signal1.c: Likewise.
7994         * tst-spin2.c: Likewise.
7995         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7997         * tst-mutex4.c: Use test-skeleton.c.
7998         * tst-spin2.c: Likewise.
7999         * tst-sysconf.c: Likewise.
8000         * tst-barrier2.c: Likewise.
8001         * tst-cond4.c: Likewise.
8002         * tst-cond6.c: Likewise.
8003         * tst-rwlock4.c: Likewise.
8004         * tst-unload.c: Likewise.
8005         * tst-flock2.c (do_test): Use return instead of exit.
8007 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8009         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8011 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8013         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8014         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8015         instead of __lll_compare_and_swap.
8016         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8017         Likewise.
8018         Removed definition if __lll_compare_and_swap.
8020         * cancellation.c: Adjust for new form of compare&exchange macros.
8021         * cleanup_defer.c: Likewise.
8022         * init.c: Likewise.
8023         * libc-cancellation.c: Likewise.
8024         * old_pthread_cond_broadcast.c: Likewise.
8025         * old_pthread_cond_signal.c: Likewise.
8026         * old_pthread_cond_timedwait.c: Likewise.
8027         * old_pthread_cond_wait.c: Likewise.
8028         * pthread_cancel.c: Likewise.
8029         * pthread_create.c: Likewise.
8030         * pthread_detach.c: Likewise.
8031         * pthread_join.c: Likewise.
8032         * pthread_key_delete.c: Likewise.
8033         * pthread_setcancelstate.c: Likewise.
8034         * pthread_setcanceltype.c: Likewise.
8035         * pthread_timedjoin.c: Likewise.
8036         * pthread_tryjoin.c: Likewise.
8037         * sysdeps/pthread/createthread.c: Likewise.
8039 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8041         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8042         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8043         definitions.  Replace uses with calls to atomic_* functions.
8044         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8045         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8046         __lll_test_and_set calls with atomic_exchange_and_add and
8047         atomic_exchange calls respectively.
8048         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8049         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8050         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8051         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8052         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8053         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8054         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8056         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8057         returns the old value.
8059 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8061         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8062         int for variable OLDVAL and correct inline assembler contraint.
8063         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8064         type int for variable OLD.
8066         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8067         only for s390-32.
8068         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8069         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8070         instead of multiple_threads field in the TCB.
8072 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8074         * sysdeps/i386/i686/bits/atomic.h: Removed.
8075         * sysdeps/i386/i586/bits/atomic.h: Removed.
8076         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8077         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8078         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8079         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8080         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8081         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8082         * atomic.h: Removed.  Moved to glibc.
8084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8085         support for clock selection.
8087         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8088         signalling waiters.
8090 2003-03-18  Roland McGrath  <roland@redhat.com>
8092         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8093         Add __lll_rel_instr first.  Add memory clobber.
8094         (lll_mutex_unlock): Use __lll_test_and_set.
8095         From Paul Mackerras <paulus@samba.org>.
8097         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8098         unconditionally.
8099         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8100         (SINGLE_THREAD_P):  Add `header.' prefix.
8101         From Paul Mackerras <paulus@samba.org>.
8103         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8104         pthread_timedjoin_np to ...
8105         (libpthread: GLIBC_2.3.3): ... here.
8106         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8108         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8109         Avoid shadowing VAL variable.
8111         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8112         New macro.
8114 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8116         * Makefile (tests): Add tst-cond11.
8117         * tst-cond11.c: New file.
8119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8120         struct passed to cleanup handler to eliminate one more
8121         instruction.
8122         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8124         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8125         (pthrad_cond_t): Replace __unused field with __clock.
8127         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8128         waken all waiters in cleanup handler.
8129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8132         * pthread_condattr_getclock.c: New file.
8133         * pthread_condattr_setclock.c: New file.
8134         * sysdeps/pthread/pthread.h: Declare these new functions.
8135         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8136         * Makefile (libpthread-routines): Add the new functions.
8137         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8138         Renamed field to value.  Document use of the bits.
8139         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8140         change.
8141         * pthread_condattr_setpshared.c: Likewise.
8142         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8143         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8144         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8145         Add __clock field.
8146         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8147         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8148         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8149         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8151         Implement clock selection.
8152         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8153         * pthread-errnos.sym: Add ENOSYS.
8154         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8155         _POSIX_CLOCK_SELECTION.
8156         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8159         invalid .size directive.
8161 2003-03-17  Roland McGrath  <roland@redhat.com>
8163         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8164         Formatting tweaks.
8166 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8168         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8169         Use __lll_add instead of spelling it out.  Use protected symbol names.
8170         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8171         Use __lll_add.
8172         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8173         Renamed from lll_compare_and_swap.  Use new name where necessary.
8174         (__lll_add): Defined.
8175         (__lll_dec_if_positive): Defined.
8176         (__lll_test_and_set): Defined.
8177         * sysdeps/ia64/pthread_spin_init.c: Removed.
8178         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8179         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8180         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8181         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8182         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8183         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8184         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8185         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8186         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8187         __sync_lock_release_si.
8188         Patch by Jakub Jelinek.
8190         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8191         Fix timeout handling.
8192         (__lll_timedwait_tid): Likewise.
8193         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8194         Patch by Jakub Jelinek.
8196         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8198 2003-03-17  Roland McGrath  <roland@redhat.com>
8200         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8201         * sysdeps/pthread/pthread_spin_init.c: New file.
8202         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8203         * sysdeps/powerpc/Makefile: New file.
8204         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8205         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8206         * sysdeps/powerpc/pthreaddef.h: New file.
8207         * sysdeps/powerpc/tcb-offsets.sym: New file.
8208         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8209         * sysdeps/powerpc/tls.h: New file.
8210         * sysdeps/powerpc/bits/atomic.h: New file.
8211         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8212         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8213         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8215         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8216         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8217         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8218         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8219         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8220         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8221         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8222         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8223         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8224         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8225         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8226         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8227         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8228         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8229         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8231         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8232         not gettimeofday.
8233         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8234         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8235         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8236         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8237         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8239 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8241         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8242         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8243         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8245         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8247 2003-03-16  Roland McGrath  <roland@redhat.com>
8249         * tst-fork4.c: Include <string.h>.
8250         * tst-signal2.c: Likewise.
8251         * tst-mutex5.c (do_test): exit -> return.
8252         * tst-mutex2.c: Include <stdlib.h>.
8254 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8256         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8257         (__lll_mutex_timedlock_wait): Correct expected value after
8258         spurious wakeup.  Otherwise we would never wait again.
8260         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8261         zone versus inline asm stupidity.  Use correct instructions.
8263         * tst-rwlock6.c: Add some more status output.
8265 2003-03-15  Roland McGrath  <roland@redhat.com>
8267         * sysdeps/pthread/configure.in: New file.
8268         * sysdeps/pthread/configure: New file (generated).
8270 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8272         * allocatestack.c (allocate_stack): Store the exact stack size of
8273         user allocated stacks.
8275 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8277         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8278         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8279         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8280         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8281         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8282         Use `header.' prefix.
8283         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8285 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8287         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8288         __builtin_frame_address, use stack pointer.
8290         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8291         instead of __builtin_frame_pointer.
8293 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8295         * tst-basic1.c (do_test): Add cast to avoid warning.
8296         * tst-basic2.c (do_test): Likewise.
8298         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8299         amount of stack correction.
8301         * tst-fork4.c: Use test-skeleton.c.
8303 2003-03-14  Roland McGrath  <roland@redhat.com>
8305         * init.c: Fix typo "#eli" for "#else".
8307 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8309         * allocatestack.c (__stack_user): Use hidden_data_def.
8310         * pthread_create.c (__pthread_keys): Likewise.
8312         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8314 2003-03-14  Roland McGrath  <roland@redhat.com>
8316         * tst-fork4.c: New file.
8317         * Makefile (tests): Add it.
8319         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8320         we always define the padding space.
8321         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8322         stopped supporting its own extensions fully.
8323         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8324         struct also called `header', so `header.multiple_threads' is the field
8325         name to use on all machines.
8326         * allocatestack.c (allocate_stack): Use `header.' prefix.
8327         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8328         * pthread_create.c (__pthread_create_2_1): Likewise.
8329         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8330         (THREAD_SELF): Likewise.
8331         * sysdeps/x86_64/tls.h: Likewise.
8332         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8333         (SINGLE_THREAD_P): Likewise.
8334         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8335         (SINGLE_THREAD_P): Likewise.
8336         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8337         (SINGLE_THREAD_P): Likewise.
8339         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8340         value directly.
8342 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8344         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8345         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8347         * pthread_create.c (start_thread): setjmp is expected to return 0.
8349         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8350         (THREAD_GETMEM_NC): Likewise.
8352 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8354         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8355         and the size of the stack which must be allocated is a multiple,
8356         allocate one more page.
8357         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8358         MULTI_PAGE_ALIASING.
8360 2003-03-13  Roland McGrath  <roland@redhat.com>
8362         * pthread_create.c (start_thread): Set EXITING_BIT after the
8363         event-reporting (and destructors), not before.
8365 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8367         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8368         lll_futex_wake): Declare register variables as long int instead of
8369         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8370         Make syscall arguments clobbered by the syscall.
8371         (lll_futex_wait): Define using lll_futex_timed_wait.
8373         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8374         to void *.
8376         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8377         PPID if [! NDEBUG].
8379         * allocatestack.c (nptl_ncreated): Only declare if
8380         COLORING_INCREMENT != 0.
8382         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8383         (__libc_enable_asynccancel_2): Remove prototype.
8385         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8386         ctid to match kernel.
8388 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8390         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8391         libc_multiple_threads.
8392         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8393         __libc_multiple_threads to...
8394         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8396         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8397         versioning.
8398         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8399         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8401         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8402         (__pthread_once_internal): Define.
8404         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8405         macros instead of .symver directly.
8406         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8407         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8409         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8410         * sysdeps/x86_64/tcb-offsets.sym: New file.
8411         * sysdeps/x86_64/Makefile: New file.
8413         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8414         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8415         to access own pthread_t in TCB.
8416         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8417         Likewise.
8418         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8419         Likewise.
8420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8422 2003-03-12  Roland McGrath  <roland@redhat.com>
8424         * pthread-errnos.sym: New file.
8425         * Makefile (gen-as-const-headers): New variable, list that file.
8426         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8427         header <pthread-errnos.h> instead of defining errno values here.
8428         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8429         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8430         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8433         Likewise.
8434         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8435         Likewise.
8436         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8438         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8440         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8441         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8442         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8443         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8445         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8446         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8447         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8448         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8449         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8450         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8451         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8452         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8453         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8454         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8455         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8456         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8457         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8458         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8459         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8460         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8462         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8464         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8465         CLONE_CHILD_SETTID worked.
8467 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8469         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8470         file.
8471         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8472         file.
8474         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8475         (pthread_cond_t): Add padding.
8477         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8478         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8479         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8481         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8482         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8484         (__pthread_rwlock_timedrdlock): Likewise.
8485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8486         (__pthread_rwlock_wrlock): Likewise.
8487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8488         (__pthread_rwlock_rdlock): Likewise.
8490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8493         result of lock re-get if it fails.
8495 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8497         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8498         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8499         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8500         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8501         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8502         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8503         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8504         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8505         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8506         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8508         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8509         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8511         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8512         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8513         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8514         (create_thread): Likewise.
8515         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8516         * init.c (__pthread_initialize_minimal_internal): Initialize
8517         __libc_multiple_threads_ptr if necessary.
8518         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8519         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8520         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8521         __libc_multiple_threads.
8522         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8523         necessary.
8525         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8526         (THREAD_SETMEM_NC): Likewise.
8528         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8529         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8530         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8531         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8533         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8534         Eliminate one entire instruction.
8536         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8537         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8539         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8540         instead of __pthread_enable_asynccancel.
8541         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8542         (__pthread_cond_wait): Likewise.
8543         * sysdeps/pthread/pthread_cond_timedwait.c
8544         (__pthread_cond_timedwait): Likewise.
8545         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8547         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8548         (__condvar_cleanup): Wake up all waiters in case we got signaled
8549         after being woken up but before disabling asynchronous
8550         cancellation.
8551         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8552         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8553         (__condvar_cleanup): Likewise.
8555         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8556         Make it an error if architecture has no #if case.  Add x86-64.
8558         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8559         pt-initfini.s generation.
8561         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8562         (TLS_INIT_TP): Fix typo.
8564 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8566         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8567         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8569         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8570         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8571         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8572         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8573         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8574         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8575         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8576         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8578 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8580         * sysdeps/pthread/pthread_cond_timedwait.c
8581         (__pthread_cond_timedwait): Return the result of the final
8582         locking.  If it succeeds, the regular function return value.
8584         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8585         Return result of the final locking.
8586         * version.c (__nptl_main): Work around problems with the strange
8587         INTERNAL_SYSCALL macro on ppc32.
8588         * init.c (__pthread_initialize_minimal_internal): Unblock
8589         SIGCANCEL in case the parent blocked it.
8590         Reported by Paul Mackerras <paulus@samba.org>.
8592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8594         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8596 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8598         * sysdeps/pthread/pthread_cond_timedwait.c
8599         (__pthread_cond_timedwait): Unlock and fail if
8600         __pthread_mutex_unlock_internal failed.
8602         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8603         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8604         Use ARCH_CLONE.
8605         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8606         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8607         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8608         ALLOCATE_STACK): New macros.
8609         (TLS_TPADJ): New macro.
8610         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8611         (allocate_stack): Handle TLS_DTV_AT_TP and
8612         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8613         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8614         Don't set PD->self.
8615         * init.c [__ia64__] (__NR_set_tid_address): Define.
8617         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8618         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8619         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8620         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8621         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8622         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8623         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8624         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8625         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8626         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8627         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8628         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8629         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8630         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8631         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8632         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8633         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8634         * sysdeps/ia64/bits/atomic.h: New file.
8635         * sysdeps/ia64/Makefile: New file.
8636         * sysdeps/ia64/pthread_spin_init.c: New file.
8637         * sysdeps/ia64/pthread_spin_lock.c: New file.
8638         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8639         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8640         * sysdeps/ia64/pthreaddef.h: New file.
8641         * sysdeps/ia64/tcb-offsets.sym: New file.
8642         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8643         * sysdeps/ia64/tls.h: New file.
8645         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8646         to syscall instead of no arguments.
8648 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8650         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8651         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8652         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8653         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8655         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8656         unused code.
8658         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8660         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8661         lowlevelbarrier.sym.
8662         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8663         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8664         Include lowlevelbarrier.h and don't define offsets locally.
8665         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8667         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8668         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8669         (__lll_mutex_timedlock_wait): Likewise.
8670         (lll_mutex_lock): Adjust asm for that.
8671         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8672         (lll_lock): Adjust asm for operand order change.
8673         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8674         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8676         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8677         Reverse order of parameters.
8678         (__lll_timedwait_tid): Remove regparms attribute.
8679         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8680         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8682         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8683         (__lll_timedwait_tid): Remove one unnecessary instruction.
8685         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8686         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8687         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8688         lowlevelmutex.S.
8690         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8691         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8692         for NOT_IN_libc.
8693         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8694         lowlevellock.S.
8696         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8697         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8698         for libc.so.
8699         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8700         define LOCK here (if UP is not defined).  The actual code is in
8701         lowlevelmutex.S.
8703         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8704         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8705         __lll_timedwait_tid for libc.so.
8706         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8707         define LOCK here (if UP is not defined).  The actual code is in
8708         lowlevellock.S.
8710         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8711         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8712         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8713         instead of lowlevelsem.h.
8714         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8715         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8716         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8718         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8719         lowlevelrwlock.sym.
8720         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8721         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8722         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8724         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8725         register loading.
8726         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8727         last changed.  D'oh.
8729         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8731         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8732         of __libc_locking_needed.
8733         (lll_trylock): Initialize %eax to zero.
8735         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8736         pthread_cond_t definition.
8738 2003-03-10  Roland McGrath  <roland@redhat.com>
8740         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8741         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8742         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8743         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8744         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8746         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8747         Instead of setting PD->multiple_threads, set globals
8748         __pthread_multiple_threads and __libc_multiple_threads.
8749         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8750         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8751         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8753         * descr.h (struct pthread): Conditionalize first member on
8754         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8755         containing an anonymous tcbhead_t.  Move `list' member out.
8756         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8757         * allocatestack.c: Remove use of `header.data.' prefix.
8758         * pthread_create.c: Likewise.
8759         * init.c (__pthread_initialize_minimal_internal): Likewise.
8760         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8761         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8762         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8763         * sysdeps/x86_64/tls.h: Likewise.
8764         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8765         (SINGLE_THREAD_P): Likewise.
8766         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8767         (SINGLE_THREAD_P): Likewise.
8768         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8769         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8771 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8773         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8775         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8776         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8778         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8779         leftovers from the ia32 code.
8781         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8782         memory load.
8783         (clear_once_control): Don't load %esi.
8785         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8786         handling.
8788         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8790         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8791         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8793         * Makefile (tests): Add tst-cond10.
8794         * tst-cond10.c: New file.
8796 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8798         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8799         * tst-signal3.c (do_test): Likewise.
8800         * tst-sem5.c (do_test): Likewise.
8801         * tst-kill6.c (do_test): Likewise.
8802         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8804         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8805         of inc/dec.
8806         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8807         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8808         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8809         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8811         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8813         Likewise.
8814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8815         Likewise.
8816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8821         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8822         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8823         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8825         * allocatestack.c (allocate_stack): If mprotect() fails free the
8826         TLS memory.
8828 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8830         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8832         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8833         lll_wake_tid.  This was used only to work around kernel limits in
8834         the early days.
8835         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8836         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8837         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8838         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8840         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8841         (__pthread_initialize_minimal_internal): Change initialization of
8842         __static_tls_align_m1 appropriately.
8843         * pthreadP.h (__static_tls_align_m1): Renamed from
8844         __static_tls_align.
8845         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8846         instead of __static_tls_align-1.
8848 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8850         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8852         * pthread_create.c: Define __pthread_keys using nocommon
8853         attribute, not by placing it explicitly in bss.
8854         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8856         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8857         Use it in mmap call to allocate stacks.
8859         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8861         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8862         result of the thread function.
8864 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8866         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8867         version is just fine.
8869         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8870         (__pthread_child_handler): Renamed from pthread_child_handler,
8871         exported, and marked hidden.  Change all users.
8872         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8873         free __pthread_child_handler from child list.
8875 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8877         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8879         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8880         Fix handling of cancellation and failing pthread_mutex_unlock call.
8881         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8882         (__pthread_cond_wait): Likewise.
8884         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8885         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8886         lll_futex_timed_wait call.
8887         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8888         (pthread_rwlock_timedwrlock): Likewise.
8890         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8891         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8892         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8894         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8895         check of lll_futex_wake return value.
8897 2003-03-03  Roland McGrath  <roland@redhat.com>
8899         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8901         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8902         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8903         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8905 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8907         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8908         error for CPU clocks.
8910         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8911         _POSIX_MONOTONIC_CLOCK.
8912         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8914         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8915         recent kernels.
8917 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8919         * descr.h (struct pthread): Move cleanup field to the front.
8921 2003-03-01  Roland McGrath  <roland@redhat.com>
8923         * sem_open.c (sem_open): Braino fix.
8925 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8927         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8929         __pthread_cleanup_pop functionality.
8930         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8932         * descr.h (struct pthread): Move tid field to the front now that
8933         it is often used.
8935         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8936         (__lll_mutex_timedlock_wait): Remove.
8937         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8938         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8939         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8940         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8941         (lll_unlock_wake_cb): Don't save and restore %esi.
8942         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8943         %esi.
8944         (__lll_timedwait_tid): Add alignment.
8945         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8946         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8947         %esi.
8948         (__lll_timedwait_tid): Removed.
8949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8950         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8952         (pthread_barrier_wait): Don't save, load, and restore %esi for
8953         last thread.
8954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8955         (__pthread_cond_signal): Don't save, load, and restore %esi.
8956         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8957         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8958         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8959         Don't save, load, and restore %esi.
8961 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8963         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8964         Release lock before waking up the waiters.
8966         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8968         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8969         (reader_thread): Likewise.
8971         * sysdeps/pthread/pthread_rwlock_unlock.c
8972         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8973         to wake up readers if there are none.
8975         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8976         Release internal lock before wake threads.
8978 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8980         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8981         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8982         predefined.
8983         * tst-rwlock9.c: Likewise.
8984         * tst-rwlock10.c: New file.
8985         * tst-rwlock11.c: New file.
8987         * Makefile (tests): Add tst-dlsym1.
8988         * tst-dlsym1.c: New file.
8990         * init.c (__pthread_initialize_minimal_internal): Set
8991         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8992         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8994 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8996         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8998         * tst-cond2.c: Fix sychronization with child.
9000         * tst-rwlock8.c (reader_thread): Remove unused variable.
9002         * Makefile: Add rules to build and run tst-tls3.
9003         * tst-tls3.c: New file.
9004         * tst-tls3mod.c: New file.
9006         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9007         * tst-rwlock8.c: New file.
9008         * tst-rwlock9.c: New file.
9009         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9010         complete broken rwlock implementation.
9011         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9012         Likewise.
9013         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9014         Likewise.
9015         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9016         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9017         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9018         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9019         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9020         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9021         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9023 2003-02-23  Roland McGrath  <roland@redhat.com>
9025         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9027 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9029         * Makefile (tests): Add tst-context1.
9030         * tst-context1.c: New file.
9032         * Makefile (tests): Add tst-tls1 and tst-tls2.
9033         * tst-tls1.c: New file.
9034         * tst-tls2.c: New file.
9036         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9037         for failed cmpxchg.
9039         * pthread_create.c (start_thread): Set EXITING_BIT early.
9041         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9042         (THREAD_GETMEM_NC): Likewise.
9044 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9046         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9047         off 3 more bytes by using offset-less instructions when possible.
9049         * Makefile: Add dependency for $(objpfx)version.d.
9051         * eintr.c (eintr_source): Add unnecessary return but the compiler
9052         insists.
9054         * tst-kill3.c: Include <unistd.h>.
9056 2003-02-21  Roland McGrath  <roland@redhat.com>
9058         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9060 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9062         * Makefile (tests): Add tst-eintr1.
9063         (distribute): Add eintr.c.
9064         * tst-eintr1.c: New file.
9065         * eintr.c: New file.
9067         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9069         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9070         Disallow sending SIGCANCEL.
9072         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9073         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9074         * tst-kill1.c: New file.
9075         * tst-kill2.c: New file.
9076         * tst-kill3.c: New file.
9077         * tst-kill5.c: New file.
9078         * tst-kill6.c: New file.
9079         * tst-basic7.c: Renamed to...
9080         * tst-kill4.c: ...this.
9082 2003-02-21  Roland McGrath  <roland@redhat.com>
9084         * Makefile (install-lib-ldscripts): New variable.
9086 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9088         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9089         * pthread_cancel.c: Use INVALID_TD_P.
9090         * pthread_detach.c: Likewise.
9091         * pthread_getschedparam.c: Likewise.
9092         * pthread_setschedparam.c: Likewise.
9093         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9094         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9095         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9096         * pthread_timedjoin.c: Likewise.
9098         * tst-basic7.c: Include <signal.h>.
9100         * pthread_join.c (pthread_join): Limited checking for invalid
9101         descriptors.
9102         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9104 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9106         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9107         beginning of the loop.  Clear the entire first block of TSD.
9108         * Makefile (tests): Add tst-key4.
9109         * tst-key4.c: New file.
9111 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9113         * Makefile (tests): Add tst-basic7.
9114         * tst-basic7.c: New file.
9116         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9117         Add some more __builtin_expect.
9119         * pthreadP.h: Define dummy version of DEBUGGING_P.
9121 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9123         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9124         _POSIX_THREAD_PRIORITY_SCHEDULING.
9125         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9126         _XOPEN_REALTIME_THREADS.
9127         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9129         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9130         kernel returns EINVAL for PID <= 0, work around it.
9132         * Makefile (tests): Add tst-signal5.
9133         * tst-signal5.c: New file.
9135         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9136         and LOGIN_NAME_MAX.
9138         * tst-cancel1.c (tf): Block all signals.
9140         * Makefile (tests): Add tst-basic6.
9141         * tst-basic6.c: New file.
9143         * tst-basic1.c: Add test for process ID.
9145         * Makefile (tests): Add tst-cancel10.
9146         * tst-cancel10.c: New file.
9148         * Makefile (tests): Add tst-signal4.
9149         * tst-signal4.c: New file.
9151         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9152         __sigismember instead of sigismember.  Add __builtin_expect.
9154 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9156         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9157         pthread_setcancelstate, and pthread_rwlock_setpshared.
9159         * tst-cancel7.c (do_test): Make sure the pid file exists before
9160         canceling the thread.
9162         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9163         pthread_rwlock_timedrdlock tests.
9164         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9166         Check for invalid tv_nsec field.
9167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9168         Likewise.
9170         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9171         recursive mutex of overflow.
9173         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9175         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9176         going into an endless loop.
9177         * Makefile (tests): Add tst-cancel9.
9178         * tst-cancel9.c: New file.
9180         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9182 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9184         * tst-mutex5.c (do_test): Add more timedlock tests.
9186         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9187         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9189         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9190         use INLINE_SYSCALL.  Error number is returned, not -1.
9192         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9193         and __deallocate_stack with internal_function.
9194         * pthread_create.c: Adjust definitions appropriately.
9195         * allocatestack.c: Likewise.
9197         * pthread_join.c: Add one more __builtin_expect.
9198         * pthread_timedjoin.c: Likewise.
9200         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9201         not data of sequence number does not match.
9202         Add one __builtin_expect.
9204         * Makefile (tests): Add tst-clock1.
9205         * tst-clock1.c: New file.
9207         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9208         negative arguments.
9209         * Makefile (tests): Add tst-basic5.
9210         * tst-basic5.c: New file.
9212 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9214         * Makefile (tests): Add tst-basic4.
9215         * tst-basic4.c: New file.
9217         * pthreadP.h: Add declaraction for __nptl_nthreads.
9218         * pthread_create.c: Define __nptl_nthreads
9219         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9220         after thread is done.  If then zero, call exit(0).
9221         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9222         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9223         * init.c (pthread_functions): Initialize ptr_nthreads.
9224         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9225         (__reclaim_stacks): Decrement __nptl_nthreads.
9226         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9227         Define.
9228         * Makefile (tests): Add tst-basic3.
9229         * tst-basic3.c: New file.
9231         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9232         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9233         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9234         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9235         if asynchronous canceling is enabled.
9236         * pthread_join.c (pthread_join): When recognizing circular joins,
9237         take into account the other thread might be already canceled.
9238         * Makefile (tests): Add tst-join5.
9239         * tst-join5.c: New file.
9241         * Makefile (tests): Add tst-join4.
9242         * tst-join4.c: New file.
9244 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9246         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9248 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9250         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9251         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9252         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9253         warning.
9254         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9255         to avoid warning.
9256         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9257         error if lll_futex_wake failed.
9259 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9262         handling of cancellation and failung pthread_mutex_unlock call.
9263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9264         * Makefile (tests): Add tst-cond8 and tst-cond9.
9265         * tst-cond8.c: New file.
9266         * tst-cond9.c: New file.
9268         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9270         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9271         non-standard initializers with __USE_GNU.
9273         * Makefile (tests): Add tst-cleanup3.
9274         * tst-cleanup3.c: New file.
9276 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9278         * Makefile (tests): Add tst-attr1 and tst-attr2.
9279         * tst-attr1.c: New file.
9280         * tst-attr2.c: New file.
9282         * Makefile: Add rules to build and run tst-atfork2 test.
9283         * tst-atfork2.c: New file.
9284         * tst-atfork2mod.c: New file.
9286         * sysdeps/unix/sysv/linux/unregister-atfork.c
9287         (__unregister_atfork): Free the memory allocated for the handlers
9288         after removing them from the lists.
9290         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9291         cleanup function.
9293         * tst-atfork1.c (do_test): Wait for the child we forked.
9294         Report error in child.
9296         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9298         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9300 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9302         * Makefile (tests): Add tst-cancel8.
9303         * tst-cancel8.c: New file.
9305         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9306         clearing of control variable.
9307         * Makefile (tests): Add tst-once3 and tst-once4.
9308         * tst-once3.c: New file.
9309         * tst-once4.c: New file.
9311 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9313         * sysdeps/sh/Makefile: New file.
9314         * sysdeps/sh/bits/atomic.h: New file.
9315         * sysdeps/sh/pthread_spin_init.c: New file.
9316         * sysdeps/sh/pthread_spin_lock.c: New file.
9317         * sysdeps/sh/pthread_spin_trylock.S: New file.
9318         * sysdeps/sh/pthread_spin_unlock.S: New file.
9319         * sysdeps/sh/pthreaddef.h: New file.
9320         * sysdeps/sh/tcb-offsets.sym: New file.
9321         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9322         * sysdeps/sh/tls.h: New file.
9323         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9324         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9325         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9326         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9327         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9328         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9329         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9330         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9331         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9332         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9333         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9334         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9335         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9336         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9337         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9338         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9339         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9340         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9341         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9342         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9343         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9344         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9345         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9346         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9347         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9348         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9349         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9350         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9351         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9352         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9354 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9356         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9357         according to POSIX.
9359         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9361 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9363         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9364         (TLS_GET_FS): New #define.
9365         (TLS_SET_FS): New #define.
9366         Correct value of __NR_set_thread_area.
9368         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9370 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9372         * Makefile (tests): Add tst-popen1.
9373         * tst-popen1.c: New file.
9375         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9376         but inactive generalization.
9377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9378         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9379         Minor optimization, remove one instruction.
9380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9382 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9384         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9386 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9388         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9389         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9390         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9391         * sysdeps/pthread/pthread_cond_signal.c: New file.
9392         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9393         * sysdeps/pthread/pthread_cond_wait.c: New file.
9394         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9395         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9396         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9397         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9398         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9399         * sysdeps/s390/Makefile: New file.
9400         * sysdeps/s390/bits/atomic.h: New file.
9401         * sysdeps/s390/pthread_spin_init.c: New file.
9402         * sysdeps/s390/pthread_spin_lock.c: New file.
9403         * sysdeps/s390/pthread_spin_trylock.c: New file.
9404         * sysdeps/s390/pthread_spin_unlock.c: New file.
9405         * sysdeps/s390/pthreaddef.h: New file.
9406         * sysdeps/s390/tcb-offsets.sym: New file.
9407         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9408         * sysdeps/s390/tls.h: New file.
9409         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9410         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9411         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9412         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9413         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9414         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9415         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9416         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9417         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9418         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9419         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9420         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9421         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9422         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9423         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9424         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9425         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9426         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9427         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9428         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9429         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9430         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9431         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9433 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9435         * atomic.h: Add a couple more default implementations.
9436         (atomic_compare_and_exchange_acq): Use
9437         __arch_compare_and_exchange_32_acq in return value definition.  It
9438         always exists.
9439         (atomic_bit_set): Renamed from atomic_set_bit.
9440         Add missing atomic_ prefixes.
9442         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9443         thread library is available, use correct value to mark initialized
9444         once variable.
9446 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9448         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9449         __sysconf to determine pagesize.
9451         * pthread_create.c: Include <atomic.h>.
9452         * allocatestack.c (allocate_stack): Implement coloring of the
9453         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9454         size minus one.  Adjust users.
9455         * sysdeps/i386/i686/Makefile: New file.
9457 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9459         * allocatestack.c: Improve comment throughout the file.
9461         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9462         (__lll_lock_wait): Add branch prediction.
9463         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9464         (__lll_lock_wait): Likewise.
9465         (lll_unlock_wake_cb): Removed.
9467 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9469         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9470         _POSIX_THREAD_PRIORITY_SCHEDULING.
9472 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9474         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9475         Fix return type of ptr___pthread_getspecific.
9477 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9479         * Makefile (tests): Add tst-umask1.
9480         (tst-umask1-ARGS): Define.
9481         * tst-umask1.c: New file.
9483 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9485         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9486         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9487         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9488         pthread_rwlock_unlock.
9489         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9490         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9491         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9493         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9494         New file.
9495         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9496         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9497         New file.
9498         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9499         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9500         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9501         New file.
9502         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9503         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9504         New file.
9505         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9506         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9507         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9508         New file.
9509         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9510         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9511         New file.
9512         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9514         * Makefile (libpthread-routines): Remove lowlevelcond and
9515         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9516         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9517         and pthread_cond_broadcast.
9518         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9519         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9520         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9521         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9522         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9523         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9524         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9525         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9526         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9527         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9532         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9533         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9534         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9535         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9536         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9537         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9538         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9539         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9540         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9541         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9542         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9543         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9544         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9545         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9546         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9547         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9548         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9550         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9551         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9552         of the code is moved to ...
9553         * sysdeps/pthread/createthread.c: ...here.  New file.
9555 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9557         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9558         (__new_sem_post): Clear %eax before returning.
9559         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9561         * Makefile (tests): Add tst-cleanup2.
9562         * tst-cleanup2.c: New file.
9564         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9565         Interpret first parameter correctly.
9567 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9569         * Makefile (headers): Add bits/semaphore.h.
9571 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9573         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9574         if not SHARED.
9576 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9578         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9579         must be used and mapping failed.
9580         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9582         * Makefile (CFLAGS-pthread_self.os): Define this, not
9583         CFLAGS-pthread_self.c.
9585 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9587         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9588         lll_unlock_wake_cb.
9590         * Makefile (libpthread-routines): Add version.  Add rules to build
9591         version.os and banner.h.
9592         * version.c: New file.
9594 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9596         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9597         the alias unconditional.
9598         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9600 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9602         * Makefile (CFLAGS-pthread_self.c): New definition.
9604 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9606         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9607         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9608         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9609         * init.c (__pthread_initialize_minimal_internal): Likewise.
9611 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9613         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9615         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9616         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9617         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9618         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9619         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9620         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9622 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9624         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9625         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9626         * tst-cancel-wrappers.sh: Remove all exceptions.
9628 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9630         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9631         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9633         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9634         Use __libc_pthread_functions array if SHARED.
9636         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9637         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9639         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9640         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9641         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9642         __libc_ptf_call instead of __libc_maybe_call.
9643         (PTF): New #define.
9644         (__libc_cleanup_region_start): Wrap function name with PTF call.
9645         (__libc_cleanup_region_end): Likewise.
9646         (__libc_cleanup_end): Likewise.
9648         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9649         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9650         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9651         * pthreadP.h: Add prototypes.
9653         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9654         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9655         __pthread_rwlock_unlock aliases.
9656         * pthreadP.h: Add prototypes for new aliases.
9658         * pthreadP.h (struct pthead_functions): Moved to...
9659         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9660         * init.c (pthread_functions): Add initializers for new elements.
9662         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9663         __pthread_cleanup_pop_restore aliases.
9664         * pthreadP.h: Add prototypes.
9666         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9667         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9668         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9669         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9670         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9671         * pthreadP.h: Adjust prototypes and callers.
9673 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9675         * Makefile (tests): Add tst-cancel7.
9676         (tst-cancel7-ARGS): New variable.
9677         * tst-cancel7.c: New file.
9679         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9680         around gcc defficiencies.
9681         * old_pthread_cond_signal.c: Likewise.
9682         * old_pthread_cond_timedwait.c: Likewise.
9683         * old_pthread_cond_wait.c: Likewise.
9685         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9687 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9689         * Makefile (tests): Add tst-cond7.
9690         * tst-cond7.c: New file.
9692         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9693         (condvar_cleanup): Get condvar address from the right place.
9695         * atomic.h: Correct definitions of atomic_full_barrier,
9696         atomic_read_barrier, atomic_write_barrier.
9698         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9699         race-free.
9700         * old_pthread_cond_signal.c: Likewise.
9701         * old_pthread_cond_timedwait.c: Likewise.
9702         * old_pthread_cond_wait.c: Likewise.
9704 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9706         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9708 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9710         * pthreadP.h (pthread_cond_2_0_t): New type.
9711         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9712         Use new type for the 2.0 condvar function prototypes.
9713         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9714         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9715         parameter.
9716         * old_pthread_cond_destroy.c: Likewise.
9717         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9718         * old_pthread_cond_signal.c: Likewise.
9719         * old_pthread_cond_timedwait.c: Likewise.
9720         * old_pthread_cond_wait.c: Likewise.
9722         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9723         (__pthread_cond_wait): Don't save cancellation mode and seq value
9724         in same location.
9726         * herrno.c (__h_errno_location): Don't define as weak.
9728 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9730         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9731         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9732         and pthread_cond_wait.
9733         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9734         Renamed to...
9735         (__pthread_cond_broadcast_2_0): ... this.
9736         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9737         Renamed to...
9738         (__pthread_cond_destroy_2_0): ... this.
9739         * old_pthread_cond_init.c (__old_pthread_cond_init):
9740         Renamed to...
9741         (__pthread_cond_init_2_0): ... this.
9742         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9743         Renamed to...
9744         (__pthread_cond_signal_2_0): ... this.
9745         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9746         Renamed to...
9747         (__pthread_cond_wait_2_0): ... this.
9748         * pthread_cond_destroy.c: Include shlib-compat.h.
9749         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9750         * pthread_cond_init.c: Include shlib-compat.h.
9751         (pthread_cond_init): Change strong_alias into versioned_symbol.
9752         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9753         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9754         fields.
9755         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9756         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9757         __pthread_cond_wait_2_0): New prototypes.
9758         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9759         __old_pthread_cond_init, __old_pthread_cond_signal,
9760         __old_pthread_cond_wait): Removed.
9761         * init.c: Include shlib-compat.h.
9762         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9763         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9764         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9765         ptr___pthread_cond_*_2_0 fields.
9766         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9767         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9769         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9770         LIBC_SIGACTION was not yet defined.
9771         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9772         [!defined LIBC_SIGACTION] (__sigaction): New function and
9773         libc_hidden_weak.
9774         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9775         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9777 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9779         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9781 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9783         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9784         New, larger type definition.
9785         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9786         implementation.
9787         * Versions [libpthread]: Add definitions for new pthread_cond_*
9788         interfaces for version GLIBC_2.3.2.
9789         * pthread_cond_init.c: Update initialization for new type definition.
9790         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9791         pthread_cond_timedwait, pthread_cond_signal, and
9792         pthread_cond_broadcast.  Add old_pthread_cond_init,
9793         old_pthread_cond_destroy, old_pthread_cond_wait,
9794         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9795         old_pthread_cond_broadcast.
9796         * old_pthread_cond_broadcast.c: New file.
9797         * old_pthread_cond_destroy.c: New file.
9798         * old_pthread_cond_init.c: New file.
9799         * old_pthread_cond_signal.c: New file.
9800         * old_pthread_cond_timedwait.c: New file.
9801         * old_pthread_cond_wait.c: New file.
9802         * pthreadP.h: Add prototypes for the compatibility interfaces.
9804         * pthread_cond_destroy.c: Don't include <errno.h>.
9806 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9808         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9809         unnecessary zero offset when addressing MUTEX.
9811 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9813         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9814         __register_atfork.
9815         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9816         for __register_atfork.
9818 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9820         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9821         instead of ASSEMBLER test macro.
9823         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9824         __libc_current_sigrtmax): Add libc_hidden_def.
9826         * sysdeps/pthread/list.h: Remove assert.h include.
9828 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9830         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9831         __pthread_initialize_minimal_internal not
9832         __pthread_initialize_minimal.
9834 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9836         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9837         __pthread_initialize_minimal as hidden.
9839         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9840         constructor.
9842 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9844         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9845         $(common-objpfx)format.lds, include that into the output script.
9846         Fix comment.
9847         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9849 2002-12-28  Andreas Jaeger  <aj@suse.de>
9851         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9852         nsec resolution changes.
9853         (xstat64_conv): Likewise.
9854         (xstat32_conv): Likewise.
9855         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9856         struct kernel_stat.
9857         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9858         structs stat and stat64.
9859         * time/time.h (__timespec_defined): Define for __USE_MISC.
9860         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9862 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9864         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9865         argument.
9866         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9867         (pthread_exit): Use strong_alias to avoid warnings.
9868         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9869         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9870         ptr___pthread_attr_init_2_*.
9871         * init.c (pthread_functions): Adjust.
9873 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9875         * forward.c: Make all functions available by default again.  It
9876         caused too much trouble.
9878         * pt-siglongjmp.c: Removed.
9880 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9882         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9883         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9884         * sysdeps/i386/Makefile: New file.
9885         * sysdeps/i386/tcb-offsets.sym: New file.
9886         * sysdeps/pthread/tcb-offsets.h: New file.
9887         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9888         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9890         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9891         __register_atfork...
9892         (GLIBC_2.3.2): ...here.
9894 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9896         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9897         pthread_attr_setstackaddr with __attribute_deprecated__.
9899 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9901         * pt-system.c (system): Remove cancellation handling.
9902         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9903         cancellation routines.
9905 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9907         * descr.h: Include <dl-sysdep.h>.
9908         (struct pthread): Move header.data.list to the back of the struct.
9909         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9910         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9911         (SYSINFO_OFFSEET): Likewise.
9913 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9915         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9916         Define.
9917         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9918         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9919         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9920         (USE_DL_SYSINFO): Undef.
9922 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9924         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9925         $(common-objpfx)libc.so.
9926         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9927         it is bigger than pipe buffer size even on arches with bigger
9928         page size.
9929         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9931 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9933         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9934         correct errno access for case that USE___THREAD is not defined.
9936 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9938         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9939         Patch by Marijn Ros <marijn@mad.scientist.com>.
9941 2002-12-22  Roland McGrath  <roland@redhat.com>
9943         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9945 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9947         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9949 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9951         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9952         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9953         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9955         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9956         of int $0x80.
9957         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9958         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9959         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9960         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9961         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9962         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9963         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9964         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9966         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9967         sysenter.
9968         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9970         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9972         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9973         in new TCB.
9974         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9975         that sysinfo is properly initialized.
9976         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9977         to 1 only for ld.so.
9979         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9980         RTLD_CORRECT_DYNAMIC_WEAK.
9982 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9984         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9985         Use return 0 as 6th argument to FORWARD4.
9986         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9988 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9990         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9991         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9992         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9993         (INIT_SYSINFO): New #define.
9994         (TLS_TP_INIT): Use INIT_SYSINFO.
9995         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9996         At test to make sure SYSINFO_OFFSET value is correct.
9997         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9999 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10001         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10002         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10003         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10004         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10005         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10006         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10007         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10009 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10011         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10012         macro instead of using int $0x80 directly.
10014         * sysdeps/pthread/bits/stdio-lock.h: New file.
10015         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10016         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10017         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10018         * Makefile (routines): Add libc-lowlevelmutex.
10020         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10021         __i686.get_pc_thunk.dx.
10023 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10025         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10026         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10027         ($(objpfx)tst-cancel-wrappers.out): New rule.
10028         * tst-cancel-wrappers.sh: New test.
10029         * tst-locale1.c: Include signal.h.
10030         (uselocale): Test static linking of __libc_current_sigrt*.
10032 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10034         * Makefile (tests): Add tst-cancel6.
10035         * tst-cancel6.c: New file
10037 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10039         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10040         Define meaningfully for assembler as well.
10041         * pthreadP.h (struct pthread_functions): Remove
10042         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10043         and ptr_pthread_attr_init_2_1 fields.
10044         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10045         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10046         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10047         (FORWARD3): Define using FORWARD4.
10048         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10049         versions.
10050         * pt-system.c: Remove duplicate stdlib.h include.
10052 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10054         * sem_init.c: Define sem_init@GLIBC_2.0.
10055         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10056         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10058         * flockfile.c: Moved to...
10059         * sysdeps/pthread/flockfile.c: ...here.  New file.
10060         * funlockfile.c: Moved to...
10061         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10062         * ftrylockfile.c: Moved to...
10063         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10065 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10067         * libc-cancellation.c: Guard both function with
10068         #if !defined NOT_IN_libc.
10069         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10070         automatically provided pthread wrappers.
10071         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10072         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10073         nor in libpthread.
10074         * pt-open.c: Removed.
10075         * pt-fcntl.c: Removed.
10076         * pt-fsync.c: Removed.
10077         * pt-lseek.c: Removed.
10078         * pt-msgrcv.c: Removed.
10079         * pt-msgsnd.c: Removed.
10080         * pt-msync.c: Removed.
10081         * pt-nanosleep.c: Removed.
10082         * pt-open64.c: Removed.
10083         * pt-pause.c: Removed.
10084         * pt-pread.c: Removed.
10085         * pt-pread64.c: Removed.
10086         * pt-pwrite.c: Removed.
10087         * pt-pwrite64.c: Removed.
10088         * pt-read.c: Removed.
10089         * pt-recv.c: Removed.
10090         * pt-recvfrom.c: Removed.
10091         * pt-recvmsg.c: Removed.
10092         * pt-send.c: Removed.
10093         * pt-sendto.c: Removed.
10094         * pt-sigtimedwait.c: Removed.
10095         * pt-sigwait.c: Removed.
10096         * pt-wait.c: Removed.
10097         * pt-waitpid.c: Removed.
10098         * pt-write.c: Removed.
10099         * pt-accept.c: Removed.
10100         * pt-close.c: Removed.
10101         * pt-connect.c: Removed.
10102         * pt-lseek64.c: Removed.
10103         * pt-sendmsg.c: Removed.
10104         * pt-tcdrain.c: Removed.
10106 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10108         * init.c (__pthread_initialize_minimal_internal): Renamed from
10109         __pthread_initialize_minimal.  Make old name an alias.  This
10110         converts a normal relocation into a relative relocation.
10112         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10114         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10115         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10116         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10117         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10118         pt-sigwaitinfo, pt-waitid, and pt-writev.
10119         * pt-creat.c: Removed.
10120         * pt-poll.c: Removed.
10121         * pt-pselect.c: Removed.
10122         * pt-readv.c: Removed.
10123         * pt-select.c: Removed.
10124         * pt-sigpause.c: Removed.
10125         * pt-sigsuspend.c: Removed.
10126         * pt-sigwaitinfo.c: Removed.
10127         * pt-waitid.c: Removed.
10128         * pt-writev.c: Removed.
10130         * init.c (pthread_functions): New variable.
10131         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10132         (or NULL) to __libc_pthread_init.
10133         * forward.c: Rewrite to use __libc:pthread_functions array to get
10134         function addresses.
10135         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10136         prototype.
10137         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10138         Take new parameter.  Copy content of variable pointed to by it
10139         to __libc_pthread_init.
10141         * pthreadP.h (struct pthread_functions): New type.
10142         (__libc_pthread_init): Declare.
10144         * pthread_attr_destroy.c: Add namespace protected alias.
10145         * pthread_attr_getdetachstate.c: Likewise.
10146         * pthread_attr_getinheritsched.c: Likewise.
10147         * pthread_attr_getschedparam.c: Likewise.
10148         * pthread_attr_getschedpolicy.c: Likewise.
10149         * pthread_attr_getscope.c: Likewise.
10150         * pthread_attr_setdetachstate.c: Likewise.
10151         * pthread_attr_setinheritsched.c: Likewise.
10152         * pthread_attr_setschedparam.c: Likewise.
10153         * pthread_attr_setschedpolicy.c: Likewise.
10154         * pthread_attr_setscope.c: Likewise.
10155         * pthread_cond_broadcast.c: Likewise.
10156         * pthread_cond_destroy.c: Likewise.
10157         * pthread_cond_init.c: Likewise.
10158         * pthread_cond_signal.c: Likewise.
10159         * pthread_cond_wait.c: Likewise.
10160         * pthread_condattr_destroy.c: Likewise.
10161         * pthread_condattr_init.c: Likewise.
10162         * pthread_equal.c: Likewise.
10163         * pthread_exit.c: Likewise.
10164         * pthread_getschedparam.c: Likewise.
10165         * pthread_self.c: Likewise.
10166         * pthread_setcancelstate.c: Likewise.
10167         * pthread_setschedparam.c: Likewise.
10168         * pthread_mutex_destroy.c: Likewise.
10169         * pthread_mutex_init.c: Likewise.
10170         * pthreadP.h: Add prototypes for the aliases.
10172         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10173         multiple_threads member in correct TCB to 1.
10175         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10176         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10177         member of thread decriptor, otherwise return unconditionally 1.
10179 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10181         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10182         regular Linux version.  Remove file.
10183         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10184         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10185         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10186         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10187         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10188         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10189         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10190         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10191         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10192         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10193         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10194         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10195         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10196         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10197         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10198         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10199         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10200         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10201         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10202         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10203         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10204         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10205         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10206         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10207         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10208         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10209         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10210         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10211         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10212         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10214 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10216         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10217         * sysdeps/unix/sysv/linux/open.c: Removed.
10218         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10219         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10220         * sysdeps/unix/sysv/linux/msync.c: Removed.
10221         * sysdeps/unix/sysv/linux/read.c: Removed.
10222         * sysdeps/unix/sysv/linux/close.c: Removed.
10223         * sysdeps/unix/sysv/linux/creat.c: Removed.
10224         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10225         * sysdeps/unix/sysv/linux/pause.c: Removed.
10226         * sysdeps/unix/sysv/linux/select.c: Removed.
10227         * sysdeps/unix/sysv/linux/write.c: Removed.
10229 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10231         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10232         element in TCB to see whether locking is needed.
10234         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10235         MULTIPLE_THREADS_OFFSET value is correct.
10237         * sysdeps/unix/sysv/linux/close.c: New file.
10238         * sysdeps/unix/sysv/linux/connect.S: New file.
10239         * sysdeps/unix/sysv/linux/creat.c: New file.
10240         * sysdeps/unix/sysv/linux/fsync.c: New file.
10241         * sysdeps/unix/sysv/linux/llseek.c: New file.
10242         * sysdeps/unix/sysv/linux/lseek.c: New file.
10243         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10244         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10245         * sysdeps/unix/sysv/linux/msync.c: New file.
10246         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10247         * sysdeps/unix/sysv/linux/open.c: New file.
10248         * sysdeps/unix/sysv/linux/open64.c: New file.
10249         * sysdeps/unix/sysv/linux/pause.c: New file.
10250         * sysdeps/unix/sysv/linux/poll.c: New file.
10251         * sysdeps/unix/sysv/linux/pread.c: New file.
10252         * sysdeps/unix/sysv/linux/pread64.c: New file.
10253         * sysdeps/unix/sysv/linux/pselect.c: New file.
10254         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10255         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10256         * sysdeps/unix/sysv/linux/readv.c: New file.
10257         * sysdeps/unix/sysv/linux/recv.S: New file.
10258         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10259         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10260         * sysdeps/unix/sysv/linux/select.c: New file.
10261         * sysdeps/unix/sysv/linux/send.S: New file.
10262         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10263         * sysdeps/unix/sysv/linux/sendto.S: New file.
10264         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10265         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10266         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10267         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10268         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10269         * sysdeps/unix/sysv/linux/system.c: New file.
10270         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10271         * sysdeps/unix/sysv/linux/wait.c: New file.
10272         * sysdeps/unix/sysv/linux/waitid.c: New file.
10273         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10274         * sysdeps/unix/sysv/linux/writev.c: New file.
10275         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10277         * pt-readv.c: Fix comment.
10279 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10281         * tst-cleanup1.c: Include stdlib.h.
10283         * tst-cancel5.c: New test.
10284         * Makefile (tests): Add tst-cancel5.
10285         (tst-cancel5): Link against libc.so libpthread.so in that order.
10287 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10289         * forward.c (test_loaded): Prevent recursive calls.
10291         * Makefile (routines): Add libc-cancellation.
10292         * libc-cancellation.c: New file.
10293         * descr.h (struct pthread): Add multiple_threads field.
10294         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10295         new thread descriptor to 1.
10296         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10297         Initialize multiple_thread field after successful thread creation.
10298         * cancellation.c (__do_cancel): Move to pthreadP.h.
10299         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10300         (__pthread_disable_asynccancel): Add internal_function attribute.
10301         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10302         * pthread_setcancelstate.c: Likewise.
10303         * pthread_setcanceltype.c: Likewise.
10304         * pthread_exit.c: Likewise.
10305         * pthreadP.h (CANCELLATION_P): Likewise.
10306         (__do_cancel): Define as static inline.
10307         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10308         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10309         declarations.
10310         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10311         fields.  Define MULTIPLE_THREADS_OFFSET.
10312         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10313         declaration.
10314         * sysdeps/unix/sysv/linux/accept.S: New file.
10315         * sysdeps/unix/sysv/linux/read.c: New file.
10316         * sysdeps/unix/sysv/linux/write.c: New file.
10317         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10318         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10319         initialization of __libc_locking_needed.
10320         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10321         __libc_locking_needed, use multiple_threads field in TCB.
10322         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10324 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10326         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10327         version.
10328         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10330         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10331         access to __libc_locking_needed for PIC.
10333 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10335         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10336         declare for libc.so.
10337         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10338         expression.
10339         (__libc_lock_lock): Put into statement expression.
10340         (__libc_lock_unlock): Remove trailing semicolon.
10341         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10343 2002-12-12  Roland McGrath  <roland@redhat.com>
10345         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10346         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10348 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10350         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10351         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10352         Initialize __libc_locking_needed.
10353         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10354         instead of __register_pthread_fork_handler.
10355         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10356         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10357         fork-gen with libc_pthread_init.
10358         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10359         of __register_pthread_fork_handler.
10360         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10361         of __register_pthread_fork_handler.
10362         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10363         __libc_locking_needed to determine whether lock prefix can be avoided.
10364         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10366 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10368         * Makefile (tests): Add tst-cleanup1.
10369         * tst-cleanup1.c: New file.
10370         * cancellation.c (__cleanup_thread): Removed.
10371         (__do_cancel): Remove call to __cleanup_thread.
10372         * pthreadP.h: Remove __cleanup_thread prorotype.
10374         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10375         Remember function and argument even if cancellation handler
10376         function is not available.
10377         (__libc_cleanup_region_end): Execute registered function directly if
10378         pthread functions are not available.
10379         (__libc_cleanup_end): Likewise.
10381         * init.c (__pthread_initialize_minimal): Fix initialization in
10382         static lib by preventing gcc from being too clever.
10384 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10386         * init.c (__pthread_initialize_minimal): Remove unneccesary
10387         sigaddset call.
10389         * Makefile (tests): We can run tst-locale2 now.
10391 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10393         * Versions: Remove duplicated sigwait entry.
10395 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10397         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10398         inside libpthread.
10400         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10402         * pthreadP.h: Declare __pthread_enable_asynccancel and
10403         __pthread_disable_asynccancel.
10404         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10405         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10406         * cancellation.c (__pthread_enable_asynccancel): New function.
10407         (__pthread_disable_asynccancel): New function.
10408         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10409         * pt-close.c: Likewise.
10410         * pt-connect.c: Likewise.
10411         * pt-creat.c: Likewise.
10412         * pt-fcntl.c: Likewise.
10413         * pt-fsync.c: Likewise.
10414         * pt-lseek.c: Likewise.
10415         * pt-lseek64.c: Likewise.
10416         * pt-msgrcv.c: Likewise.
10417         * pt-msgsnd.c: Likewise.
10418         * pt-msync.c: Likewise.
10419         * pt-nanosleep.c: Likewise.
10420         * pt-open.c: Likewise.
10421         * pt-open64.c: Likewise.
10422         * pt-pause.c: Likewise.
10423         * pt-poll.c: Likewise.
10424         * pt-pread.c: Likewise.
10425         * pt-pread64.c: Likewise.
10426         * pt-pselect.c: Likewise.
10427         * pt-pwrite.c: Likewise.
10428         * pt-pwrite64.c: Likewise.
10429         * pt-read.c: Likewise.
10430         * pt-readv.c: Likewise.
10431         * pt-recv.c: Likewise.
10432         * pt-recvfrom.c: Likewise.
10433         * pt-recvmsg.c: Likewise.
10434         * pt-select.c: Likewise.
10435         * pt-send.c: Likewise.
10436         * pt-sendmsg.c: Likewise.
10437         * pt-sendto.c: Likewise.
10438         * pt-sigpause.c: Likewise.
10439         * pt-sigsuspend.c: Likewise.
10440         * pt-sigtimedwait.c: Likewise.
10441         * pt-sigwait.c: Likewise.
10442         * pt-sigwaitinfo.c: Likewise.
10443         * pt-system.c: Likewise.
10444         * pt-tcdrain.c: Likewise.
10445         * pt-wait.c: Likewise.
10446         * pt-waitid.c: Likewise.
10447         * pt-waitpid.c: Likewise.
10448         * pt-write.c: Likewise.
10449         * pt-writev.c: Likewise.
10450         * pthread_join.c: Likewise.
10451         * pthread_timedjoin.c: Likewise.
10453         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10454         (__xpg_sigpause): New function.
10455         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10457 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10459         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10461         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10462         _GI_pthread_cleanup_pop to pthreadP.h.
10464         * ftrylockfile.c: Use _IO_lock_trylock instead of
10465         pthread_mutex_trylock.
10467         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10468         (CANCEL_RESET): Likewise.
10469         (__pthread_setcanceltype_): Declare.
10470         (__pthread_mutex_lock_internal): Declare.
10471         (__pthread_mutex_unlock_internal): Declare.
10472         (__pthread_once_internal): Declare.
10473         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10474         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10476         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10477         and pthread_mutex_unlock.
10478         * pthread_cond_wait.c: Likewise.
10479         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10480         * pthread_mutex_unlock.c: Likewise.
10482         * pthread_setcanceltype.c: Add additional alias
10483         __pthread_setcanceltype.
10485         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10486         * sem_open.c (sem_open): Likewise.
10487         Use __libc_open, __libc_write, and __libc_close instead of
10488         open, write, and close respectively.
10490         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10491         Rewrite as statement expression since it must return a value.
10493         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10494         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10495         __pthread_kill.
10497         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10498         alias __pthread_once_internal.
10500         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10502 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10504         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10505         * tst-stdio1.c: New file.
10506         * tst-stdio2.c: New file.
10508         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10510         * Makefile (tests): Comment out tst-locale2 for now.
10511         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10513         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10514         -D_IO_MTSAFE_IO.
10515         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10516         Use _IO_lock_init instead of explicit assignment.
10518         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10519         Define __libc_lock_* and __libc_lock_recursive macros with
10520         lowlevellock macros, not pthread mutexes.
10522         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10523         of pthread_mutex_lock.
10524         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10525         instead of pthread_mutex_unlock.
10527 2002-12-06  Roland McGrath  <roland@redhat.com>
10529         * allocatestack.c (__stack_user): Use uninitialized defn.
10530         * init.c (__pthread_initialize_minimal): Initialize it here.
10532 2002-12-05  Roland McGrath  <roland@redhat.com>
10534         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10535         string.
10536         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10538         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10539         missing & here too.
10541 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10543         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10544         lowlevellock.
10545         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10546         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10547         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10548         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10549         for __libc_lock_* macros.
10550         * Makefile (routines): Add libc-lowlevellock.
10552 2002-10-09  Roland McGrath  <roland@redhat.com>
10554         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10555         Under [__PIC__], call the function via the pointer fetched for
10556         comparison rather than a call by name that uses the PLT.
10557         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10558         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10559         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10560         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10561         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10563 2002-12-04  Roland McGrath  <roland@redhat.com>
10565         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10567         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10568         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10570         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10572 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10574         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10575         a completely opaque, non-integer type.
10576         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10578 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10580         * sysdeps/i386/tls.h: Include stdlib.h.
10581         * sysdeps/x86_64/tls.h: Likewise.
10583 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10585         * Makefile (tests): Add tst-locale2.
10586         (tests-static): Likewise.
10587         * tst-locale2.c: New file.
10589         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10590         volatile and add memory clobbers to lock operations.
10592 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10594         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10595         * sysdeps/i386/i486/bits/atomic.h: New file.
10596         * sysdeps/i386/i586/bits/atomic.h: New file.
10597         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10598         include i486 version.
10599         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10600         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10601         Patch by Marijn Ros <marijn@mad.scientist.com>.
10603         * allocatestack.c (get_cached_stack): Don't crash if we first
10604         found a stack with a larger size then needed.
10605         Reported by Hui Huang <hui.huang@sun.com>.
10607         * Makefile (tests): Add tst-sysconf.
10608         * tst-sysconf.c: New file.
10610         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10611         PTHREAD_THREADS_MAX.
10613 2002-12-02  Roland McGrath  <roland@redhat.com>
10615         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10616         Declare using hidden_proto instead of attribute_hidden, so there are
10617         non-.hidden static symbols for gdb to find.
10618         (__pthread_keys): Likewise.
10619         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10620         * allocatestack.c (__stack_user): Likewise.
10621         * pthread_create.c (__pthread_keys): Likewise.
10622         (__nptl_threads_events, __nptl_last_event): Make these static instead
10623         of hidden.
10624         * pthread_key_create.c (__pthread_pthread_keys_max,
10625         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10627 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10629         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10630         statically.
10631         * tst-locale1.c: New file.
10633         * pthread_cond_timedwait.c: Include <stdlib.h>.
10635         * Makefile (tests): Add tst-fork2 and tst-fork3.
10636         * tst-fork2.c: New file.
10637         * tst-fork3.c: New file.
10639 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10641         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10643         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10644         require it to 200112L.
10646         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10647         instruction only if HAVE_CMOV is defined.
10648         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10650         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10652         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10654         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10656         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10658 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10660         * sysdeps/x86_64/bits/atomic.h: New file.
10662         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10663         16-bit operations.
10665         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10666         possible since gettid cannot fail.
10668         * sysdeps/x86_64/pthreaddef.h: New file.
10670         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10672         * sysdeps/x86_64/pthread_spin_init.c: New file.
10673         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10674         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10675         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10677         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10678         Add missing lock prefix.  Minute optimization.
10680         * tst-spin2.c (main): Also check successful trylock call.
10682         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10683         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10685         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10686         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10688         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10689         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10690         value in case of an error.  Add support for INTERNAL_SYSCALL.
10692         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10693         value in case of an error.
10695         * sysdeps/x86_64/tls.h: New file.
10697 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10699         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10700         takes the array member name and the index as parameters.
10701         (THREAD_SETMEM_NC): Likewise.
10702         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10703         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10704         interfaces.
10706         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10707         to decide which code to use.
10708         (THREAD_SETMEM_NC): Likewise.
10710         * allocatestack.c (queue_stack): Don't remove stack from list here.
10711         Do it in the caller.  Correct condition to prematurely terminate
10712         loop to free stacks.
10713         (__deallocate_stack): Remove stack from list here.
10715 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10717         * Makefile (tests): Add tst-stack1.
10718         * tst-stack1.c: New file.
10720         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10721         provided stack.
10723         * pthread_attr_getstack.c: Return bottom of the thread area.
10725 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10727         * Makefile (libpthread-routines): Add pt-allocrtsig and
10728         pthread_kill_other_threads.
10729         * pt-allocrtsig.c: New file.
10730         * pthread_kill_other_threads.c: New file.
10731         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10732         all three functions.
10733         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10734         allocrtsig.
10735         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10736         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10737         and __libc_allocate_rtsig_private.
10738         * Versions (libpthread): Export pthread_kill_other_threads_np,
10739         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10741 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10743         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10744         the end of the stack.  Adjust computations.
10745         When mprotect call fails dequeue stack and free it.
10746         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10747         attribute.
10748         * pthread_getattr_np.c: Likewise.
10750         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10751         surprises.
10753 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10755         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10756         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10758 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10760         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10761         * pthread_setspecific.c: Likewise.
10763 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10765         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10766         definitions.  Get them from the official place.
10767         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10769         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10770         Use new CLONE_ flags in clone() calls.
10772         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10773         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10775         * Versions: Add pthread_* functions for libc.
10776         * forward.c: New file.
10778         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10779         errno-loc.
10780         * herrno.c: New file.
10781         * res.c: New file.
10783         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10784         sem_trywait, and sem_timedwait.  Add herrno and res.
10785         * sem_init.c: Don't initialize lock and waiters members.
10786         * sem_open.c: Likewise.
10787         * sem_post.c: Removed.
10788         * sem_wait.c: Removed.
10789         * sem_trywait.c: Removed.
10790         * sem_timedwait.c: Removed.
10791         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10792         Includes full implementations of sem_post, sem_wait, sem_trywait,
10793         and sem_timedwait.
10794         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10795         for new implementation.
10796         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10797         and waiters fields.
10799         * tst-sem3.c: Improve error message.
10800         * tst-signal3.c: Likewise.
10802         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10803         to tell the kernel about the termination futex and to initialize tid
10804         member.  Don't initialize main_thread.
10805         * descr.h (struct pthread): Remove main_thread member.
10806         * cancelllation.c (__do_cancel): Remove code handling main thread.
10807         The main thread is not special anymore.
10809         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10810         size of the stacks to stack_cache_actsize.
10812         * pt-readv.c: Add missing "defined".
10813         * pt-sigwait.c: Likewise.
10814         * pt-writev.c: Likewise.
10816 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10818         * Versions: Export __connect from libpthread.
10819         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10821         * Makefile (libpthread-routines): Add pt-raise.
10822         * sysdeps/unix/sysv/linux/raise.c: New file.
10823         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10824         * sysdeps/generic/pt-raise.c: New file.
10826         * pthread_cond_init.c: Initialize all data elements of the condvar
10827         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10829         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10830         * pthread_create.c: Likewise.
10832         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10833         * tst-key1.c: New file.
10834         * tst-key2.c: New file.
10835         * tst-key3.c: New file.
10837         * Versions: Export pthread_detach for version GLIBC_2.0.
10838         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10840 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10842         * pthread_key_create.c: Terminate search after an unused key was found.
10843         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10845         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10846         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10848 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10850         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10851         dynamic lookup for errno in PIC.
10853         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10854         release the stack lock as soon as possible.
10855         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10856         the static TLS block.
10857         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10859         * cancellation.c: Renamed from cancelation.c.
10860         * Makefile: Adjust accordingly.
10861         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10862         * cleanup_defer.c: Use CANCELLATION_P.
10863         * pthread_testcancel.c: Likewise.
10864         * descr.h: Fix spelling in comments.
10865         * init.c: Likewise.
10866         * pthread_getattr_np.c: Likewise.
10867         * pthread_getschedparam.c: Likewise.
10868         * pthread_setschedparam.c: Likewise.
10869         * Versions: Likewise.
10871         * pt-pselect.c: New file.
10872         * Makefile (libpthread-routines): Add pt-pselect.
10873         * Versions: Add pselect.
10875         * tst-cancel4.c: New file.
10876         * Makefile (tests): Add tst-cancel4.
10878 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10880         * pthread_mutex_lock.c: Always record lock ownership.
10881         * pthread_mutex_timedlock.c: Likewise.
10882         * pthread_mutex_trylock.c: Likewise.
10884         * pt-readv.c: New file.
10885         * pt-writev.c: New file.
10886         * pt-creat.c: New file.
10887         * pt-msgrcv.c: New file.
10888         * pt-msgsnd.c: New file.
10889         * pt-poll.c: New file.
10890         * pt-select.c: New file.
10891         * pt-sigpause.c: New file.
10892         * pt-sigsuspend.c: New file.
10893         * pt-sigwait.c: New file.
10894         * pt-sigwaitinfo.c: New file.
10895         * pt-waitid.c: New file.
10896         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10897         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10898         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10899         * Versions: Add all the new functions.
10901         * tst-exit1.c: New file.
10902         * Makefile (tests): Add tst-exit1.
10904         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10906 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10908         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10910         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10911         call.  pthread_join is an official cancellation point.
10912         * pthread_timedjoin.c: Likewise.
10914         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10915         and the condvar's mutex are retrieved.
10916         * pthread_cond_timedwait.c: Likewise.
10917         Reported by dice@saros.East.Sun.COM.
10919 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10921         * pthreadP.h: Cut out all type definitions and move them...
10922         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10923         * pthreadP.h: Include <internaltypes.h>.
10925         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10926         performance tweaks.
10928         * sem_trywait.c: Shuffle #includes around to get right order.
10929         * sem_timedwait.c: Likewise.
10930         * sem_post.c: Likewise.
10931         * sem_wait.c: Likewise.
10933         * nptl 0.3 released.
10935         * Makefile (tests): Add tst-signal3.
10936         * tst-signal3.c: New file.
10938 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10940         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10941         the asms modify the sem object.
10942         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10944         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10945         the actual members.
10946         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10947         * semaphoreP.h: Include pthreadP.h.
10948         * sem_getvalue.c: Adjust to sem_t change.
10949         * sem_init.c: Likewise.
10950         * sem_open.c: Likewise.
10951         * sem_post.c: Likewise.
10952         * sem_timedwait.c: Likewise.
10953         * sem_trywait.c: Likewise.
10954         * sem_wait.c: Likewise.
10956 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10958         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10959         * tst-basic2.c: New file.
10960         * tst-exec1.c: New file.
10961         * tst-exec2.c: New file.
10962         * tst-exec3.c: New file.
10964         * tst-fork1.c: Remove extra */.
10966         * nptl 0.2 released.  The API for IA-32 is complete.