Merge commit 'origin/master' into fedora/master
[glibc.git] / nptl / ChangeLog
blob59a77528e4e603d6754b3533978bb1f486654ca0
1 2009-08-11  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Add CFI
4         directives.
6 2009-08-10  Ulrich Drepper  <drepper@redhat.com>
8         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Add CFI
9         directives.
10         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
12 2009-08-10  Andreas Schwab  <schwab@redhat.com>
14         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
15         (__pthread_cond_signal): Don't clobber register used for syscall
16         number.
18 2009-08-08  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
21         Optimize code path used when FUTEX_CLOCK_REALTIME is supported.
23         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
24         (__pthread_cond_wait): Optimize by avoiding use of callee-safe
25         register.
27 2009-08-07  Ulrich Drepper  <drepper@redhat.com>
29         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Little optimizations
30         enabled by the special *_asynccancel functions.
31         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
32         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
34         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Include lowlevellock.h.
36 2009-08-04  Ulrich Drepper  <drepper@redhat.com>
38         * sysdeps/unix/sysv/linux/x86_64/cancellation.S: New file.
39         * sysdeps/unix/sysv/linux/x86_64/libc-cancellation.S: New file.
40         * sysdeps/unix/sysv/linux/x86_64/librt-cancellation.S: New file.
41         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Optimize
42         since we can assume the special __*_{en,dis}able_asynccancel
43         functions.
44         (PUSHARGS_*, POPARGS_*, SAVESTK_*, RESTSTK_*): Removed.
45         * sysdeps/x86_64/tcb-offsets.sym: Add cancellation-related bits
46         and PTHREAD_CANCELED.
48 2009-07-31  Ulrich Drepper  <drepper@redhat.com>
50         * descr.h: Better definition of *_BITMASK macros for cancellation.
52 2009-07-29  Ulrich Drepper  <drepper@redhat.com>
54         * sysdeps/x86_64/tls.h (TLS_TCB_ALIGN): Define explicitly to 32.
56         * sysdeps/x86_64/tls.h (tcbhead_t): Add room for SSE registers the
57         dynamic linker might have to save.
58         Define RTLD_CHECK_FOREIGN_CALL, RTLD_ENABLE_FOREIGN_CALL,
59         RTLD_PREPARE_FOREIGN_CALL, and RTLD_FINALIZE_FOREIGN_CALL.  Pretty
60         printing.
62         * sysdeps/x86_64/tcb-offsets.sym: Add RTLD_SAVESPACE_SSE.
64 2009-07-28  Ulrich Drepper  <drepper@redhat.com>
66         * pthread_mutex_lock.c [NO_INCR] (__pthread_mutex_cond_lock_adjust):
67         New function.
68         * pthreadP.h: Declare __pthread_mutex_cond_lock_adjust.
69         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: Add ROBUST_BIT.
70         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Don't use
71         requeue_pi for robust mutexes.
72         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
73         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
74         Don't only skip __pthread_mutex_cond_lock.  Call instead
75         __pthread_mutex_cond_lock_adjust.
76         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
78         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Minor
79         optimization of PI mutex handling.
81 2009-07-27  Ulrich Drepper  <drepper@redhat.com>
83         [BZ #10418]
84         * pthread_mutex_unlock.c (__pthread_mutex_unlock_full): Use _rel
85         instead of of _acq variants of cmpxchg.
87 2009-07-23  Ulrich Drepper  <drepper@redhat.com>
89         * sysdeps/x86_64/configure.in: New file.
91         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix error
92         path when not using absolute timeout futex.
94 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
96         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
97         optimizations of last changes.
98         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
100 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
103         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
104         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
105         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
108         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
109         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
111         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
112         (__pthread_cond_timedwait): Make more robust.
114 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
116         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
117         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
118         directly use absolute timeout.
120         * tst-sem5.c (do_test): Add test for premature timeout.
121         * Makefile: Linu tst-sem5 with librt.
123         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
124         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
125         directly use absolute timeout.
126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
127         (pthread_rwlock_timedrdlock): Likewise.
129         * tst-cond11.c (run_test): Add test to check that the timeout is
130         long enough.
132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
133         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
134         directly use absolute timeout.
136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
137         (__pthread_cond_wait): Convert to using exception handler instead of
138         registered unwind buffer.
139         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
140         (__pthread_cond_timedwait): Likewise.
142 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
144         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
145         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
146         use absolute timeout.
148         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
149         handling of uncontested semaphore.
151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
152         (__condvar_cleanup): Rewrite to use cfi directives instead of
153         hand-coded unwind tables.
154         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
155         Likewise.
156         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
157         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
158         Likewise.
160 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
162         * Makefile (libpthread-routines): Add pthread_sigqueue.
163         * Versions: Add pthread_sigqueue for GLIBC_2.11.
164         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
165         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
167 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
169         [BZ #10262]
170         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
171         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
172         cannot be assumed.
173         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
175 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
177         * libc-cancellation.c: Move __libc_cleanup_routine to...
178         * libc-cleanup.c: ...here.  New file.
179         * Makefile (routines): Add libc-cleanup.
181         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
182         test.
183         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
184         * sysdeps/pthread/librt-cancellation.c: Likewise.
186         [BZ #9924]
187         * nptl-init.c: Renamed from init.c.
188         * Makefile: Change all occurences of init.c to nptl-init.c.
190 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
192         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
193         to test when deciding on the delay.
194         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
195         * pthread_cancel.c: Close race between deciding on sending a signal
196         and setting the CANCELING_BIT bit.
198         * cancellation.c (__pthread_disable_asynccancel): Don't return if
199         thread is canceled.
200         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
202 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
204         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
205         is available.
206         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
207         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
208         * sysdeps/i386/tls.h: Likewise.
209         (tcbhead_t): Add __private_tm member.
211 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
213         * sem_open.c (sem_open): Rewrite initialization of initsem to
214         avoid warnings.
216         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
217         Avoid warning by using may_alias attribute on ptrhack.
219 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
221         [BZ #10090]
222         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
223         Check policy and priority for validity.
224         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
226 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
228         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
229         (__pthread_cond_timedwait): Change to use cfi directives instead of
230         hand-coded unwind sections.
232 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
234         * init.c (nptl_freeres): Compile only for SHARED.
236 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
238         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
239         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
240         FUTEX_BITSET_MATCH_ANY.
242 2009-02-27  Roland McGrath  <roland@redhat.com>
244         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
245         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
247 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
249         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
250         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
251         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
252         200112L to 200809L.
254 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
256         * sysdeps/pthread/pthread.h: The robust mutex functions are in
257         POSIX 2008.
259 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
261         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
262         Unify name of include protector macro.
264 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
266         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
267         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
269 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
271         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
272         pointer variables.
274         * allocatestack.c (__free_stacks): Renamed from free_stacks.
275         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
276         * init.c (nptl_freeres): New function.
277         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
278         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
279         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
280         variable.
281         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
282         load DSO.  Assign last.
283         (__unwind_freeres): New function.
285         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
286         for better debugging.  No need to use stack_list_add here.
288 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
290         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
291         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
292         instead of computing relative timeout.
293         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
294         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
296 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
298         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
300 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
302         * sysdeps/pthread/list.h (list_add): Initialize new element first.
303         (list_add_tail): Removed.
305 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
307         * (in_flight_stack): New variable.
308         (stack_list_del): New function.  Use instead of list_del.
309         (stack_list_add): New function.  Use instead of list_add when adding to
310         stack_cache and stack_used lists.
311         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
312         when the fork call interrupted another thread.
314 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
316         * init.c (__pthread_initialize_minimal_internal): Optimize test
317         FUTEX_CLOCK_REALTIME a bit.
319 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
321         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
322         only passing five parameters to FUTEX_WAIT_BITSET call.
324         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
325         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
326         instead of computing relative timeout.
328 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
330         * init.c (__pthread_initialize_minimal_internal): Check for
331         FUTEX_CLOCK_REALTIME flag.
332         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
333         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
334         relative timeout.
336         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
337         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
338         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
339         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
340         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
341         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
343 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
345         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
346         loop body instead of ; to avoid gcc warnings.
347         (pthread_cleanup_pop_restore_np): Likewise.
348         Patch by Caolán McNamara <caolanm@redhat.com>.
350 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
352         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
353         fast path here, for robust/PI/PP mutexes call
354         __pthread_mutex_lock_full.  Don't use switch, instead use a series
355         of ifs according to their probability.
356         (__pthread_mutex_lock_full): New function.
357         * pthread_mutex_unlock.c: Include assert.h.
358         (__pthread_mutex_unlock_usercnt): Handle only the
359         fast path here, for robust/PI/PP mutexes call
360         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
361         of ifs according to their probability.
362         (__pthread_mutex_unlock_full): New function.
363         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
364         (__pthread_mutex_lock_full): Define.
366 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
368         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
369         implementation.  Add necessary padding and.
370         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
371         words.
373 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
375         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
376         and FUTEX_WAKE_BITSET.
378 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
380         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
381         and FUTEX_WAKE_BITSET.
382         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
383         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
384         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
385         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
387 2008-11-25  Roland McGrath  <roland@redhat.com>
389         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
390         Subdirectories moved to ports repository as
391         sysdeps/.../nptl subdirectories.
393 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
395         [BZ #7008]
396         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
397         of old value.
398         * pthread_cond_init.c (__pthread_cond_init): Fix
399         cond->__data.__nwaiters initialization.
400         * Makefile (tests): Add tst-cond23.
401         * tst-cond23.c: New test.
403 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
405         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
406         arguments.
407         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
408         arguments.
410 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
412         [BZ #6955]
413         * pthread_mutex_lock.c: Add support for private PI mutexes.
414         * pthread_mutex_timedlock.c: Likewise.
415         * pthread_mutex_trylock.c: Likewise.
416         * pthread_mutex_unlock.c: Likewise.
417         Patch mostly by Ben Jackson <ben@ben.com>.
419 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
421         [BZ #6843]
422         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
423         Increase stack size for helper thread.
425 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
427         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
428         assembly with a clobber list for access registers a0 and a1.
430 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
432         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
433         to force runp->refcntr to be read from memory.
435 2008-09-08  Richard Guenther  <rguenther@suse.de>
437         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
438         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
439         lll_timedlock, lll_robust_timedlock, lll_unlock,
440         lll_robust_unlock): Promote private to int.
442 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
444         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
445         ARCH_RETRY_MMAP definitions.
446         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
447         Define MAP_STACK when not defined.
448         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
449         handling of ARCH_RETRY_MMAP.
451 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
453         * tst-align2.c (f): Print message that f is reached.
455 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
457         [BZ #6740]
458         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
459         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
461 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
463         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
464         SOCK_CLOEXEC if possible.
466 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
468         * Makefile (tests): Add tst-rwlock2a.
469         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
470         * tst-rwlock2a.c: New file.
472 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
474         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
476 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
478         * sysdeps/pthread/pthread.h: Fix typo in comment.
480 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
482         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
483         of CPU set to the kernel.
485 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
487         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
488         cfi directives.
489         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
491         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
493         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
494         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
496 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
498         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
499         cfi directives.
500         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
501         Likewise.
502         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
503         Likewise.
504         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
505         Likewise.
507 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
509         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
511 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
513         David S. Miller  <davem@davemloft.net>
515         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
517 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
519         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
520         __pshared correctly.
521         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
522         Likewise.
523         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
524         Likewise.
525         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
526         Likewise.
527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
528         Likewise.
529         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
531 2008-04-14  David S. Miller  <davem@davemloft.net>
533         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
534         (__old_sem_wait): Fix argument to lll_futex_wait().
536 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
538         * pthread_create.c: Require pthread_mutex_trylock and
539         pthread_key_delete for libgcc.
541 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
543         [BZ #6020]
544         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
545         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
546         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
548 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
550         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
551         <linux/limits.h> has defined it.
552         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
553         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
554         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
555         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
557 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
559         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
560         of ASSEMBLER.
561         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
562         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
564 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
566         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
567         HAVE_DL_DISCOVER_OSVERSION.
568         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
569         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
571 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
573         [BZ #5778]
574         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
575         _POSIX_CHOWN_RESTRICTED value to zero.
577 2008-01-31  Roland McGrath  <roland@redhat.com>
579         * Makefile (omit-deps): Variable removed.
581 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
583         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
584         unnecessary addr32 prefix.
586 2008-01-29  Roland McGrath  <roland@redhat.com>
588         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
590 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
592         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
594 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
596         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
597         a scratch register.
598         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
599         (__lll_lock_wait_private): Fix typo.
600         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
601         (pthread_barrier_wait): Likewise.  Adjust XADD use.
602         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
603         Adjust XADD use.
604         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
605         (pthread_rwlock_timedrdlock): Return correct return value.
606         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
607         (pthread_rwlock_timedwrlock): Likewise.
609 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
611         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
612         thread returns the program exits with an error code.
614 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
616         * pthread-errnos.sym: Add EOVERFLOW.
617         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
618         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
619         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
620         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
622 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
624         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
625         parameter.  Passed it as permission to mmap.
626         * allocatestack.c (allocate_stack): Pass prot as second parameter
627         to ARCH_RETRY_MMAP.
629 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
631         * tst-basic7.c: Allocate memory for the stack.
633         [BZ #5465]
634         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
635         (__pthread_cond_timedwait): Don't use VDSO.
636         Patch by Michal Januszewski.
638 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
640         [BZ #5455]
641         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
642         Allow label before pthread_cleanup_pop.
643         (pthread_cleanup_pop_restore_np): Likewise.
645 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
647         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
648         Store 2 before returning ETIMEDOUT.
650 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
652         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
653         Store 2 before returning ETIMEDOUT.
654         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
655         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
656         (__lll_lock_wait_private): Optimize.
657         (__lll_lock_wait): Likewise.
659 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
661         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
662         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
663         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
665 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
667         [BZ #5240]
668         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
669         If we time out, try one last time to lock the futex to avoid
670         losing a wakeup signal.
671         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
672         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
674         [BZ #5245]
675         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
676         if necessary.
678 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
680         [BZ #5245]
681         * allocatestack.c (allocate_stack): Change ENOMEM error in case
682         mmap failed to EAGAIN.
683         * Makefile (tests): Add tst-basic7.
684         * tst-basic7.c: New file.
686 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
688         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
689         Use __linkin_atfork.
691 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
693         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
694         missing line continuations.
695         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
696         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
698 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
700         [BZ #5220]
701         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
702         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
703         (struct timer): Add next element.
704         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
705         enqueue timer structure into __active_timer_sigev_thread list.
706         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
707         remove timer struct from __active_timer_sigev_thread.
708         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
709         Before using timer structure make sure it is still on the
710         __active_timer_sigev_thread list.  Keep lock until done.
711         Define __active_timer_sigev_thread and
712         __active_timer_sigev_thread_lock.
714 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
716         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
717         Redefine thread_atfork for use of ATFORK_MEM.
718         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
719         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
720         function.
721         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
722         Use atomic operation when removing first element of list.
724 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
726         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
727         routine instead of an alias to __new_sem_post.
729 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
731         * init.c (__pthread_initialize_minimal): Initialize word to appease
732         valgrind.
734 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
736         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
737         libc.so just clear NAME.
738         (__libc_rwlock_fini): Nop inside of libc.so.
739         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
740         all zeros.
742 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
744         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
745         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
746         unlocking failed.
747         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
749 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
751         [BZ #4938]
752         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
753         reclaimed stack if necessary.
754         * Makefile (tests): Add tst-tsd6.
755         * tst-tsd6.c: New file.
757 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
759         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
760         Add private argument.
762 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
765         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
767 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
769         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
770         (__lll_robust_timedlock): Pass private as last argument to
771         __lll_robust_timedlock_wait.
772         (__lll_unlock): Fix a pasto.
774 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
776         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
777         sparc_old_sem): New structs.
778         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
779         (__sem_wait_cleanup): New function.
780         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
781         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
782         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
783         lll_futex_wait.
784         (__old_sem_wait): New function.
785         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
786         nptl/sysdeps/unix/sysv/linux/sparc version.
787         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
788         Likewise.
789         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
790         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
791         (__new_sem_trywait): Use sparc_old_sem structure.
792         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
793         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
794         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
795         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
796         lll_futex_timed_wait.
797         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
798         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
799         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
800         lll_futex_wake.
801         (__old_sem_post): New function.
802         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
803         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
804         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
805         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
806         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
807         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
809 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
811         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
812         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
813         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
814         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
815         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
816         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
817         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
818         Use FUTEX_WAKE_OP.
819         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
820         kernel-features.h and tcb-offsets.h.
821         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
822         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
823         process private.
824         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
825         tcb-offsets.h.
826         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
827         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
828         process private.
829         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
830         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
831         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
832         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
833         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
834         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
835         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
837 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
839         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
840         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
841         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
842         lll_futex_timed_wait.
844         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
845         __lll_robust_unlock): Rewrite as macros instead of inline functions.
846         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
847         __lll_robust_unlock, __lll_wait_tid): Likewise.
849 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
851         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
852         Fix a pasto.
853         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
854         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
855         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
856         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
857         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
858         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
859         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
861         kernel-features.h.
862         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
863         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
864         process private.  Switch DW_CFA_advance_loc1 and some
865         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
867         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
868         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
869         process private.  Switch DW_CFA_advance_loc{1,2} and some
870         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
871         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
872         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
873         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
874         Likewise.
875         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
877         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
878         Likewise.
879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
880         (__pthread_cond_broadcast): Compare %r8 instead of
881         dep_mutex-cond_*(%rdi) with $-1.
882         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
883         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
884         of oring.
886 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
888         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
890 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
892         * allocatestack.c: Include kernel-features.h.
893         * pthread_create.c: Likewise.
894         * pthread_mutex_init.c: Likewise.
895         * init.c: Likewise.
896         * pthread_cond_timedwait.c: Likewise.
897         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
898         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
899         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
900         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
901         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
902         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
903         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
904         Likewise.
905         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
906         Likewise.
907         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
908         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
909         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
910         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
912 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
914         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
915         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
916         byte elements.  One of them is the new __shared element.
917         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
918         adjust names of other padding elements.
919         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
920         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
921         byte elements.  One of them is the new __shared element.
922         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
923         adjust names of other padding elements.
924         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
925         Renamed __pad1 element to __shared, adjust names of other padding
926         elements.
927         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
928         (pthread_rwlock_t): Likewise.
929         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
930         typo.
932 2007-08-09  Anton Blanchard  <anton@samba.org>
934         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
936 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
939         <kernel-features.h>.
940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
942 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
944         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
945         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
946         dealing with robust mutexes.
947         * pthread_mutex_timedlock.c: Likewise.
948         * pthread_mutex_trylock.c: Likewise.
949         * pthread_mutex_unlock.c: Likewise.
950         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
952 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
954         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
955         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
956         (PTHREAD_MUTEX_PSHARED): Define.
957         * pthread_mutex_init.c (__pthread_mutex_init): Set
958         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
959         mutexes.
960         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
961         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
962         as second argument to lll_lock.
963         (LLL_MUTEX_TRYLOCK): Take mutex as argument
964         instead of its __data.__lock field.
965         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
966         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
967         to lll_robust_lock.
968         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
969         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
970         instead of mutex->__data.__kind directly, pass
971         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
972         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
973         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
974         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
975         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
976         to lll_timedlock, lll_robust_timedlock, lll_unlock and
977         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
978         of mutex->__data.__kind directly.
979         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
980         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
981         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
982         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
983         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
984         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
985         and lll_futex_wake.
986         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
987         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
988         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
989         directly.
990         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
991         Take mutex as argument instead of its __data.__lock field, pass
992         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
993         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
994         __data.__lock field.
995         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
996         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
997         to lll_robust_cond_lock.
998         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
999         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
1000         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
1001         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
1002         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
1003         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
1004         lll_futex_wait.
1005         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
1006         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
1007         lll_futex_wake.
1008         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
1009         pshared variable, pass it to lll_lock, lll_unlock,
1010         lll_futex_timedwait and lll_futex_wake.
1011         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
1012         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
1013         and lll_futex_wake.
1014         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
1015         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
1016         macro.
1017         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
1018         lll_futex_wake_unlock): Likewise.
1019         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
1020         Likewise.
1021         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
1022         lll_futex_wake_unlock): Likewise.
1023         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
1024         Likewise.
1025         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
1026         lll_futex_wake_unlock): Likewise.
1027         (lll_futex_wake): Fix a typo.
1028         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
1029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
1030         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
1031         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1032         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
1033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
1034         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
1035         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
1036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
1037         (__pthread_cond_timedwait): Likewise.
1038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1039         (__condvar_cleanup, __pthread_cond_wait): Likewise.
1041 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
1043         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
1044         Don't use CGOTSETUP and CGOTRESTORE macros.
1045         (CGOTSETUP, CGOTRESTORE): Remove.
1046         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
1047         @local symbol.
1049 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1051         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
1052         definitions for private futexes.
1053         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
1054         kernel-features.h and lowlevellock.h.  Use private futexes if
1055         they are available.
1056         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
1057         (__lll_mutex_lock_wait): Rename to
1058         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
1059         (__lll_mutex_timedlock_wait): Rename to ...
1060         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
1061         Don't compile in for libc.so.
1062         (__lll_mutex_unlock_wake): Rename to ...
1063         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
1064         (__lll_timedwait_tid): Use __NR_gettimeofday.
1065         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
1066         the header from assembler.  Renamed all lll_mutex_* resp.
1067         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1068         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
1069         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
1070         Define.
1071         (__lll_lock_wait_private): Add prototype.
1072         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
1073         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
1074         __lll_unlock_wake): Likewise.
1075         (lll_lock): Add private argument.  Call __lll_lock_wait_private
1076         if private is constant LLL_PRIVATE.
1077         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1078         lll_timedlock, lll_robust_timedlock): Add private argument.
1079         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
1080         if private is constant LLL_PRIVATE.
1081         (lll_robust_unlock, lll_robust_dead): Add private argument.
1082         (lll_lock_t): Remove.
1083         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1084         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1085         lll_cond_wake, lll_cond_broadcast): Remove.
1086         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
1087         kernel-features.h and lowlevellock.h.
1088         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1089         (LOAD_FUTEX_WAIT): Define.
1090         (__lll_robust_mutex_lock_wait): Rename to ...
1091         (__lll_robust_lock_wait): ... this.  Add private argument.
1092         Use LOAD_FUTEX_WAIT macro.
1093         (__lll_robust_mutex_timedlock_wait): Rename to ...
1094         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1095         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1096         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1097         lowlevellock.h.
1098         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1099         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1100         __lll_mutex_{lock,unlock}_*.
1101         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1102         lowlevellock.h and pthread-errnos.h.
1103         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1104         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1105         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1106         __lll_mutex_{lock,unlock}_*.
1107         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1108         lowlevellock.h and pthread-errnos.h.
1109         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1110         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1111         __lll_mutex_{lock,unlock}_*.
1112         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1113         lowlevellock.h.
1114         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1115         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1116         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1117         (__condvar_tw_cleanup): Likewise.
1118         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1119         lowlevellock.h.
1120         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1121         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1122         __lll_mutex_{lock,unlock}_*.
1123         ( __condvar_w_cleanup): Likewise.
1124         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1125         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1126         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1127         lowlevellock.h.
1128         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1129         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1130         __lll_mutex_{lock,unlock}_*.
1131         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1132         lowlevellock.h.
1133         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1134         FUTEX_PRIVATE_FLAG): Remove.
1135         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1136         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1137         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1138         lowlevellock.h.
1139         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1140         FUTEX_PRIVATE_FLAG): Remove.
1141         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1142         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1143         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1144         lowlevellock.h.
1145         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1146         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1147         __lll_mutex_{lock,unlock}_*.
1148         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1149         lowlevellock.h.
1150         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1151         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1152         __lll_mutex_{lock,unlock}_*.
1153         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1154         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1155         (__new_sem_post): Use standard initial exec code sequences.
1156         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1157         lowlevellock.h.
1158         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1159         FUTEX_PRIVATE_FLAG): Remove.
1160         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1161         exec code sequences.
1162         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1163         (__new_sem_trywait): Use standard initial exec code sequences.
1164         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1165         (__new_sem_wait): Use standard initial exec code sequences.
1167 2007-07-31  Anton Blanchard  <anton@samba.org>
1169         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1170         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1171         atomic_full_barrier.
1173 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1175         * allocatestack.c (stack_cache_lock): Change type to int.
1176         (get_cached_stack, allocate_stack, __deallocate_stack,
1177         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1178         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1179         as second argument to lll_lock and lll_unlock macros on
1180         stack_cache_lock.
1181         * pthread_create.c (__find_in_stack_list): Likewise.
1182         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1183         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1184         as second argument.
1185         * descr.h (struct pthread): Change lock and setxid_futex field
1186         type to int.
1187         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1188         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1189         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1190         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1191         Likewise.
1192         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1193         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1194         * pthreadP.h (__attr_list_lock): Change type to int.
1195         * pthread_attr_init.c (__attr_list_lock): Likewise.
1196         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1197         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1198         lll_{,un}lock.
1199         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1200         also for lll_futex_{wake,wait}.
1201         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1202         a pointer to const.
1203         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1204         LLL_SHARED as second argument to lll_{,un}lock.
1205         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1206         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1207         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1208         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1209         Likewise.
1210         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1211         as second argument to lll_{,un}lock macros on pd->lock.
1212         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1213         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1214         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1215         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1216         Likewise.
1217         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1218         Likewise.
1219         * pthread_once.c (once_lock): Change type to int.
1220         (__pthread_once): Pass LLL_PRIVATE as second argument to
1221         lll_{,un}lock macros on once_lock.
1222         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1223         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1224         rwlock->__data.__shared as second argument to them and similarly
1225         for lll_futex_w*.
1226         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1227         Likewise.
1228         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1229         Likewise.
1230         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1231         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1232         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1233         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1234         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1235         to lll_{,un}lock macros on __sem_mappings_lock.
1236         * sem_open.c (check_add_mapping): Likewise.
1237         (__sem_mappings_lock): Change type to int.
1238         * semaphoreP.h (__sem_mappings_lock): Likewise.
1239         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1240         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1241         instead of lll_*mutex_*, pass LLL_SHARED as last
1242         argument.
1243         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1244         pass LLL_SHARED as last argument.
1245         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1246         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1247         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1248         pass LLL_SHARED as last argument.
1249         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1250         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1251         LLL_SHARED as last argument.
1252         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1253         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1254         Similarly.
1255         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1256         __libc_lock_lock_recursive, __libc_lock_unlock,
1257         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1258         argument to lll_{,un}lock.
1259         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1260         _IO_lock_unlock): Likewise.
1261         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1262         compound literal.
1263         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1264         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1265         __fork_lock.
1266         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1267         free_mem): Likewise.
1268         (__fork_lock): Change type to int.
1269         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1270         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1271         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1272         lll_futex_wake.
1273         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1274         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1275         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1276         New function.
1277         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1278         pass it through to lll_futex_*wait, only compile in when
1279         IS_IN_libpthread.
1280         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1281         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1282         argument and pass it through to lll_futex_*wait.
1283         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1284         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1285         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1286         inline functions to __lll_* resp. __lll_robust_*.
1287         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1288         (lll_mutex_dead): Add private argument.
1289         (__lll_lock_wait_private): New prototype.
1290         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1291         __lll_robust_lock_timedwait): Add private argument to prototypes.
1292         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1293         call __lll_lock_wait_private, otherwise pass private to
1294         __lll_lock_wait.
1295         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1296         __lll_robust_timedlock): Add private argument, pass it to
1297         __lll_*wait functions.
1298         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1299         call __lll_unlock_wake_private, otherwise pass private to
1300         __lll_unlock_wake.
1301         (__lll_robust_unlock): Add private argument, pass it to
1302         __lll_robust_unlock_wake.
1303         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1304         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1305         argument, pass it through to __lll_* inline function.
1306         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1307         (lll_lock_t): Remove.
1308         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1309         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1310         lll_cond_wake, lll_cond_broadcast): Remove.
1311         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1312         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1313         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1314         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1315         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1316         the header from assembler.  Renamed all lll_mutex_* resp.
1317         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1318         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1319         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1320         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1321         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1322         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1323         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1324         Remove prototype.
1325         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1326         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1327         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1328         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1329         MULTIPLE_THREADS_OFFSET as another asm operand.
1330         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1331         MULTIPLE_THREADS_OFFSET as last asm operand, call
1332         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1333         otherwise pass private as another argument to __lll_lock_wait.
1334         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1335         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1336         private as another argument to __lll_*lock_wait call.
1337         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1338         MULTIPLE_THREADS_OFFSET as another asm operand, call
1339         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1340         otherwise pass private as another argument to __lll_unlock_wake.
1341         (lll_robust_unlock): Add private argument, pass private as another
1342         argument to __lll_unlock_wake.
1343         (lll_robust_dead): Add private argument, use __lll_private_flag
1344         macro.
1345         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1346         LLL_MUTEX_LOCK_INITIALIZER.
1347         (lll_lock_t): Remove.
1348         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1349         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1350         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1351         lll_cond_wake, lll_cond_broadcast): Remove.
1352         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1353         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1354         2007-05-2{3,9} changes.
1355         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1356         kernel-features.h and lowlevellock.h.
1357         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1358         (LOAD_FUTEX_WAIT): Rewritten.
1359         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1360         define.
1361         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1362         (__lll_mutex_lock_wait): Rename to ...
1363         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1364         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1365         (__lll_mutex_timedlock_wait): Rename to ...
1366         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1367         contains private argument.  Don't compile in for libc.so.
1368         (__lll_mutex_unlock_wake): Rename to ...
1369         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1370         Don't compile in for libc.so.
1371         (__lll_timedwait_tid): Use __NR_gettimeofday.
1372         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1373         kernel-features.h and lowlevellock.h.
1374         (LOAD_FUTEX_WAIT): Define.
1375         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1376         define.
1377         (__lll_robust_mutex_lock_wait): Rename to ...
1378         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1379         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1380         macro.
1381         (__lll_robust_mutex_timedlock_wait): Rename to ...
1382         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1383         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1384         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1385         lowlevellock.h.
1386         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1387         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1388         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1389         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1390         to __lll_lock_wait in %edx.
1391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1392         Include lowlevellock.h and pthread-errnos.h.
1393         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1394         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1395         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1396         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1397         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1398         __lll_unlock_wake.
1399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1400         Include lowlevellock.h and pthread-errnos.h.
1401         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1402         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1403         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1404         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1405         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1406         __lll_unlock_wake.
1407         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1408         Include lowlevellock.h.
1409         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1410         Don't define.
1411         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1412         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1413         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1414         __lll_unlock_wake.  Use __NR_gettimeofday.
1415         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1416         Include lowlevellock.h.
1417         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1418         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1419         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1420         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1421         and __lll_unlock_wake.
1422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1423         Include lowlevellock.h.
1424         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1425         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1426         MUTEX(%ebx) address in %edx rather than %ecx to
1427         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1428         and __lll_unlock_wake.  Move return value from %ecx to %edx
1429         register.
1430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1431         Include lowlevellock.h.
1432         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1433         Don't define.
1434         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1435         MUTEX(%ebp) address in %edx rather than %ecx to
1436         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1437         and __lll_unlock_wake.  Move return value from %ecx to %edx
1438         register.  Use __NR_gettimeofday.
1439         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1440         Include lowlevellock.h.
1441         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1442         Don't define.
1443         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1444         MUTEX(%ebp) address in %edx rather than %ecx to
1445         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1446         and __lll_unlock_wake.  Move return value from %ecx to %edx
1447         register.  Use __NR_gettimeofday.
1448         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1449         Include lowlevellock.h.
1450         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1451         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1452         MUTEX(%edi) address in %edx rather than %ecx to
1453         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1454         and __lll_unlock_wake.
1455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1456         Include lowlevellock.h.
1457         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1458         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1459         MUTEX(%ebx) address in %edx rather than %ecx to
1460         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1461         and __lll_unlock_wake.  Move return value from %ecx to %edx
1462         register.
1463         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1464         lowlevellock.h.
1465         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1466         define.
1467         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1468         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1469         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1470         lowlevellock.h.
1471         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1472         (sem_timedwait): Use __NR_gettimeofday.
1473         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1474         lowlevellock.h.
1475         (LOCK): Don't define.
1476         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1477         lowlevellock.h.
1478         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1479         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1480         are waiters.
1481         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1482         2007-05-2{3,9} changes.
1483         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1484         kernel-features.h and lowlevellock.h.
1485         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1486         (LOAD_FUTEX_WAIT): Rewritten.
1487         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1488         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1489         (__lll_mutex_lock_wait): Rename to ...
1490         (__lll_lock_wait): ... this.  %esi is now private argument.
1491         Don't compile in for libc.so.
1492         (__lll_mutex_timedlock_wait): Rename to ...
1493         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1494         Don't compile in for libc.so.
1495         (__lll_mutex_unlock_wake): Rename to ...
1496         (__lll_unlock_wake): ... this.  %esi contains private argument.
1497         Don't compile in for libc.so.
1498         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1499         kernel-features.h and lowlevellock.h.
1500         (LOAD_FUTEX_WAIT): Define.
1501         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1502         (__lll_robust_mutex_lock_wait): Rename to ...
1503         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1504         Use LOAD_FUTEX_WAIT macro.
1505         (__lll_robust_mutex_timedlock_wait): Rename to ...
1506         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1507         private, use LOAD_FUTEX_WAIT macro.
1508         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1509         lowlevellock.h.
1510         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1511         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1512         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1513         __lll_lock_wait and __lll_unlock_wake.
1514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1515         Include lowlevellock.h and pthread-errnos.h.
1516         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1517         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1518         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1519         pass LLL_SHARED in %esi to both __lll_lock_wait and
1520         __lll_unlock_wake.
1521         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1522         Include lowlevellock.h and pthread-errnos.h.
1523         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1524         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1525         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1526         pass LLL_SHARED in %esi to both __lll_lock_wait and
1527         __lll_unlock_wake.
1528         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1529         Include lowlevellock.h.
1530         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1531         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1532         pass LLL_SHARED in %esi to both __lll_lock_wait and
1533         __lll_unlock_wake.
1534         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1535         Include lowlevellock.h.
1536         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1537         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1538         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1539         and __lll_unlock_wake.
1540         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1541         Include lowlevellock.h.
1542         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1543         Don't define.
1544         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1545         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1546         and __lll_unlock_wake.
1547         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1548         Include lowlevellock.h.
1549         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1550         Don't define.
1551         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1552         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1553         and __lll_unlock_wake.
1554         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1555         Include lowlevellock.h.
1556         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1557         Don't define.
1558         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1559         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1560         and __lll_unlock_wake.
1561         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1562         Include lowlevellock.h.
1563         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1564         Don't define.
1565         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1566         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1567         and __lll_unlock_wake.
1568         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1569         Include lowlevellock.h.
1570         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1571         Don't define.
1572         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1573         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1574         and __lll_unlock_wake.
1575         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1576         lowlevellock.h.
1577         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1578         define.
1579         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1580         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1581         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1582         lowlevellock.h.
1583         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1584         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1585         lowlevellock.h.
1586         (LOCK): Don't define.
1587         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1588         lowlevellock.h.
1589         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1590         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1591         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1592         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1593         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1594         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1595         (__lll_lock_wait_private): New function.
1596         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1597         it to lll_futex_*wait.  Don't compile in for libc.so.
1598         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1599         Remove.
1600         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1601         (struct sparc_pthread_barrier): Remove.
1602         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1603         struct sparc_pthread_barrier.  Pass
1604         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1605         and lll_futex_wait macros.
1606         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1607         Remove.
1608         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1609         Include sparc pthread_barrier_wait.c instead of generic one.
1611 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1613         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1615         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1616         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1617         %ecx.
1618         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1619         (pthread_rwlock_timedwrlock): Likewise.
1620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1621         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1623 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1625         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1627 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1629         * tst-locale2.c (useless): Add return statement.
1631 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1633         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1634         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1635         * pthread_create.c (start_thread): Likewise.
1636         * init.c (sighandler_setxid): Likewise.
1637         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1638         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1639         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1640         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1641         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1642         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1643         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1644         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1645         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1646         Likewise.
1647         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1648         Likewise.
1649         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1650         Likewise.
1651         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1652         __rtld_notify): Likewise.
1653         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1654         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1655         __pthread_once): Likewise.
1656         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1657         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1658         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1659         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1660         (lll_futex_wait): Add private argument, define as wrapper around
1661         lll_futex_timed_wait.
1662         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1663         use __lll_private_flag macro.
1664         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1665         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1666         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1667         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1668         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1669         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1670         (lll_futex_wait): Add private argument, define as wrapper around
1671         lll_futex_timed_wait.
1672         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1673         use __lll_private_flag macro.
1674         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1675         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1676         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1677         Define.
1678         (lll_futex_timed_wait, lll_futex_wake): Use it.
1679         (lll_private_futex_wait, lll_private_futex_timed_wait,
1680         lll_private_futex_wake): Removed.
1681         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1682         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1683         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1684         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1685         (lll_futex_wait): Add private argument, define as wrapper around
1686         lll_futex_timed_wait.
1687         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1688         use __lll_private_flag macro.
1689         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1690         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1691         to lll_futex_*.
1692         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1693         (lll_private_futex_wait, lll_private_futex_timed_wait,
1694         lll_private_futex_wake): Removed.
1695         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1696         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1697         (lll_private_futex_wait, lll_private_futex_timed_wait,
1698         lll_private_futex_wake): Removed.
1699         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1700         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1701         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1702         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1703         (lll_futex_wait): Add private argument, define as wrapper around
1704         lll_futex_timed_wait.
1705         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1706         use __lll_private_flag macro.
1707         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1708         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1709         to lll_futex_*.
1710         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1711         Define.
1712         (lll_futex_timed_wait, lll_futex_wake): Use it.
1713         (lll_private_futex_wait, lll_private_futex_timed_wait,
1714         lll_private_futex_wake): Removed.
1716 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1718         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1719         of the structure for sparc32.
1721 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1723         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1725 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1727         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1728         code used when private futexes are assumed.
1729         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1730         Likewise.
1732 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1734         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1735         (__lll_private_flag): Define.
1736         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1737         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1738         __lll_private_flag.
1739         (lll_private_futex_wait, lll_private_futex_timedwait,
1740         lll_private_futex_wake): Define as wrapper around non-_private
1741         macros.
1742         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1743         (__lll_private_flag): Define.
1744         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1745         (lll_private_futex_wait, lll_private_futex_timedwait,
1746         lll_private_futex_wake): Define as wrapper around non-_private
1747         macros.
1749 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1751         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1752         parameter to lll_futex_wait call.
1753         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1755         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1756         Replace lll_futex_wait with lll_private_futex_wait.
1757         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1758         Add LLL_SHARED parameter to lll_futex_wake().
1760         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1761         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1762         lll_private_futex_wake.
1763         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1764         bit from private parm before syscall.
1765         (lll_futex_timed_wait): Likewise.
1766         (lll_futex_wake): Likewise.
1767         (lll_futex_wake_unlock): Likewise.
1768         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1769         (lll_robust_mutex_unlock): Likewise.
1770         (lll_mutex_unlock_force): Likewise.
1771         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1773 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1775         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1776         compilation when unconditionally using private futexes.
1777         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1778         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1779         Likewise.
1780         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1781         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1783 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1785         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1786         Define.
1788 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1790         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1791         kernel-features.h.
1793 2007-05-16  Roland McGrath  <roland@redhat.com>
1795         * init.c (__nptl_initial_report_events): New variable.
1796         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1797         to that.
1799 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1801         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1802         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1804 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1806         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1807         implementation.
1809 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1811         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1812         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1813         * pthread_mutex_timedlock.c: Likewise.
1814         * pthread_mutex_trylock.c: Likewise.
1815         * pthread_mutex_unlock.c: Likewise.
1817 2007-06-17  Andreas Schwab  <schwab@suse.de>
1819         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1820         sections.
1822 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1824         * allocatestack.c (allocate_stack): Make code compile if
1825         __ASSUME_PRIVATE_FUTEX is set.
1827 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1829         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1830         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1831         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1832         (__pthread_rwlock_wrlock): Likewise.
1833         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1834         (pthread_rwlock_timedrdlock): Likewise.
1835         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1836         (pthread_rwlock_timedwrlock): Likewise.
1837         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1838         (__pthread_rwlock_unlock): Likewise.
1840 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1842         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1843         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1844         Split __flags into __flags, __shared, __pad1 and __pad2.
1845         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1846         futexes if they are available.
1847         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1848         in libc-lowlevellock.S allow using private futexes.
1849         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1850         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1851         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1852         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1853         lll_private_futex_timed_wait and lll_private_futex_wake.
1854         (lll_robust_mutex_unlock): Fix typo.
1855         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1856         field in futex command setup.
1857         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1858         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1859         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1860         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1861         if they are available.  Remove clear_once_control.
1862         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1863         futexes if they are available.
1864         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1865         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1866         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1867         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1868         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1869         Wake only when there are waiters.
1870         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1871         support.  Indicate that there are waiters.  Remove unnecessary
1872         extra cancellation test.
1873         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1874         left-over duplication of __sem_wait_cleanup.
1876 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1878         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1879         parameter to lll_futex_wait, lll_futex_timed_wait, and
1880         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1881         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1882         lll_private_futex_wake.
1883         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1884         * allocatestack.c: Adjust use of lll_futex_* macros.
1885         * init.c: Likewise.
1886         * lowlevellock.h: Likewise.
1887         * pthread_barrier_wait.c: Likewise.
1888         * pthread_cond_broadcast.c: Likewise.
1889         * pthread_cond_destroy.c: Likewise.
1890         * pthread_cond_signal.c: Likewise.
1891         * pthread_cond_timedwait.c: Likewise.
1892         * pthread_cond_wait.c: Likewise.
1893         * pthread_create.c: Likewise.
1894         * pthread_mutex_lock.c: Likewise.
1895         * pthread_mutex_setprioceiling.c: Likewise.
1896         * pthread_mutex_timedlock.c: Likewise.
1897         * pthread_mutex_unlock.c: Likewise.
1898         * pthread_rwlock_timedrdlock.c: Likewise.
1899         * pthread_rwlock_timedwrlock.c: Likewise.
1900         * pthread_rwlock_unlock.c: Likewise.
1901         * sysdeps/alpha/tls.h: Likewise.
1902         * sysdeps/i386/tls.h: Likewise.
1903         * sysdeps/ia64/tls.h: Likewise.
1904         * sysdeps/powerpc/tls.h: Likewise.
1905         * sysdeps/pthread/aio_misc.h: Likewise.
1906         * sysdeps/pthread/gai_misc.h: Likewise.
1907         * sysdeps/s390/tls.h: Likewise.
1908         * sysdeps/sh/tls.h: Likewise.
1909         * sysdeps/sparc/tls.h: Likewise.
1910         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1911         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1912         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1913         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1914         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1915         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1916         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1917         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1918         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1919         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1920         Likewise.
1921         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1922         * sysdeps/x86_64/tls.h: Likewise.
1924 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1926         * pthread_getattr_np.c: No need to install a cancellation handler,
1927         this is no cancellation point.
1928         * pthread_getschedparam.c: Likewise.
1929         * pthread_setschedparam.c: Likewise.
1930         * pthread_setschedprio.c: Likewise.
1931         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1932         lll_unlock_wake_cb.
1933         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1934         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1935         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1936         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1937         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1938         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1939         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1940         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1941         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1942         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1943         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1946         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1947         whether there are more than one thread makes no sense here since
1948         we only call the slow path if the locks are taken.
1949         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1951         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1952         COND_NWAITERS_SHIFT.
1953         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1954         COND_CLOCK_BITS.
1955         * pthread_cond_init.c: Likewise.
1956         * pthread_cond_timedwait.c: Likewise.
1957         * pthread_cond_wait.c: Likewise.
1958         * pthread_condattr_getclock.c: Likewise.
1959         * pthread_condattr_setclock.c: Likewise.
1960         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1962         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1963         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1964         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1966 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1968         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1969         unistd.h.
1971         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1972         insn suffix.
1973         (THREAD_GSCOPE_GET_FLAG): Remove.
1974         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1975         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1976         changes.
1977         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1978         (THREAD_GSCOPE_GET_FLAG): Remove.
1979         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1980         instead of THREAD_GSCOPE_GET_FLAG.
1981         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1982         it.
1983         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1984         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1985         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1986         THREAD_GSCOPE_WAIT): Define.
1987         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1988         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1989         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1990         THREAD_GSCOPE_WAIT): Define.
1991         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1992         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1993         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1994         THREAD_GSCOPE_WAIT): Define.
1995         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1996         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1997         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1998         THREAD_GSCOPE_WAIT): Define.
2000 2007-05-24  Richard Henderson  <rth@redhat.com>
2002         * descr.h (struct pthread): Add header.gscope_flag.
2003         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
2004         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
2005         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
2006         THREAD_GSCOPE_WAIT): Define.
2008 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
2010         * init.c: Make it compile with older kernel headers.
2012         * tst-initializers1.c: Show through exit code which test failed.
2014         * pthread_rwlock_init.c: Also initialize __shared field.
2015         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
2016         element in rwlock structure into four byte elements.  One of them is
2017         the new __shared element.
2018         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
2019         Likewise.
2020         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
2021         __shared, adjust names of other padding elements.
2022         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2023         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
2024         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
2025         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
2026         FUTEX_PRIVATE_FLAG.
2027         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
2028         futex to use private operations if possible.
2029         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
2030         Likewise.
2031         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
2032         Likewise.
2033         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
2034         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
2035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
2036         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
2037         Likewise.
2038         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
2039         Likewise.
2040         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
2041         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
2043 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
2045         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
2046         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
2047         * pthread_rwlock_timedrdlock.c: Likewise.
2048         * pthread_rwlock_tryrdlock.c: Likewise.
2050         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
2051         optimization.
2053         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
2054         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
2055         duplication of __sem_wait_cleanup.
2057         * allocatestack.c: Revert last change.
2058         * init.c: Likewise.
2059         * sysdeps/i386/tls.h: Likewise.
2060         * sysdeps/x86_64/tls.h: Likewise.
2061         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
2062         header structure.
2063         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
2065         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
2066         Add private field.
2067         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
2068         * pthread_barrier_init.c: Set private flag if pshared and private
2069         futexes are supported.
2070         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
2071         private field in futex command setup.
2072         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
2074 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2076         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
2077         support.
2078         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2079         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2080         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2081         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2082         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2084         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
2085         * sem_init.c (__new_sem_init): Rewrite to initialize all three
2086         fields in the structure.
2087         (__old_sem_init): New function.
2088         * sem_open.c: Initialize all fields of the structure.
2089         * sem_getvalue.c: Adjust for renamed element.
2090         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
2091         (gen-as-const-headers): Add structsem.sym.
2092         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2093         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2094         struct new_sem.  Add struct old_sem.
2095         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2096         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2097         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2098         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2099         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2100         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2101         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2102         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2103         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2104         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2105         * tst-sem10.c: New file.
2106         * tst-sem11.c: New file.
2107         * tst-sem12.c: New file.
2108         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2109         of struct sem.
2111 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2112             Jakub Jelinek  <jakub@redhat.com>
2114         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2115         Move __pthread_enable_asynccancel right before futex syscall.
2116         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2117         Likewise.
2119 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2121         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2122         THREAD_COPY_PRIVATE_FUTEX): Define.
2123         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2124         THREAD_COPY_PRIVATE_FUTEX): Define.
2125         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2126         * init.c (__pthread_initialize_minimal_internal): Use
2127         THREAD_SET_PRIVATE_FUTEX.
2129         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2130         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2131         THREAD_GSCOPE_FLAG_WAIT): Define.
2132         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2133         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2134         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2135         PTR_DEMANGLE.
2136         (THREAD_GSCOPE_GET_FLAG): Define.
2137         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2138         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2139         instead of ->header.gscope_flag directly.
2141 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2143         * init.c (__pthread_initialize_minimal_internal): Check whether
2144         private futexes are available.
2145         * allocatestack.c (allocate_stack): Copy private_futex field from
2146         current thread into the new stack.
2147         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2148         futexes if they are available.
2149         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2150         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2151         in libc-lowlevellock.S allow using private futexes.
2152         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2153         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2154         FUTEX_PRIVATE_FLAG.
2155         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2156         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2157         if they are available.
2158         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2159         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2160         * sysdeps/i386/tcb-offsets.sym: Likewise.
2161         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2162         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2164 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2166         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2167         Remove ptr_wait_lookup_done again.
2168         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2169         (__pthread_initialize_minimal_internal): Initialize
2170         _dl_wait_lookup_done pointer in _rtld_global directly.
2171         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2172         Remove code to code _dl_wait_lookup_done.
2173         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2174         encrypted for now.
2176 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2178         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2179         pthread_mutex_init failed with ENOTSUP.
2181 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2183         * allocatestack.c (__wait_lookup_done): New function.
2184         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2185         Add ptr_wait_lookup_done.
2186         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2187         * pthreadP.h: Declare __wait_lookup_done.
2188         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2189         Define macros to implement reference handling of global scope.
2190         * sysdeps/x86_64/tls.h: Likewise.
2191         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2192         Initialize GL(dl_wait_lookup_done).
2194 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2196         [BZ #4512]
2197         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2198         is detected.
2199         * pthread_mutex_timedlock.c: Likewise.
2200         * pthread_mutex_trylock.c: Likewise.
2201         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2203         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2204         * tst-robust9.c: New file.
2205         * tst-robustpi9.c: New file.
2207         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2208         unnecessary extra cancellation test.
2210 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2212         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2213         extra cancellation test.
2214         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2216 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2218         * descr.h (struct pthread): Rearrange members to fill hole in
2219         64-bit layout.
2221         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2222         (__pthread_setaffinity_new): If syscall was successful and
2223         RESET_VGETCPU_CACHE is defined, use it before returning.
2224         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2226 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2228         [BZ #4455]
2229         * tst-align2.c: Include stackinfo.h.
2230         * tst-getpid1.c: Likewise.
2232 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2234         [BZ #4455]
2235         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2236         * tst-getpid1.c (do_test): Likewise.
2238         [BZ #4456]
2239         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2240         (allocate_stack): Likewise.
2242 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2244         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2245         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2246         (__lll_robust_timedlock_wait): Likewise.
2247         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2249 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2251         [BZ #4465]
2252         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2253         * tst-cancel4.c (tf_fdatasync): New test.
2255 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2257         [BZ #4392]
2258         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2259         check mutexes like normal mutexes.
2261         [BZ #4306]
2262         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2263         Initialize the whole sigevent structure to appease valgrind.
2265 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2267         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2268         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2270 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2272         * tst-locale1.c: Avoid warnings.
2273         * tst-locale2.c: Likewise.
2275 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2277         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2278         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2280 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2282         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2283         __extern_always_inline where appropriate.
2284         * sysdeps/pthread/pthread.h: Likewise.
2286 2007-03-13  Richard Henderson  <rth@redhat.com>
2288         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2289         separate cfi regions for the two subsections.
2291 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2293         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2294         new thread, don't just decrement it.
2295         Patch by Suzuki K P <suzuki@in.ibm.com>.
2297 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2299         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2300         PTHFCT_CALL definition.
2302 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2304         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2305         available, don't use it.
2307 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2309         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2310         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2311         call into the kernel to delay.
2313 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2315         * tst-initializers1.c: We want to test the initializers as seen
2316         outside of libc, so undefined _LIBC.
2318         * pthread_join.c (cleanup): Avoid warning.
2320 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2322         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2323         (__lll_timedwait_tid): Add unwind info.
2325         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2326         function table, mangle the pointers.
2327         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2328         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2329         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2330         demangle pointers before use.
2331         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2332         demangle pointer.
2333         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2334         * sysdeps/pthread/setxid.h: Likewise.
2336 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2338         * tst-rwlock7.c: Show some more information in case of correct
2339         behavior.
2341 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2343         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2344         (lll_futex_timed_wait): Undo part of last change, don't negate
2345         return value.
2347 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2349         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2350         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2352 2006-12-28  David S. Miller  <davem@davemloft.net>
2354         * shlib-versions: Fix sparc64 linux target specification.
2356 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2358         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2359         Adjust include path for pthread_barrier_wait.c move.
2361 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2363         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2364         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2366 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2368         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2369         6 argument cancellable syscalls.
2370         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2371         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2372         6 argument cancellable syscalls.
2373         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2375 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2377         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2378         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2380 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2382         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2383         __sync_lock_release instead of __sync_lock_release_si.
2385 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2387         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2388         Define.
2389         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2390         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2391         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2392         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2393         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2394         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2395         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2396         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2397         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2398         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2399         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2401 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2403         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2404         * pthread_barrier_wait.c: ...here.
2405         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2406         * pthread_cond_broadcast.c: ...here.
2407         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2408         * pthread_cond_signal.c: ...here.
2409         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2410         * pthread_cond_timedwait.c: ...here.
2411         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2412         * pthread_cond_wait.c: ...here.
2413         * sysdeps/pthread/pthread_once.c: Move to...
2414         * pthread_once.c: ...here.
2415         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2416         * pthread_rwlock_rdlock.c: ...here.
2417         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2418         * pthread_rwlock_timedrdlock.c: ...here.
2419         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2420         * pthread_rwlock_timedwrlock.c: ...here.
2421         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2422         * pthread_rwlock_unlock.c: ...here.
2423         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2424         * pthread_rwlock_wrlock.c: ...here.
2425         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2426         * pthread_spin_destroy.c: ...here.
2427         * sysdeps/pthread/pthread_spin_init.c: Move to...
2428         * pthread_spin_init.c: ...here.
2429         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2430         * pthread_spin_unlock.c: ...here.
2431         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2432         * pthread_getcpuclockid.c: ...here.
2434         * init.c: USE_TLS support is now always enabled.
2435         * tst-tls5.h: Likewise.
2436         * sysdeps/alpha/tls.h: Likewise.
2437         * sysdeps/i386/tls.h: Likewise.
2438         * sysdeps/ia64/tls.h: Likewise.
2439         * sysdeps/powerpc/tls.h: Likewise.
2440         * sysdeps/s390/tls.h: Likewise.
2441         * sysdeps/sh/tls.h: Likewise.
2442         * sysdeps/sparc/tls.h: Likewise.
2443         * sysdeps/x86_64/tls.h: Likewise.
2445 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2447         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2448         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2449         failed.
2451         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2452         Define to THREAD_SELF->header.multiple_threads.
2453         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2454         Likewise.
2455         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2456         Likewise.
2457         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2458         (SINGLE_THREAD_P): Likewise.
2459         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2460         (SINGLE_THREAD_P): Likewise.
2461         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2462         (SINGLE_THREAD_P): Likewise.
2463         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2464         (SINGLE_THREAD_P): Likewise.
2465         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2466         Likewise.
2467         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2468         (SINGLE_THREAD_P): Likewise.
2469         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2470         (SINGLE_THREAD_P): Likewise.
2471         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2472         Likewise.
2474 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2476         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2477         by default rather than 2_3_3.
2479 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2481         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2482         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2483         atomic_* instead of catomic_* macros.
2485 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2487         [BZ #3285]
2488         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2489         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2490         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2491         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2492         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2493         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2494         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2495         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2496         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2497         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2498         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2499         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2500         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2502 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2504         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2505         cancelable syscalls with six parameters.
2507         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2508         operations instead of atomic_*.
2510 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2512         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2514 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2516         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2517         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2518         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2519         New file.
2520         * pthread_attr_setstack.c: Allow overwriting the version number of the
2521         new symbol.
2522         * pthread_attr_setstacksize.c: Likewise.
2523         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2524         it.
2525         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2526         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2528 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2530         [BZ #3251]
2531         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2532         Patch by Petr Baudis.
2534 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2536         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2538         * tst-cancel2.c (tf): Loop as long as something was written.
2540 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2542         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2543         mutexes wake all mutexes.
2544         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2545         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2546         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2548 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2550         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2551         to guarantee the thread is always canceled.
2553 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2555         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2556         Include stdlib.h.
2557         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2558         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2559         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2560         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2561         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2563 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2565         [BZ #3123]
2566         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2567         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2568         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2570         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2571         * Makefile (tests): Add tst-cond22.
2572         * tst-cond22.c: New file.
2574 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2576         [BZ #3124]
2577         * descr.h (struct pthread): Add parent_cancelhandling.
2578         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2579         cancelhandling value to child.
2580         * pthread_create.c (start_thread): If parent thread was canceled
2581         reset the SIGCANCEL mask.
2582         * Makefile (tests): Add tst-cancel25.
2583         * tst-cancel25.c: New file.
2585 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2586             Ulrich Drepper  <drepper@redhat.com>
2588         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2589         counterp if it is already zero.
2590         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2592 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2593             Roland McGrath  <roland@redhat.com>
2595         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2596         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2597         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2598         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2599         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2600         lll_robust_mutex_timedlock, lll_mutex_unlock,
2601         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2602         Add _L_*_ symbols around the subsection.
2603         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2604         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2606 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2607             Roland McGrath  <roland@redhat.com>
2609         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2610         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2611         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2612         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2613         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2614         lll_robust_mutex_timedlock, lll_mutex_unlock,
2615         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2616         Add _L_*_ symbols around the subsection.
2617         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2618         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2620 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2622         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2623         change because it can disturb too much existing code.  If real hard
2624         reader preference is needed we'll introduce another type.
2625         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2626         (pthread_rwlock_timedwrlock): Likewise.
2627         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2628         Likewise.
2630 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2632         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2633         reader preference.
2634         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2635         (pthread_rwlock_timedwrlock): Likewise.
2636         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2637         Likewise.
2639 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2641         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2642         Only define ifdef SHARED.
2644 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2646         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2647         (free_stacks): ...here.
2648         (__free_stack_cache): New function.
2649         * pthreadP.h: Declare __free_stack_cache.
2650         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2651         ptr_freeres.
2652         * init.c (pthread_functions): Initialize ptr_freeres.
2653         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2654         New freeres function.
2656 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2658         [BZ #3018]
2659         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2661 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2663         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2664         _XOPEN_REALTIME_THREADS.
2666 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2668         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2669         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2670         HAVE_CLOCK_GETTIME_VSYSCALL.
2671         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2673 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2675         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2676         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2677         * descr.h (struct priority_protection_data): New type.
2678         (struct pthread): Add tpp field.
2679         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2680         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2681         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2682         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2683         TPP mutexes.
2684         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2685         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2686         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2687         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2688         * tpp.c: New file.
2689         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2690         boosted by TPP.
2691         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2692         * pthread_mutexattr_getprioceiling.c
2693         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2694         in the SCHED_FIFO priority range.
2695         * pthread_mutexattr_setprioceiling.c
2696         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2697         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2698         if mutex is not TPP.  Ceiling is now in __data.__lock.
2699         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2700         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2701         is now in __data.__lock.  Add locking.
2702         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2703         * Makefile (libpthread-routines): Add tpp.
2704         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2705         * tst-tpp.h: New file.
2706         * tst-mutexpp1.c: New file.
2707         * tst-mutexpp6.c: New file.
2708         * tst-mutexpp10.c: New file.
2709         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2710         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2712 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2714         [BZ #2843]
2715         * pthread_join.c (pthread_join): Account for self being canceled
2716         when checking for deadlocks.
2717         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2718         (tf1): Don't print anything after pthread_join returns, this would be
2719         another cancellation point.
2720         (tf2): Likewise.
2721         * tst-join6.c: New file.
2722         * Makefile (tests): Add tst-join6.
2724 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2726         [BZ #2892]
2727         * pthread_setspecific.c (__pthread_setspecific): Check
2728         out-of-range index before checking for unused key.
2730         * sysdeps/pthread/gai_misc.h: New file.
2732 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2734         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2735         file.  Don't use sysctl.
2736         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2737         overwrite the file if this is likely not true.
2739 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2741         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2742         * Makefile (tests): Add tst-getpid3.
2743         * tst-getpid3.c: New file.
2745 2006-07-30  Roland McGrath  <roland@redhat.com>
2747         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2749         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2750         (pause_not_cancel): New macro.
2751         (nanosleep_not_cancel): New macro.
2752         (sigsuspend_not_cancel): New macro.
2753         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2754         nanosleep_not_cancel macro from <not-cancel.h>.
2755         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2756         macro from <not-cancel.h>.
2758 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2759             Jakub Jelinek  <jakub@redhat.com>
2761         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2762         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2763         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2764         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2765         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2766         * pthread_mutex_lock.c: Likewise.
2767         * pthread_mutex_timedlock.c: Likewise.
2768         * pthread_mutex_trylock.c: Likewise.
2769         * pthread_mutex_unlock.c: Likewise.
2770         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2771         all mutexes.
2772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2773         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2774         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2775         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2776         pthread-pi-defines.sym.
2777         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2778         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2779         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2780         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2781         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2782         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2783         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2784         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2785         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2786         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2787         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2788         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2789         * tst-mutex2.c: Likewise.
2790         * tst-mutex3.c: Likewise.
2791         * tst-mutex4.c: Likewise.
2792         * tst-mutex5.c: Likewise.
2793         * tst-mutex6.c: Likewise.
2794         * tst-mutex7.c: Likewise.
2795         * tst-mutex7a.c: Likewise.
2796         * tst-mutex8.c: Likewise.
2797         * tst-mutex9.c: Likewise.
2798         * tst-robust1.c: Likewise.
2799         * tst-robust7.c: Likewise.
2800         * tst-robust8.c: Likewise.
2801         * tst-mutexpi1.c: New file.
2802         * tst-mutexpi2.c: New file.
2803         * tst-mutexpi3.c: New file.
2804         * tst-mutexpi4.c: New file.
2805         * tst-mutexpi5.c: New file.
2806         * tst-mutexpi6.c: New file.
2807         * tst-mutexpi7.c: New file.
2808         * tst-mutexpi7a.c: New file.
2809         * tst-mutexpi8.c: New file.
2810         * tst-mutexpi9.c: New file.
2811         * tst-robust1.c: New file.
2812         * tst-robust2.c: New file.
2813         * tst-robust3.c: New file.
2814         * tst-robust4.c: New file.
2815         * tst-robust5.c: New file.
2816         * tst-robust6.c: New file.
2817         * tst-robust7.c: New file.
2818         * tst-robust8.c: New file.
2819         * Makefile (tests): Add the new tests.
2821         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2822         * pthread_mutex_destroy.c: Remove unneeded label.
2824 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2826         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2827         computations to compile time.
2829 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2831         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2833 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2835         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2837 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2839         * pthread_key_create.c (__pthread_key_create): Do away with
2840         __pthread_keys_lock.
2842         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2843         (__kernel_cpumask_size): Mark as hidden.
2844         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2846         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2847         * semaphoreP.h (__sem_mappings_lock): Likewise.
2849 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2851         * pthread_atfork.c: Mark __dso_handle as hidden.
2853 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2855         [BZ #2644]
2856         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2857         the reload problem.  Change the one path in pthread_cancel_init
2858         which causes the problem.  Force gcc to reload.  Simplify callers.
2859         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2860         (_Unwind_GetBSP): Undo last patch.
2862 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2864         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2865         function pointer is reloaded after pthread_cancel_init calls.
2867         [BZ #2644]
2868         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2869         pointers are reloaded after pthread_cancel_init calls.
2871 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2873         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2874         __always_inline.
2876 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2878         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2879         Allocate new object which is passed to timer_sigev_thread so that
2880         the timer can be deleted before the new thread is scheduled.
2882 2006-04-26  Roland McGrath  <roland@redhat.com>
2884         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2886 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2888         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2889         suffix for conditional jumps.
2890         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2891         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2892         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2893         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2894         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2895         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2897         * init.c (sigcancel_handler): Compare with correct PID even if the
2898         thread is in the middle of a fork call.
2899         (sighandler_setxid): Likewise.
2900         Reported by Suzuki K P <suzuki@in.ibm.com> .
2902 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2904         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2906 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2908         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2909         fails [Coverity CID 105].
2911 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2913         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2915 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2917         [BZ #2505]
2918         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2919         Define __lll_rel_instr using lwsync.
2921 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2923         * allocatestack.c (allocate_stack): Always initialize robust_head.
2924         * descr.h: Define struct robust_list_head.
2925         (struct pthread): Use robust_list_head in robust mutex list definition.
2926         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2927         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2928         (__pthread_initialize_minimal_internal): Register robust_list with
2929         the kernel.
2930         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2931         Declare __set_robust_list_avail.
2932         * pthread_create.c (start_thread): Register robust_list of new thread.
2933         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2934         waiters.
2935         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2936         number of users, it's unreliable.
2937         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2938         set_robust_list syscall is available.
2939         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2940         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2941         Set robust_head.list_op_pending before trying to lock a robust mutex.
2942         * pthread_mutex_timedlock.c: Likewise.
2943         * pthread_mutex_trylock.c: Likewise.
2944         * pthread_mutex_unlock.c: Likewise for unlocking.
2945         * Makefile (tests): Add tst-robust8.
2946         * tst-robust8.c: New file.
2948 2006-03-08  Andreas Schwab  <schwab@suse.de>
2950         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2951         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2953 2006-03-05  Roland McGrath  <roland@redhat.com>
2955         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2956         and $config_os doesn't match *linux*.
2958 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2960         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2961         Use __syscall_error.
2962         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2963         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2964         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2965         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2966         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2967         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2969 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2971         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2973 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2975         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2976         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2977         mutex.
2978         (__lll_robust_timedlock_wait): Likewise.
2979         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2980         (__lll_robust_lock_wait): Likewise.
2981         (__lll_robust_timedlock_wait): Likewise.
2982         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2983         (__lll_robust_lock_wait): Likewise.
2984         (__lll_robust_timedlock_wait): Likewise.
2986 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2988         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2989         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2990         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2991         lll_robust_mutex_unlock): Define.
2992         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2994 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2996         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2997         instead of <clone.S>.
2999 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
3001         * Makefile (libpthread-routines): Add
3002         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
3003         and pthread_mutex_[sg]etprioceiling.
3004         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
3005         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
3006         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
3007         pthread_mutex_setprioceiling.
3008         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
3009         PTHREAD_PRIO_PROTECT): New enum values.
3010         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
3011         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
3012         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
3013         prototypes.
3014         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
3015         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
3016         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
3017         Define.
3018         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
3019         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
3020         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
3021         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
3022         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
3023         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
3024         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
3025         protocol mutexes.
3026         * pthread_mutex_getprioceiling.c: New file.
3027         * pthread_mutex_setprioceiling.c: New file.
3028         * pthread_mutexattr_getprioceiling.c: New file.
3029         * pthread_mutexattr_setprioceiling.c: New file.
3030         * pthread_mutexattr_getprotocol.c: New file.
3031         * pthread_mutexattr_setprotocol.c: New file.
3033 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
3035         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
3037 2006-02-27  Roland McGrath  <roland@redhat.com>
3039         * sysdeps/pthread/Subdirs: List nptl here too.
3040         * configure (libc_add_on_canonical): New variable.
3042         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
3044         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
3045         self to get main source tree's file.
3046         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
3047         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
3048         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
3049         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
3050         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
3051         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
3052         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
3053         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
3054         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
3055         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
3056         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
3057         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
3058         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
3060         * Makefile: Use $(sysdirs) in vpath directive.
3062         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
3063         (CPPFLAGS-timer_routines.c): Likewise.
3065         * Makeconfig (includes): Variable removed.
3067 2006-02-26  Roland McGrath  <roland@redhat.com>
3069         * sysdeps/generic/pt-raise.c: Moved to ...
3070         * pt-raise.c: ... here.
3071         * sysdeps/generic/lowlevellock.h: Moved to ...
3072         * lowlevellock.h: ... here.
3074 2006-02-23  Roland McGrath  <roland@redhat.com>
3076         * descr.h (struct pthread): Add final member `end_padding'.
3077         (PTHREAD_STRUCT_END_PADDING): Use it.
3079 2006-02-20  Roland McGrath  <roland@redhat.com>
3081         * sysdeps/mips: Directory removed, saved in ports repository.
3082         * sysdeps/unix/sysv/linux/mips: Likewise.
3084 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
3086         * tst-robust1.c: Add second mutex to check that the mutex list is
3087         handled correctly.
3089 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
3091         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
3092         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3093         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3094         lll_robust_mutex_unlock): New macros.
3095         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3096         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3097         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3098         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3099         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3101 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3103         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3104         definitions.
3105         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3107 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3109         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3110         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3111         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3112         (lll_robust_mutex_unlock): Likewise.
3114 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3116         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3117         Set robust_list.__next rather than robust_list.
3118         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3119         (__pthread_list_t): New typedef.
3120         (pthread_mutex_t): Replace __next and __prev fields with __list.
3121         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3122         (__pthread_list_t): New typedef.
3123         (pthread_mutex_t): Replace __next and __prev fields with __list.
3124         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3125         (__pthread_list_t, __pthread_slist_t): New typedefs.
3126         (pthread_mutex_t): Replace __next and __prev fields with __list.
3127         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3128         (__pthread_list_t, __pthread_slist_t): New typedefs.
3129         (pthread_mutex_t): Replace __next and __prev fields with __list.
3130         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3131         (__pthread_list_t, __pthread_slist_t): New typedefs.
3132         (pthread_mutex_t): Replace __next and __prev fields with __list.
3133         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3134         (__pthread_slist_t): New typedef.
3135         (pthread_mutex_t): Replace __next field with __list.
3137 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3139         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3140         PTHREAD_MUTEX_OWNERDEAD.
3141         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3142         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3143         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3144         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3145         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3146         to PTHREAD_MUTEX_INCONSISTENT.
3147         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3148         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3149         * pthread_mutex_trylock.c: Likewise.
3150         * pthread_mutex_timedlock.c: Likewise.
3151         * pthread_mutex_unlock.c: Likewise.
3152         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3153         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3154         lowlevelrobustlock.sym.
3155         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3156         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3157         definitions.
3158         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3159         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3160         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3161         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3162         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3164 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3166         * allocatestack.c (allocate_stack): Initialize robust_list.
3167         * init.c (__pthread_initialize_minimal_internal): Likewise.
3168         * descr.h (struct xid_command): Pretty printing.
3169         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3170         robust_list.  Adjust macros.
3171         * pthread_create.c (start_thread): Adjust robust_list handling.
3172         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3173         but the owner for all robust mutex types.
3174         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3175         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3176         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3177         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3179         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3180         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3182 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3184         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3185         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3187 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3189         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3190         Return status.
3191         (lll_futex_timed_wait): Define.
3193 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3195         * tst-cancel4.c: Test ppoll.
3197 2006-01-18  Andreas Jaeger  <aj@suse.de>
3199         [BZ #2167]
3200         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3201         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3202         by Jim Gifford <patches@jg555.com>.
3204 2006-01-13  Richard Henderson  <rth@redhat.com>
3206         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3208 2006-01-10  Roland McGrath  <roland@redhat.com>
3210         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3211         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3212         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3213         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3214         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3215         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3216         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3217         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3218         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3219         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3221 2006-01-09  Roland McGrath  <roland@redhat.com>
3223         * tst-initializers1-c89.c: New file.
3224         * tst-initializers1-c99.c: New file.
3225         * tst-initializers1-gnu89.c: New file.
3226         * tst-initializers1-gnu99.c: New file.
3227         * Makefile (tests): Add them.
3228         (CFLAGS-tst-initializers1-c89.c): New variable.
3229         (CFLAGS-tst-initializers1-c99.c): New variable.
3230         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3231         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3233         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3234         Use __extension__ on anonymous union definition.
3235         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3236         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3237         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3238         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3239         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3241 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3243         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3244         Don't give the union a name because it changes the mangled name.
3245         Instead name the struct for __data.
3246         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3247         Likewise.
3248         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3249         Likewise.
3251 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3253         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3254         stack bias to mc_ftp field.
3256 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3258         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3259         being too clever and reloading the futex value where it shouldn't.
3261 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3263         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3264         correct type.
3266 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3268         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3269         Add cfi directives.
3271 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3273         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3274         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3275         rename in tcbhead_t.
3277         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3278         Don't give the union a name because it changes the mangled name.
3279         Instead name the struct for __data.
3280         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3281         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3282         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3283         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3284         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3285         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3287 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3289         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3290         Return status.
3291         (lll_futex_timed_wait): Define.
3292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3293         * sysdeps/pthread/aio_misc.h: New file.
3295 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3297         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3299 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3301         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3302         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3303         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3305 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3307         * tst-cancel24.cc: Use C headers instead of C++ headers.
3309 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3311         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3312         sparc-linux configured glibc.
3313         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3314         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3315         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3316         atomic_compare_and_exchange_val_24_acq instead of
3317         atomic_compare_and_exchange_val_acq.
3318         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3319         instead of atomic_exchange_rel.
3320         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3321         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3322         file.
3323         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3324         file.
3325         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3326         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3327         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3328         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3329         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3330         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3331         New file.
3332         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3333         New file.
3334         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3335         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3336         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3337         file.
3338         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3339         file.
3340         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3342 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3344         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3345         mutex initializers.
3347 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3349         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3350         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3351         THREAD_COPY_POINTER_GUARD): Define.
3352         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3353         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3355 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3357         * version.c: Update copyright year.
3359 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3361         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3362         .eh_frame section, use cfi_* directives.
3363         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3365 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3367         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3368         now.
3370 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3372         * sysdeps/pthread/sigaction.c: Removed.
3373         * sigaction.c: New file.
3374         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3376 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3378         * Makefile (tests): Add tst-signal7.
3379         * tst-signal7.c: New file.
3381 2005-12-27  Roland McGrath  <roland@redhat.com>
3383         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3384         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3385         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3386         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3387         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3388         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3389         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3390         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3391         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3392         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3393         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3395 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3397         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3398         and __prev field to pthread_mutex_t.
3399         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3400         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3401         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3402         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3403         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3404         to pthread_mutex_t.
3406 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3408         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3409         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3410         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3411         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3412         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3413         and PTHREAD_MUTEXATTR_FLAG_BITS.
3414         * descr.h (struct pthread): Add robust_list field and define
3415         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3416         * pthread_mutexattr_getrobust.c: New file.
3417         * pthread_mutexattr_setrobust.c: New file.
3418         * pthread_mutex_consistent.c: New file.
3419         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3420         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3421         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3422         Adjust pthread_mutex_t initializers.
3423         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3424         field to pthread_mutex_t.
3425         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3426         and __prev field to pthread_mutex_t.
3427         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3428         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3429         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3430         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3431         * pthread_mutexattr_gettype.c: Likewise.
3432         * pthread_mutexattr_setpshared.c: Likewise.
3433         * pthread_mutexattr_settype.c: Likewise.
3434         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3435         Initialize mutex kind according to robust flag.
3436         * pthread_mutex_lock.c: Implement local robust mutex.
3437         * pthread_mutex_timedlock.c: Likewise.
3438         * pthread_mutex_trylock.c: Likewise.
3439         * pthread_mutex_unlock.c: Likewise.
3440         * pthread_create.c (start_thread): Mark robust mutexes which remained
3441         locked as dead.
3442         * tst-robust1.c: New file.
3443         * tst-robust2.c: New file.
3444         * tst-robust3.c: New file.
3445         * tst-robust4.c: New file.
3446         * tst-robust5.c: New file.
3447         * tst-robust6.c: New file.
3448         * tst-robust7.c: New file.
3449         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3450         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3451         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3452         tst-robust5, tst-robust6, and tst-robust7.
3454         * tst-typesizes.c: New file.
3455         * Makefile (tests): Add tst-typesizes.
3457         * tst-once3.c: More debug output.
3459 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3461         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3462         missing after last change.
3464         * version.c: Update copyright year.
3466 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3468         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3469         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3470         * pthread_mutex_trylock.c: Likewise.
3471         * pthread_mutex_timedlock.c: Likewise.
3472         * pthread_mutex_unlock.c: Likewise.
3474 2005-12-22  Roland McGrath  <roland@redhat.com>
3476         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3477         so that #include_next's search location is not reset to the -I..
3478         directory where <nptl/...> can be found.
3480 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3482         [BZ #1913]
3483         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3484         Fix unwind info.  Remove useless branch prediction prefix.
3485         * tst-cancel24.cc: New file.
3486         * Makefile: Add rules to build and run tst-cancel24.
3488 2005-12-21  Roland McGrath  <roland@redhat.com>
3490         * libc-cancellation.c: Use <> rather than "" #includes.
3491         * pt-cleanup.c: Likewise.
3492         * pthread_create.c: Likewise.
3493         * pthread_join.c: Likewise.
3494         * pthread_timedjoin.c: Likewise.
3495         * pthread_tryjoin.c: Likewise.
3496         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3497         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3498         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3499         * unwind.c: Likewise.
3501 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3503         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3504         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3505         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3506         THREAD_COPY_POINTER_GUARD): Define.
3508 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3510         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3511         rather than one.
3512         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3513         THREAD_COPY_POINTER_GUARD): Define.
3514         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3515         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3516         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3517         THREAD_COPY_POINTER_GUARD): Define.
3518         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3519         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3520         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3521         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3522         Use PTR_DEMANGLE for B0 if defined.
3524 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3526         * pthread_create.c (__pthread_create_2_1): Use
3527         THREAD_COPY_POINTER_GUARD if available.
3528         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3529         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3530         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3531         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3532         * sysdeps/x86_64/tls.h: Likewise.
3534 2005-12-15  Roland McGrath  <roland@redhat.com>
3536         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3538 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3540         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3541         sysdeps/generic.
3542         * errno-loc.c: New file.
3544 2005-12-12  Roland McGrath  <roland@redhat.com>
3546         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3547         adjustments before choosing stack size.  Update minimum stack size
3548         calculation to match allocate_stack change.
3550 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3552         * allocatestack.c (allocate_stack): Don't demand that there is an
3553         additional full page available on the stack beside guard, TLS, the
3554         minimum stack.
3556 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3558         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3559         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3561         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3562         compiling 32-bit code we must define __cleanup_fct_attribute.
3564 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3566         [BZ #1920]
3567         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3568         __attribute__ instead of __attribute.
3569         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3570         (__cleanup_fct_attribute): Likewise.
3572 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3574         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3575         a write barrier before writing libgcc_s_getcfa.
3577 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3579         * sysdeps/unix/sysv/linux/configure: Removed.
3581 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3583         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3584         optional init_array/fini_array support.
3586 2005-10-24  Roland McGrath  <roland@redhat.com>
3588         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3589         versioned_symbol use.
3591 2005-10-16  Roland McGrath  <roland@redhat.com>
3593         * init.c (__pthread_initialize_minimal_internal): Even when using a
3594         compile-time default stack size, apply the minimum that allocate_stack
3595         will require, and round up to page size.
3597 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3599         * Makefile ($(test-modules)): Remove static pattern rule.
3601 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3602             Ulrich Drepper  <drepper@redhat.com>
3604         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3605         alignment in callback function.
3606         * Makefile: Add rules to build and run tst-align3.
3607         * tst-align3.c: New file.
3609 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3611         * allocatestack.c (setxid_signal_thread): Add
3612         INTERNAL_SYSCALL_DECL (err).
3614 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3616         * allocatestack.c (setxid_signal_thread): Need to use
3617         atomic_compare_and_exchange_bool_acq.
3619 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3620             Jakub Jelinek  <jakub@redhat.com>
3622         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3623         CANCEL_RESTMASK.
3624         (struct pthread): Move specific_used field to avoid padding.
3625         Add setxid_futex field.
3626         * init.c (sighandler_setxid): Reset setxid flag and release the
3627         setxid futex.
3628         * allocatestack.c (setxid_signal_thread): New function.  Broken
3629         out of the bodies of the two loops in __nptl_setxid.  For undetached
3630         threads check whether they are exiting and if yes, don't send a signal.
3631         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3632         * pthread_create.c (start_thread): For undetached threads, check
3633         whether setxid bit is set.  If yes, wait until signal has been
3634         processed.
3636         * allocatestack.c (STACK_VARIABLES): Initialize them.
3637         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3639 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3641         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3642         waiters, awake all waiters on the associated mutex.
3644 2005-09-22  Roland McGrath  <roland@redhat.com>
3646         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3647         ../sysdeps/x86_64/hp-timing.h).
3649 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3651         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3652         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3653         (lll_futex_wake_unlock): Define.
3654         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3655         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3656         (lll_futex_wake_unlock): Define.
3657         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3658         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3659         (lll_futex_wake_unlock): Define.
3660         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3661         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3662         (lll_futex_wake_unlock): Define.
3663         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3664         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3665         (lll_futex_wake_unlock): Define.
3666         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3667         lll_futex_wake_unlock.
3668         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3669         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3670         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3672         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3673         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3675 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3677         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3678         Fix typo in register name.
3680 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3682         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3683         Use __sigfillset.  Document that sigfillset does the right thing wrt
3684         to SIGSETXID.
3686 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3688         * tst-stackguard1.c (do_test): Likewise.
3690 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3692         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3693         randomization doesn't work well enough.
3695 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3697         [BZ #1102]
3698         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3699         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3700         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3701         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3702         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3703         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3704         in the structure.
3705         * Makefile (tests): Add tst-initializers1.
3706         (CFLAGS-tst-initializers1.c): Set.
3707         * tst-initializers1.c: New test.
3709 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3711         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3712         Make sure __flags are located at offset 48 from the start of the
3713         structure.
3715 2005-07-02  Roland McGrath  <roland@redhat.com>
3717         * Makeconfig: Comment fix.
3719 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3721         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3722         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3723         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3724         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3725         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3726         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3727         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3728         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3729         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3730         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3732 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3734         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3735         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3736         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3737         fields.
3738         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3739         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3740         field.  Put in sysinfo field unconditionally.
3741         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3742         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3743         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3744         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3745         fields.
3746         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3747         * pthread_create.c (__pthread_create_2_1): Use
3748         THREAD_COPY_STACK_GUARD macro.
3749         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3750         tests.
3751         * tst-stackguard1.c: New file.
3752         * tst-stackguard1-static.c: New file.
3754 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3756         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3757         Invoke CGOTSETUP and CGOTRESTORE.
3758         (CGOTSETUP, CGOTRESTORE): Define.
3760 2005-05-29  Richard Henderson  <rth@redhat.com>
3762         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3763         (tf_write, tf_writev): Use it.
3764         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3765         the system minimum.
3767 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3769         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3770         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3771         __librt_*_asynccancel@local.
3773 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3775         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3776         all occurrences of JUMPTARGET.  Instead append @local to labels.
3778 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3780         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3781         size/alignment of struct pthread rather than tcbhead_t.
3782         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3783         Likewise.
3784         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3785         Likewise.
3786         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3787         Likewise.
3789 2005-05-19  Richard Henderson  <rth@redhat.com>
3791         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3792         __sync_val_compare_and_swap, not explicit _si variant.
3793         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3795 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3797         [BZ #915]
3798         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3800 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3802         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3803         .eh_frame section, use cfi_* directives.
3805 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3807         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3808         of "" includes.
3810 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3812         [BZ #1075]
3813         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3814         aio_write blocks.
3816 2005-04-27  Roland McGrath  <roland@redhat.com>
3818         * Makefile (tests): Remove tst-clock2.
3820         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3821         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3822         translating to the kernel clockid_t for our own process/thread clock.
3824         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3826 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3828         * old_pthread_cond_init.c: Include <errno.h>.
3829         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3830         process shared or uses clock other than CLOCK_REALTIME.
3831         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3833 2005-04-13  David S. Miller  <davem@davemloft.net>
3835         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3836         * sysdeps/sparc/sparc64/clone.S: New file.
3838 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3840         [BZ #1102]
3841         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3842         __inline instead of inline.
3843         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3845 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3847         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3848         functionally equivalent, but shorter instructions.
3849         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3850         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3851         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3852         Likewise.
3853         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3854         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3855         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3856         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3858         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3859         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3860         Likewise.
3861         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3862         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3863         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3864         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3865         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3867 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3869         * sysdeps/mips/Makefile: New file.
3870         * sysdeps/mips/nptl-sysdep.S: New file.
3871         * sysdeps/mips/tcb-offsets.sym: New file.
3872         * sysdeps/mips/pthread_spin_lock.S: New file.
3873         * sysdeps/mips/pthread_spin_trylock.S: New file.
3874         * sysdeps/mips/pthreaddef.h: New file.
3875         * sysdeps/mips/tls.h: New file.
3876         * sysdeps/mips/jmpbuf-unwind.h: New file.
3877         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3878         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3879         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3880         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3881         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3882         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3883         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3884         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3885         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3886         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3888 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3890         [BZ #1112]
3891         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3892         variable to scerr.
3894 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3896         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3898 2005-02-25  Roland McGrath  <roland@redhat.com>
3900         * alloca_cutoff.c: Correct license text.
3901         * tst-unload.c: Likewise.
3902         * sysdeps/pthread/allocalim.h: Likewise.
3903         * sysdeps/pthread/pt-initfini.c: Likewise.
3904         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3905         * sysdeps/pthread/bits/sigthread.h: Likewise.
3906         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3907         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3909 2005-02-16  Roland McGrath  <roland@redhat.com>
3911         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3912         Use unsigned int * for ptr_nthreads.
3914 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3916         [BZ #721]
3917         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3918         gcc4.
3920 2005-02-07  Richard Henderson  <rth@redhat.com>
3922         [BZ #787]
3923         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3924         argument.
3926 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3928         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3929         order of arguments in invocation of atomic_add_zero.
3931 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3933         [BZ #737]
3934         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3935         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3936         at least gotntpoff relocation and addition.
3937         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3938         Likewise.
3939         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3940         Likewise.
3941         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3942         Likewise.
3944 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3946         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3947         entry for static tls deallocation fix.
3948         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3949         also contains information whether the memory pointed to is static
3950         TLS or not.
3951         * sysdeps/i386/tls.h: Likewise.
3952         * sysdeps/ia64/tls.h: Likewise.
3953         * sysdeps/powerpc/tls.h: Likewise.
3954         * sysdeps/s390/tls.h: Likewise.
3955         * sysdeps/sh/tls.h: Likewise.
3956         * sysdeps/sparc/tls.h: Likewise.
3957         * sysdeps/x86_64/tls.h: Likewise.
3959 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3961         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3963 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3965         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3966         %esp.
3967         * Makefile (tests): Add tst-align2.
3968         * tst-align2.c: New test.
3969         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3970         -mpreferred-stack-boundary=4.
3972 2004-12-18  Roland McGrath  <roland@redhat.com>
3974         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3975         New file removed withdrawn for the moment.
3977 2004-12-17  Richard Henderson  <rth@redhat.com>
3979         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3980         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3982 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3985         Increased PTHREAD_STACK_MIN.
3987         * tst-context1.c (stacks): Use bigger stack size.
3989 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3991         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3992         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3994 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3996         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3997         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3998         * sysdeps/s390/tcb-offsets.sym (TID): Add.
4000 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
4002         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
4004 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
4006         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
4007         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
4009         * tst-getpid1.c: If child crashes, report this first.  Print which
4010         signal.
4012 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
4014         * init.c (__pthread_initialize_minimal_internal): Also unblock
4015         SIGSETXID.
4017 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
4019         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
4020         _POSIX_THREAD_CPUTIME): Define to 0.
4021         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
4022         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
4023         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
4024         __timer_signal_thread_tclk): Remove.
4025         (init_module): Remove their initialization.
4026         (thread_cleanup): Remove their cleanup assertions.
4027         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
4028         __timer_signal_thread_tclk): Remove.
4029         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
4030         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
4031         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
4033 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
4035         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
4036         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
4038         * Makefile (tests): Add tst-getpid2.
4039         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
4040         (do_test): Use it.  Use __clone2 instead of clone on ia64.
4041         * tst-getpid2.c: New test.
4043 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4045         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
4047 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
4049         * Makefile (tests): Add tst-getpid1.
4050         * tst-getpid1.c: New file.
4051         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
4052         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
4054 2004-12-02  Roland McGrath  <roland@redhat.com>
4056         * Makefile (libpthread-nonshared): Variable removed.
4057         ($(objpfx)libpthread_nonshared.a): Target removed.
4058         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
4059         These are now handled by generic magic from
4060         libpthread-static-only-routines being set.
4062 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
4064         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
4065         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
4066         _POSIX_THREAD_PRIO_PROTECT): Define.
4067         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4068         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4069         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4071 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
4073         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
4074         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
4075         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
4076         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
4077         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
4078         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4079         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
4081 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
4083         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
4085         * Makefile (libpthread-routines): Add pthread_setschedprio.
4086         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
4087         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
4088         * pthread_setschedprio.c: New file.
4090 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
4092         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4093         * pthread_cancel.c (pthread_create): Likewise.
4095         * Makefile (libpthread-routines): Add vars.
4096         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4097         * init.c (__default_stacksize, __is_smp): Remove.
4098         * vars.c: New file.
4099         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4100         and define a wrapper macro.
4101         (PTHREAD_STATIC_FN_REQUIRE): Define.
4102         * allocatestack.c (__find_thread_by_id): Undefine.
4103         * pthread_create (__pthread_keys): Remove.
4104         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4105         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4106         PTHREAD_STATIC_FN_REQUIRE.
4108 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4110         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4111         parameter to REGISTER macro.
4113 2004-11-17  Roland McGrath  <roland@redhat.com>
4115         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4116         Make sure SIGCANCEL is blocked as well.
4118 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4120         * sysdeps/pthread/setxid.h: New file.
4121         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4122         (struct xid_command): Add forward decl.
4123         (struct pthread_functions): Change return type of __nptl_setxid hook
4124         to int.
4125         * pthreadP.h (__nptl_setxid): Change return type to int.
4126         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4127         calling thread, return its return value and set errno on failure.
4128         * descr.h (struct xid_command): Change id type to long array.
4130         * Makefile: Add rules to build and test tst-setuid1 and
4131         tst-setuid1-static.
4132         * tst-setuid1.c: New test.
4133         * tst-setuid1-static.c: New test.
4135 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4137         * Makefile (tests): Add tst-exit3.
4138         * tst-exit3.c: New test.
4140 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4142         * Makefile (tests): Add tst-exit2.
4143         * tst-exit2.c: New file.
4145 2004-11-09  Roland McGrath  <roland@redhat.com>
4147         [BZ #530]
4148         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4149         here, before calling clone.
4150         * pthread_create.c (start_thread): Don't do it here.
4152 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4154         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4156 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4158         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4159         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4160         assembler warning.
4162 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4164         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4165         if sched_priority is not between minprio and maxprio.
4167 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4169         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4170         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4172         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4173         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4175 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4177         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4178         not-cancelable I/O functions.
4180 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4182         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4183         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4184         make sure 2 is stored in the futex and we looked at the old value.
4185         Fix a few other problems to return the correct value.
4187 2004-10-14  Richard Henderson  <rth@redhat.com>
4189         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4190         make gcc4 happy.
4192 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4194         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4195         of pthread-functions.h and pthreaddef.h.
4196         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4198         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4199         Change __data.__nwaiters from int to unsigned int.
4201         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4202         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4204         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4205         before return type.
4207         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4208         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4210 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4212         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4213         test fails, remove message queue.
4214         (tf_msgsnd): Likewise.
4216 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4218         * tst-clock1.c: Change #ifdef to #if defined.
4219         * tst-clock2.c: Likewise.
4220         * tst-cond11.c: Likewise.
4222         * sysdeps/pthread/timer_create.c (timer_create): Use
4223         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4224         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4225         THREAD_CPUTIME.
4227 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4229         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4230         _POSIX_THREAD_CPUTIME): Define to 0.
4232 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4234         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4235         and _POSIX_THREAD_CPUTIME to zero.
4236         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4237         * tst-barrier2.c: Fix testing for POSIX feature.
4238         * tst-clock1.c: Likewise.
4239         * tst-clock2.c: Likewise.
4240         * tst-cond11.c: Likewise.
4241         * tst-cond4.c: Likewise.
4242         * tst-cond6.c: Likewise.
4243         * tst-flock2.c: Likewise.
4244         * tst-mutex4.c: Likewise.
4245         * tst-mutex9.c: Likewise.
4246         * tst-rwlock12.c: Likewise.
4247         * tst-rwlock4.c: Likewise.
4248         * tst-signal1.c: Likewise.
4249         * tst-spin2.c: Likewise.
4250         * sysdeps/pthread/posix-timer.h: Likewise.
4251         * sysdeps/pthread/timer_create.c: Likewise.
4252         * sysdeps/pthread/timer_routines.c: Likewise.
4254 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4256         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4257         (__lll_mutex_timedlock_wait): Address futex correctly.
4259         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4260         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4261         make sure 2 is stored in the futex and we looked at the old value.
4262         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4263         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4264         which might very well made the code not working at all before.
4265         [BZ #417]
4267 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4269         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4270         allow SIGSETXID to be sent.
4271         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4272         for SIGSETXID to be defined.
4273         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4274         SIGSETXID cannot be blocked.
4276         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4277         Add __extension__ to long long types.
4278         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4279         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4280         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4281         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4282         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4283         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4284         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4286 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4288         * descr.h (struct pthread): Add stopped_start field.
4289         * sysdeps/pthread/createthread.c (create_thread): Set
4290         start_stopped flag in descriptor for new thread appropriately.
4291         * pthread_create.c (start_thread): Only take lock to be stopped on
4292         startup if stopped_start flag says so.
4294 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4296         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4297         is created detached and if yes, do not try to free the stack in case
4298         the thread creation failed.
4299         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4300         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4301         case there has been no error.  [BZ #405]
4303         * pthread_create.c (start_thread): Don't wait for scheduler data
4304         etc to be set at the beginning of the function.  The cancellation
4305         infrastructure must have been set up.  And enable async
4306         cancellation before potentially going to sleep.  [BZ #401]
4308 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4310         * Versions: Remove exports for pthread_set*id_np functions.
4311         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4312         for now.
4313         * Makefile: Don't build pthread_set*id code for now.
4315 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4317         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4318         internal use.
4319         * allocatestack.c (__nptl_setxid): New function.
4320         * descr.h (struct xid_command): Define type.
4321         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4322         (sighandler_setxid): New function.
4323         (__pthread_initialize_minimal): Register sighandler_setxid for
4324         SIGCANCEL.
4325         * pt-allocrtsig.c: Update comment.
4326         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4327         Declare __nptl_setxid.
4328         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4329         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4330         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4331         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4332         and pthread_setresuid_np.
4333         * pthread_setgid_np.c: New file.
4334         * pthread_setuid_np.c: New file.
4335         * pthread_setegid_np.c: New file.
4336         * pthread_seteuid_np.c: New file.
4337         * pthread_setregid_np.c: New file.
4338         * pthread_setreuid_np.c: New file.
4339         * pthread_setresgid_np.c: New file.
4340         * pthread_setresuid_np.c: New file.
4341         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4342         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4343         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4344         and pthread_setresuid_np.
4345         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4346         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4347         pthread_setregid, and pthread_setresgid.
4349 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4351         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4352         ENOMEM when out of memory.
4354 2004-09-10  Roland McGrath  <roland@redhat.com>
4356         [BZ #379]
4357         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4358         code, since we don't try to use the broken CLONE_STOPPED any more.
4359         * pthread_create.c (start_thread): Likewise.
4361 2004-09-15  Richard Henderson  <rth@redhat.com>
4363         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4365 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4367         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4368         (__libc_unwind_longjmp): Delete macro and declare as function.
4369         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4370         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4371         nptl directory.
4372         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4373         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4374         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4376 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4378         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4379         for __USE_XOPEN2K.
4380         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4381         types also for __USE_XOPEN2K.
4382         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4383         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4384         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4385         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4386         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4387         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4388         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4389         [BZ #320]
4391 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4393         * sysdeps/pthread/pthread.h
4394         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4395         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4396         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4397         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4398         [BZ #375]
4400 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4402         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4403         PSEUDO to be used with . prefix.
4405         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4406         Use atomic_increment instead of atomic_exchange_and_add.
4407         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4408         Likewise.
4409         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4410         Likewise.
4411         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4412         Likewise.
4414         * allocatestack.c (allocate_stack): Use atomic_increment_val
4415         instead of atomic_exchange_and_add.
4416         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4417         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4418         Likewise.
4419         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4420         Likewise.
4422         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4423         the initialization function might throw.
4425 2005-09-05  Richard Henderson  <rth@redhat.com>
4427         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4428         Move definition inside libpthread, libc, librt check.  Provide
4429         definition for rtld.
4431 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4433         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4434         waiters, awake all waiters on the associated mutex.
4436 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4438         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4439         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4440         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4441         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4442         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4443         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4444         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4445         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4446         * unwind.c: Use it.
4448         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4449         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4450         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4451         Likewise.
4452         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4453         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4454         this is the last waiter, signal pthread_cond_destroy caller and
4455         avoid using the pthread_cond_t structure after unlock.
4456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4458         Read clock type from the least significant bits of __nwaiters instead
4459         of __clock.
4460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4461         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4463 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4465         [BZ #342]
4466         * Makefile (tests): Add tst-cond20 and tst-cond21.
4467         * tst-cond20.c: New test.
4468         * tst-cond21.c: New test.
4469         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4470         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4471         it unsigned int.
4472         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4473         Likewise.
4474         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4475         (pthread_cond_t): Likewise.
4476         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4477         Likewise.
4478         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4479         Likewise.
4480         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4481         Likewise.
4482         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4483         (cond_nwaiters): New.
4484         (clock_bits): New.
4485         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4486         if there are waiters not signalled yet.
4487         Wait until all already signalled waiters wake up.
4488         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4489         __nwaiters.  If pthread_cond_destroy has been called and this is the
4490         last waiter, signal pthread_cond_destroy caller and avoid using
4491         the pthread_cond_t structure after unlock.
4492         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4493         decrement it when leaving.  If pthread_cond_destroy has been called
4494         and this is the last waiter, signal pthread_cond_destroy caller.
4495         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4496         Likewise.  Read clock type from the least significant bits of
4497         __nwaiters instead of __clock.
4498         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4499         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4500         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4501         clock type just from the last COND_CLOCK_BITS bits of value.
4502         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4503         instead of __clock, just from second bit of condattr's value.
4505 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4507         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4508         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4509         != 64.
4510         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4512 2004-08-15  Roland McGrath  <roland@frob.com>
4514         * pthread_atfork.c: Update copyright terms including special exception
4515         for these trivial files, which are statically linked into executables
4516         that use dynamic linking for the significant library code.
4518 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4520         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4521         pthread_rwlock_rdlock.
4522         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4523         Decrease __nr_readers_queued after reacquiring lock.
4524         * sysdeps/pthread/pthread_rwlock_timedrdlock
4525         (pthread_rwlock_timedrdlock): Likewise.
4526         Reported by Bob Cook <bobcook47@hotmail.com>.
4528 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4530         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4531         before pthread_barrier_wait.
4533 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4536         Remove unnecessary exception handling data.
4538 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4540         [BZ #284]
4541         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4542         instead of clockid_t.
4544 2004-07-21  Roland McGrath  <roland@redhat.com>
4546         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4548 2004-07-19  Roland McGrath  <roland@redhat.com>
4550         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4552 2004-07-02  Roland McGrath  <roland@redhat.com>
4554         * configure: Don't exit.
4556 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4558         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4559         (__pthread_cond_timedwait): Check for invalid nanosecond in
4560         timeout value.
4562 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4564         * Makefile: Add rules to build and run tst-fini1.
4565         * tst-fini1.c: New file.
4566         * tst-fini1mod.c: New file.
4568 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4570         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4571         if no cancellation support is needed.
4572         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4573         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4574         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4575         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4576         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4577         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4578         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4579         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4580         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4582         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4583         only if not already defined.
4585 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4587         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4588         constraint "m" instead of "0" for futex.
4590         * shlib-versions: Add powerpc64-.*-linux.*.
4592 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4594         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4595         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4596         for valid tv_nsec.
4597         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4598         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4599         bits.
4601 2004-06-29  Roland McGrath  <roland@redhat.com>
4603         * Banner: NPTL no longer has its own version number.
4604         * Makefile (nptl-version): Variable removed.
4605         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4606         using $(version), the glibc version number.
4608 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4610         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4611         Fix branch offset for a PLT entry.
4612         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4613         Likewise.
4614         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4615         Likewise.
4616         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4617         Likewise.
4618         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4619         Likewise.
4621 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4623         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4624         unconditionally.
4626 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4628         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4629         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4630         instead of tv_sec.
4631         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4632         (pthread_rwlock_timedrdlock): Likewise.
4634 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4636         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4637         Set __r7 to val, not mutex.
4639 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4641         * Makefile: Add rules to build tst-rwlock14.
4642         * tst-rwlock14.c: New file.
4644 2004-06-24  Boris Hu  <boris.hu@intel.com>
4646         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4647         check.
4648         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4650 2004-06-19  Andreas Jaeger  <aj@suse.de>
4652         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4653         assembler in last patch.
4655 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4657         * sysdeps/pthread/pthread_cond_timedwait.c
4658         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4659         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4660         (__pthread_cond_timedwait): Check for invalid nanosecond in
4661         timeout value.
4662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4663         * tst-cond19.c: New file.
4664         * Makefile: Add rules to build and run tst-cond19.
4666 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4668         * tst-context1.c (GUARD_PATTERN): Defined.
4669         (tst_context_t): Define struct containing ucontext_t & guard words.
4670         (ctx): Declare as an array of tst_context_t.
4671         (fct): Verify uc_link & guard words are still valid.
4672         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4674 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4676         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4677         Add __data.__futex field, reshuffle __data.__clock.
4678         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4679         (__pthread_cond_signal): Increment __futex at the same time as
4680         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4681         address of low 32-bits of __wakeup_seq to futex syscall.
4682         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4683         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4684         releasing internal lock to FUTEX_WAIT.
4685         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4686         (__pthread_cond_timedwait): Likewise.
4687         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4688         (FUTEX_CMP_REQUEUE): Define.
4689         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4690         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4691         Pass __futex value from before the unlock and __futex address instead
4692         of address of low 32-bits of __wakeup_seq to futex syscall.
4693         Fallback to FUTEX_WAKE all on any errors.
4695 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4697         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4698         comment typo.
4699         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4700         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4701         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4702         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4703         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4705 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4707         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4708         Add memory clobber to inline assembly.
4709         (__lll_mutex_trylock): Likewise.
4710         (__lll_mutex_cond_trylock): Likewise.
4712 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4714         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4715         Pass val argument as 6th system call argument in %r7.
4717 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4719         * Makefile (tests): Add tst-cond16.
4720         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4721         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4722         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4723         Add __data.__futex field, reshuffle __data.__clock.
4724         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4725         (__pthread_cond_signal): Increment __futex at the same time as
4726         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4727         address of low 32-bits of __wakeup_seq to futex syscall.
4728         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4729         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4730         releasing internal lock to FUTEX_WAIT.
4731         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4732         (__pthread_cond_timedwait): Likewise.
4733         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4734         (FUTEX_CMP_REQUEUE): Define.
4735         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4736         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4737         Pass __futex value from before the unlock and __futex address instead
4738         of address of low 32-bits of __wakeup_seq to futex syscall.
4739         Fallback to FUTEX_WAKE all on any errors.
4740         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4741         Define.
4742         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4743         internally.  Return non-zero if error, zero if success.
4744         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4745         Add __data.__futex field, reshuffle __data.__clock.
4746         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4747         Define.
4748         (lll_futex_requeue): Add val argument, return 1 unconditionally
4749         for the time being.
4750         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4751         Add __data.__futex field, reshuffle __data.__clock.
4752         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4753         Define.
4754         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4755         internally.  Return non-zero if error, zero if success.
4756         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4757         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4758         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4759         Define.
4760         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4761         internally.  Return non-zero if error, zero if success.
4762         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4763         Add __data.__futex field, reshuffle __data.__clock.
4764         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4765         Define.
4766         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4767         internally.  Return non-zero if error, zero if success.
4768         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4769         Add __data.__futex field, reshuffle __data.__clock.
4770         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4771         Add __data.__futex field, reshuffle __data.__clock.
4772         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4773         Increment __futex at the same time as __wakeup_seq or __total_seq.
4774         Pass address of __futex instead of address of low 32-bits of
4775         __wakeup_seq to futex syscall.
4776         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4777         Pass __futex value from before releasing internal lock
4778         to FUTEX_WAIT.
4779         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4780         Likewise.  Avoid unnecessary shadowing of variables.
4781         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4782         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4783         unlock and __futex address instead of address of low 32-bits of
4784         __wakeup_seq to futex_requeue macro, adjust for new return value
4785         meaning.
4786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4787         (__pthread_cond_signal): Increment __futex at the same time as
4788         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4789         address of low 32-bits of __wakeup_seq to futex syscall.
4790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4791         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4792         releasing internal lock to FUTEX_WAIT.
4793         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4794         (__pthread_cond_timedwait): Likewise.
4795         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4796         (FUTEX_CMP_REQUEUE): Define.
4797         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4798         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4799         Pass __futex value from before the unlock and __futex address instead
4800         of address of low 32-bits of __wakeup_seq to futex syscall.
4801         Fallback to FUTEX_WAKE all on any errors.
4803 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4805         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4806         Add nop to align the end of critical section.
4807         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4809 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4811         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4812         Add __broadcast_seq field.
4813         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4814         all waiters as woken with woken_seq and bump broadcast counter.
4815         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4816         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4817         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4818         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4820 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4823         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4824         Reported by Kaz Kojima.
4826 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4828         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4830 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4832         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4833         __broadcast_seq with bc_seq after acquiring internal lock instead of
4834         before it.
4836 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4838         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4839         compilation.
4840         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4841         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4842         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4843         (pthread_cond_t): Add __data.__broadcast_seq field.
4844         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4845         (FRAME_SIZE): Define.
4846         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4847         Comment typo fixes.
4848         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4849         Define.
4850         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4851         typo fixes.
4852         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4853         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4854         fixes.
4856 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4858         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4859         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4860         Add __broadcast_seq field.
4861         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4862         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4863         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4864         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4865         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4866         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4867         all waiters as woken with woken_seq and bump broadcast counter.
4868         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4870         __broadcast_seq field.
4871         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4872         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4873         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4874         * pthread_cond_init.c: Initialize __broadcast_seq field.
4875         * Makefile (tests): Add tst-cond17 and tst-cond18.
4876         Add .NOTPARALLEL goal.
4877         * tst-cond16.c: New file.  From Jakub.
4878         * tst-cond17.c: New file.  From Jakub.
4879         * tst-cond18.c: New file.  From Jakub.
4881 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4883         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4884         unwind info.
4886         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4887         Parametrize frame size.  Correct some unwind info.
4888         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4890 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4892         * tst-stack3.c: Note testing functionality beyond POSIX.
4894 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4896         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4897         Change conditional from ifdef to if.
4899 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4901         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4902         SYSDEP_CANCEL_ERROR): Define.
4903         (PSEUDO): Use it.
4905 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4907         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4909 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4911         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4913 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4915         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4916         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4917         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4918         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4920 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4922         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4923         thread has all signals blocked.
4925 2004-04-18  Andreas Jaeger  <aj@suse.de>
4927         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4928         (SEM_VALUE_MAX): Add missing brace.
4930 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4932         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4933         in rt subdir.
4934         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4935         * sysdeps/pthread/tst-mqueue8x.c: New test.
4936         * tst-cancel4.c: Update comment about message queues.
4938         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4939         return it_value { 0, 0 }.
4940         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4941         like SIGEV_SIGNAL.
4942         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4943         assertion for SIGEV_NONE.
4944         (thread_attr_compare): Compare all attributes, not just a partial
4945         subset.
4947 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4949         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4951 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4953         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4954         Just use a plain number.
4955         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4956         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4957         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4958         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4959         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4960         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4961         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4963 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4965         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4966         frame info.
4967         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4969 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4971         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4972         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4973         of calling sigwaitinfo.
4975 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4977         * allocatestack.c (allocate_stack): Set reported_guardsize
4978         unconditionally.
4979         * pthread_getattr_np.c (pthread_getattr_np): Use
4980         reported_guardsize instead of guardsize.
4981         * descr.h (struct pthread): Add reported_guardsize field.
4983 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4985         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4987 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4989         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4991 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4993         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4994         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4995         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4996         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4997         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4998         Define.
4999         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
5000         (_POSIX_MESSAGE_PASSING): Define.
5001         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
5002         (_POSIX_MESSAGE_PASSING): Define.
5003         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
5004         (_POSIX_MESSAGE_PASSING): Define.
5006 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
5008         * tst-context1.c (fct): Check whether correct stack is used.
5010 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
5012         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
5013         matching constraints for asm mem parameters.
5015         * tst-clock2.c (tf): Don't define unless needed.
5017 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
5019         * Makefile (link-libc-static): Use $(static-gnulib) instead of
5020         $(gnulib).
5022 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
5024         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
5025         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
5026         * pthreadP.h: Declare __nptl_deallocate_tsd.
5027         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
5028         Adjust caller.
5030         * Makefile (tests): Add tst-tsd5.
5031         * tst-tsd5.c: New file.
5033 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
5035         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5036         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
5037         is SHLIB_COMPAT check.
5038         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5039         (__pthread_attr_getaffinity_old): Likewise.
5040         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5041         (__pthread_getaffinity_old): Likewise.
5042         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5043         (__pthread_setaffinity_old): Likewise.
5045 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
5047         * allocatestack.c (_make_stacks_executable): Call
5048         _dl_make_stack_executable first.
5050 2004-03-24  Roland McGrath  <roland@redhat.com>
5052         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
5053         constraint instead of "0".
5055 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
5057         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5058         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
5060         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
5061         code to avoid warning.
5063 2004-03-24  Andreas Jaeger  <aj@suse.de>
5065         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5066         (__pthread_attr_setaffinity_old): Remove const.
5068 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
5070         * sysdeps/unix/sysv/linux/smp.h: New file.
5071         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
5072         * init.c: Define __is_smp.
5073         (__pthread_initialize_minimal_internal): Call is_smp_system to
5074         initialize __is_smp.
5075         * pthreadP.h: Declare __is_smp.
5076         Define MAX_ADAPTIVE_COUNT is necessary.
5077         * pthread_mutex_init.c: Add comment regarding __spins field.
5078         * pthread_mutex_lock.c: Implement adaptive mutex type.
5079         * pthread_mutex_timedlock.c: Likewise.
5080         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
5081         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
5082         Add __spins field.
5083         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5084         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5085         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5086         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5087         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5088         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5089         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5090         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
5091         lll_mutex_cond_trylock.
5092         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5093         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5094         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5095         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5096         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5097         Define BUSY_WAIT_NOP.
5098         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5099         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5101         * tst-mutex5.c: Add support for testing adaptive mutexes.
5102         * tst-mutex7.c: Likewise.
5103         * tst-mutex5a.c: New file.
5104         * tst-mutex7a.c: New file.
5105         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5107         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5108         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5109         vgettimeofday call might destroy the content.
5111         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5112         @pause in the loop.
5114         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5115         No need to restrict type of ret.  Make it int.  Add comment.
5117         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5118         Remove unnecessary setne instruction.
5120 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5122         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5123         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5124         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5125         If realloc fails, break out of the loop.
5127 2004-03-20  Andreas Jaeger  <aj@suse.de>
5129         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5130         (__pthread_setaffinity_old): Fix interface.
5131         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5132         (__pthread_getaffinity_old): Likewise.
5134         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5135         (__pthread_setaffinity_new): Remove duplicate declaration.
5137 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5139         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5140         the return value to a safe register.
5141         (CDISABLE): Set the function argument correctly.
5143 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5145         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5146         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5147         Rewrite so that only one locked memory operation per round is needed.
5148         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5149         (pthread_barrier_wait): After wakeup, release lock only when the
5150         last thread stopped using the barrier object.
5151         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5152         (__pthread_cond_wait): Don't store mutex address if the current
5153         value is ~0l.  Add correct cleanup support and unwind info.
5154         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5155         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5156         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5157         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5158         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5159         Add correct cleanup support and unwind info.
5160         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5161         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5162         information for syscall wrappers.
5164 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5166         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5167         cpusetsize field, remove next.
5168         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5169         parameter for size of the CPU set.
5170         (pthread_setaffinity_np): Likewise.
5171         (pthread_attr_getaffinity_np): Likewise.
5172         (pthread_attr_setaffinity_np): Likewise.
5173         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5174         interface change, keep compatibility code.
5175         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5176         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5177         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5178         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5179         __pthread_getaffinity_np.
5180         * Versions: Add version for changed interfaces.
5181         * tst-attr3.c: Adjust test for interface change.
5182         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5183         increasing buffer sizes.
5184         * pthread_attr_destroy.c: Remove unused list handling.
5185         * pthread_attr_init.c: Likewise.
5187 2004-03-17  Roland McGrath  <roland@redhat.com>
5189         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5190         first argument to clock_getres so we ever enable kernel timers.
5192 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5194         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5196 2004-03-12  Richard Henderson  <rth@redhat.com>
5198         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5199         oldvalue from CENABLE to CDISABLE.
5201 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5203         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5204         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5205         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5206         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5208 2004-03-11  Richard Henderson  <rth@redhat.com>
5210         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5211         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5212         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5214 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5216         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5217         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5218         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5220 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5222         * forward.c (__pthread_cond_broadcast_2_0,
5223         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5224         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5225         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5227 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5229         * sysdeps/sh/tcb-offsets.sym: Add PID.
5230         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5231         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5233 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5235         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5236         include <sysdep-cancel.h>, vfork is no cancellation point.
5237         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5238         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5239         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5241 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5243         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5244         libc_hidden_def.
5245         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5246         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5247         Likewise.
5248         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5249         Likewise.
5250         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5251         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5252         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5253         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5254         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5256         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5257         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5258         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5259         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5260         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5261         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5263         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5264         a local register for saving old PID.  Negate PID in parent upon exit.
5266         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5267         tcb-offsets.h.
5268         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5269         before syscall, set to the old value in the parent afterwards.
5270         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5271         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5272         tcb-offsets.h.
5273         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5274         before syscall, set to the old value in the parent afterwards.
5275         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5276         * sysdeps/s390/tcb-offsets.sym: Add PID.
5278         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5279         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5280         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5281         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5282         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5283         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5285 2004-03-10  Andreas Schwab  <schwab@suse.de>
5287         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5288         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5289         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5291 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5293         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5294         * tst-cancel21.c (do_one_test): Likewise.
5295         Reported by Gordon Jin <gordon.jin@intel.com>.
5297 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5299         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5300         if non-zero and set to INT_MIN if zero.
5301         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5302         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5303         (SAVE_PID, RESTORE_PID): Define.
5304         (__vfork): Use it.
5305         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5306         Use relative path to avoid including NPTL i386/vfork.S.
5307         (SAVE_PID, RESTORE_PID): Define.
5308         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5309         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5310         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5311         tst-vfork2x.
5312         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5313         * tst-vfork1.c: New test.
5314         * tst-vfork2.c: New test.
5315         * tst-vfork1x.c: New test.
5316         * tst-vfork2x.c: New test.
5318 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5320         * sysdeps/i386/tcb-offsets.sym: Add PID.
5321         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5322         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5323         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5325 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5327         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5329 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5331         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5332         _rtld_global_ro.
5334 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5336         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5337         _rtld_global_ro.
5339         * tst-once4.c: Remove unnecessary macro definition.
5341         * tst-mutex7.c (do_test): Limit thread stack size.
5342         * tst-once2.c (do_test): Likewise.
5343         * tst-tls3.c (do_test): Likewise.
5344         * tst-tls1.c (do_test): Likewise.
5345         * tst-signal3.c (do_test): Likewise.
5346         * tst-kill6.c (do_test): Likewise.
5347         * tst-key4.c (do_test): Likewise.
5348         * tst-join4.c (do_test): Likewise.
5349         * tst-fork1.c (do_test): Likewise.
5350         * tst-context1.c (do_test): Likewise.
5351         * tst-cond2.c (do_test): Likewise.
5352         * tst-cond10.c (do_test): Likewise.
5353         * tst-clock2.c (do_test): Likewise.
5354         * tst-cancel10.c (do_test): Likewise.
5355         * tst-basic2.c (do_test): Likewise.
5356         * tst-barrier4.c (do_test): Likewise.
5358 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5360         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5362 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5364         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5365         (__pthread_cond_timedwait): Optimize wakeup test.
5366         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5367         (__pthread_cond_wait): Likewise.
5368         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5369         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5370         Likewise.
5372 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5374         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5375         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5376         the atomic instruction needed.
5377         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5378         (__lll_mutex_lock_wait): Likewise.
5380 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5382         * Makefile (tests): Add tst-cond14 and tst-cond15.
5383         * tst-cond14.c: New file.
5384         * tst-cond15.c: New file.
5386 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5388         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5389         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5390         needs to be implemented differently to be useful.
5392 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5394         * pthread_attr_setschedparam.c: Don't test priority against limits
5395         here.  Set ATTR_FLAG_SCHED_SET flag.
5396         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5397         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5398         from parent thread to child.  If attribute is used and scheduling
5399         parameters are not inherited, copy parameters from attribute or
5400         compute them.  Check priority value.
5401         * pthread_getschedparam.c: If the parameters aren't known yet get
5402         them from the kernel.
5403         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5404         ATTR_FLAG_POLICY_SET flag for thread.
5405         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5406         and ATTR_FLAG_POLICY_SET.
5408         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5410         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5411         fail if stack address hasn't been set.  Just return 0.
5413 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5415         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5416         libpthread for the files in this list.
5417         (CFLAGS-tst-unload): Removed.
5418         * tst-unload.c (do_test): Don't use complete path for
5419         LIBPHREAD_SO.
5421         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5422         tst-_res1mod2.
5424 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5426         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5427         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5428         operation per round is needed.
5429         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5430         (__lll_mutex_lock_wait): Likewise.
5432 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5434         * tst-cancel9.c (cleanup): Don't print to stderr.
5436 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5438         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5440 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5442         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5443         (__syscall_error_handler2): Call CDISABLE.
5444         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5445         (__syscall_error_handler2): Call CDISABLE.
5447         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5448         Release lock before the loop, don't reacquire it.
5450         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5452 2004-02-19  Andreas Schwab  <schwab@suse.de>
5454         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5455         Fix last change.
5457 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5459         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5460         (pthread_barrier_wait): After wakeup, release lock only when the
5461         last thread stopped using the barrier object.
5462         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5463         (pthread_barrier_wait): Likewise.
5464         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5465         Likewise.
5466         * Makefile (tests): Add tst-barrier4.
5467         * tst-barrier4.c: New file.
5469         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5470         (__pthread_cond_timedwait): Perform timeout test while holding
5471         internal lock to prevent wakeup race.
5472         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5473         * sysdeps/pthread/pthread_cond_timedwait.c
5474         (__pthread_cond_timedwait): Likewise.
5475         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5476         (__pthread_cond_timedwait): Likewise.
5478 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5481         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5482         * Makefile (tests): Add tst-rwlock13.
5483         * tst-rwlock13.c: New test.
5485 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5487         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5488         (__condvar_tw_cleanup): Little optimization.
5489         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5491 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5493         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5494         libpthread as "lib" parameter to SHLIB_COMPAT.
5495         (__novmx_siglongjmp): Fix typo in function name.
5496         (__novmx_longjmp): Fix typo in function name.
5498 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5500         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5501         __builtin_expect.
5503         * sysdeps/generic/pt-longjmp.c: Moved to...
5504         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5506 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5508         * Makefile (libpthread-routines): Add pt-cleanup.
5509         * pt-longjmp.c: Removed.
5510         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5511         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5512         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5513         Version longjmp, siglongjmp for GLIBC_2.3.4.
5514         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5516 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5518         * sysdeps/pthread/pthread_cond_timedwait.c
5519         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5520         Reuse code.  Add __builtin_expects.
5522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5523         (__pthread_cond_timedwait): Get internal lock in case timeout has
5524         passed before the futex syscall.
5525         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5527 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5529         * allocatestack.c: Pretty printing.
5531         * sysdeps/pthread/createthread.c (create_thread): Don't add
5532         CLONE_DETACHED bit if it is not necessary.
5534 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5536         * pthread_getattr_np.c: Include ldsodefs.h.
5538 2004-01-16  Richard Henderson  <rth@redhat.com>
5540         * allocatestack.c: Don't declare __libc_stack_end.
5541         * init.c (__pthread_initialize_minimal_internal): Likewise.
5542         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5544 2004-01-15  Richard Henderson  <rth@redhat.com>
5546         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5547         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5548         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5549         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5550         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5551         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5552         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5553         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5555 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5557         * init.c (pthread_functions): Make array const.
5559 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5561         * allocatestack.c (__make_stacks_executable): Change interface.
5562         Check parameters.  Pass parameter on to libc counterpart.
5563         * pthreadP.h: Change declaration.
5565 2004-01-13  Richard Henderson  <rth@redhat.com>
5567         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5568         prototype form.
5569         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5570         Likewise.
5572         * sysdeps/alpha/Makefile: New file.
5573         * sysdeps/alpha/tcb-offsets.sym: New file.
5574         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5575         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5577         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5578         on powerpc version.
5580 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5582         * Makefile (tests): Add tst-backtrace1.
5583         * tst-backtrace1.c: New test.
5585 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5587         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5588         register as second parameter to the REGISTER macro.
5589         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5590         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5591         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5592         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5593         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5594         of thread register as second parameter to REGISTER macro in 64 case.
5596 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5598         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5599         (CFLAGS-getpid.o): Defined.
5600         (CFLAGS-getpid.os): Defined.
5602 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5604         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5605         returned for main thread does not overlap with any other VMA.
5606         Patch by Jakub Jelinek.
5608 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5610         * tst-raise1.c: Include stdio.h.
5612 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5614         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5615         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5616         If pid is 0, set it to selftid.
5617         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5618         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5619         != 0, return self->tid without doing a syscall.
5620         * descr.h (struct pthread): Move pid field after tid.
5622         * Makefile (tests): Add tst-raise1.
5623         * tst-raise1.c: New file.
5625 2003-12-23  Roland McGrath  <roland@redhat.com>
5627         * tst-oddstacklimit.c: New file.
5628         * Makefile (tests): Add it.
5629         (tst-oddstacklimit-ENV): New variable.
5631         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5632         value up to page size for __default_stacksize.
5634 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5636         * Makefile (tests): Add tst-eintr5.
5637         * tst-eintr5.c: New file.
5639         * eintr.c (eintr_source): Prevent sending signal to self.
5641         * tst-eintr2.c (tf1): Improve error message.
5643 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5645         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5646         * sysdeps/unix/sysv/linux/getpid.c: New file.
5647         * pthread_cancel.c: Add comment explaining use of PID field.
5648         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5649         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5650         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5651         temporarily to signal the field must not be relied on and updated
5652         by getpid().
5653         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5654         temporarily negative.
5655         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5657 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5659         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5660         (eintr_source): If ARG != NULL, use pthread_kill.
5661         * tst-eintr1.c: Adjust for this change.
5662         * tst-eintr2.c: Likewise.
5663         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5664         * tst-eintr3.c: New file.
5665         * tst-eintr4.c: New file.
5667 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5669         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5670         if CANCELSTATE_BITMASK is set.
5671         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5672         Likewise.
5674         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5675         (tests-reverse): Add tst-cancel23.
5676         * tst-cancel22.c: New test.
5677         * tst-cancel23.c: New test.
5679 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5681         * tst-eintr1.c: Better error messages.
5683         * Makefile (tests): Add tst-eintr2.
5684         * tst-eintr2.c: New file.
5686 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5688         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5689         (CFLAGS-tst-cancelx21.c): Set.
5690         * tst-cancel21.c: New test.
5691         * tst-cancelx21.c: New test.
5693         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5694         comparison operand.
5695         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5696         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5697         * pt-longjmp.c: Include jmpbuf-unwind.h.
5698         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5699         _JMPBUF_UNWINDS.  Adjust compared pointers.
5700         * init.c (__pthread_initialize_minimal_internal): Initialize
5701         pd->stackblock_size.
5702         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5703         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5704         * sysdeps/i386/jmpbuf-unwind.h: New file.
5705         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5706         * sysdeps/s390/jmpbuf-unwind.h: New file.
5707         * sysdeps/sh/jmpbuf-unwind.h: New file.
5708         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5709         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5710         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5711         (_JMPBUF_CFA_UNWINDS): Remove.
5712         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5714 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5716         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5717         (CFLAGS-tst-cancelx20.c): Set.
5718         * tst-cancel20.c: New test.
5719         * tst-cancelx20.c: New test.
5721 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5723         * init.c (__pthread_initialize_minimal_internal): Don't treat
5724         architectures with separate register stack special here when
5725         computing default stack size.
5727 2003-12-17  Roland McGrath  <roland@redhat.com>
5729         * Makefile (tst-cancelx7-ARGS): New variable.
5730         Reportd by Greg Schafer <gschafer@zip.com.au>.
5732 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5734         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5735         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5736         (tst-stack3-ENV): Set.
5737         ($(objpfx)tst-stack3-mem): New.
5738         * tst-stack3.c: New test.
5740 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5742         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5743         Add unwind directives.  Drop unused .regstk directive.
5744         (_fini_EPILOG_BEGINS): Add unwind directives.
5746 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5748         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5749         Assume parameter is a pointer.
5750         (lll_futex_wake): Likewise.
5751         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5752         Likewise.
5753         (lll_futex_wake): Likewise.
5754         Reported by Boris Hu.
5755         * sysdeps/unix/sysv/linux/unregister-atfork.c
5756         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5758         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5760 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5762         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5763         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5764         __rtld_lock_initialize for ld.so lock.
5765         Patch in part by Adam Li <adam.li@intel.com>.
5767 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5769         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5770         in $(gnulib).  Also, remove stale comment.
5772 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5774         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5775         advantage of new syscall stub and optimize accordingly.
5777         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5778         from SYS_futex, to match expectations of
5779         sysdep.h:DO_INLINE_SYSCALL.
5780         (lll_futex_clobbers): Remove.
5781         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5782         (lll_futex_wake): Likewise.
5783         (lll_futex_requeue): Likewise.
5784         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5785         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5786         Jelinek).
5787         (__lll_mutex_lock): Likewise.
5788         (__lll_mutex_cond_lock): Likewise.
5789         (__lll_mutex_timed_lock): Likewise.
5790         (__lll_mutex_unlock): Likewise.
5791         (__lll_mutex_unlock_force): Likewise.
5793         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5794         comes before the include of <sysdep.h>.
5795         (THREAD_SELF_SYSINFO): New macro.
5796         (THREAD_SYSINFO): Likewise.
5797         (INIT_SYSINFO): New macro.
5798         (TLS_INIT_TP): Call INIT_SYSINFO.
5800         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5802         * sysdeps/pthread/createthread.c (create_thread): Use
5803         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5804         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5805         THREAD_SELF_SYSINFO instead of open code.
5806         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5807         (THREAD_SYSINFO): Likewise.
5809         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5811         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5813 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5815         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5816         instead of .init.  Patch by David Mosberger.
5818 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5820         * sysdeps/pthread/configure.in: Remove broken declaration in C
5821         cleanup handling check.
5823 2003-11-30  Andreas Jaeger  <aj@suse.de>
5825         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5826         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5827         Likewise.
5829 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5831         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5832         * pthread_attr_destroy.c: Include shlib-compat.h.
5833         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5834         is set in iattr->flags.
5835         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5837 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5839         * Makefile (distribute): Add tst-cleanup4aux.c.
5841         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5842         include.
5844 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5846         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5847         pthread_cond_signal.
5849         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5850         store mutex address if the current value is ~0l.
5851         * sysdeps/pthread/pthread_cond_timedwait.c
5852         (__pthread_cond_timedwait): Likewise.
5853         * sysdeps/pthread/pthread_cond_broadcast.c
5854         (__pthread_cond_broadcast): Don't use requeue for pshared
5855         condvars.
5857         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5858         (__pthread_cond_wait): Don't store mutex address if the current
5859         value is ~0l.
5860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5861         (__pthread_cond_timedwait): Likewise.
5862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5863         (__pthread_cond_broadcast): Don't use requeue for pshared
5864         condvars.
5866         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5867         element with ~0l for pshared condvars, with NULL otherwise.
5869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5870         (__pthread_cond_wait): Don't store mutex address if the current
5871         value is ~0l.
5872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5873         (__pthread_cond_timedwait): Likewise.
5874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5875         (__pthread_cond_broadcast): Don't use requeue for pshared
5876         condvars.
5878         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5879         * tst-cond12.c: New file.
5880         * tst-cond13.c: New file.
5882 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5884         * sysdeps/pthread/configure.in: Make missing forced unwind support
5885         fatal.
5887 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5889         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5891 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5893         * Makefile: Add magic to clean up correctly.
5895 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5897         * unwind.c (FRAME_LEFT): Define.
5898         (unwind_stop): Handle old style cleanups here.
5899         (__pthread_unwind): Handle old style cleanups only if
5900         !HAVE_FORCED_UNWIND.
5901         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5902         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5903         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5904         ($(objpfx)tst-cleanupx4): Likewise.
5905         * tst-cleanup4.c: New test.
5906         * tst-cleanup4aux.c: New.
5907         * tst-cleanupx4.c: New test.
5909 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5911         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5912         lll_mutex_*lock macros to skip atomic operations on some archs.
5914 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5916         * sysdeps/pthread/tst-timer.c (main): Initialize
5917         sigev2.sigev_value as well.
5919 2003-10-15  Roland McGrath  <roland@redhat.com>
5921         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5922         is missing.
5923         * sysdeps/pthread/configure: Regenerated.
5925 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5927         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5928         locking macros.  No distinction between normal and mutex locking
5929         anymore.
5930         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5931         Merge bits from lowlevelmutex.S we still need.
5932         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5933         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5934         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5935         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5936         new mutex implementation.
5937         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5938         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5939         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5940         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5941         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5942         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5943         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5944         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5945         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5946         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5947         symbol for entry point to avoid cancellation.
5949 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5951         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5952         changes.
5953         (SAVE_OLDTYPE_0): Fix a typo.
5955 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5957         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5958         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5960 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5962         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5963         correct offset.
5965 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5967         * Makefile (tests): Add tst-cancel19.
5968         * tst-cancel19.c: New test.
5970 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5972         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5973         restoring of the old cancellation type.
5975 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5977         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5979 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5981         * sysdeps/pthread/malloc-machine.h: New file
5983 2003-09-24  Roland McGrath  <roland@redhat.com>
5985         * allocatestack.c (__make_stacks_executable): Don't ignore return
5986         value from _dl_make_stack_executable.
5988 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5990         * allocatestack.c (__make_stacks_executable): Also change
5991         permission of the currently unused stacks.
5993         * allocatestack.c (change_stack_perm): Split out from
5994         __make_stacks_executable.
5995         (allocate_stack): If the required permission changed between the time
5996         we started preparing the stack and queueing it, change the permission.
5997         (__make_stacks_executable): Call change_stack_perm.
5999         * Makefile: Build tst-execstack-mod locally.
6000         * tst-execstack-mod.c: New file.
6002 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
6004         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
6006 2003-09-23  Roland McGrath  <roland@redhat.com>
6008         * tst-execstack.c: New file.
6009         * Makefile (tests): Add it.
6010         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
6011         (LDFLAGS-tst-execstack): New variable.
6013         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
6014         whether to use PROT_EXEC for stack mmap.
6015         (__make_stacks_executable): New function.
6016         * pthreadP.h: Declare it.
6017         * init.c (__pthread_initialize_minimal_internal): Set
6018         GL(dl_make_stack_executable_hook) to that.
6020 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6022         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
6023         recommendation from AMD re avoidance of lock prefix.
6025 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
6027         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
6028         lll_futex_timed_wait instead of lll_futex_wait.
6029         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
6030         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
6031         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
6032         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
6033         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
6034         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
6035         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
6036         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
6037         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
6038         Completely revamp the locking macros.  No distinction between
6039         normal and mutex locking anymore.
6040         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
6041         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
6042         __lll_lock_timedwait): Fix prototypes.
6043         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
6044         __lll_lock_timedwait): Likewise.
6045         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
6046         macros, add __builtin_expect.
6047         (lll_mutex_timedlock): Likewise.  Fix return value.
6048         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
6049         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
6050         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
6051         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
6052         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
6053         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
6054         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
6055         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
6057 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
6059         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
6060         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
6061         operation if possible.
6063         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
6064         like jumping over the lock prefix.
6066 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
6068         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
6069         locking macros.  No distinction between normal and mutex locking
6070         anymore.
6071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6072         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6073         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
6074         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
6075         locking.  Merge bits from lowlevelmutex.S we still need.
6076         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
6077         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
6078         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
6079         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
6080         * Makefile (routines): Remove libc-lowlevelmutex.
6081         (libpthread-rountines): Remove lowlevelmutex.
6082         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
6083         for new mutex implementation.
6084         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6085         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6089         Likewise.
6090         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6091         Likewise.
6092         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6093         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6094         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6095         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6097         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6098         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6099         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6100         Likewise.
6101         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6102         Likewise.
6103         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6104         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6106         Don't use requeue.
6107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6108         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6110 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6112         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6113         in parameters of asm with output parameters.
6115         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6116         type of DECR parameter to int.
6117         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6119 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6121         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6122         guardsize for each thread.
6124 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6126         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6127         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6128         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6130         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6131         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6132         NULL.
6133         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6134         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6135         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6136         (pthread_getaffinity_np): Add hidden_def.
6138         * Makefile (tests): Add tst-attr3.
6139         * tst-attr3.c: New test.
6141         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6143 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6145         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6146         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6148 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6150         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6151         * tst-align.c: Include tst-stack-align.h.
6152         (tf, do_test): Use TEST_STACK_ALIGN macro.
6154 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6156         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6157         variable.
6159 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6161         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6162         stack-related values for the initial thread.
6164 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6166         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6168 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6170         * pthread_mutex_lock.c: Minor code rearrangements.
6172 2003-09-05  Roland McGrath  <roland@redhat.com>
6174         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6175         Instead, include ../nptl_db/db_info.c to do its magic.
6176         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6177         (__pthread_pthread_key_2ndlevel_size): Likewise.
6178         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6179         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6180         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6181         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6182         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6183         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6184         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6185         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6186         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6187         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6188         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6189         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6190         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6191         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6192         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6193         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6194         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6196 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6198         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6199         of pthread_t to be compatible with LT.
6200         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6201         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6202         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6203         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6204         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6205         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6206         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6208 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6210         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6212 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6214         * unwind-forcedunwind.c: Move to...
6215         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6216         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6217         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6218         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6219         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6220         * unwind.c: Include jmpbuf-unwind.h.
6221         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6223 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6225         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6226         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6227         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6228         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6229         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6230         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6231         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6232         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6233         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6234         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6235         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6236         function.
6237         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6238         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6239         * Makefile (tests): Add tst-stack2.
6240         * tst-stack2.c: New test.
6241         * tst-stack1.c: Include limits.h and sys/param.h.
6242         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6244         * pthread_condattr_setpshared.c: Include errno.h.
6245         (pthread_condattr_setpshared): Return EINVAL if pshared
6246         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6248         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6249         defined symbol for entry point to avoid cancellation.
6250         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6251         Likewise.
6252         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6253         Likewise.
6254         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6255         Likewise.
6256         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6257         Likewise.
6258         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6259         Likewise.
6260         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6261         __close_nocancel, __read_nocancel, __write_nocancel,
6262         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6263         libpthread.so or librt.so, define to corresponding function
6264         without _nocancel suffix.
6265         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6266         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6267         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6269         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6271 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6273         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6274         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6276         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6277         in subsections has a symbol associated with it.
6279         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6280         defined symbol for entry point to avoid cancellation.
6281         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6283 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6285         * Makefile (tests): Add tst-tls5.
6286         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6287         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6288         ($(objpfx)tst-tls5): New.
6289         ($(objpfx)tst-tls6.out): Likewise.
6290         (tests): Depend on $(objpfx)tst-tls6.out.
6291         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6292         (do_test): Check pthread_self () return value alignment.
6293         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6294         (tf): Check pthread_self () return value alignment.
6295         * tst-tls5.c: New test.
6296         * tst-tls5.h: New.
6297         * tst-tls5mod.c: New.
6298         * tst-tls5moda.c: New.
6299         * tst-tls5modb.c: New.
6300         * tst-tls5modc.c: New.
6301         * tst-tls5modd.c: New.
6302         * tst-tls5mode.c: New.
6303         * tst-tls5modf.c: New.
6304         * tst-tls6.sh: New test.
6306         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6307         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6308         * init.c (pthread_functions): Initialize them.
6309         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6310         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6311         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6312         pthread_cond_timedwait@@GLIBC_2.3.2.
6314 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6316         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6317         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6318         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6319         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6320         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6321         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6323         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6325         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6326         _POSIX_THREAD_PRIORITY_SCHEDULING.
6327         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6329 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6331         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6332         nested function, use static inline function from libio.h.
6333         Code by Richard Henderson.
6335         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6336         weak.
6338 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6340         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6341         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6342         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6343         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6344         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6345         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6346         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6347         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6348         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6349         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6350         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6351         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6352         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6353         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6354         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6355         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6356         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6357         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6358         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6359         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6360         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6361         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6362         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6363         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6364         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6365         * sysdeps/sparc/tls.h: New file.
6366         * sysdeps/sparc/tcb-offsets.sym: New file.
6367         * sysdeps/sparc/Makefile: New file.
6368         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6369         * init.c [__sparc__] (__NR_set_tid_address): Define.
6371 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6373         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6374         _IO_release_lock): Define.
6376 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6378         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6379         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6381 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6383         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6384         (__pthread_cleanup_class): Add missing return types of member
6385         functions.
6387 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6389         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6390         (lll_mutex_unlock_force): Add memory barrier between store and futex
6391         syscall.
6393 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6395         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6396         tempmsg in first loop.
6398 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6400         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6401         _POSIX_THREAD_PRIORITY_SCHEDULING.
6402         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6404 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6406         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6407         (__rtld_lock_default_lock_recursive,
6408         __rtld_lock_default_unlock_recursive): Define.
6409         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6410         __rtld_lock_unlock_recursive): Define using
6411         GL(_dl_rtld_*lock_recursive).
6412         * init.c (__pthread_initialize_minimal_internal): Initialize
6413         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6414         Lock GL(_dl_load_lock) the same number of times as
6415         GL(_dl_load_lock) using non-mt implementation was nested.
6417         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6418         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6420 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6422         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6423         PIPE_BUF.
6425 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6427         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6429 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6431         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6432         to first syscall error check.  Move syscall error check for tkill
6433         into __ASSUME_CLONE_STOPPED #ifdef.
6435 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6437         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6438         is not defined, do explicit synchronization.
6439         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6440         is not defined also unlock pd->lock for non-debugging case in case
6441         it is necessary.
6442         * pthread_create.c (start_thread): Always get and release pd->lock
6443         if __ASSUME_CLONE_STOPPED is not defined.
6444         (start_thread_debug): Removed.  Adjust users.
6445         * allocatestack.c (allocate_stack): Always initialize lock if
6446         __ASSUME_CLONE_STOPPED is not defined.
6447         * Makefile (tests): Add tst-sched1.
6448         * tst-sched1.c: New file.
6450         * sysdeps/pthread/createthread.c (do_clone): Only use
6451         sched_setschduler and pass correct parameters.
6453 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6455         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6456         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6457         PTHREAD_STACK_MIN in comments.
6459 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6461         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6462         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6463         argument.
6464         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6465         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6466         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6467         (__pthread_cleanup_upto): Fix prototype.
6468         (_longjmp_unwind): Adjust caller.
6469         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6470         Change second argument to const struct pointer.
6471         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6472         * tst-sem9.c (main): Likewise.
6473         * unwind.c: Include string.h for strlen prototype.
6475 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6477         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6478         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6479         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6480         Define HAVE_CMOV.
6481         Patch by Nicholas Miell <nmiell@attbi.com>.
6483 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6485         * init.c (__pthread_initialize_minimal_internal): Initialize
6486         GL(dl_init_static_tls).
6487         * pthreadP.h (__pthread_init_static_tls): New prototype.
6488         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6489         New functions.
6490         * Makefile (tests): Add tst-tls4.
6491         (modules-names): Add tst-tls4moda and tst-tls4modb.
6492         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6493         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6494         tst-tls4modb.so.
6495         * tst-tls4.c: New file.
6496         * tst-tls4moda.c: New file.
6497         * tst-tls4modb.c: New file.
6499 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6501         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6502         before __timer_dealloc.
6503         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6504         Don't call list_unlink.
6506 2003-07-29  Roland McGrath  <roland@redhat.com>
6508         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6510 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6512         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
6513         if __need_struct_pthread_size, instead define lll_lock_t.
6515 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6517         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6518         Don't reuse struct aiocb A if it failed.
6519         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6520         not just one byte, as that does not block.
6522 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6524         * sysdeps/pthread/unwind-resume.c: New file.
6525         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6526         unwind-resume in csu subdir.
6527         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6528         exceptions.
6529         (librt-sysdep_routines, librt-shared-only-routines): Add
6530         rt-unwind-resume.
6531         * sysdeps/pthread/rt-unwind-resume.c: New file.
6532         * unwind-forcedunwind.c: New file.
6533         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6534         (libpthread-shared-only-routines): Likewise.
6535         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6536         * pthreadP.h (pthread_cancel_init): New prototype.
6537         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6539         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6540         attr argument const struct pthread_attr *.
6542         * res.c (__res_state): Return __resp.
6543         * descr.h: Include resolv.h.
6544         (struct pthread): Add res field.
6545         * pthread_create.c: Include resolv.h.
6546         (start_thread): Initialize __resp.
6547         * Makefile (tests): Add tst-_res1.
6548         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6549         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6550         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6551         libpthread.
6552         * tst-_res1.c: New file.
6553         * tst-_res1mod1.c: New file.
6554         * tst-_res1mod2.c: New file.
6556 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6558         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6560         * Makefile: Define various *-no-z-defs variables for test DSOs
6561         which has undefined symbols.
6563 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6565         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6566         Retry if the stwcx fails to store once_control.
6568 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6570         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6571         pthread_attr_setaffinity.
6572         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6573         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6574         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6575         * pthread_attr_destroy.c: Free cpuset element if allocated.
6576         * pthread_create.c: Pass iattr as additional parameter to
6577         create_thread.
6578         * sysdeps/pthread/createthread.c: If attribute is provided and
6579         a new thread is created with affinity set or scheduling parameters,
6580         start thread with CLONE_STOPPED.
6581         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6582         pthread_attr_setaffinity.
6583         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6584         cpuset element.
6586 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6588         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6590 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6592         * sysdeps/pthread/configure.in: Require CFI directives also for
6593         ppc and s390.
6595 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6598         Add cfi directives.
6600 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6602         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6603         CLEANUP_JMP_BUF.
6604         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6605         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6606         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6608         not self pointer in __writer.  Compare with TID to determine
6609         deadlocks.
6610         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6612         Likewise.
6613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6614         Likewise.
6615         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6616         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6617         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6618         macros also when compiling librt.
6620 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6622         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6623         -fasynchronous-unwind-tables.
6624         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6625         (PSEUDO): Add cfi directives.
6626         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6627         Likewise.
6628         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6629         Likewise.
6631 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6633         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6634         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6635         * unwind.c (__pthread_unwind_next): Add hidden_def.
6636         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6637         Likewise.
6638         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6639         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6640         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6641         Likewise.
6642         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6643         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6644         Likewise.
6645         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6646         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6647         __pthread_unregister_cancel and __pthread_unwind_next.
6649 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6651         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6652         different symbol for the cancellation syscall wrapper and
6653         non-cancellation syscall wrapper.
6654         (PSEUDO_END): Define.
6656 2003-07-05  Richard Henderson  <rth@redhat.com>
6658         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6659         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6660         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6661         return actual return value from the syscall, not 0.
6663 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6665         * descr.h (struct pthread): Add pid field.
6666         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6667         (__reclaim_stacks): Likewise.
6668         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6669         also check for PID of the signal source.
6670         (__pthread_initialize_minimal_internal): Also initialize pid field
6671         of initial thread's descriptor.
6672         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6673         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6674         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6675         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6676         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6678 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6680         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6681         Fix use of parameter.
6682         (__libc_cleanup_pop): Likewise.
6684 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6686         * init.c (sigcancel_handler): Change parameters to match handler
6687         for SA_SIGACTION.  Check signal number and code to recognize
6688         invalid invocations.
6690 2003-07-03  Roland McGrath  <roland@redhat.com>
6692         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6693         Apply sizeof (struct pthread) bias to r13 value.
6695 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6697         * sysdeps/pthread/configure.in: Require CFI directives.
6699         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6700         definition.
6701         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6702         libpthread compilation.
6703         * unwind.c (__pthread_unwind): Add hidden_def.
6704         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6706 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6708         * libc-cancellation.c (__libc_cleanup_routine): Define.
6709         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6710         (__pthread_cleanup_pop): Define.
6712 2003-07-01  Richard Henderson  <rth@redhat.com>
6714         * sysdeps/alpha/elf/pt-initfini.c: New file.
6715         * sysdeps/alpha/pthread_spin_lock.S: New file.
6716         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6717         * sysdeps/alpha/pthreaddef.h: New file.
6718         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6719         * sysdeps/alpha/tls.h: New file.
6720         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6721         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6722         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6723         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6724         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6725         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6726         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6727         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6728         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6729         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6731 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6733         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6734         cleanup support and unwind info.
6736 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6738         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6739         Use correct cleanup handler registration.  Add unwind info.
6740         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6741         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6742         * tst-once3.c: Add cleanup handler and check it is called.
6743         * tst-once4.c: Likewise.
6744         * tst-oncex3.c: New file.
6745         * tst-oncex4.c: New file.
6746         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6748 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6750         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6752 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6754         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6755         (tf_msgsnd): Likewise.
6757         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6758         premature returns a bit more.
6760 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6762         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6763         definition to the front.
6765         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6766         the cleanup functions to make the names unique.  Fix dwarf opcode
6767         un unwind table.
6768         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6769         functions to make the names unique.  Fix CFA offset for two blocks.
6771 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6773         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6774         missing closing braces.
6775         Patch by Christophe Saout <christophe@saout.de>.
6777 2003-06-24  Roland McGrath  <roland@redhat.com>
6779         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6781 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6783         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6784         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6786         * pthreadP.h: Declare __find_thread_by_id.
6787         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6788         * pthread_clock_gettime.c: Allow using other thread's clock.
6789         * pthread_clock_settime.c: Likewise.
6790         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6791         * Makefile: Add rules to build and run tst-clock2.
6792         * tst-clock2.c: New file.
6794 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6796         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6797         to use exception-based cleanup handler.
6798         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6800         * tst-cond8.c (ch): Announce that we are done.
6802         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6804         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6805         Also test aio_suspend with timeout value.
6807 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6809         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6810         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6811         attribute_hidden.
6813         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6814         (__pthread_mutex_lock_internal): Likewise.
6815         (__pthread_mutex_unlock_internal): Likewise.
6816         (__pthread_mutex_unlock_usercnt): Declare.
6817         * pthread_mutex_destroy.c: Always fail if used in any way.
6818         * pthread_mutex_init.c: Update comment.
6819         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6820         * pthread_mutex_timedlock.c: Adjust __nusers.
6821         * pthread_mutex_trylock.c: Adjust __nusers.
6822         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6823         and public interfaces are wrapper with pass additional parameter.
6824         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6825         parameter zero.
6826         * tst-mutex8.c: New file.
6827         * Makefile (tests): Add tst-mutex8.
6828         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6829         __pthread_mutex_unlock_usercnt.
6830         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6831         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6832         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6835         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6836         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6837         Add __nusers.
6838         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6839         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6840         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6841         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6842         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6844         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6845         * pthread_mutex_timedlock.c: Likewise.
6846         * pthread_mutex_trylock.c: Adjust __nusers.
6847         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6848         * tst-mutex9.c: New file.
6849         * Makefile (tests): Add tst-mutex9.
6850         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6851         * sysdeps/ia64/tls.h: Likewise.
6852         * sysdeps/powerpc/tls.h: Likewise.
6853         * sysdeps/s390/tls.h: Likewise.
6854         * sysdeps/sh/tls.h: Likewise.
6855         * sysdeps/x86_64/tls.h: Likewise.
6856         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6857         Change type of __owner.
6858         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6859         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6860         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6861         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6862         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6864 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6866         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6867         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6869         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6870         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6871         instead of nr to lll_futex_wake.  Only set errno and return -1
6872         if err < 0.
6874         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6875         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6876         return actual return value from the syscall, not 0.
6878 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6880         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6881         find a random value.
6882         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6883         errno==EIDRM.
6885         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6886         compat_timer_settime.
6887         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6888         compat_timer_gettime.
6889         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6890         compat_timer_getoverrun.
6891         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6892         compat_timer_delete.
6894         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6895         error-checking mutex detect busy mutexes.
6897 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6899         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6900         Add ax to clobber list.
6901         (lll_mutex_cond_lock): Likewise.
6902         (lll_mutex_unlock): Likewise.
6903         (lll_lock): Likewise.
6904         (lll_unlock): Likewise.
6906         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6907         * tst-cancel18.c: New file.
6908         * tst-cancelx18.c: New file.
6910         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6911         and tcdrain.
6913         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6914         * tst-cancel17.c: New file.
6915         * tst-cancelx17.c: New file.
6917         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6918         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6919         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6921         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6923 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6925         * sysdeps/pthread/createthread.c (create_thread): Set
6926         header.multiple_threads unconditionally.
6927         * allocatestack.c (allocate_stack): Likewise.
6928         * descr.h (struct pthread): Add header.multiple_threads
6929         unconditionally.
6930         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6931         Define for librt.  #error if neither libpthread, libc nor librt.
6932         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6933         Likewise.
6934         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6935         CDISABLE): Likewise.
6936         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6937         CDISABLE): Likewise.
6938         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6939         CDISABLE): Likewise.
6940         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6941         CDISABLE): Likewise.  Access header.multiple_threads outside of
6942         libc and libpthread.
6943         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6944         Likewise.
6945         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6946         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6948 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6950         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6951         Also test early cancellation before the thread reaches the cancellation
6952         point.
6954         * Makefile: Compile forward.c with exceptions.
6956         * sysdeps/unix/sysv/linux/sleep.c: New file.
6958 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6960         * Makefile: Add CFLAGS definition to compile function wrappers
6961         duplicated from libc with exceptions.
6962         * tst-cancel4.c: Also check cancellation handlers.
6964         * Makefile: Add rules to build and run tst-cancel16 and
6965         tst-cancelx16.  Add missing CFLAGS definitions.
6966         * tst-cancel16.c: New file.
6967         * tst-cancelx16.c: New file.
6969 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6971         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6972         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6973         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6974         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6976         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6977         (LIBC_CANCEL_RESET): Likewise.
6978         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6979         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6980         librt-cancellation.
6981         (CFLAGS-libcrt-cancellation.c): Define.
6982         * sysdeps/pthread/librt-cancellation.c: New file.
6983         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6984         macros also when compiling librt.
6985         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6986         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6987         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6988         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6989         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6990         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6991         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6993         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6994         compat_timer_create.
6996 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6998         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
7000         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
7001         __register_atfork.
7002         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
7003         Add libc_hidden_def.
7005 2003-06-13  Roland McGrath  <roland@redhat.com>
7007         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
7008         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
7010 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
7012         * allocatestack.c (queue_stack): Always inline.
7013         * ptreadhP.h (__do_cancel): Likewise.
7015 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
7017         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
7018         a typo.
7020 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
7022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7023         (__pthread_cond_signal): Remove incorrect second addition for
7024         cond_lock!=0.
7026 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
7028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7029         (__pthread_cond_signal): Use correct futex pointer in
7030         __lll_mutex_lock_wait call.
7032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7033         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
7035 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
7037         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
7038         cancelable.
7039         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7040         Likewise.
7042         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
7043         hand-written CFI generation code.  Since ENTRY/END also initiated
7044         CFI frames this caused two CFI sets to be generated.
7046 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
7048         * cleanup_routine.c: New file.
7049         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
7050         * sysdeps/pthread/pthread.h: Add support for fully exception-based
7051         cleanup handling.
7052         * Makefile (libpthread-routines): Add cleanup_routine.
7053         Add more CFLAGS variables to compile with exceptions.  Add comments
7054         why which file needs unwind tables.
7055         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
7056         tests.
7057         * tst-cancelx1.c: New file.
7058         * tst-cancelx2.c: New file.
7059         * tst-cancelx3.c: New file.
7060         * tst-cancelx4.c: New file.
7061         * tst-cancelx5.c: New file.
7062         * tst-cancelx6.c: New file.
7063         * tst-cancelx7.c: New file.
7064         * tst-cancelx8.c: New file.
7065         * tst-cancelx9.c: New file.
7066         * tst-cancelx10.c: New file.
7067         * tst-cancelx11.c: New file.
7068         * tst-cancelx12.c: New file.
7069         * tst-cancelx13.c: New file.
7070         * tst-cancelx14.c: New file.
7071         * tst-cancelx15.c: New file.
7072         * tst-cleanupx0.c: New file.
7073         * tst-cleanupx0.expect: New file.
7074         * tst-cleanupx1.c: New file.
7075         * tst-cleanupx2.c: New file.
7076         * tst-cleanupx3.c: New file.
7078         * tst-cleanup0.c: Make standard compliant.
7079         * tst-cleanup1.c: Likewise.
7081         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
7082         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7083         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7085         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7086         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7087         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
7088         CLEANUP_JMP_BUF.
7089         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7090         * tst-cancel12.c: New file.
7091         * tst-cancel13.c: New file.
7092         * tst-cancel14.c: New file.
7093         * tst-cancel15.c: New file.
7094         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7095         and tst-cancel15.
7097         * tst-cancel1.c: Add some comments.
7099         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7100         timeout correctly.
7102 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7104         * Makefile (CFLAGS-pthread_cancel.c): Define.
7106 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7108         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7109         Change type of __writer element to int.
7110         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7111         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7112         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7113         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7114         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7115         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7116         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7117         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7118         Compare with TID to determine deadlocks.
7119         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7120         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7121         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7122         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7123         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7124         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7125         Likewise.
7126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7127         Likewise.
7128         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7130         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7131         Likewise.
7132         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7133         Likewise.
7134         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7135         * Makefile (tests): Add tst-rwlock12.
7136         * tst-rwlock12.c: New file.
7138 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7140         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7141         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7142         Remove bogus hidden_proto.
7143         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7144         Likewise.
7145         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7146         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7147         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7148         ___lll_mutex_timedlock): Likewise.
7150 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7153         (__pthread_cond_signal): Add some code to eventually handle
7154         cond_lock!=0.
7156 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7158         * Makefile (tests): Add tst-exec4.
7159         (tst-exec4-ARGS): Define.
7160         * tst-exec4.c: New file.
7162 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7164         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7165         Also fail if tv_nsec < 0.
7166         (__lll_timedwait_tid): Likewise.
7167         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7168         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7169         Likewise.
7170         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7171         Likewise.
7172         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7173         Likewise.
7174         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7175         Likewise.
7176         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7177         Likewise.
7178         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7179         Likewise.
7181         * Makefile (tests): Add tst-sem8 and tst-sem9.
7182         * tst-sem8.c: New file.
7183         * tst-sem9.c: New file.
7184         * sem_open.c: Fix creation of in_use record if the file exists but
7185         no internal record.
7187         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7188         definitions.
7190         * sysdeps/pthread/timer_create.c (timer_create): In case
7191         evp==NULL, assign timer ID to sival_ptr.
7193         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7194         struct pthread_unwind_buf *.
7195         (struct pthread): Likewise for cleanup_jmp_buf element.
7197         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7198         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7199         * unwind.c (__pthread_unwind_next): Likewise.
7201 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7203         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7204         (lll_futex_timed_wait): Use int for futex value parameter.
7205         (lll_futex_wake): Likewise.
7206         (lll_futex_requeue): Likewise.
7208         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7209         Replace one memory operation with one register operation.
7211         * tst-join4.c (do_test): Fix error message.
7213         * tst-rwlock6.c (do_test): Use correct format specifier.
7215         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7216         (__lll_mutex_lock_wait): Replace one memory operation with one
7217         register operation.
7218         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7219         (__lll_mutex_lock_wait): Likewise.
7221         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7222         (__lll_mutex_cond_lock): Add one to value parameter of
7223         __lll_lock_wait to reflect reality in the futex syscall.
7224         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7225         (lll_mutex_cond_lock): Likewise.
7227 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7229         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7230         New function.
7231         (lll_mutex_cond_lock): Define.
7233 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7235         * Makefile (tests): Add tst-signal6.
7236         * tst-signal6.c: New file.
7238         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7239         (__lll_mutex_unlock_force): New function
7240         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7242         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7243         (__lll_mutex_unlock_force): New function.
7244         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7246         * tst-rwlock7.c (do_test): Use correct format specifier.
7248         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7249         Find break parameter in correct asm argument.
7251 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7253         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7254         Remove out4.
7255         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7256         error occured.
7257         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7258         Add __mutex.
7259         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7260         lll_futex_requeue, lll_mutex_unlock_force): Define.
7262 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7264         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7265         (pthread_cond_t): Add __mutex.
7266         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7267         lll_futex_requeue, lll_mutex_unlock_force): Define.
7269 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7271         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7272         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7273         Add __mutex field.
7274         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7275         Define.
7276         (lll_futex_wait, lll_futex_wake): Define.
7277         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7278         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7279         FUTEX_REQUEUE instead of FUTEX_WAIT.
7280         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7281         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7282         mutex which was used in condvar structure.  Call
7283         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7284         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7286         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7287         include tcb-offsets.h.  Read wakeup value in locked region.
7288         Use the value of gbr register as THREAD_ID.
7289         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7290         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7291         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7293         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7294         macros.
7296 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7298         * sysdeps/pthread/pthread_cond_broadcast.c
7299         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7301 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7303         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7304         typo in register name.
7305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7306         correctly.  Actually use requeue.  Little optimization.
7307         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7308         mutex address early.  Handle cancellation state as 32-bit value.
7309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7310         Remove unnecessary label.
7312 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7314         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7315         instead of FUTEX_WAIT.
7316         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7320         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7321         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7322         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7323         of __pthread_mutex_lock_internal.
7324         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7326         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7327         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7329         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7330         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7331         Add pthread_mutex_cond_lock.
7332         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7333         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7334         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7335         lll_mutex_cond_lock.
7336         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7337         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7338         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7339         Add __mutex field.
7340         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7341         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7343         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7344         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7346         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7347         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7348         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7349         macro don't define aliases.
7351         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7352         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7353         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7354         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7356         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7357         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7358         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7359         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7361 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7363         * sem_open.c: Fix one endless loop.  Implement correct semantics
7364         wrt opening the same semaphore more then once.
7365         * sem_close.c: Adjust for sem_open change.
7366         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7367         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7368         * Makefile (tests): Add tst-sem7.
7369         * tst-sem7.c: New file.
7371 2003-05-16  Roland McGrath  <roland@redhat.com>
7373         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7374         uninitialized variable braino.
7376 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7378         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7379         test for syscall availability.
7381         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7382         __no_posix_timers to -1 if the syscalls don't exist.
7384         * pthread_join.c (pthread_join): Set tid field of the joined
7385         thread to -1.  This isn't necessary but helps to recognize some
7386         error conditions with almost no cost.
7388         * allocatestack.c (FREE_P): Also negative values indicate an
7389         unused stack.
7391         * unwind.c: Include <unistd.h>.
7393 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7395         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7397 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7399         * Makefile (crti-objs, crtn-objs): New variables.
7400         (omit-deps, extra-objs): Add crtn.
7401         ($(objpfx)libpthread.so): Depend on both crti and crtn
7402         and links to them in multidir.
7403         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7405 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7407         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7408         (lll_mutex_unlock): Use atomic_exchange_rel.
7410 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7412         * cond-perf.c (cons): Add missing locking around setting of alldone.
7414 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7416         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7417         related macros.
7418         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7420 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7422         * tst-sem6.c: New file.
7423         * Makefile (tests): Add tst-sem6.
7425         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7426         Use atomic_exchange_rel instead of atomic_exchange.
7427         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7428         Likewise.
7430         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7431         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7432         vsyscall is possible.
7434         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7435         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7436         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7437         pthread_setaffinity_np.
7438         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7439         and pthread_setaffinity_np.
7440         * Makefile (libpthread-routines): Add pthread_getaffinity and
7441         pthread_setaffinity.
7443         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7444         use it in case mmap to allocate the stack fails.
7445         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7446         ARCH_MAP_FLAGS here.
7447         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7448         ARCH_RETRY_MMAP.
7450 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7452         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7453         handler implementation.  It is now lockless in fork().
7454         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7455         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7456         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7457         declare the __fork_*_lists.
7458         (struct fork_handler): Include pointers to all three functions.
7459         Add next, refcntr and need_signal elements.
7460         (__fork_handlers): New declaration.
7461         (__register_atfork_malloc): Remove declaration.
7462         (HAVE_register_atfork_malloc): Remove definition.
7463         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7464         __pthread_child_handler variable.
7465         (__libc_pthread_init): Use __register_atfork instead of explicitly
7466         adding to the list.
7467         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7468         and lll_futex_wake.
7469         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7471         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7472         function must never be reached.
7474         * cond-perf.c: New file.
7476 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7478         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7480 2003-05-04  Roland McGrath  <roland@redhat.com>
7482         * Makefile ($(objpfx)../libc.so): New target.
7484 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7486         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7487         (pthread_condattr_t): Size is only an int, don't use long for
7488         alignment.
7489         (pthread_mutexattr_t): Likewise.
7490         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7491         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7492         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7494 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7496         * sysdeps/i386/tls.h: Define THREAD_ID.
7497         * sysdeps/ia64/tls.h: Likewise.
7498         * sysdeps/powerpc/tls.h: Likewise.
7499         * sysdeps/s390/tls.h: Likewise.
7500         * sysdeps/sh/tls.h: Likewise.
7501         * sysdeps/x86_64/tls.h: Likewise.
7502         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7503         record ownership.
7504         * pthread_mutex_timedlock.c: Likewise.
7505         * pthread_mutex_trylock.c: Likewise.
7506         * pthread_mutex_unlock.c: Likewise.
7507         * pthread_rwlock_trywrlock.c: Likewise.
7508         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7509         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7510         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7511         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7513         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7514         flag.
7516 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7518         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7519         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7520         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7521         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7522         Make __align long long instead of long.
7523         (pthread_rwlock_t): Formatting.
7524         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7525         (pthread_rwlock_t): Formatting.
7526         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7527         (pthread_cond_t): Make __align long long instead of long.
7528         (pthread_rwlock_t): Move __flags field to the same position as in
7529         linuxthreads.
7531 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7533         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7534         * tst-rwlock7.c (do_test): Likewise.
7536 2003-04-26  Roland McGrath  <roland@redhat.com>
7538         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7540 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7542         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7543         sizeof (struct pthread).
7544         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7545         1 struct pthread.
7546         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7547         to 0.
7548         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7549         struct pthread.
7550         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7551         to 32-bit bytes.
7552         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7553         tcbp.
7554         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7555         unneccessarily.
7556         (NO_TLS_OFFSET): Define.
7557         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7558         add TLS_TCB_SIZE unnecessarily.
7560 2003-04-22  Roland McGrath  <roland@redhat.com>
7562         * Makeconfig (shared-thread-library): Reverse link order to work
7563         around linker bug.
7565 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7567         * semaphore.h: Fix typo in comment.
7569 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7571         * sysdeps/pthread/sigfillset.c: New file.
7573         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7574         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7575         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7576         * sysdeps/pthread/sigaction.c: Likewise.
7577         * sysdeps/pthread/sigprocmask.c: New file.
7578         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7579         __SIGRTMIN+1.
7580         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7581         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7582         in this case.
7584 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7586         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7587         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7589         * sysdeps/unix/sysv/linux/unregister-atfork.c
7590         (__unregister_atfork): Don't free memory not allocated dynamically.
7592         * semaphore.h: Remove __THROW marker from cancellation points.
7593         * nptl/sysdeps/pthread/pthread.h: Likewise.
7595 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7597         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7598         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7599         __THROW.
7601 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7603         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7605 2003-04-15  Roland McGrath  <roland@redhat.com>
7607         * forward.c (__pthread_unwind): Tweak to avoid warning.
7609 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7611         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7613 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7615         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7616         overflow CFA advance instructions.
7617         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7619 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7621         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7622         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7623         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7624         defined.
7626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7627         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7628         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7629         DW_CFA_advance_loc for .Laddl-.Lsubl.
7631 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7633         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7634         position-independent unwind data for static libraries.
7635         Add missing unwind info.  Add comments.
7637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7638         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7640         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7642 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7644         * Makefile: Make sure all cancellation points are compiled with
7645         exception and asynchronous unwind tables.
7647         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7648         which mishandles loading of global object addresses in PIC.
7649         (THREAD_SETMEM_NC): Likewise.
7651 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7653         * pthread.h: Define new data structure for cleanup buffer.  Declare
7654         new cleanup handler interfaces.
7655         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7656         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7657         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7658         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7659         it.  Declare old cleanup handler installation functions.
7660         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7661         handling.
7662         * cleanup_defer.c: Likewise.
7663         * cleanup_compat.c: New file.  Old cleanup code.
7664         * cleanup_def_compat.c: New file.  Old cleanup code.
7665         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7666         if own thread descriptor.
7667         * unwind.c: New file.
7668         * forward.c: Add __pthread_unwind.
7669         * init.c (pthread_functions): Add __pthread_unwind.
7670         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7671         Add ptr___pthread_unwind.
7672         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7673         and unwind function.
7674         * Makefile (libpthread-routines): Add cleanup_compat,
7675         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7676         table generation if necessary.
7677         * version.c: Record whether unwind support is compiled in.
7678         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7679         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7680         handler interfaces.
7681         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7682         complication to generate unwind information for syscall wrappers.
7683         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7684         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7685         __cleanup_fct_attribute.
7687         * Makefile: Add rules to build and run tst-cleanup0.
7688         * tst-cleanup0.c: New file.
7689         * tst-cleanup0.expect: New file.
7691         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7692         caller.  Optimize to avoid often unecessary local variable.
7694 2003-04-11  Roland McGrath  <roland@redhat.com>
7696         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7697         sets variable `multidir'; include that.
7698         (generated): Add it.
7699         ($(objpfx)$(multidir)/crti.o): New target.
7700         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7702 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7704         * tst-attr2.c (do_test): Add cast to avoid warning.
7705         * tst-mutex4.c (do_test): Likewise.
7707 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7709         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7710         in child.
7712 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7714         * Makefile (tests): Add tst-detach1.
7715         * tst-detach1.c: New file.
7717 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7719         * sysdeps/pthread/pthread.h: Remove duplicate
7720         pthread_cleanup_{push,pop} definitions.
7722         * tst-barrier2.c: Eliminate warnings.
7723         * tst-cancel4.c: Likewise.
7724         * tst-cond4.c: Likewise.
7725         * tst-cond6.c: Likewise.
7726         * tst-detach1.c: Likewise.
7727         * tst-rwlock4.c: Likewise.
7728         * tst-rwlock6.c: Likewise.
7729         * tst-rwlock7.c: Likewise.
7730         * tst-sem3.c: Likewise.
7731         * tst-spin2.c: Likewise.
7732         * tst-umask1.c: Likewise.
7734 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7736         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7738 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7740         * descr.h (struct pthread): Move cancelhandling member to the front.
7742 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7744         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7745         malloc_parent, and malloc_child statically.
7746         (__register_atfork_malloc): New function.
7747         (free_mem): Don't free any of the malloc_* variables on the list.
7748         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7749         Define HAVE_register_atfork_malloc.
7751 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7753         * sysdeps/pthread/createthread.c (create_thread): Add some more
7754         comments explaining when to set multiple_threads and when not.
7756         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7757         THREAD_ATOMIC_BIT_SET if not already defined.
7758         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7759         THREAD_ATOMIC_BIT_SET:
7760         * sysdeps/x86_64/tls.h: Likewise.
7761         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7762         THREAD_ATOMIC_CMPXCHG_VAL.
7763         (_pthread_cleanup_pop_restore): Likewise.
7764         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7765         (__pthread_enable_asynccancel_2): Likewise.
7766         (__pthread_disable_asynccancel): Likewise.
7767         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7768         (__libc_disable_asynccancel): Likewise.
7769         * init.c (sigcancel_handler): Likewise.
7770         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7771         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7773 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7775         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7776         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7777         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7778         * Makefile (tests): Add tst-cancel11.
7779         * tst-cancel11.c: New file.
7781 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7783         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7784         round, not the first.  Use specific_used flag instead of local
7785         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7786         (__free_tcb): Don't call deallocate_tsd here.
7787         (start_thread): Call deallocate_tsd here.
7788         * pthread_setspecific.c: Set specific_used flag really only when
7789         needed.
7790         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7791         * tst-tsd3.c: New file.
7792         * tst-tsd4.c: New file.
7794 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7796         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7797         Use atomic_exchange_and_add instead of __lll_add.
7798         (__lll_mutex_timedlock): Likewise.
7799         Patch by Ian Wienand.
7801 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7803         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7804         (SINGLE_THREAD_P): Fix typo.
7805         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7807 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7809         * Makefile (tests): Add tst-align.
7810         * tst-align.c: New file.
7811         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7813         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7814         function correctly.
7816         * tst-tsd2.c: Add casts to avoid warnings.
7818 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7820         * descr.h (struct pthread): Move most often used elements to the front.
7822 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7824         * Makefile (libpthread-routines): Add pthread_atfork.
7825         (libpthread-static-only-routines): Add pthread_atfork.
7827 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7829         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7830         of TLS_DTV_AT_TP.
7831         (INSTALL_DTV): Add parens.
7832         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7833         Use passed descr instead of THREAD_SELF.
7834         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7835         (__lll_mutex_timedlock_wait): Correct expected value after
7836         spurious wakeup.
7837         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7838         Release lock before waking up the waiters.
7839         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7840         criteria.  Reorderstruct passed to cleanup handler.  Fix
7841         handling of cancellation and failung pthread_mutex_unlock call.
7842         Use __pthread_enable_asynccancel_2 instead of
7843         __pthread_enable_asynccancel.
7844         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7845         Return result of lock re-get if it fails.
7846         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7847         for __pthread_cleanup_push.
7848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7849         completely broken rwlock implementation.
7850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7851         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7853         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7854         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7855         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7856         versioned_symbol macro.
7857         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7858         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7860 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7862         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7863         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7864         and __helper_tid.
7865         (struct timer): Remove th and bar field.
7866         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7867         debugging code.  Create only one helper thread.
7868         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7869         helper thread.
7870         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7871         Renamed.  Define statically.  Use thread info from siginfo.
7872         (__helper_once): New variable.
7873         (__helper_tid): New variable.
7874         (__reset_helper_control): New function.
7875         (__start_helper_thread): New function.
7877         * pthread_create.c (start_thread): Don't use setjmp inside
7878         __builtin_expect to work around gcc bug.
7880         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7881         timer_delete syscall fails, but not with ENOSYS, set
7882         __no_posix_timers.
7884         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7885         (timer_settime): Fix typo.
7886         * sysdeps/unix/sysv/linux/timer_getoverr.c
7887         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7889 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7892         offset of cleanupbuf.__prev.
7894 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7896         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7897         of included file.
7899 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7901         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7902         NULL provide default definition to syscall.
7904 2003-03-25  Roland McGrath  <roland@redhat.com>
7906         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7907         (timer_id2ptr): Fix typo.
7909 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7911         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7912         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7913         * sysdeps/ia64/pthreaddef.h: Likewise.
7914         * sysdeps/powerpc/pthreaddef.h: Likewise.
7915         * sysdeps/s390/pthreaddef.h: Likewise.
7916         * sysdeps/sh/pthreaddef.h: Likewise.
7917         * sysdeps/x86_64/pthreaddef.h: Likewise.
7918         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7919         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7920         being changed.
7921         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7922         SIGTIMER is not unblocked.
7923         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7924         RT signal taken.
7925         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7926         be send.
7927         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7928         pass pointer through as ID.
7929         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7930         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7931         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7932         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7933         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7934         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7935         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7936         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7937         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7938         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7939         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7940         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7941         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7942         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7943         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7944         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7945         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7946         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7947         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7948         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7949         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7950         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7951         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7952         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7953         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7954         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7955         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7956         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7957         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7958         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7959         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7960         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7961         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7963         * pthreadP.h: Remove FRAME_LEFT definition.
7964         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7965         already left frame.  Programs which have this problem are not POSIX
7966         compliant.
7967         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7969 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7971         * sysdeps/pthread/tst-timer.c: Check return values of the
7972         functions we test.
7974 2003-03-23  Roland McGrath  <roland@redhat.com>
7976         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7977         * tst-tls3mod.c: Likewise.
7978         * tst-tls1.c: Likewise.
7979         * tst-tls2.c: Likewise.
7981         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7982         undefined behavior.
7984         * tst-join5.c (tf1, tf2): Add a cast.
7986         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7988         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7989         Don't test anything.
7990         * tst-cond4.c: Likewise.
7991         * tst-cond6.c: Likewise.
7992         * tst-flock2.c: Likewise.
7993         * tst-mutex4.c: Likewise.
7994         * tst-rwlock4.c: Likewise.
7995         * tst-signal1.c: Likewise.
7996         * tst-spin2.c: Likewise.
7997         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7999         * tst-mutex4.c: Use test-skeleton.c.
8000         * tst-spin2.c: Likewise.
8001         * tst-sysconf.c: Likewise.
8002         * tst-barrier2.c: Likewise.
8003         * tst-cond4.c: Likewise.
8004         * tst-cond6.c: Likewise.
8005         * tst-rwlock4.c: Likewise.
8006         * tst-unload.c: Likewise.
8007         * tst-flock2.c (do_test): Use return instead of exit.
8009 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
8011         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
8013 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
8015         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
8016         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
8017         instead of __lll_compare_and_swap.
8018         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
8019         Likewise.
8020         Removed definition if __lll_compare_and_swap.
8022         * cancellation.c: Adjust for new form of compare&exchange macros.
8023         * cleanup_defer.c: Likewise.
8024         * init.c: Likewise.
8025         * libc-cancellation.c: Likewise.
8026         * old_pthread_cond_broadcast.c: Likewise.
8027         * old_pthread_cond_signal.c: Likewise.
8028         * old_pthread_cond_timedwait.c: Likewise.
8029         * old_pthread_cond_wait.c: Likewise.
8030         * pthread_cancel.c: Likewise.
8031         * pthread_create.c: Likewise.
8032         * pthread_detach.c: Likewise.
8033         * pthread_join.c: Likewise.
8034         * pthread_key_delete.c: Likewise.
8035         * pthread_setcancelstate.c: Likewise.
8036         * pthread_setcanceltype.c: Likewise.
8037         * pthread_timedjoin.c: Likewise.
8038         * pthread_tryjoin.c: Likewise.
8039         * sysdeps/pthread/createthread.c: Likewise.
8041 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
8043         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
8044         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
8045         definitions.  Replace uses with calls to atomic_* functions.
8046         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
8047         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
8048         __lll_test_and_set calls with atomic_exchange_and_add and
8049         atomic_exchange calls respectively.
8050         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
8051         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
8052         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
8053         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
8054         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
8055         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
8056         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
8058         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
8059         returns the old value.
8061 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
8063         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
8064         int for variable OLDVAL and correct inline assembler contraint.
8065         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
8066         type int for variable OLD.
8068         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
8069         only for s390-32.
8070         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8071         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
8072         instead of multiple_threads field in the TCB.
8074 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
8076         * sysdeps/i386/i686/bits/atomic.h: Removed.
8077         * sysdeps/i386/i586/bits/atomic.h: Removed.
8078         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
8079         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
8080         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
8081         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
8082         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
8083         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
8084         * atomic.h: Removed.  Moved to glibc.
8086         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
8087         support for clock selection.
8089         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
8090         signalling waiters.
8092 2003-03-18  Roland McGrath  <roland@redhat.com>
8094         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8095         Add __lll_rel_instr first.  Add memory clobber.
8096         (lll_mutex_unlock): Use __lll_test_and_set.
8097         From Paul Mackerras <paulus@samba.org>.
8099         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8100         unconditionally.
8101         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8102         (SINGLE_THREAD_P):  Add `header.' prefix.
8103         From Paul Mackerras <paulus@samba.org>.
8105         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8106         pthread_timedjoin_np to ...
8107         (libpthread: GLIBC_2.3.3): ... here.
8108         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8110         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8111         Avoid shadowing VAL variable.
8113         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8114         New macro.
8116 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8118         * Makefile (tests): Add tst-cond11.
8119         * tst-cond11.c: New file.
8121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8122         struct passed to cleanup handler to eliminate one more
8123         instruction.
8124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8126         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8127         (pthrad_cond_t): Replace __unused field with __clock.
8129         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8130         waken all waiters in cleanup handler.
8131         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8134         * pthread_condattr_getclock.c: New file.
8135         * pthread_condattr_setclock.c: New file.
8136         * sysdeps/pthread/pthread.h: Declare these new functions.
8137         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8138         * Makefile (libpthread-routines): Add the new functions.
8139         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8140         Renamed field to value.  Document use of the bits.
8141         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8142         change.
8143         * pthread_condattr_setpshared.c: Likewise.
8144         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8145         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8146         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8147         Add __clock field.
8148         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8149         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8150         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8151         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8153         Implement clock selection.
8154         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8155         * pthread-errnos.sym: Add ENOSYS.
8156         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8157         _POSIX_CLOCK_SELECTION.
8158         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8161         invalid .size directive.
8163 2003-03-17  Roland McGrath  <roland@redhat.com>
8165         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8166         Formatting tweaks.
8168 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8170         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8171         Use __lll_add instead of spelling it out.  Use protected symbol names.
8172         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8173         Use __lll_add.
8174         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8175         Renamed from lll_compare_and_swap.  Use new name where necessary.
8176         (__lll_add): Defined.
8177         (__lll_dec_if_positive): Defined.
8178         (__lll_test_and_set): Defined.
8179         * sysdeps/ia64/pthread_spin_init.c: Removed.
8180         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8181         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8182         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8183         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8184         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8185         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8186         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8187         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8188         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8189         __sync_lock_release_si.
8190         Patch by Jakub Jelinek.
8192         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8193         Fix timeout handling.
8194         (__lll_timedwait_tid): Likewise.
8195         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8196         Patch by Jakub Jelinek.
8198         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8200 2003-03-17  Roland McGrath  <roland@redhat.com>
8202         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8203         * sysdeps/pthread/pthread_spin_init.c: New file.
8204         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8205         * sysdeps/powerpc/Makefile: New file.
8206         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8207         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8208         * sysdeps/powerpc/pthreaddef.h: New file.
8209         * sysdeps/powerpc/tcb-offsets.sym: New file.
8210         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8211         * sysdeps/powerpc/tls.h: New file.
8212         * sysdeps/powerpc/bits/atomic.h: New file.
8213         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8214         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8215         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8217         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8218         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8219         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8220         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8221         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8222         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8223         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8224         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8225         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8226         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8227         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8228         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8229         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8230         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8231         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8233         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8234         not gettimeofday.
8235         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8236         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8237         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8238         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8239         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8241 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8243         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8244         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8247         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8249 2003-03-16  Roland McGrath  <roland@redhat.com>
8251         * tst-fork4.c: Include <string.h>.
8252         * tst-signal2.c: Likewise.
8253         * tst-mutex5.c (do_test): exit -> return.
8254         * tst-mutex2.c: Include <stdlib.h>.
8256 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8258         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8259         (__lll_mutex_timedlock_wait): Correct expected value after
8260         spurious wakeup.  Otherwise we would never wait again.
8262         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8263         zone versus inline asm stupidity.  Use correct instructions.
8265         * tst-rwlock6.c: Add some more status output.
8267 2003-03-15  Roland McGrath  <roland@redhat.com>
8269         * sysdeps/pthread/configure.in: New file.
8270         * sysdeps/pthread/configure: New file (generated).
8272 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8274         * allocatestack.c (allocate_stack): Store the exact stack size of
8275         user allocated stacks.
8277 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8279         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8280         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8281         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8282         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8283         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8284         Use `header.' prefix.
8285         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8287 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8289         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8290         __builtin_frame_address, use stack pointer.
8292         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8293         instead of __builtin_frame_pointer.
8295 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8297         * tst-basic1.c (do_test): Add cast to avoid warning.
8298         * tst-basic2.c (do_test): Likewise.
8300         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8301         amount of stack correction.
8303         * tst-fork4.c: Use test-skeleton.c.
8305 2003-03-14  Roland McGrath  <roland@redhat.com>
8307         * init.c: Fix typo "#eli" for "#else".
8309 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8311         * allocatestack.c (__stack_user): Use hidden_data_def.
8312         * pthread_create.c (__pthread_keys): Likewise.
8314         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8316 2003-03-14  Roland McGrath  <roland@redhat.com>
8318         * tst-fork4.c: New file.
8319         * Makefile (tests): Add it.
8321         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8322         we always define the padding space.
8323         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8324         stopped supporting its own extensions fully.
8325         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8326         struct also called `header', so `header.multiple_threads' is the field
8327         name to use on all machines.
8328         * allocatestack.c (allocate_stack): Use `header.' prefix.
8329         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8330         * pthread_create.c (__pthread_create_2_1): Likewise.
8331         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8332         (THREAD_SELF): Likewise.
8333         * sysdeps/x86_64/tls.h: Likewise.
8334         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8335         (SINGLE_THREAD_P): Likewise.
8336         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8337         (SINGLE_THREAD_P): Likewise.
8338         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8339         (SINGLE_THREAD_P): Likewise.
8341         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8342         value directly.
8344 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8346         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8347         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8349         * pthread_create.c (start_thread): setjmp is expected to return 0.
8351         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8352         (THREAD_GETMEM_NC): Likewise.
8354 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8356         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8357         and the size of the stack which must be allocated is a multiple,
8358         allocate one more page.
8359         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8360         MULTI_PAGE_ALIASING.
8362 2003-03-13  Roland McGrath  <roland@redhat.com>
8364         * pthread_create.c (start_thread): Set EXITING_BIT after the
8365         event-reporting (and destructors), not before.
8367 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8369         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8370         lll_futex_wake): Declare register variables as long int instead of
8371         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8372         Make syscall arguments clobbered by the syscall.
8373         (lll_futex_wait): Define using lll_futex_timed_wait.
8375         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8376         to void *.
8378         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8379         PPID if [! NDEBUG].
8381         * allocatestack.c (nptl_ncreated): Only declare if
8382         COLORING_INCREMENT != 0.
8384         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8385         (__libc_enable_asynccancel_2): Remove prototype.
8387         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8388         ctid to match kernel.
8390 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8392         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8393         libc_multiple_threads.
8394         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8395         __libc_multiple_threads to...
8396         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8398         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8399         versioning.
8400         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8401         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8403         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8404         (__pthread_once_internal): Define.
8406         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8407         macros instead of .symver directly.
8408         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8409         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8411         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8412         * sysdeps/x86_64/tcb-offsets.sym: New file.
8413         * sysdeps/x86_64/Makefile: New file.
8415         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8416         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8417         to access own pthread_t in TCB.
8418         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8419         Likewise.
8420         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8421         Likewise.
8422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8424 2003-03-12  Roland McGrath  <roland@redhat.com>
8426         * pthread-errnos.sym: New file.
8427         * Makefile (gen-as-const-headers): New variable, list that file.
8428         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8429         header <pthread-errnos.h> instead of defining errno values here.
8430         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8431         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8432         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8433         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8434         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8435         Likewise.
8436         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8437         Likewise.
8438         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8440         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8441         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8442         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8443         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8444         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8445         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8447         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8448         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8449         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8450         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8451         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8452         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8453         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8454         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8455         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8456         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8457         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8458         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8459         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8460         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8461         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8462         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8463         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8464         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8466         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8467         CLONE_CHILD_SETTID worked.
8469 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8471         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8472         file.
8473         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8474         file.
8476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8477         (pthread_cond_t): Add padding.
8479         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8481         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8484         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8486         (__pthread_rwlock_timedrdlock): Likewise.
8487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8488         (__pthread_rwlock_wrlock): Likewise.
8489         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8490         (__pthread_rwlock_rdlock): Likewise.
8492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8494         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8495         result of lock re-get if it fails.
8497 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8499         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8500         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8501         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8502         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8503         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8504         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8505         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8506         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8507         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8508         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8510         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8511         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8513         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8514         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8515         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8516         (create_thread): Likewise.
8517         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8518         * init.c (__pthread_initialize_minimal_internal): Initialize
8519         __libc_multiple_threads_ptr if necessary.
8520         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8521         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8522         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8523         __libc_multiple_threads.
8524         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8525         necessary.
8527         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8528         (THREAD_SETMEM_NC): Likewise.
8530         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8531         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8532         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8533         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8535         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8536         Eliminate one entire instruction.
8538         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8539         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8541         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8542         instead of __pthread_enable_asynccancel.
8543         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8544         (__pthread_cond_wait): Likewise.
8545         * sysdeps/pthread/pthread_cond_timedwait.c
8546         (__pthread_cond_timedwait): Likewise.
8547         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8550         (__condvar_cleanup): Wake up all waiters in case we got signaled
8551         after being woken up but before disabling asynchronous
8552         cancellation.
8553         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8555         (__condvar_cleanup): Likewise.
8557         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8558         Make it an error if architecture has no #if case.  Add x86-64.
8560         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8561         pt-initfini.s generation.
8563         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8564         (TLS_INIT_TP): Fix typo.
8566 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8568         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8569         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8571         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8572         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8573         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8574         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8575         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8576         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8577         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8578         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8580 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8582         * sysdeps/pthread/pthread_cond_timedwait.c
8583         (__pthread_cond_timedwait): Return the result of the final
8584         locking.  If it succeeds, the regular function return value.
8586         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8587         Return result of the final locking.
8588         * version.c (__nptl_main): Work around problems with the strange
8589         INTERNAL_SYSCALL macro on ppc32.
8590         * init.c (__pthread_initialize_minimal_internal): Unblock
8591         SIGCANCEL in case the parent blocked it.
8592         Reported by Paul Mackerras <paulus@samba.org>.
8594         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8595         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8598 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8600         * sysdeps/pthread/pthread_cond_timedwait.c
8601         (__pthread_cond_timedwait): Unlock and fail if
8602         __pthread_mutex_unlock_internal failed.
8604         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8605         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8606         Use ARCH_CLONE.
8607         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8608         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8609         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8610         ALLOCATE_STACK): New macros.
8611         (TLS_TPADJ): New macro.
8612         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8613         (allocate_stack): Handle TLS_DTV_AT_TP and
8614         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8615         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8616         Don't set PD->self.
8617         * init.c [__ia64__] (__NR_set_tid_address): Define.
8619         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8620         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8621         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8622         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8623         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8624         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8626         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8627         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8628         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8629         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8630         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8631         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8632         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8633         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8634         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8635         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8636         * sysdeps/ia64/bits/atomic.h: New file.
8637         * sysdeps/ia64/Makefile: New file.
8638         * sysdeps/ia64/pthread_spin_init.c: New file.
8639         * sysdeps/ia64/pthread_spin_lock.c: New file.
8640         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8641         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8642         * sysdeps/ia64/pthreaddef.h: New file.
8643         * sysdeps/ia64/tcb-offsets.sym: New file.
8644         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8645         * sysdeps/ia64/tls.h: New file.
8647         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8648         to syscall instead of no arguments.
8650 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8652         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8653         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8654         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8655         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8657         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8658         unused code.
8660         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8662         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8663         lowlevelbarrier.sym.
8664         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8665         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8666         Include lowlevelbarrier.h and don't define offsets locally.
8667         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8669         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8670         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8671         (__lll_mutex_timedlock_wait): Likewise.
8672         (lll_mutex_lock): Adjust asm for that.
8673         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8674         (lll_lock): Adjust asm for operand order change.
8675         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8676         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8678         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8679         Reverse order of parameters.
8680         (__lll_timedwait_tid): Remove regparms attribute.
8681         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8682         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8684         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8685         (__lll_timedwait_tid): Remove one unnecessary instruction.
8687         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8688         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8689         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8690         lowlevelmutex.S.
8692         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8693         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8694         for NOT_IN_libc.
8695         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8696         lowlevellock.S.
8698         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8699         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8700         for libc.so.
8701         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8702         define LOCK here (if UP is not defined).  The actual code is in
8703         lowlevelmutex.S.
8705         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8706         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8707         __lll_timedwait_tid for libc.so.
8708         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8709         define LOCK here (if UP is not defined).  The actual code is in
8710         lowlevellock.S.
8712         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8713         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8714         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8715         instead of lowlevelsem.h.
8716         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8717         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8718         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8720         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8721         lowlevelrwlock.sym.
8722         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8723         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8724         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8727         register loading.
8728         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8729         last changed.  D'oh.
8731         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8734         of __libc_locking_needed.
8735         (lll_trylock): Initialize %eax to zero.
8737         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8738         pthread_cond_t definition.
8740 2003-03-10  Roland McGrath  <roland@redhat.com>
8742         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8743         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8744         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8745         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8746         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8748         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8749         Instead of setting PD->multiple_threads, set globals
8750         __pthread_multiple_threads and __libc_multiple_threads.
8751         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8752         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8753         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8755         * descr.h (struct pthread): Conditionalize first member on
8756         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8757         containing an anonymous tcbhead_t.  Move `list' member out.
8758         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8759         * allocatestack.c: Remove use of `header.data.' prefix.
8760         * pthread_create.c: Likewise.
8761         * init.c (__pthread_initialize_minimal_internal): Likewise.
8762         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8763         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8764         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8765         * sysdeps/x86_64/tls.h: Likewise.
8766         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8767         (SINGLE_THREAD_P): Likewise.
8768         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8769         (SINGLE_THREAD_P): Likewise.
8770         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8771         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8773 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8775         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8777         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8778         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8780         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8781         leftovers from the ia32 code.
8783         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8784         memory load.
8785         (clear_once_control): Don't load %esi.
8787         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8788         handling.
8790         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8792         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8793         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8795         * Makefile (tests): Add tst-cond10.
8796         * tst-cond10.c: New file.
8798 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8800         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8801         * tst-signal3.c (do_test): Likewise.
8802         * tst-sem5.c (do_test): Likewise.
8803         * tst-kill6.c (do_test): Likewise.
8804         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8806         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8807         of inc/dec.
8808         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8809         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8810         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8811         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8813         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8815         Likewise.
8816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8817         Likewise.
8818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8819         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8823         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8824         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8825         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8827         * allocatestack.c (allocate_stack): If mprotect() fails free the
8828         TLS memory.
8830 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8832         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8834         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8835         lll_wake_tid.  This was used only to work around kernel limits in
8836         the early days.
8837         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8838         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8839         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8840         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8842         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8843         (__pthread_initialize_minimal_internal): Change initialization of
8844         __static_tls_align_m1 appropriately.
8845         * pthreadP.h (__static_tls_align_m1): Renamed from
8846         __static_tls_align.
8847         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8848         instead of __static_tls_align-1.
8850 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8852         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8854         * pthread_create.c: Define __pthread_keys using nocommon
8855         attribute, not by placing it explicitly in bss.
8856         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8858         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8859         Use it in mmap call to allocate stacks.
8861         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8863         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8864         result of the thread function.
8866 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8868         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8869         version is just fine.
8871         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8872         (__pthread_child_handler): Renamed from pthread_child_handler,
8873         exported, and marked hidden.  Change all users.
8874         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8875         free __pthread_child_handler from child list.
8877 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8879         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8881         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8882         Fix handling of cancellation and failing pthread_mutex_unlock call.
8883         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8884         (__pthread_cond_wait): Likewise.
8886         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8887         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8888         lll_futex_timed_wait call.
8889         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8890         (pthread_rwlock_timedwrlock): Likewise.
8892         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8893         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8894         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8896         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8897         check of lll_futex_wake return value.
8899 2003-03-03  Roland McGrath  <roland@redhat.com>
8901         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8903         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8904         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8905         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8907 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8909         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8910         error for CPU clocks.
8912         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8913         _POSIX_MONOTONIC_CLOCK.
8914         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8916         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8917         recent kernels.
8919 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8921         * descr.h (struct pthread): Move cleanup field to the front.
8923 2003-03-01  Roland McGrath  <roland@redhat.com>
8925         * sem_open.c (sem_open): Braino fix.
8927 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8929         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8930         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8931         __pthread_cleanup_pop functionality.
8932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8934         * descr.h (struct pthread): Move tid field to the front now that
8935         it is often used.
8937         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8938         (__lll_mutex_timedlock_wait): Remove.
8939         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8940         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8941         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8942         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8943         (lll_unlock_wake_cb): Don't save and restore %esi.
8944         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8945         %esi.
8946         (__lll_timedwait_tid): Add alignment.
8947         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8948         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8949         %esi.
8950         (__lll_timedwait_tid): Removed.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8952         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8953         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8954         (pthread_barrier_wait): Don't save, load, and restore %esi for
8955         last thread.
8956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8957         (__pthread_cond_signal): Don't save, load, and restore %esi.
8958         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8959         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8960         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8961         Don't save, load, and restore %esi.
8963 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8965         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8966         Release lock before waking up the waiters.
8968         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8970         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8971         (reader_thread): Likewise.
8973         * sysdeps/pthread/pthread_rwlock_unlock.c
8974         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8975         to wake up readers if there are none.
8977         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8978         Release internal lock before wake threads.
8980 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8982         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8983         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8984         predefined.
8985         * tst-rwlock9.c: Likewise.
8986         * tst-rwlock10.c: New file.
8987         * tst-rwlock11.c: New file.
8989         * Makefile (tests): Add tst-dlsym1.
8990         * tst-dlsym1.c: New file.
8992         * init.c (__pthread_initialize_minimal_internal): Set
8993         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8994         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8996 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8998         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
9000         * tst-cond2.c: Fix sychronization with child.
9002         * tst-rwlock8.c (reader_thread): Remove unused variable.
9004         * Makefile: Add rules to build and run tst-tls3.
9005         * tst-tls3.c: New file.
9006         * tst-tls3mod.c: New file.
9008         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
9009         * tst-rwlock8.c: New file.
9010         * tst-rwlock9.c: New file.
9011         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
9012         complete broken rwlock implementation.
9013         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9014         Likewise.
9015         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9016         Likewise.
9017         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
9018         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
9019         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
9020         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
9021         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
9022         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
9023         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
9025 2003-02-23  Roland McGrath  <roland@redhat.com>
9027         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
9029 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
9031         * Makefile (tests): Add tst-context1.
9032         * tst-context1.c: New file.
9034         * Makefile (tests): Add tst-tls1 and tst-tls2.
9035         * tst-tls1.c: New file.
9036         * tst-tls2.c: New file.
9038         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
9039         for failed cmpxchg.
9041         * pthread_create.c (start_thread): Set EXITING_BIT early.
9043         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
9044         (THREAD_GETMEM_NC): Likewise.
9046 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
9048         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
9049         off 3 more bytes by using offset-less instructions when possible.
9051         * Makefile: Add dependency for $(objpfx)version.d.
9053         * eintr.c (eintr_source): Add unnecessary return but the compiler
9054         insists.
9056         * tst-kill3.c: Include <unistd.h>.
9058 2003-02-21  Roland McGrath  <roland@redhat.com>
9060         * pthread_create.c (start_thread): Call __libc_thread_freeres.
9062 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9064         * Makefile (tests): Add tst-eintr1.
9065         (distribute): Add eintr.c.
9066         * tst-eintr1.c: New file.
9067         * eintr.c: New file.
9069         * pthread_cancel.c (pthread_cancel): Use tkill directly.
9071         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
9072         Disallow sending SIGCANCEL.
9074         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
9075         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
9076         * tst-kill1.c: New file.
9077         * tst-kill2.c: New file.
9078         * tst-kill3.c: New file.
9079         * tst-kill5.c: New file.
9080         * tst-kill6.c: New file.
9081         * tst-basic7.c: Renamed to...
9082         * tst-kill4.c: ...this.
9084 2003-02-21  Roland McGrath  <roland@redhat.com>
9086         * Makefile (install-lib-ldscripts): New variable.
9088 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
9090         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
9091         * pthread_cancel.c: Use INVALID_TD_P.
9092         * pthread_detach.c: Likewise.
9093         * pthread_getschedparam.c: Likewise.
9094         * pthread_setschedparam.c: Likewise.
9095         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9096         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9097         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9098         * pthread_timedjoin.c: Likewise.
9100         * tst-basic7.c: Include <signal.h>.
9102         * pthread_join.c (pthread_join): Limited checking for invalid
9103         descriptors.
9104         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9106 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9108         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9109         beginning of the loop.  Clear the entire first block of TSD.
9110         * Makefile (tests): Add tst-key4.
9111         * tst-key4.c: New file.
9113 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9115         * Makefile (tests): Add tst-basic7.
9116         * tst-basic7.c: New file.
9118         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9119         Add some more __builtin_expect.
9121         * pthreadP.h: Define dummy version of DEBUGGING_P.
9123 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9125         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9126         _POSIX_THREAD_PRIORITY_SCHEDULING.
9127         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9128         _XOPEN_REALTIME_THREADS.
9129         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9131         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9132         kernel returns EINVAL for PID <= 0, work around it.
9134         * Makefile (tests): Add tst-signal5.
9135         * tst-signal5.c: New file.
9137         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9138         and LOGIN_NAME_MAX.
9140         * tst-cancel1.c (tf): Block all signals.
9142         * Makefile (tests): Add tst-basic6.
9143         * tst-basic6.c: New file.
9145         * tst-basic1.c: Add test for process ID.
9147         * Makefile (tests): Add tst-cancel10.
9148         * tst-cancel10.c: New file.
9150         * Makefile (tests): Add tst-signal4.
9151         * tst-signal4.c: New file.
9153         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9154         __sigismember instead of sigismember.  Add __builtin_expect.
9156 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9158         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9159         pthread_setcancelstate, and pthread_rwlock_setpshared.
9161         * tst-cancel7.c (do_test): Make sure the pid file exists before
9162         canceling the thread.
9164         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9165         pthread_rwlock_timedrdlock tests.
9166         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9168         Check for invalid tv_nsec field.
9169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9170         Likewise.
9172         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9173         recursive mutex of overflow.
9175         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9177         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9178         going into an endless loop.
9179         * Makefile (tests): Add tst-cancel9.
9180         * tst-cancel9.c: New file.
9182         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9184 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9186         * tst-mutex5.c (do_test): Add more timedlock tests.
9188         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9189         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9191         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9192         use INLINE_SYSCALL.  Error number is returned, not -1.
9194         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9195         and __deallocate_stack with internal_function.
9196         * pthread_create.c: Adjust definitions appropriately.
9197         * allocatestack.c: Likewise.
9199         * pthread_join.c: Add one more __builtin_expect.
9200         * pthread_timedjoin.c: Likewise.
9202         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9203         not data of sequence number does not match.
9204         Add one __builtin_expect.
9206         * Makefile (tests): Add tst-clock1.
9207         * tst-clock1.c: New file.
9209         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9210         negative arguments.
9211         * Makefile (tests): Add tst-basic5.
9212         * tst-basic5.c: New file.
9214 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9216         * Makefile (tests): Add tst-basic4.
9217         * tst-basic4.c: New file.
9219         * pthreadP.h: Add declaraction for __nptl_nthreads.
9220         * pthread_create.c: Define __nptl_nthreads
9221         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9222         after thread is done.  If then zero, call exit(0).
9223         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9224         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9225         * init.c (pthread_functions): Initialize ptr_nthreads.
9226         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9227         (__reclaim_stacks): Decrement __nptl_nthreads.
9228         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9229         Define.
9230         * Makefile (tests): Add tst-basic3.
9231         * tst-basic3.c: New file.
9233         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9234         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9235         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9236         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9237         if asynchronous canceling is enabled.
9238         * pthread_join.c (pthread_join): When recognizing circular joins,
9239         take into account the other thread might be already canceled.
9240         * Makefile (tests): Add tst-join5.
9241         * tst-join5.c: New file.
9243         * Makefile (tests): Add tst-join4.
9244         * tst-join4.c: New file.
9246 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9248         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9250 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9252         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9253         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9254         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9255         warning.
9256         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9257         to avoid warning.
9258         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9259         error if lll_futex_wake failed.
9261 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9264         handling of cancellation and failung pthread_mutex_unlock call.
9265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9266         * Makefile (tests): Add tst-cond8 and tst-cond9.
9267         * tst-cond8.c: New file.
9268         * tst-cond9.c: New file.
9270         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9272         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9273         non-standard initializers with __USE_GNU.
9275         * Makefile (tests): Add tst-cleanup3.
9276         * tst-cleanup3.c: New file.
9278 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9280         * Makefile (tests): Add tst-attr1 and tst-attr2.
9281         * tst-attr1.c: New file.
9282         * tst-attr2.c: New file.
9284         * Makefile: Add rules to build and run tst-atfork2 test.
9285         * tst-atfork2.c: New file.
9286         * tst-atfork2mod.c: New file.
9288         * sysdeps/unix/sysv/linux/unregister-atfork.c
9289         (__unregister_atfork): Free the memory allocated for the handlers
9290         after removing them from the lists.
9292         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9293         cleanup function.
9295         * tst-atfork1.c (do_test): Wait for the child we forked.
9296         Report error in child.
9298         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9300         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9302 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9304         * Makefile (tests): Add tst-cancel8.
9305         * tst-cancel8.c: New file.
9307         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9308         clearing of control variable.
9309         * Makefile (tests): Add tst-once3 and tst-once4.
9310         * tst-once3.c: New file.
9311         * tst-once4.c: New file.
9313 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9315         * sysdeps/sh/Makefile: New file.
9316         * sysdeps/sh/bits/atomic.h: New file.
9317         * sysdeps/sh/pthread_spin_init.c: New file.
9318         * sysdeps/sh/pthread_spin_lock.c: New file.
9319         * sysdeps/sh/pthread_spin_trylock.S: New file.
9320         * sysdeps/sh/pthread_spin_unlock.S: New file.
9321         * sysdeps/sh/pthreaddef.h: New file.
9322         * sysdeps/sh/tcb-offsets.sym: New file.
9323         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9324         * sysdeps/sh/tls.h: New file.
9325         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9326         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9327         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9328         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9329         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9330         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9331         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9332         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9333         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9334         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9335         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9336         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9337         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9338         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9339         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9340         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9341         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9342         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9343         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9344         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9345         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9346         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9347         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9348         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9349         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9350         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9351         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9352         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9353         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9354         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9356 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9358         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9359         according to POSIX.
9361         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9363 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9365         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9366         (TLS_GET_FS): New #define.
9367         (TLS_SET_FS): New #define.
9368         Correct value of __NR_set_thread_area.
9370         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9372 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9374         * Makefile (tests): Add tst-popen1.
9375         * tst-popen1.c: New file.
9377         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9378         but inactive generalization.
9379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9381         Minor optimization, remove one instruction.
9382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9384 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9386         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9388 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9390         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9391         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9392         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9393         * sysdeps/pthread/pthread_cond_signal.c: New file.
9394         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9395         * sysdeps/pthread/pthread_cond_wait.c: New file.
9396         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9397         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9398         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9399         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9400         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9401         * sysdeps/s390/Makefile: New file.
9402         * sysdeps/s390/bits/atomic.h: New file.
9403         * sysdeps/s390/pthread_spin_init.c: New file.
9404         * sysdeps/s390/pthread_spin_lock.c: New file.
9405         * sysdeps/s390/pthread_spin_trylock.c: New file.
9406         * sysdeps/s390/pthread_spin_unlock.c: New file.
9407         * sysdeps/s390/pthreaddef.h: New file.
9408         * sysdeps/s390/tcb-offsets.sym: New file.
9409         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9410         * sysdeps/s390/tls.h: New file.
9411         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9412         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9413         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9414         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9415         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9416         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9417         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9418         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9419         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9420         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9421         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9422         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9423         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9424         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9425         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9426         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9427         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9428         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9429         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9430         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9431         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9432         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9433         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9435 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9437         * atomic.h: Add a couple more default implementations.
9438         (atomic_compare_and_exchange_acq): Use
9439         __arch_compare_and_exchange_32_acq in return value definition.  It
9440         always exists.
9441         (atomic_bit_set): Renamed from atomic_set_bit.
9442         Add missing atomic_ prefixes.
9444         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9445         thread library is available, use correct value to mark initialized
9446         once variable.
9448 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9450         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9451         __sysconf to determine pagesize.
9453         * pthread_create.c: Include <atomic.h>.
9454         * allocatestack.c (allocate_stack): Implement coloring of the
9455         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9456         size minus one.  Adjust users.
9457         * sysdeps/i386/i686/Makefile: New file.
9459 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9461         * allocatestack.c: Improve comment throughout the file.
9463         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9464         (__lll_lock_wait): Add branch prediction.
9465         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9466         (__lll_lock_wait): Likewise.
9467         (lll_unlock_wake_cb): Removed.
9469 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9471         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9472         _POSIX_THREAD_PRIORITY_SCHEDULING.
9474 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9476         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9477         Fix return type of ptr___pthread_getspecific.
9479 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9481         * Makefile (tests): Add tst-umask1.
9482         (tst-umask1-ARGS): Define.
9483         * tst-umask1.c: New file.
9485 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9487         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9488         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9489         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9490         pthread_rwlock_unlock.
9491         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9492         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9493         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9494         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9495         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9496         New file.
9497         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9498         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9499         New file.
9500         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9501         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9502         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9503         New file.
9504         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9505         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9506         New file.
9507         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9508         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9509         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9510         New file.
9511         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9512         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9513         New file.
9514         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9516         * Makefile (libpthread-routines): Remove lowlevelcond and
9517         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9518         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9519         and pthread_cond_broadcast.
9520         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9521         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9522         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9523         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9524         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9525         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9526         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9527         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9528         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9529         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9530         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9531         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9534         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9535         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9536         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9537         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9538         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9539         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9540         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9541         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9542         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9543         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9544         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9545         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9546         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9547         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9548         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9549         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9550         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9552         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9553         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9554         of the code is moved to ...
9555         * sysdeps/pthread/createthread.c: ...here.  New file.
9557 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9559         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9560         (__new_sem_post): Clear %eax before returning.
9561         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9563         * Makefile (tests): Add tst-cleanup2.
9564         * tst-cleanup2.c: New file.
9566         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9567         Interpret first parameter correctly.
9569 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9571         * Makefile (headers): Add bits/semaphore.h.
9573 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9575         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9576         if not SHARED.
9578 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9580         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9581         must be used and mapping failed.
9582         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9584         * Makefile (CFLAGS-pthread_self.os): Define this, not
9585         CFLAGS-pthread_self.c.
9587 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9589         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9590         lll_unlock_wake_cb.
9592         * Makefile (libpthread-routines): Add version.  Add rules to build
9593         version.os and banner.h.
9594         * version.c: New file.
9596 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9598         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9599         the alias unconditional.
9600         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9602 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9604         * Makefile (CFLAGS-pthread_self.c): New definition.
9606 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9608         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9609         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9610         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9611         * init.c (__pthread_initialize_minimal_internal): Likewise.
9613 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9615         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9617         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9618         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9619         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9620         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9621         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9622         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9624 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9626         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9627         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9628         * tst-cancel-wrappers.sh: Remove all exceptions.
9630 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9632         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9633         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9635         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9636         Use __libc_pthread_functions array if SHARED.
9638         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9639         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9641         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9642         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9643         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9644         __libc_ptf_call instead of __libc_maybe_call.
9645         (PTF): New #define.
9646         (__libc_cleanup_region_start): Wrap function name with PTF call.
9647         (__libc_cleanup_region_end): Likewise.
9648         (__libc_cleanup_end): Likewise.
9650         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9651         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9652         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9653         * pthreadP.h: Add prototypes.
9655         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9656         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9657         __pthread_rwlock_unlock aliases.
9658         * pthreadP.h: Add prototypes for new aliases.
9660         * pthreadP.h (struct pthead_functions): Moved to...
9661         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9662         * init.c (pthread_functions): Add initializers for new elements.
9664         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9665         __pthread_cleanup_pop_restore aliases.
9666         * pthreadP.h: Add prototypes.
9668         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9669         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9670         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9671         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9672         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9673         * pthreadP.h: Adjust prototypes and callers.
9675 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9677         * Makefile (tests): Add tst-cancel7.
9678         (tst-cancel7-ARGS): New variable.
9679         * tst-cancel7.c: New file.
9681         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9682         around gcc defficiencies.
9683         * old_pthread_cond_signal.c: Likewise.
9684         * old_pthread_cond_timedwait.c: Likewise.
9685         * old_pthread_cond_wait.c: Likewise.
9687         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9689 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9691         * Makefile (tests): Add tst-cond7.
9692         * tst-cond7.c: New file.
9694         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9695         (condvar_cleanup): Get condvar address from the right place.
9697         * atomic.h: Correct definitions of atomic_full_barrier,
9698         atomic_read_barrier, atomic_write_barrier.
9700         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9701         race-free.
9702         * old_pthread_cond_signal.c: Likewise.
9703         * old_pthread_cond_timedwait.c: Likewise.
9704         * old_pthread_cond_wait.c: Likewise.
9706 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9708         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9710 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9712         * pthreadP.h (pthread_cond_2_0_t): New type.
9713         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9714         Use new type for the 2.0 condvar function prototypes.
9715         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9716         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9717         parameter.
9718         * old_pthread_cond_destroy.c: Likewise.
9719         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9720         * old_pthread_cond_signal.c: Likewise.
9721         * old_pthread_cond_timedwait.c: Likewise.
9722         * old_pthread_cond_wait.c: Likewise.
9724         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9725         (__pthread_cond_wait): Don't save cancellation mode and seq value
9726         in same location.
9728         * herrno.c (__h_errno_location): Don't define as weak.
9730 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9732         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9733         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9734         and pthread_cond_wait.
9735         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9736         Renamed to...
9737         (__pthread_cond_broadcast_2_0): ... this.
9738         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9739         Renamed to...
9740         (__pthread_cond_destroy_2_0): ... this.
9741         * old_pthread_cond_init.c (__old_pthread_cond_init):
9742         Renamed to...
9743         (__pthread_cond_init_2_0): ... this.
9744         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9745         Renamed to...
9746         (__pthread_cond_signal_2_0): ... this.
9747         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9748         Renamed to...
9749         (__pthread_cond_wait_2_0): ... this.
9750         * pthread_cond_destroy.c: Include shlib-compat.h.
9751         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9752         * pthread_cond_init.c: Include shlib-compat.h.
9753         (pthread_cond_init): Change strong_alias into versioned_symbol.
9754         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9755         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9756         fields.
9757         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9758         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9759         __pthread_cond_wait_2_0): New prototypes.
9760         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9761         __old_pthread_cond_init, __old_pthread_cond_signal,
9762         __old_pthread_cond_wait): Removed.
9763         * init.c: Include shlib-compat.h.
9764         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9765         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9766         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9767         ptr___pthread_cond_*_2_0 fields.
9768         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9769         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9771         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9772         LIBC_SIGACTION was not yet defined.
9773         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9774         [!defined LIBC_SIGACTION] (__sigaction): New function and
9775         libc_hidden_weak.
9776         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9777         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9779 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9781         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9783 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9785         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9786         New, larger type definition.
9787         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9788         implementation.
9789         * Versions [libpthread]: Add definitions for new pthread_cond_*
9790         interfaces for version GLIBC_2.3.2.
9791         * pthread_cond_init.c: Update initialization for new type definition.
9792         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9793         pthread_cond_timedwait, pthread_cond_signal, and
9794         pthread_cond_broadcast.  Add old_pthread_cond_init,
9795         old_pthread_cond_destroy, old_pthread_cond_wait,
9796         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9797         old_pthread_cond_broadcast.
9798         * old_pthread_cond_broadcast.c: New file.
9799         * old_pthread_cond_destroy.c: New file.
9800         * old_pthread_cond_init.c: New file.
9801         * old_pthread_cond_signal.c: New file.
9802         * old_pthread_cond_timedwait.c: New file.
9803         * old_pthread_cond_wait.c: New file.
9804         * pthreadP.h: Add prototypes for the compatibility interfaces.
9806         * pthread_cond_destroy.c: Don't include <errno.h>.
9808 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9810         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9811         unnecessary zero offset when addressing MUTEX.
9813 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9815         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9816         __register_atfork.
9817         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9818         for __register_atfork.
9820 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9822         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9823         instead of ASSEMBLER test macro.
9825         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9826         __libc_current_sigrtmax): Add libc_hidden_def.
9828         * sysdeps/pthread/list.h: Remove assert.h include.
9830 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9832         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9833         __pthread_initialize_minimal_internal not
9834         __pthread_initialize_minimal.
9836 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9838         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9839         __pthread_initialize_minimal as hidden.
9841         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9842         constructor.
9844 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9846         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9847         $(common-objpfx)format.lds, include that into the output script.
9848         Fix comment.
9849         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9851 2002-12-28  Andreas Jaeger  <aj@suse.de>
9853         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9854         nsec resolution changes.
9855         (xstat64_conv): Likewise.
9856         (xstat32_conv): Likewise.
9857         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9858         struct kernel_stat.
9859         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9860         structs stat and stat64.
9861         * time/time.h (__timespec_defined): Define for __USE_MISC.
9862         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9864 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9866         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9867         argument.
9868         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9869         (pthread_exit): Use strong_alias to avoid warnings.
9870         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9871         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9872         ptr___pthread_attr_init_2_*.
9873         * init.c (pthread_functions): Adjust.
9875 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9877         * forward.c: Make all functions available by default again.  It
9878         caused too much trouble.
9880         * pt-siglongjmp.c: Removed.
9882 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9884         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9885         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9886         * sysdeps/i386/Makefile: New file.
9887         * sysdeps/i386/tcb-offsets.sym: New file.
9888         * sysdeps/pthread/tcb-offsets.h: New file.
9889         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9890         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9892         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9893         __register_atfork...
9894         (GLIBC_2.3.2): ...here.
9896 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9898         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9899         pthread_attr_setstackaddr with __attribute_deprecated__.
9901 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9903         * pt-system.c (system): Remove cancellation handling.
9904         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9905         cancellation routines.
9907 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9909         * descr.h: Include <dl-sysdep.h>.
9910         (struct pthread): Move header.data.list to the back of the struct.
9911         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9912         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9913         (SYSINFO_OFFSEET): Likewise.
9915 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9917         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9918         Define.
9919         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9920         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9921         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9922         (USE_DL_SYSINFO): Undef.
9924 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9926         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9927         $(common-objpfx)libc.so.
9928         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9929         it is bigger than pipe buffer size even on arches with bigger
9930         page size.
9931         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9933 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9935         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9936         correct errno access for case that USE___THREAD is not defined.
9938 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9940         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9941         Patch by Marijn Ros <marijn@mad.scientist.com>.
9943 2002-12-22  Roland McGrath  <roland@redhat.com>
9945         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9947 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9949         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9951 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9953         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9954         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9955         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9957         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9958         of int $0x80.
9959         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9960         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9961         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9962         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9963         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9964         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9965         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9966         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9968         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9969         sysenter.
9970         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9972         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9974         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9975         in new TCB.
9976         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9977         that sysinfo is properly initialized.
9978         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9979         to 1 only for ld.so.
9981         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9982         RTLD_CORRECT_DYNAMIC_WEAK.
9984 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9986         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9987         Use return 0 as 6th argument to FORWARD4.
9988         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9990 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9992         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9993         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9994         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9995         (INIT_SYSINFO): New #define.
9996         (TLS_TP_INIT): Use INIT_SYSINFO.
9997         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9998         At test to make sure SYSINFO_OFFSET value is correct.
9999         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
10001 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
10003         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
10004         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
10005         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
10006         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
10007         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
10008         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
10009         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
10011 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
10013         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
10014         macro instead of using int $0x80 directly.
10016         * sysdeps/pthread/bits/stdio-lock.h: New file.
10017         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
10018         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
10019         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
10020         * Makefile (routines): Add libc-lowlevelmutex.
10022         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
10023         __i686.get_pc_thunk.dx.
10025 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10027         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
10028         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
10029         ($(objpfx)tst-cancel-wrappers.out): New rule.
10030         * tst-cancel-wrappers.sh: New test.
10031         * tst-locale1.c: Include signal.h.
10032         (uselocale): Test static linking of __libc_current_sigrt*.
10034 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
10036         * Makefile (tests): Add tst-cancel6.
10037         * tst-cancel6.c: New file
10039 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
10041         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
10042         Define meaningfully for assembler as well.
10043         * pthreadP.h (struct pthread_functions): Remove
10044         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
10045         and ptr_pthread_attr_init_2_1 fields.
10046         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
10047         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
10048         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
10049         (FORWARD3): Define using FORWARD4.
10050         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
10051         versions.
10052         * pt-system.c: Remove duplicate stdlib.h include.
10054 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
10056         * sem_init.c: Define sem_init@GLIBC_2.0.
10057         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
10058         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
10060         * flockfile.c: Moved to...
10061         * sysdeps/pthread/flockfile.c: ...here.  New file.
10062         * funlockfile.c: Moved to...
10063         * sysdeps/pthread/funlockfile.c: ...here.  New file.
10064         * ftrylockfile.c: Moved to...
10065         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
10067 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
10069         * libc-cancellation.c: Guard both function with
10070         #if !defined NOT_IN_libc.
10071         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
10072         automatically provided pthread wrappers.
10073         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
10074         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
10075         nor in libpthread.
10076         * pt-open.c: Removed.
10077         * pt-fcntl.c: Removed.
10078         * pt-fsync.c: Removed.
10079         * pt-lseek.c: Removed.
10080         * pt-msgrcv.c: Removed.
10081         * pt-msgsnd.c: Removed.
10082         * pt-msync.c: Removed.
10083         * pt-nanosleep.c: Removed.
10084         * pt-open64.c: Removed.
10085         * pt-pause.c: Removed.
10086         * pt-pread.c: Removed.
10087         * pt-pread64.c: Removed.
10088         * pt-pwrite.c: Removed.
10089         * pt-pwrite64.c: Removed.
10090         * pt-read.c: Removed.
10091         * pt-recv.c: Removed.
10092         * pt-recvfrom.c: Removed.
10093         * pt-recvmsg.c: Removed.
10094         * pt-send.c: Removed.
10095         * pt-sendto.c: Removed.
10096         * pt-sigtimedwait.c: Removed.
10097         * pt-sigwait.c: Removed.
10098         * pt-wait.c: Removed.
10099         * pt-waitpid.c: Removed.
10100         * pt-write.c: Removed.
10101         * pt-accept.c: Removed.
10102         * pt-close.c: Removed.
10103         * pt-connect.c: Removed.
10104         * pt-lseek64.c: Removed.
10105         * pt-sendmsg.c: Removed.
10106         * pt-tcdrain.c: Removed.
10108 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10110         * init.c (__pthread_initialize_minimal_internal): Renamed from
10111         __pthread_initialize_minimal.  Make old name an alias.  This
10112         converts a normal relocation into a relative relocation.
10114         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10116         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10117         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10118         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10119         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10120         pt-sigwaitinfo, pt-waitid, and pt-writev.
10121         * pt-creat.c: Removed.
10122         * pt-poll.c: Removed.
10123         * pt-pselect.c: Removed.
10124         * pt-readv.c: Removed.
10125         * pt-select.c: Removed.
10126         * pt-sigpause.c: Removed.
10127         * pt-sigsuspend.c: Removed.
10128         * pt-sigwaitinfo.c: Removed.
10129         * pt-waitid.c: Removed.
10130         * pt-writev.c: Removed.
10132         * init.c (pthread_functions): New variable.
10133         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10134         (or NULL) to __libc_pthread_init.
10135         * forward.c: Rewrite to use __libc:pthread_functions array to get
10136         function addresses.
10137         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10138         prototype.
10139         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10140         Take new parameter.  Copy content of variable pointed to by it
10141         to __libc_pthread_init.
10143         * pthreadP.h (struct pthread_functions): New type.
10144         (__libc_pthread_init): Declare.
10146         * pthread_attr_destroy.c: Add namespace protected alias.
10147         * pthread_attr_getdetachstate.c: Likewise.
10148         * pthread_attr_getinheritsched.c: Likewise.
10149         * pthread_attr_getschedparam.c: Likewise.
10150         * pthread_attr_getschedpolicy.c: Likewise.
10151         * pthread_attr_getscope.c: Likewise.
10152         * pthread_attr_setdetachstate.c: Likewise.
10153         * pthread_attr_setinheritsched.c: Likewise.
10154         * pthread_attr_setschedparam.c: Likewise.
10155         * pthread_attr_setschedpolicy.c: Likewise.
10156         * pthread_attr_setscope.c: Likewise.
10157         * pthread_cond_broadcast.c: Likewise.
10158         * pthread_cond_destroy.c: Likewise.
10159         * pthread_cond_init.c: Likewise.
10160         * pthread_cond_signal.c: Likewise.
10161         * pthread_cond_wait.c: Likewise.
10162         * pthread_condattr_destroy.c: Likewise.
10163         * pthread_condattr_init.c: Likewise.
10164         * pthread_equal.c: Likewise.
10165         * pthread_exit.c: Likewise.
10166         * pthread_getschedparam.c: Likewise.
10167         * pthread_self.c: Likewise.
10168         * pthread_setcancelstate.c: Likewise.
10169         * pthread_setschedparam.c: Likewise.
10170         * pthread_mutex_destroy.c: Likewise.
10171         * pthread_mutex_init.c: Likewise.
10172         * pthreadP.h: Add prototypes for the aliases.
10174         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10175         multiple_threads member in correct TCB to 1.
10177         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10178         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10179         member of thread decriptor, otherwise return unconditionally 1.
10181 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10183         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10184         regular Linux version.  Remove file.
10185         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10186         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10187         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10188         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10189         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10190         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10191         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10192         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10193         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10194         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10195         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10196         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10197         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10198         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10199         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10200         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10201         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10202         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10203         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10204         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10205         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10206         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10207         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10208         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10209         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10210         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10211         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10212         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10213         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10214         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10216 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10218         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10219         * sysdeps/unix/sysv/linux/open.c: Removed.
10220         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10221         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10222         * sysdeps/unix/sysv/linux/msync.c: Removed.
10223         * sysdeps/unix/sysv/linux/read.c: Removed.
10224         * sysdeps/unix/sysv/linux/close.c: Removed.
10225         * sysdeps/unix/sysv/linux/creat.c: Removed.
10226         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10227         * sysdeps/unix/sysv/linux/pause.c: Removed.
10228         * sysdeps/unix/sysv/linux/select.c: Removed.
10229         * sysdeps/unix/sysv/linux/write.c: Removed.
10231 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10233         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10234         element in TCB to see whether locking is needed.
10236         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10237         MULTIPLE_THREADS_OFFSET value is correct.
10239         * sysdeps/unix/sysv/linux/close.c: New file.
10240         * sysdeps/unix/sysv/linux/connect.S: New file.
10241         * sysdeps/unix/sysv/linux/creat.c: New file.
10242         * sysdeps/unix/sysv/linux/fsync.c: New file.
10243         * sysdeps/unix/sysv/linux/llseek.c: New file.
10244         * sysdeps/unix/sysv/linux/lseek.c: New file.
10245         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10246         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10247         * sysdeps/unix/sysv/linux/msync.c: New file.
10248         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10249         * sysdeps/unix/sysv/linux/open.c: New file.
10250         * sysdeps/unix/sysv/linux/open64.c: New file.
10251         * sysdeps/unix/sysv/linux/pause.c: New file.
10252         * sysdeps/unix/sysv/linux/poll.c: New file.
10253         * sysdeps/unix/sysv/linux/pread.c: New file.
10254         * sysdeps/unix/sysv/linux/pread64.c: New file.
10255         * sysdeps/unix/sysv/linux/pselect.c: New file.
10256         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10257         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10258         * sysdeps/unix/sysv/linux/readv.c: New file.
10259         * sysdeps/unix/sysv/linux/recv.S: New file.
10260         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10261         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10262         * sysdeps/unix/sysv/linux/select.c: New file.
10263         * sysdeps/unix/sysv/linux/send.S: New file.
10264         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10265         * sysdeps/unix/sysv/linux/sendto.S: New file.
10266         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10267         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10268         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10269         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10270         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10271         * sysdeps/unix/sysv/linux/system.c: New file.
10272         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10273         * sysdeps/unix/sysv/linux/wait.c: New file.
10274         * sysdeps/unix/sysv/linux/waitid.c: New file.
10275         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10276         * sysdeps/unix/sysv/linux/writev.c: New file.
10277         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10279         * pt-readv.c: Fix comment.
10281 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10283         * tst-cleanup1.c: Include stdlib.h.
10285         * tst-cancel5.c: New test.
10286         * Makefile (tests): Add tst-cancel5.
10287         (tst-cancel5): Link against libc.so libpthread.so in that order.
10289 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10291         * forward.c (test_loaded): Prevent recursive calls.
10293         * Makefile (routines): Add libc-cancellation.
10294         * libc-cancellation.c: New file.
10295         * descr.h (struct pthread): Add multiple_threads field.
10296         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10297         new thread descriptor to 1.
10298         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10299         Initialize multiple_thread field after successful thread creation.
10300         * cancellation.c (__do_cancel): Move to pthreadP.h.
10301         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10302         (__pthread_disable_asynccancel): Add internal_function attribute.
10303         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10304         * pthread_setcancelstate.c: Likewise.
10305         * pthread_setcanceltype.c: Likewise.
10306         * pthread_exit.c: Likewise.
10307         * pthreadP.h (CANCELLATION_P): Likewise.
10308         (__do_cancel): Define as static inline.
10309         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10310         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10311         declarations.
10312         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10313         fields.  Define MULTIPLE_THREADS_OFFSET.
10314         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10315         declaration.
10316         * sysdeps/unix/sysv/linux/accept.S: New file.
10317         * sysdeps/unix/sysv/linux/read.c: New file.
10318         * sysdeps/unix/sysv/linux/write.c: New file.
10319         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10320         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10321         initialization of __libc_locking_needed.
10322         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10323         __libc_locking_needed, use multiple_threads field in TCB.
10324         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10326 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10328         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10329         version.
10330         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10332         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10333         access to __libc_locking_needed for PIC.
10335 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10337         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10338         declare for libc.so.
10339         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10340         expression.
10341         (__libc_lock_lock): Put into statement expression.
10342         (__libc_lock_unlock): Remove trailing semicolon.
10343         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10345 2002-12-12  Roland McGrath  <roland@redhat.com>
10347         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10348         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10350 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10352         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10353         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10354         Initialize __libc_locking_needed.
10355         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10356         instead of __register_pthread_fork_handler.
10357         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10358         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10359         fork-gen with libc_pthread_init.
10360         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10361         of __register_pthread_fork_handler.
10362         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10363         of __register_pthread_fork_handler.
10364         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10365         __libc_locking_needed to determine whether lock prefix can be avoided.
10366         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10368 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10370         * Makefile (tests): Add tst-cleanup1.
10371         * tst-cleanup1.c: New file.
10372         * cancellation.c (__cleanup_thread): Removed.
10373         (__do_cancel): Remove call to __cleanup_thread.
10374         * pthreadP.h: Remove __cleanup_thread prorotype.
10376         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10377         Remember function and argument even if cancellation handler
10378         function is not available.
10379         (__libc_cleanup_region_end): Execute registered function directly if
10380         pthread functions are not available.
10381         (__libc_cleanup_end): Likewise.
10383         * init.c (__pthread_initialize_minimal): Fix initialization in
10384         static lib by preventing gcc from being too clever.
10386 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10388         * init.c (__pthread_initialize_minimal): Remove unneccesary
10389         sigaddset call.
10391         * Makefile (tests): We can run tst-locale2 now.
10393 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10395         * Versions: Remove duplicated sigwait entry.
10397 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10399         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10400         inside libpthread.
10402         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10404         * pthreadP.h: Declare __pthread_enable_asynccancel and
10405         __pthread_disable_asynccancel.
10406         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10407         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10408         * cancellation.c (__pthread_enable_asynccancel): New function.
10409         (__pthread_disable_asynccancel): New function.
10410         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10411         * pt-close.c: Likewise.
10412         * pt-connect.c: Likewise.
10413         * pt-creat.c: Likewise.
10414         * pt-fcntl.c: Likewise.
10415         * pt-fsync.c: Likewise.
10416         * pt-lseek.c: Likewise.
10417         * pt-lseek64.c: Likewise.
10418         * pt-msgrcv.c: Likewise.
10419         * pt-msgsnd.c: Likewise.
10420         * pt-msync.c: Likewise.
10421         * pt-nanosleep.c: Likewise.
10422         * pt-open.c: Likewise.
10423         * pt-open64.c: Likewise.
10424         * pt-pause.c: Likewise.
10425         * pt-poll.c: Likewise.
10426         * pt-pread.c: Likewise.
10427         * pt-pread64.c: Likewise.
10428         * pt-pselect.c: Likewise.
10429         * pt-pwrite.c: Likewise.
10430         * pt-pwrite64.c: Likewise.
10431         * pt-read.c: Likewise.
10432         * pt-readv.c: Likewise.
10433         * pt-recv.c: Likewise.
10434         * pt-recvfrom.c: Likewise.
10435         * pt-recvmsg.c: Likewise.
10436         * pt-select.c: Likewise.
10437         * pt-send.c: Likewise.
10438         * pt-sendmsg.c: Likewise.
10439         * pt-sendto.c: Likewise.
10440         * pt-sigpause.c: Likewise.
10441         * pt-sigsuspend.c: Likewise.
10442         * pt-sigtimedwait.c: Likewise.
10443         * pt-sigwait.c: Likewise.
10444         * pt-sigwaitinfo.c: Likewise.
10445         * pt-system.c: Likewise.
10446         * pt-tcdrain.c: Likewise.
10447         * pt-wait.c: Likewise.
10448         * pt-waitid.c: Likewise.
10449         * pt-waitpid.c: Likewise.
10450         * pt-write.c: Likewise.
10451         * pt-writev.c: Likewise.
10452         * pthread_join.c: Likewise.
10453         * pthread_timedjoin.c: Likewise.
10455         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10456         (__xpg_sigpause): New function.
10457         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10459 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10461         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10463         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10464         _GI_pthread_cleanup_pop to pthreadP.h.
10466         * ftrylockfile.c: Use _IO_lock_trylock instead of
10467         pthread_mutex_trylock.
10469         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10470         (CANCEL_RESET): Likewise.
10471         (__pthread_setcanceltype_): Declare.
10472         (__pthread_mutex_lock_internal): Declare.
10473         (__pthread_mutex_unlock_internal): Declare.
10474         (__pthread_once_internal): Declare.
10475         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10476         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10478         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10479         and pthread_mutex_unlock.
10480         * pthread_cond_wait.c: Likewise.
10481         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10482         * pthread_mutex_unlock.c: Likewise.
10484         * pthread_setcanceltype.c: Add additional alias
10485         __pthread_setcanceltype.
10487         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10488         * sem_open.c (sem_open): Likewise.
10489         Use __libc_open, __libc_write, and __libc_close instead of
10490         open, write, and close respectively.
10492         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10493         Rewrite as statement expression since it must return a value.
10495         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10496         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10497         __pthread_kill.
10499         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10500         alias __pthread_once_internal.
10502         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10504 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10506         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10507         * tst-stdio1.c: New file.
10508         * tst-stdio2.c: New file.
10510         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10512         * Makefile (tests): Comment out tst-locale2 for now.
10513         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10515         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10516         -D_IO_MTSAFE_IO.
10517         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10518         Use _IO_lock_init instead of explicit assignment.
10520         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10521         Define __libc_lock_* and __libc_lock_recursive macros with
10522         lowlevellock macros, not pthread mutexes.
10524         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10525         of pthread_mutex_lock.
10526         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10527         instead of pthread_mutex_unlock.
10529 2002-12-06  Roland McGrath  <roland@redhat.com>
10531         * allocatestack.c (__stack_user): Use uninitialized defn.
10532         * init.c (__pthread_initialize_minimal): Initialize it here.
10534 2002-12-05  Roland McGrath  <roland@redhat.com>
10536         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10537         string.
10538         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10540         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10541         missing & here too.
10543 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10545         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10546         lowlevellock.
10547         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10548         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10549         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10550         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10551         for __libc_lock_* macros.
10552         * Makefile (routines): Add libc-lowlevellock.
10554 2002-10-09  Roland McGrath  <roland@redhat.com>
10556         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10557         Under [__PIC__], call the function via the pointer fetched for
10558         comparison rather than a call by name that uses the PLT.
10559         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10560         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10561         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10562         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10563         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10565 2002-12-04  Roland McGrath  <roland@redhat.com>
10567         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10569         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10570         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10572         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10574 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10576         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10577         a completely opaque, non-integer type.
10578         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10580 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10582         * sysdeps/i386/tls.h: Include stdlib.h.
10583         * sysdeps/x86_64/tls.h: Likewise.
10585 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10587         * Makefile (tests): Add tst-locale2.
10588         (tests-static): Likewise.
10589         * tst-locale2.c: New file.
10591         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10592         volatile and add memory clobbers to lock operations.
10594 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10596         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10597         * sysdeps/i386/i486/bits/atomic.h: New file.
10598         * sysdeps/i386/i586/bits/atomic.h: New file.
10599         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10600         include i486 version.
10601         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10602         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10603         Patch by Marijn Ros <marijn@mad.scientist.com>.
10605         * allocatestack.c (get_cached_stack): Don't crash if we first
10606         found a stack with a larger size then needed.
10607         Reported by Hui Huang <hui.huang@sun.com>.
10609         * Makefile (tests): Add tst-sysconf.
10610         * tst-sysconf.c: New file.
10612         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10613         PTHREAD_THREADS_MAX.
10615 2002-12-02  Roland McGrath  <roland@redhat.com>
10617         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10618         Declare using hidden_proto instead of attribute_hidden, so there are
10619         non-.hidden static symbols for gdb to find.
10620         (__pthread_keys): Likewise.
10621         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10622         * allocatestack.c (__stack_user): Likewise.
10623         * pthread_create.c (__pthread_keys): Likewise.
10624         (__nptl_threads_events, __nptl_last_event): Make these static instead
10625         of hidden.
10626         * pthread_key_create.c (__pthread_pthread_keys_max,
10627         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10629 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10631         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10632         statically.
10633         * tst-locale1.c: New file.
10635         * pthread_cond_timedwait.c: Include <stdlib.h>.
10637         * Makefile (tests): Add tst-fork2 and tst-fork3.
10638         * tst-fork2.c: New file.
10639         * tst-fork3.c: New file.
10641 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10643         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10645         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10646         require it to 200112L.
10648         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10649         instruction only if HAVE_CMOV is defined.
10650         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10652         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10654         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10656         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10658         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10660 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10662         * sysdeps/x86_64/bits/atomic.h: New file.
10664         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10665         16-bit operations.
10667         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10668         possible since gettid cannot fail.
10670         * sysdeps/x86_64/pthreaddef.h: New file.
10672         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10674         * sysdeps/x86_64/pthread_spin_init.c: New file.
10675         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10676         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10677         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10679         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10680         Add missing lock prefix.  Minute optimization.
10682         * tst-spin2.c (main): Also check successful trylock call.
10684         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10685         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10687         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10688         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10690         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10691         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10692         value in case of an error.  Add support for INTERNAL_SYSCALL.
10694         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10695         value in case of an error.
10697         * sysdeps/x86_64/tls.h: New file.
10699 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10701         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10702         takes the array member name and the index as parameters.
10703         (THREAD_SETMEM_NC): Likewise.
10704         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10705         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10706         interfaces.
10708         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10709         to decide which code to use.
10710         (THREAD_SETMEM_NC): Likewise.
10712         * allocatestack.c (queue_stack): Don't remove stack from list here.
10713         Do it in the caller.  Correct condition to prematurely terminate
10714         loop to free stacks.
10715         (__deallocate_stack): Remove stack from list here.
10717 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10719         * Makefile (tests): Add tst-stack1.
10720         * tst-stack1.c: New file.
10722         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10723         provided stack.
10725         * pthread_attr_getstack.c: Return bottom of the thread area.
10727 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10729         * Makefile (libpthread-routines): Add pt-allocrtsig and
10730         pthread_kill_other_threads.
10731         * pt-allocrtsig.c: New file.
10732         * pthread_kill_other_threads.c: New file.
10733         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10734         all three functions.
10735         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10736         allocrtsig.
10737         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10738         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10739         and __libc_allocate_rtsig_private.
10740         * Versions (libpthread): Export pthread_kill_other_threads_np,
10741         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10743 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10745         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10746         the end of the stack.  Adjust computations.
10747         When mprotect call fails dequeue stack and free it.
10748         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10749         attribute.
10750         * pthread_getattr_np.c: Likewise.
10752         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10753         surprises.
10755 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10757         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10758         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10760 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10762         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10763         * pthread_setspecific.c: Likewise.
10765 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10767         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10768         definitions.  Get them from the official place.
10769         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10771         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10772         Use new CLONE_ flags in clone() calls.
10774         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10775         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10777         * Versions: Add pthread_* functions for libc.
10778         * forward.c: New file.
10780         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10781         errno-loc.
10782         * herrno.c: New file.
10783         * res.c: New file.
10785         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10786         sem_trywait, and sem_timedwait.  Add herrno and res.
10787         * sem_init.c: Don't initialize lock and waiters members.
10788         * sem_open.c: Likewise.
10789         * sem_post.c: Removed.
10790         * sem_wait.c: Removed.
10791         * sem_trywait.c: Removed.
10792         * sem_timedwait.c: Removed.
10793         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10794         Includes full implementations of sem_post, sem_wait, sem_trywait,
10795         and sem_timedwait.
10796         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10797         for new implementation.
10798         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10799         and waiters fields.
10801         * tst-sem3.c: Improve error message.
10802         * tst-signal3.c: Likewise.
10804         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10805         to tell the kernel about the termination futex and to initialize tid
10806         member.  Don't initialize main_thread.
10807         * descr.h (struct pthread): Remove main_thread member.
10808         * cancelllation.c (__do_cancel): Remove code handling main thread.
10809         The main thread is not special anymore.
10811         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10812         size of the stacks to stack_cache_actsize.
10814         * pt-readv.c: Add missing "defined".
10815         * pt-sigwait.c: Likewise.
10816         * pt-writev.c: Likewise.
10818 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10820         * Versions: Export __connect from libpthread.
10821         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10823         * Makefile (libpthread-routines): Add pt-raise.
10824         * sysdeps/unix/sysv/linux/raise.c: New file.
10825         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10826         * sysdeps/generic/pt-raise.c: New file.
10828         * pthread_cond_init.c: Initialize all data elements of the condvar
10829         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10831         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10832         * pthread_create.c: Likewise.
10834         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10835         * tst-key1.c: New file.
10836         * tst-key2.c: New file.
10837         * tst-key3.c: New file.
10839         * Versions: Export pthread_detach for version GLIBC_2.0.
10840         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10842 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10844         * pthread_key_create.c: Terminate search after an unused key was found.
10845         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10847         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10848         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10850 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10852         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10853         dynamic lookup for errno in PIC.
10855         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10856         release the stack lock as soon as possible.
10857         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10858         the static TLS block.
10859         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10861         * cancellation.c: Renamed from cancelation.c.
10862         * Makefile: Adjust accordingly.
10863         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10864         * cleanup_defer.c: Use CANCELLATION_P.
10865         * pthread_testcancel.c: Likewise.
10866         * descr.h: Fix spelling in comments.
10867         * init.c: Likewise.
10868         * pthread_getattr_np.c: Likewise.
10869         * pthread_getschedparam.c: Likewise.
10870         * pthread_setschedparam.c: Likewise.
10871         * Versions: Likewise.
10873         * pt-pselect.c: New file.
10874         * Makefile (libpthread-routines): Add pt-pselect.
10875         * Versions: Add pselect.
10877         * tst-cancel4.c: New file.
10878         * Makefile (tests): Add tst-cancel4.
10880 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10882         * pthread_mutex_lock.c: Always record lock ownership.
10883         * pthread_mutex_timedlock.c: Likewise.
10884         * pthread_mutex_trylock.c: Likewise.
10886         * pt-readv.c: New file.
10887         * pt-writev.c: New file.
10888         * pt-creat.c: New file.
10889         * pt-msgrcv.c: New file.
10890         * pt-msgsnd.c: New file.
10891         * pt-poll.c: New file.
10892         * pt-select.c: New file.
10893         * pt-sigpause.c: New file.
10894         * pt-sigsuspend.c: New file.
10895         * pt-sigwait.c: New file.
10896         * pt-sigwaitinfo.c: New file.
10897         * pt-waitid.c: New file.
10898         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10899         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10900         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10901         * Versions: Add all the new functions.
10903         * tst-exit1.c: New file.
10904         * Makefile (tests): Add tst-exit1.
10906         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10908 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10910         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10912         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10913         call.  pthread_join is an official cancellation point.
10914         * pthread_timedjoin.c: Likewise.
10916         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10917         and the condvar's mutex are retrieved.
10918         * pthread_cond_timedwait.c: Likewise.
10919         Reported by dice@saros.East.Sun.COM.
10921 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10923         * pthreadP.h: Cut out all type definitions and move them...
10924         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10925         * pthreadP.h: Include <internaltypes.h>.
10927         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10928         performance tweaks.
10930         * sem_trywait.c: Shuffle #includes around to get right order.
10931         * sem_timedwait.c: Likewise.
10932         * sem_post.c: Likewise.
10933         * sem_wait.c: Likewise.
10935         * nptl 0.3 released.
10937         * Makefile (tests): Add tst-signal3.
10938         * tst-signal3.c: New file.
10940 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10942         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10943         the asms modify the sem object.
10944         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10946         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10947         the actual members.
10948         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10949         * semaphoreP.h: Include pthreadP.h.
10950         * sem_getvalue.c: Adjust to sem_t change.
10951         * sem_init.c: Likewise.
10952         * sem_open.c: Likewise.
10953         * sem_post.c: Likewise.
10954         * sem_timedwait.c: Likewise.
10955         * sem_trywait.c: Likewise.
10956         * sem_wait.c: Likewise.
10958 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10960         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10961         * tst-basic2.c: New file.
10962         * tst-exec1.c: New file.
10963         * tst-exec2.c: New file.
10964         * tst-exec3.c: New file.
10966         * tst-fork1.c: Remove extra */.
10968         * nptl 0.2 released.  The API for IA-32 is complete.