Merge commit 'origin/master' into fedora/master
[glibc.git] / nptl / ChangeLog
blob1f24aa58491d59c7b7651c48f8ee298e9fcb5ea9
1 2009-07-20  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Minor
4         optimizations of last changes.
5         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7 2009-07-19  Ulrich Drepper  <drepper@redhat.com>
9         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
10         FUTEX_WAIT_REQUEUE_PI and FUTEX_CMP_REQUEUE_PI.
11         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: If mutex
12         is a PI mutex, then use FUTEX_CMP_REQUEUE_PI.
13         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
14         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: If mutex
15         is a PI mutex, then use FUTEX_WAIT_REQUEUE_PI.
16         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
18         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
19         (__pthread_cond_timedwait): Make more robust.
21 2009-07-18  Ulrich Drepper  <drepper@redhat.com>
23         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
24         (__lll_robust_timedlock_wait): If possible use FUTEX_WAIT_BITSET to
25         directly use absolute timeout.
27         * tst-sem5.c (do_test): Add test for premature timeout.
28         * Makefile: Linu tst-sem5 with librt.
30         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
31         (pthread_rwlock_timedwrlock): If possible use FUTEX_WAIT_BITSET to
32         directly use absolute timeout.
33         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
34         (pthread_rwlock_timedrdlock): Likewise.
36         * tst-cond11.c (run_test): Add test to check that the timeout is
37         long enough.
39         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
40         (__pthread_cond_timedwait): If possible use FUTEX_WAIT_BITSET to
41         directly use absolute timeout.
43         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
44         (__pthread_cond_wait): Convert to using exception handler instead of
45         registered unwind buffer.
46         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
47         (__pthread_cond_timedwait): Likewise.
49 2009-07-17  Ulrich Drepper  <drepper@redhat.com>
51         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
52         If possible use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME to directly
53         use absolute timeout.
55         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Optimize
56         handling of uncontested semaphore.
58         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
59         (__condvar_cleanup): Rewrite to use cfi directives instead of
60         hand-coded unwind tables.
61         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S (__pthread_once):
62         Likewise.
63         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
64         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
65         Likewise.
67 2009-06-12  Ulrich Drepper  <drepper@redhat.com>
69         * Makefile (libpthread-routines): Add pthread_sigqueue.
70         * Versions: Add pthread_sigqueue for GLIBC_2.11.
71         * sysdeps/pthread/bits/sigthread.h: Declare pthread_sigqueue.
72         * sysdeps/unix/sysv/linux/pthread_sigqueue.c: New file.
74 2009-06-11  Ulrich Drepper  <drepper@redhat.com>
76         [BZ #10262]
77         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
78         (LOAD_FUTEX_WAIT_ABS): Fix futex parameter in case private futexes
79         cannot be assumed.
80         Patch by Bryan Kadzban <bz-glibc@kdzbn.homelinux.net>.
82 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
84         * libc-cancellation.c: Move __libc_cleanup_routine to...
85         * libc-cleanup.c: ...here.  New file.
86         * Makefile (routines): Add libc-cleanup.
88         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
89         test.
90         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
91         * sysdeps/pthread/librt-cancellation.c: Likewise.
93         [BZ #9924]
94         * nptl-init.c: Renamed from init.c.
95         * Makefile: Change all occurences of init.c to nptl-init.c.
97 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
99         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
100         to test when deciding on the delay.
101         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
102         * pthread_cancel.c: Close race between deciding on sending a signal
103         and setting the CANCELING_BIT bit.
105         * cancellation.c (__pthread_disable_asynccancel): Don't return if
106         thread is canceled.
107         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
109 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
111         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
112         is available.
113         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
114         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
115         * sysdeps/i386/tls.h: Likewise.
116         (tcbhead_t): Add __private_tm member.
118 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
120         * sem_open.c (sem_open): Rewrite initialization of initsem to
121         avoid warnings.
123         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
124         Avoid warning by using may_alias attribute on ptrhack.
126 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
128         [BZ #10090]
129         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
130         Check policy and priority for validity.
131         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
133 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
135         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
136         (__pthread_cond_timedwait): Change to use cfi directives instead of
137         hand-coded unwind sections.
139 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
141         * init.c (nptl_freeres): Compile only for SHARED.
143 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
145         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
146         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
147         FUTEX_BITSET_MATCH_ANY.
149 2009-02-27  Roland McGrath  <roland@redhat.com>
151         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
152         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
154 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
156         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
157         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
158         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
159         200112L to 200809L.
161 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
163         * sysdeps/pthread/pthread.h: The robust mutex functions are in
164         POSIX 2008.
166 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
168         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
169         Unify name of include protector macro.
171 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
173         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
174         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
176 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
178         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
179         pointer variables.
181         * allocatestack.c (__free_stacks): Renamed from free_stacks.
182         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
183         * init.c (nptl_freeres): New function.
184         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
185         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
186         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
187         variable.
188         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
189         load DSO.  Assign last.
190         (__unwind_freeres): New function.
192         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
193         for better debugging.  No need to use stack_list_add here.
195 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
197         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
198         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
199         instead of computing relative timeout.
200         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
201         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
203 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
205         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
207 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
209         * sysdeps/pthread/list.h (list_add): Initialize new element first.
210         (list_add_tail): Removed.
212 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
214         * (in_flight_stack): New variable.
215         (stack_list_del): New function.  Use instead of list_del.
216         (stack_list_add): New function.  Use instead of list_add when adding to
217         stack_cache and stack_used lists.
218         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
219         when the fork call interrupted another thread.
221 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
223         * init.c (__pthread_initialize_minimal_internal): Optimize test
224         FUTEX_CLOCK_REALTIME a bit.
226 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
228         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
229         only passing five parameters to FUTEX_WAIT_BITSET call.
231         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
232         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
233         instead of computing relative timeout.
235 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
237         * init.c (__pthread_initialize_minimal_internal): Check for
238         FUTEX_CLOCK_REALTIME flag.
239         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
240         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
241         relative timeout.
243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
244         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
245         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
246         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
247         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
248         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
250 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
252         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
253         loop body instead of ; to avoid gcc warnings.
254         (pthread_cleanup_pop_restore_np): Likewise.
255         Patch by Caolán McNamara <caolanm@redhat.com>.
257 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
259         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
260         fast path here, for robust/PI/PP mutexes call
261         __pthread_mutex_lock_full.  Don't use switch, instead use a series
262         of ifs according to their probability.
263         (__pthread_mutex_lock_full): New function.
264         * pthread_mutex_unlock.c: Include assert.h.
265         (__pthread_mutex_unlock_usercnt): Handle only the
266         fast path here, for robust/PI/PP mutexes call
267         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
268         of ifs according to their probability.
269         (__pthread_mutex_unlock_full): New function.
270         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
271         (__pthread_mutex_lock_full): Define.
273 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
275         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
276         implementation.  Add necessary padding and.
277         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
278         words.
280 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
282         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
283         and FUTEX_WAKE_BITSET.
285 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
287         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
288         and FUTEX_WAKE_BITSET.
289         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
290         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
291         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
294 2008-11-25  Roland McGrath  <roland@redhat.com>
296         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
297         Subdirectories moved to ports repository as
298         sysdeps/.../nptl subdirectories.
300 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
302         [BZ #7008]
303         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
304         of old value.
305         * pthread_cond_init.c (__pthread_cond_init): Fix
306         cond->__data.__nwaiters initialization.
307         * Makefile (tests): Add tst-cond23.
308         * tst-cond23.c: New test.
310 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
312         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
313         arguments.
314         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
315         arguments.
317 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
319         [BZ #6955]
320         * pthread_mutex_lock.c: Add support for private PI mutexes.
321         * pthread_mutex_timedlock.c: Likewise.
322         * pthread_mutex_trylock.c: Likewise.
323         * pthread_mutex_unlock.c: Likewise.
324         Patch mostly by Ben Jackson <ben@ben.com>.
326 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
328         [BZ #6843]
329         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
330         Increase stack size for helper thread.
332 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
334         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
335         assembly with a clobber list for access registers a0 and a1.
337 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
339         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
340         to force runp->refcntr to be read from memory.
342 2008-09-08  Richard Guenther  <rguenther@suse.de>
344         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
345         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
346         lll_timedlock, lll_robust_timedlock, lll_unlock,
347         lll_robust_unlock): Promote private to int.
349 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
351         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
352         ARCH_RETRY_MMAP definitions.
353         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
354         Define MAP_STACK when not defined.
355         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
356         handling of ARCH_RETRY_MMAP.
358 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
360         * tst-align2.c (f): Print message that f is reached.
362 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
364         [BZ #6740]
365         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
366         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
368 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
370         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
371         SOCK_CLOEXEC if possible.
373 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
375         * Makefile (tests): Add tst-rwlock2a.
376         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
377         * tst-rwlock2a.c: New file.
379 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
381         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
383 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
385         * sysdeps/pthread/pthread.h: Fix typo in comment.
387 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
389         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
390         of CPU set to the kernel.
392 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
394         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
395         cfi directives.
396         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
397         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
398         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
399         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
400         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
401         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
403 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
406         cfi directives.
407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
408         Likewise.
409         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
410         Likewise.
411         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
412         Likewise.
414 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
416         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
418 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
420         David S. Miller  <davem@davemloft.net>
422         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
424 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
426         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
427         __pshared correctly.
428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
429         Likewise.
430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
431         Likewise.
432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
433         Likewise.
434         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
435         Likewise.
436         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
438 2008-04-14  David S. Miller  <davem@davemloft.net>
440         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
441         (__old_sem_wait): Fix argument to lll_futex_wait().
443 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
445         * pthread_create.c: Require pthread_mutex_trylock and
446         pthread_key_delete for libgcc.
448 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
450         [BZ #6020]
451         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
452         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
453         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
455 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
457         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
458         <linux/limits.h> has defined it.
459         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
460         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
461         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
462         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
464 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
466         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
467         of ASSEMBLER.
468         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
469         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
471 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
473         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
474         HAVE_DL_DISCOVER_OSVERSION.
475         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
476         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
478 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
480         [BZ #5778]
481         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
482         _POSIX_CHOWN_RESTRICTED value to zero.
484 2008-01-31  Roland McGrath  <roland@redhat.com>
486         * Makefile (omit-deps): Variable removed.
488 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
490         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
491         unnecessary addr32 prefix.
493 2008-01-29  Roland McGrath  <roland@redhat.com>
495         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
497 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
499         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
501 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
503         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
504         a scratch register.
505         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
506         (__lll_lock_wait_private): Fix typo.
507         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
508         (pthread_barrier_wait): Likewise.  Adjust XADD use.
509         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
510         Adjust XADD use.
511         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
512         (pthread_rwlock_timedrdlock): Return correct return value.
513         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
514         (pthread_rwlock_timedwrlock): Likewise.
516 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
518         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
519         thread returns the program exits with an error code.
521 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
523         * pthread-errnos.sym: Add EOVERFLOW.
524         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
525         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
526         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
527         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
529 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
531         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
532         parameter.  Passed it as permission to mmap.
533         * allocatestack.c (allocate_stack): Pass prot as second parameter
534         to ARCH_RETRY_MMAP.
536 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
538         * tst-basic7.c: Allocate memory for the stack.
540         [BZ #5465]
541         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
542         (__pthread_cond_timedwait): Don't use VDSO.
543         Patch by Michal Januszewski.
545 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
547         [BZ #5455]
548         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
549         Allow label before pthread_cleanup_pop.
550         (pthread_cleanup_pop_restore_np): Likewise.
552 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
554         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
555         Store 2 before returning ETIMEDOUT.
557 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
559         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
560         Store 2 before returning ETIMEDOUT.
561         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
562         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
563         (__lll_lock_wait_private): Optimize.
564         (__lll_lock_wait): Likewise.
566 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
568         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
569         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
570         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
572 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
574         [BZ #5240]
575         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
576         If we time out, try one last time to lock the futex to avoid
577         losing a wakeup signal.
578         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
579         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
581         [BZ #5245]
582         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
583         if necessary.
585 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
587         [BZ #5245]
588         * allocatestack.c (allocate_stack): Change ENOMEM error in case
589         mmap failed to EAGAIN.
590         * Makefile (tests): Add tst-basic7.
591         * tst-basic7.c: New file.
593 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
595         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
596         Use __linkin_atfork.
598 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
600         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
601         missing line continuations.
602         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
603         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
605 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
607         [BZ #5220]
608         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
609         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
610         (struct timer): Add next element.
611         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
612         enqueue timer structure into __active_timer_sigev_thread list.
613         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
614         remove timer struct from __active_timer_sigev_thread.
615         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
616         Before using timer structure make sure it is still on the
617         __active_timer_sigev_thread list.  Keep lock until done.
618         Define __active_timer_sigev_thread and
619         __active_timer_sigev_thread_lock.
621 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
623         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
624         Redefine thread_atfork for use of ATFORK_MEM.
625         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
626         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
627         function.
628         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
629         Use atomic operation when removing first element of list.
631 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
633         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
634         routine instead of an alias to __new_sem_post.
636 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
638         * init.c (__pthread_initialize_minimal): Initialize word to appease
639         valgrind.
641 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
643         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
644         libc.so just clear NAME.
645         (__libc_rwlock_fini): Nop inside of libc.so.
646         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
647         all zeros.
649 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
651         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
652         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
653         unlocking failed.
654         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
656 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
658         [BZ #4938]
659         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
660         reclaimed stack if necessary.
661         * Makefile (tests): Add tst-tsd6.
662         * tst-tsd6.c: New file.
664 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
666         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
667         Add private argument.
669 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
672         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
674 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
676         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
677         (__lll_robust_timedlock): Pass private as last argument to
678         __lll_robust_timedlock_wait.
679         (__lll_unlock): Fix a pasto.
681 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
683         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
684         sparc_old_sem): New structs.
685         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
686         (__sem_wait_cleanup): New function.
687         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
688         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
689         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
690         lll_futex_wait.
691         (__old_sem_wait): New function.
692         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
693         nptl/sysdeps/unix/sysv/linux/sparc version.
694         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
695         Likewise.
696         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
697         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
698         (__new_sem_trywait): Use sparc_old_sem structure.
699         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
700         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
701         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
702         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
703         lll_futex_timed_wait.
704         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
705         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
706         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
707         lll_futex_wake.
708         (__old_sem_post): New function.
709         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
710         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
711         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
712         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
713         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
714         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
716 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
718         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
719         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
720         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
721         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
722         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
723         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
724         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
725         Use FUTEX_WAKE_OP.
726         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
727         kernel-features.h and tcb-offsets.h.
728         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
729         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
730         process private.
731         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
732         tcb-offsets.h.
733         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
734         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
735         process private.
736         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
737         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
738         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
739         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
741         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
742         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
744 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
746         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
747         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
748         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
749         lll_futex_timed_wait.
751         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
752         __lll_robust_unlock): Rewrite as macros instead of inline functions.
753         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
754         __lll_robust_unlock, __lll_wait_tid): Likewise.
756 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
758         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
759         Fix a pasto.
760         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
761         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
762         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
763         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
765         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
766         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
767         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
768         kernel-features.h.
769         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
770         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
771         process private.  Switch DW_CFA_advance_loc1 and some
772         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
774         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
775         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
776         process private.  Switch DW_CFA_advance_loc{1,2} and some
777         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
778         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
779         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
780         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
781         Likewise.
782         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
785         Likewise.
786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
787         (__pthread_cond_broadcast): Compare %r8 instead of
788         dep_mutex-cond_*(%rdi) with $-1.
789         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
790         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
791         of oring.
793 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
795         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
797 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
799         * allocatestack.c: Include kernel-features.h.
800         * pthread_create.c: Likewise.
801         * pthread_mutex_init.c: Likewise.
802         * init.c: Likewise.
803         * pthread_cond_timedwait.c: Likewise.
804         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
805         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
806         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
807         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
808         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
810         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
811         Likewise.
812         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
813         Likewise.
814         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
815         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
816         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
817         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
819 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
821         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
822         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
823         byte elements.  One of them is the new __shared element.
824         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
825         adjust names of other padding elements.
826         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
827         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
828         byte elements.  One of them is the new __shared element.
829         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
830         adjust names of other padding elements.
831         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
832         Renamed __pad1 element to __shared, adjust names of other padding
833         elements.
834         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
835         (pthread_rwlock_t): Likewise.
836         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
837         typo.
839 2007-08-09  Anton Blanchard  <anton@samba.org>
841         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
843 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
845         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
846         <kernel-features.h>.
847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
849 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
851         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
852         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
853         dealing with robust mutexes.
854         * pthread_mutex_timedlock.c: Likewise.
855         * pthread_mutex_trylock.c: Likewise.
856         * pthread_mutex_unlock.c: Likewise.
857         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
859 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
861         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
862         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
863         (PTHREAD_MUTEX_PSHARED): Define.
864         * pthread_mutex_init.c (__pthread_mutex_init): Set
865         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
866         mutexes.
867         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
868         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
869         as second argument to lll_lock.
870         (LLL_MUTEX_TRYLOCK): Take mutex as argument
871         instead of its __data.__lock field.
872         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
873         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
874         to lll_robust_lock.
875         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
876         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
877         instead of mutex->__data.__kind directly, pass
878         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
879         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
880         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
881         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
882         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
883         to lll_timedlock, lll_robust_timedlock, lll_unlock and
884         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
885         of mutex->__data.__kind directly.
886         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
887         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
888         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
889         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
890         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
891         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
892         and lll_futex_wake.
893         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
894         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
895         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
896         directly.
897         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
898         Take mutex as argument instead of its __data.__lock field, pass
899         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
900         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
901         __data.__lock field.
902         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
903         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
904         to lll_robust_cond_lock.
905         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
906         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
907         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
908         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
909         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
910         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
911         lll_futex_wait.
912         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
913         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
914         lll_futex_wake.
915         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
916         pshared variable, pass it to lll_lock, lll_unlock,
917         lll_futex_timedwait and lll_futex_wake.
918         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
919         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
920         and lll_futex_wake.
921         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
922         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
923         macro.
924         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
925         lll_futex_wake_unlock): Likewise.
926         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
927         Likewise.
928         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
929         lll_futex_wake_unlock): Likewise.
930         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
931         Likewise.
932         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
933         lll_futex_wake_unlock): Likewise.
934         (lll_futex_wake): Fix a typo.
935         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
936         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
937         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
938         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
939         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
940         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
941         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
942         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
944         (__pthread_cond_timedwait): Likewise.
945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
946         (__condvar_cleanup, __pthread_cond_wait): Likewise.
948 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
950         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
951         Don't use CGOTSETUP and CGOTRESTORE macros.
952         (CGOTSETUP, CGOTRESTORE): Remove.
953         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
954         @local symbol.
956 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
958         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
959         definitions for private futexes.
960         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
961         kernel-features.h and lowlevellock.h.  Use private futexes if
962         they are available.
963         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
964         (__lll_mutex_lock_wait): Rename to
965         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
966         (__lll_mutex_timedlock_wait): Rename to ...
967         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
968         Don't compile in for libc.so.
969         (__lll_mutex_unlock_wake): Rename to ...
970         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
971         (__lll_timedwait_tid): Use __NR_gettimeofday.
972         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
973         the header from assembler.  Renamed all lll_mutex_* resp.
974         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
975         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
976         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
977         Define.
978         (__lll_lock_wait_private): Add prototype.
979         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
980         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
981         __lll_unlock_wake): Likewise.
982         (lll_lock): Add private argument.  Call __lll_lock_wait_private
983         if private is constant LLL_PRIVATE.
984         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
985         lll_timedlock, lll_robust_timedlock): Add private argument.
986         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
987         if private is constant LLL_PRIVATE.
988         (lll_robust_unlock, lll_robust_dead): Add private argument.
989         (lll_lock_t): Remove.
990         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
991         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
992         lll_cond_wake, lll_cond_broadcast): Remove.
993         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
994         kernel-features.h and lowlevellock.h.
995         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
996         (LOAD_FUTEX_WAIT): Define.
997         (__lll_robust_mutex_lock_wait): Rename to ...
998         (__lll_robust_lock_wait): ... this.  Add private argument.
999         Use LOAD_FUTEX_WAIT macro.
1000         (__lll_robust_mutex_timedlock_wait): Rename to ...
1001         (__lll_robust_timedlock_wait): ... this.    Add private argument.
1002         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
1003         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
1004         lowlevellock.h.
1005         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1006         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
1007         __lll_mutex_{lock,unlock}_*.
1008         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
1009         lowlevellock.h and pthread-errnos.h.
1010         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1011         FUTEX_CMP_REQUEUE, EINVAL): Remove.
1012         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
1013         __lll_mutex_{lock,unlock}_*.
1014         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
1015         lowlevellock.h and pthread-errnos.h.
1016         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
1017         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
1018         __lll_mutex_{lock,unlock}_*.
1019         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
1020         lowlevellock.h.
1021         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
1022         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
1023         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1024         (__condvar_tw_cleanup): Likewise.
1025         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
1026         lowlevellock.h.
1027         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
1028         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
1029         __lll_mutex_{lock,unlock}_*.
1030         ( __condvar_w_cleanup): Likewise.
1031         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
1032         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1033         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
1034         lowlevellock.h.
1035         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1036         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
1037         __lll_mutex_{lock,unlock}_*.
1038         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
1039         lowlevellock.h.
1040         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1041         FUTEX_PRIVATE_FLAG): Remove.
1042         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
1043         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1044         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
1045         lowlevellock.h.
1046         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1047         FUTEX_PRIVATE_FLAG): Remove.
1048         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
1049         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
1050         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
1051         lowlevellock.h.
1052         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1053         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
1054         __lll_mutex_{lock,unlock}_*.
1055         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
1056         lowlevellock.h.
1057         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1058         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
1059         __lll_mutex_{lock,unlock}_*.
1060         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
1061         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
1062         (__new_sem_post): Use standard initial exec code sequences.
1063         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
1064         lowlevellock.h.
1065         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
1066         FUTEX_PRIVATE_FLAG): Remove.
1067         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
1068         exec code sequences.
1069         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
1070         (__new_sem_trywait): Use standard initial exec code sequences.
1071         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
1072         (__new_sem_wait): Use standard initial exec code sequences.
1074 2007-07-31  Anton Blanchard  <anton@samba.org>
1076         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1077         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
1078         atomic_full_barrier.
1080 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1082         * allocatestack.c (stack_cache_lock): Change type to int.
1083         (get_cached_stack, allocate_stack, __deallocate_stack,
1084         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1085         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1086         as second argument to lll_lock and lll_unlock macros on
1087         stack_cache_lock.
1088         * pthread_create.c (__find_in_stack_list): Likewise.
1089         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1090         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1091         as second argument.
1092         * descr.h (struct pthread): Change lock and setxid_futex field
1093         type to int.
1094         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1095         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1096         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1097         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1098         Likewise.
1099         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1100         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1101         * pthreadP.h (__attr_list_lock): Change type to int.
1102         * pthread_attr_init.c (__attr_list_lock): Likewise.
1103         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1104         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1105         lll_{,un}lock.
1106         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1107         also for lll_futex_{wake,wait}.
1108         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1109         a pointer to const.
1110         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1111         LLL_SHARED as second argument to lll_{,un}lock.
1112         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1113         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1114         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1115         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1116         Likewise.
1117         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1118         as second argument to lll_{,un}lock macros on pd->lock.
1119         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1120         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1121         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1122         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1123         Likewise.
1124         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1125         Likewise.
1126         * pthread_once.c (once_lock): Change type to int.
1127         (__pthread_once): Pass LLL_PRIVATE as second argument to
1128         lll_{,un}lock macros on once_lock.
1129         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1130         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1131         rwlock->__data.__shared as second argument to them and similarly
1132         for lll_futex_w*.
1133         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1134         Likewise.
1135         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1136         Likewise.
1137         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1138         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1139         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1140         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1141         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1142         to lll_{,un}lock macros on __sem_mappings_lock.
1143         * sem_open.c (check_add_mapping): Likewise.
1144         (__sem_mappings_lock): Change type to int.
1145         * semaphoreP.h (__sem_mappings_lock): Likewise.
1146         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1147         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1148         instead of lll_*mutex_*, pass LLL_SHARED as last
1149         argument.
1150         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1151         pass LLL_SHARED as last argument.
1152         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1153         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1154         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1155         pass LLL_SHARED as last argument.
1156         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1157         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1158         LLL_SHARED as last argument.
1159         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1160         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1161         Similarly.
1162         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1163         __libc_lock_lock_recursive, __libc_lock_unlock,
1164         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1165         argument to lll_{,un}lock.
1166         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1167         _IO_lock_unlock): Likewise.
1168         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1169         compound literal.
1170         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1171         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1172         __fork_lock.
1173         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1174         free_mem): Likewise.
1175         (__fork_lock): Change type to int.
1176         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1177         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1178         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1179         lll_futex_wake.
1180         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1181         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1182         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1183         New function.
1184         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1185         pass it through to lll_futex_*wait, only compile in when
1186         IS_IN_libpthread.
1187         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1188         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1189         argument and pass it through to lll_futex_*wait.
1190         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1191         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1192         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1193         inline functions to __lll_* resp. __lll_robust_*.
1194         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1195         (lll_mutex_dead): Add private argument.
1196         (__lll_lock_wait_private): New prototype.
1197         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1198         __lll_robust_lock_timedwait): Add private argument to prototypes.
1199         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1200         call __lll_lock_wait_private, otherwise pass private to
1201         __lll_lock_wait.
1202         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1203         __lll_robust_timedlock): Add private argument, pass it to
1204         __lll_*wait functions.
1205         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1206         call __lll_unlock_wake_private, otherwise pass private to
1207         __lll_unlock_wake.
1208         (__lll_robust_unlock): Add private argument, pass it to
1209         __lll_robust_unlock_wake.
1210         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1211         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1212         argument, pass it through to __lll_* inline function.
1213         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1214         (lll_lock_t): Remove.
1215         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1216         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1217         lll_cond_wake, lll_cond_broadcast): Remove.
1218         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1219         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1220         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1221         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1222         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1223         the header from assembler.  Renamed all lll_mutex_* resp.
1224         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1225         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1226         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1227         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1228         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1229         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1230         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1231         Remove prototype.
1232         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1233         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1234         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1235         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1236         MULTIPLE_THREADS_OFFSET as another asm operand.
1237         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1238         MULTIPLE_THREADS_OFFSET as last asm operand, call
1239         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1240         otherwise pass private as another argument to __lll_lock_wait.
1241         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1242         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1243         private as another argument to __lll_*lock_wait call.
1244         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1245         MULTIPLE_THREADS_OFFSET as another asm operand, call
1246         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1247         otherwise pass private as another argument to __lll_unlock_wake.
1248         (lll_robust_unlock): Add private argument, pass private as another
1249         argument to __lll_unlock_wake.
1250         (lll_robust_dead): Add private argument, use __lll_private_flag
1251         macro.
1252         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1253         LLL_MUTEX_LOCK_INITIALIZER.
1254         (lll_lock_t): Remove.
1255         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1256         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1257         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1258         lll_cond_wake, lll_cond_broadcast): Remove.
1259         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1260         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1261         2007-05-2{3,9} changes.
1262         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1263         kernel-features.h and lowlevellock.h.
1264         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1265         (LOAD_FUTEX_WAIT): Rewritten.
1266         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1267         define.
1268         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1269         (__lll_mutex_lock_wait): Rename to ...
1270         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1271         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1272         (__lll_mutex_timedlock_wait): Rename to ...
1273         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1274         contains private argument.  Don't compile in for libc.so.
1275         (__lll_mutex_unlock_wake): Rename to ...
1276         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1277         Don't compile in for libc.so.
1278         (__lll_timedwait_tid): Use __NR_gettimeofday.
1279         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1280         kernel-features.h and lowlevellock.h.
1281         (LOAD_FUTEX_WAIT): Define.
1282         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1283         define.
1284         (__lll_robust_mutex_lock_wait): Rename to ...
1285         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1286         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1287         macro.
1288         (__lll_robust_mutex_timedlock_wait): Rename to ...
1289         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1290         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1291         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1292         lowlevellock.h.
1293         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1294         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1295         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1296         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1297         to __lll_lock_wait in %edx.
1298         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1299         Include lowlevellock.h and pthread-errnos.h.
1300         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1301         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1302         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1303         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1304         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1305         __lll_unlock_wake.
1306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1307         Include lowlevellock.h and pthread-errnos.h.
1308         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1309         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1310         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1311         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1312         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1313         __lll_unlock_wake.
1314         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1315         Include lowlevellock.h.
1316         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1317         Don't define.
1318         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1319         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1320         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1321         __lll_unlock_wake.  Use __NR_gettimeofday.
1322         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1323         Include lowlevellock.h.
1324         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1325         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1326         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1327         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1328         and __lll_unlock_wake.
1329         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1330         Include lowlevellock.h.
1331         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1332         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1333         MUTEX(%ebx) address in %edx rather than %ecx to
1334         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1335         and __lll_unlock_wake.  Move return value from %ecx to %edx
1336         register.
1337         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1338         Include lowlevellock.h.
1339         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1340         Don't define.
1341         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1342         MUTEX(%ebp) address in %edx rather than %ecx to
1343         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1344         and __lll_unlock_wake.  Move return value from %ecx to %edx
1345         register.  Use __NR_gettimeofday.
1346         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1347         Include lowlevellock.h.
1348         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1349         Don't define.
1350         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1351         MUTEX(%ebp) address in %edx rather than %ecx to
1352         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1353         and __lll_unlock_wake.  Move return value from %ecx to %edx
1354         register.  Use __NR_gettimeofday.
1355         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1356         Include lowlevellock.h.
1357         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1358         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1359         MUTEX(%edi) address in %edx rather than %ecx to
1360         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1361         and __lll_unlock_wake.
1362         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1363         Include lowlevellock.h.
1364         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1365         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1366         MUTEX(%ebx) address in %edx rather than %ecx to
1367         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1368         and __lll_unlock_wake.  Move return value from %ecx to %edx
1369         register.
1370         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1371         lowlevellock.h.
1372         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1373         define.
1374         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1375         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1376         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1377         lowlevellock.h.
1378         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1379         (sem_timedwait): Use __NR_gettimeofday.
1380         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1381         lowlevellock.h.
1382         (LOCK): Don't define.
1383         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1384         lowlevellock.h.
1385         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1386         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1387         are waiters.
1388         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1389         2007-05-2{3,9} changes.
1390         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1391         kernel-features.h and lowlevellock.h.
1392         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1393         (LOAD_FUTEX_WAIT): Rewritten.
1394         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1395         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1396         (__lll_mutex_lock_wait): Rename to ...
1397         (__lll_lock_wait): ... this.  %esi is now private argument.
1398         Don't compile in for libc.so.
1399         (__lll_mutex_timedlock_wait): Rename to ...
1400         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1401         Don't compile in for libc.so.
1402         (__lll_mutex_unlock_wake): Rename to ...
1403         (__lll_unlock_wake): ... this.  %esi contains private argument.
1404         Don't compile in for libc.so.
1405         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1406         kernel-features.h and lowlevellock.h.
1407         (LOAD_FUTEX_WAIT): Define.
1408         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1409         (__lll_robust_mutex_lock_wait): Rename to ...
1410         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1411         Use LOAD_FUTEX_WAIT macro.
1412         (__lll_robust_mutex_timedlock_wait): Rename to ...
1413         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1414         private, use LOAD_FUTEX_WAIT macro.
1415         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1416         lowlevellock.h.
1417         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1418         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1419         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1420         __lll_lock_wait and __lll_unlock_wake.
1421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1422         Include lowlevellock.h and pthread-errnos.h.
1423         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1424         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1425         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1426         pass LLL_SHARED in %esi to both __lll_lock_wait and
1427         __lll_unlock_wake.
1428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1429         Include lowlevellock.h and pthread-errnos.h.
1430         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1431         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1432         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1433         pass LLL_SHARED in %esi to both __lll_lock_wait and
1434         __lll_unlock_wake.
1435         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1436         Include lowlevellock.h.
1437         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1438         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1439         pass LLL_SHARED in %esi to both __lll_lock_wait and
1440         __lll_unlock_wake.
1441         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1442         Include lowlevellock.h.
1443         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1444         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1445         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1446         and __lll_unlock_wake.
1447         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1448         Include lowlevellock.h.
1449         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1450         Don't define.
1451         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1452         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1453         and __lll_unlock_wake.
1454         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1455         Include lowlevellock.h.
1456         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1457         Don't define.
1458         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1459         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1460         and __lll_unlock_wake.
1461         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1462         Include lowlevellock.h.
1463         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1464         Don't define.
1465         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1466         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1467         and __lll_unlock_wake.
1468         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1469         Include lowlevellock.h.
1470         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1471         Don't define.
1472         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1473         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1474         and __lll_unlock_wake.
1475         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1476         Include lowlevellock.h.
1477         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1478         Don't define.
1479         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1480         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1481         and __lll_unlock_wake.
1482         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1483         lowlevellock.h.
1484         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1485         define.
1486         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1487         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1488         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1489         lowlevellock.h.
1490         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1491         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1492         lowlevellock.h.
1493         (LOCK): Don't define.
1494         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1495         lowlevellock.h.
1496         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1497         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1498         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1499         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1500         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1501         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1502         (__lll_lock_wait_private): New function.
1503         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1504         it to lll_futex_*wait.  Don't compile in for libc.so.
1505         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1506         Remove.
1507         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1508         (struct sparc_pthread_barrier): Remove.
1509         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1510         struct sparc_pthread_barrier.  Pass
1511         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1512         and lll_futex_wait macros.
1513         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1514         Remove.
1515         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1516         Include sparc pthread_barrier_wait.c instead of generic one.
1518 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1520         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1522         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1523         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1524         %ecx.
1525         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1526         (pthread_rwlock_timedwrlock): Likewise.
1527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1528         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1530 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1532         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1534 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1536         * tst-locale2.c (useless): Add return statement.
1538 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1540         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1541         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1542         * pthread_create.c (start_thread): Likewise.
1543         * init.c (sighandler_setxid): Likewise.
1544         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1545         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1546         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1547         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1548         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1549         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1550         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1551         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1552         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1553         Likewise.
1554         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1555         Likewise.
1556         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1557         Likewise.
1558         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1559         __rtld_notify): Likewise.
1560         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1561         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1562         __pthread_once): Likewise.
1563         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1564         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1565         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1566         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1567         (lll_futex_wait): Add private argument, define as wrapper around
1568         lll_futex_timed_wait.
1569         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1570         use __lll_private_flag macro.
1571         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1572         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1573         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1574         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1575         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1576         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1577         (lll_futex_wait): Add private argument, define as wrapper around
1578         lll_futex_timed_wait.
1579         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1580         use __lll_private_flag macro.
1581         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1582         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1583         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1584         Define.
1585         (lll_futex_timed_wait, lll_futex_wake): Use it.
1586         (lll_private_futex_wait, lll_private_futex_timed_wait,
1587         lll_private_futex_wake): Removed.
1588         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1589         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1590         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1591         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1592         (lll_futex_wait): Add private argument, define as wrapper around
1593         lll_futex_timed_wait.
1594         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1595         use __lll_private_flag macro.
1596         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1597         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1598         to lll_futex_*.
1599         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1600         (lll_private_futex_wait, lll_private_futex_timed_wait,
1601         lll_private_futex_wake): Removed.
1602         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1603         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1604         (lll_private_futex_wait, lll_private_futex_timed_wait,
1605         lll_private_futex_wake): Removed.
1606         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1607         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1608         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1609         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1610         (lll_futex_wait): Add private argument, define as wrapper around
1611         lll_futex_timed_wait.
1612         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1613         use __lll_private_flag macro.
1614         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1615         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1616         to lll_futex_*.
1617         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1618         Define.
1619         (lll_futex_timed_wait, lll_futex_wake): Use it.
1620         (lll_private_futex_wait, lll_private_futex_timed_wait,
1621         lll_private_futex_wake): Removed.
1623 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1625         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1626         of the structure for sparc32.
1628 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1630         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1632 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1634         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1635         code used when private futexes are assumed.
1636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1637         Likewise.
1639 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1641         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1642         (__lll_private_flag): Define.
1643         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1644         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1645         __lll_private_flag.
1646         (lll_private_futex_wait, lll_private_futex_timedwait,
1647         lll_private_futex_wake): Define as wrapper around non-_private
1648         macros.
1649         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1650         (__lll_private_flag): Define.
1651         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1652         (lll_private_futex_wait, lll_private_futex_timedwait,
1653         lll_private_futex_wake): Define as wrapper around non-_private
1654         macros.
1656 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1658         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1659         parameter to lll_futex_wait call.
1660         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1662         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1663         Replace lll_futex_wait with lll_private_futex_wait.
1664         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1665         Add LLL_SHARED parameter to lll_futex_wake().
1667         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1668         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1669         lll_private_futex_wake.
1670         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1671         bit from private parm before syscall.
1672         (lll_futex_timed_wait): Likewise.
1673         (lll_futex_wake): Likewise.
1674         (lll_futex_wake_unlock): Likewise.
1675         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1676         (lll_robust_mutex_unlock): Likewise.
1677         (lll_mutex_unlock_force): Likewise.
1678         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1680 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1682         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1683         compilation when unconditionally using private futexes.
1684         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1685         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1686         Likewise.
1687         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1688         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1690 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1692         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1693         Define.
1695 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1697         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1698         kernel-features.h.
1700 2007-05-16  Roland McGrath  <roland@redhat.com>
1702         * init.c (__nptl_initial_report_events): New variable.
1703         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1704         to that.
1706 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1708         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1709         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1711 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1713         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1714         implementation.
1716 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1718         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1719         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1720         * pthread_mutex_timedlock.c: Likewise.
1721         * pthread_mutex_trylock.c: Likewise.
1722         * pthread_mutex_unlock.c: Likewise.
1724 2007-06-17  Andreas Schwab  <schwab@suse.de>
1726         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1727         sections.
1729 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1731         * allocatestack.c (allocate_stack): Make code compile if
1732         __ASSUME_PRIVATE_FUTEX is set.
1734 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1736         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1737         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1738         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1739         (__pthread_rwlock_wrlock): Likewise.
1740         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1741         (pthread_rwlock_timedrdlock): Likewise.
1742         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1743         (pthread_rwlock_timedwrlock): Likewise.
1744         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1745         (__pthread_rwlock_unlock): Likewise.
1747 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1749         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1750         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1751         Split __flags into __flags, __shared, __pad1 and __pad2.
1752         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1753         futexes if they are available.
1754         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1755         in libc-lowlevellock.S allow using private futexes.
1756         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1757         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1758         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1759         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1760         lll_private_futex_timed_wait and lll_private_futex_wake.
1761         (lll_robust_mutex_unlock): Fix typo.
1762         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1763         field in futex command setup.
1764         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1765         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1766         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1767         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1768         if they are available.  Remove clear_once_control.
1769         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1770         futexes if they are available.
1771         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1772         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1773         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1774         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1775         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1776         Wake only when there are waiters.
1777         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1778         support.  Indicate that there are waiters.  Remove unnecessary
1779         extra cancellation test.
1780         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1781         left-over duplication of __sem_wait_cleanup.
1783 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1785         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1786         parameter to lll_futex_wait, lll_futex_timed_wait, and
1787         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1788         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1789         lll_private_futex_wake.
1790         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1791         * allocatestack.c: Adjust use of lll_futex_* macros.
1792         * init.c: Likewise.
1793         * lowlevellock.h: Likewise.
1794         * pthread_barrier_wait.c: Likewise.
1795         * pthread_cond_broadcast.c: Likewise.
1796         * pthread_cond_destroy.c: Likewise.
1797         * pthread_cond_signal.c: Likewise.
1798         * pthread_cond_timedwait.c: Likewise.
1799         * pthread_cond_wait.c: Likewise.
1800         * pthread_create.c: Likewise.
1801         * pthread_mutex_lock.c: Likewise.
1802         * pthread_mutex_setprioceiling.c: Likewise.
1803         * pthread_mutex_timedlock.c: Likewise.
1804         * pthread_mutex_unlock.c: Likewise.
1805         * pthread_rwlock_timedrdlock.c: Likewise.
1806         * pthread_rwlock_timedwrlock.c: Likewise.
1807         * pthread_rwlock_unlock.c: Likewise.
1808         * sysdeps/alpha/tls.h: Likewise.
1809         * sysdeps/i386/tls.h: Likewise.
1810         * sysdeps/ia64/tls.h: Likewise.
1811         * sysdeps/powerpc/tls.h: Likewise.
1812         * sysdeps/pthread/aio_misc.h: Likewise.
1813         * sysdeps/pthread/gai_misc.h: Likewise.
1814         * sysdeps/s390/tls.h: Likewise.
1815         * sysdeps/sh/tls.h: Likewise.
1816         * sysdeps/sparc/tls.h: Likewise.
1817         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1818         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1819         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1820         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1821         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1822         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1823         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1824         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1825         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1826         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1827         Likewise.
1828         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1829         * sysdeps/x86_64/tls.h: Likewise.
1831 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1833         * pthread_getattr_np.c: No need to install a cancellation handler,
1834         this is no cancellation point.
1835         * pthread_getschedparam.c: Likewise.
1836         * pthread_setschedparam.c: Likewise.
1837         * pthread_setschedprio.c: Likewise.
1838         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1839         lll_unlock_wake_cb.
1840         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1841         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1842         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1843         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1844         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1845         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1846         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1847         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1848         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1849         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1850         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1851         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1853         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1854         whether there are more than one thread makes no sense here since
1855         we only call the slow path if the locks are taken.
1856         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1858         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1859         COND_NWAITERS_SHIFT.
1860         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1861         COND_CLOCK_BITS.
1862         * pthread_cond_init.c: Likewise.
1863         * pthread_cond_timedwait.c: Likewise.
1864         * pthread_cond_wait.c: Likewise.
1865         * pthread_condattr_getclock.c: Likewise.
1866         * pthread_condattr_setclock.c: Likewise.
1867         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1871         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1873 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1875         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1876         unistd.h.
1878         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1879         insn suffix.
1880         (THREAD_GSCOPE_GET_FLAG): Remove.
1881         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1882         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1883         changes.
1884         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1885         (THREAD_GSCOPE_GET_FLAG): Remove.
1886         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1887         instead of THREAD_GSCOPE_GET_FLAG.
1888         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1889         it.
1890         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1891         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1892         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1893         THREAD_GSCOPE_WAIT): Define.
1894         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1895         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1896         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1897         THREAD_GSCOPE_WAIT): Define.
1898         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1899         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1900         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1901         THREAD_GSCOPE_WAIT): Define.
1902         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1903         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1904         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1905         THREAD_GSCOPE_WAIT): Define.
1907 2007-05-24  Richard Henderson  <rth@redhat.com>
1909         * descr.h (struct pthread): Add header.gscope_flag.
1910         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1911         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1912         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1913         THREAD_GSCOPE_WAIT): Define.
1915 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1917         * init.c: Make it compile with older kernel headers.
1919         * tst-initializers1.c: Show through exit code which test failed.
1921         * pthread_rwlock_init.c: Also initialize __shared field.
1922         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1923         element in rwlock structure into four byte elements.  One of them is
1924         the new __shared element.
1925         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1926         Likewise.
1927         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1928         __shared, adjust names of other padding elements.
1929         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1930         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1931         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1932         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1933         FUTEX_PRIVATE_FLAG.
1934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1935         futex to use private operations if possible.
1936         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1937         Likewise.
1938         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1939         Likewise.
1940         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1942         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1943         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1944         Likewise.
1945         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1946         Likewise.
1947         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1948         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1950 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1952         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1953         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1954         * pthread_rwlock_timedrdlock.c: Likewise.
1955         * pthread_rwlock_tryrdlock.c: Likewise.
1957         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1958         optimization.
1960         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1961         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1962         duplication of __sem_wait_cleanup.
1964         * allocatestack.c: Revert last change.
1965         * init.c: Likewise.
1966         * sysdeps/i386/tls.h: Likewise.
1967         * sysdeps/x86_64/tls.h: Likewise.
1968         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1969         header structure.
1970         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1972         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1973         Add private field.
1974         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1975         * pthread_barrier_init.c: Set private flag if pshared and private
1976         futexes are supported.
1977         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1978         private field in futex command setup.
1979         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1981 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1983         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1984         support.
1985         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1986         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1987         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1988         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1989         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1991         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1992         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1993         fields in the structure.
1994         (__old_sem_init): New function.
1995         * sem_open.c: Initialize all fields of the structure.
1996         * sem_getvalue.c: Adjust for renamed element.
1997         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1998         (gen-as-const-headers): Add structsem.sym.
1999         * sysdeps/unix/sysv/linux/structsem.sym: New file.
2000         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
2001         struct new_sem.  Add struct old_sem.
2002         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
2003         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
2004         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
2005         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
2006         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2007         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
2008         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
2009         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2010         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2011         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
2012         * tst-sem10.c: New file.
2013         * tst-sem11.c: New file.
2014         * tst-sem12.c: New file.
2015         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
2016         of struct sem.
2018 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
2019             Jakub Jelinek  <jakub@redhat.com>
2021         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
2022         Move __pthread_enable_asynccancel right before futex syscall.
2023         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
2024         Likewise.
2026 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
2028         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
2029         THREAD_COPY_PRIVATE_FUTEX): Define.
2030         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
2031         THREAD_COPY_PRIVATE_FUTEX): Define.
2032         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
2033         * init.c (__pthread_initialize_minimal_internal): Use
2034         THREAD_SET_PRIVATE_FUTEX.
2036         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
2037         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
2038         THREAD_GSCOPE_FLAG_WAIT): Define.
2039         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
2040         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
2041         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
2042         PTR_DEMANGLE.
2043         (THREAD_GSCOPE_GET_FLAG): Define.
2044         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
2045         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
2046         instead of ->header.gscope_flag directly.
2048 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
2050         * init.c (__pthread_initialize_minimal_internal): Check whether
2051         private futexes are available.
2052         * allocatestack.c (allocate_stack): Copy private_futex field from
2053         current thread into the new stack.
2054         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
2055         futexes if they are available.
2056         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
2057         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
2058         in libc-lowlevellock.S allow using private futexes.
2059         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2060         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
2061         FUTEX_PRIVATE_FLAG.
2062         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
2063         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
2064         if they are available.
2065         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
2066         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
2067         * sysdeps/i386/tcb-offsets.sym: Likewise.
2068         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
2069         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
2071 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
2073         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2074         Remove ptr_wait_lookup_done again.
2075         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
2076         (__pthread_initialize_minimal_internal): Initialize
2077         _dl_wait_lookup_done pointer in _rtld_global directly.
2078         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2079         Remove code to code _dl_wait_lookup_done.
2080         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2081         encrypted for now.
2083 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2085         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2086         pthread_mutex_init failed with ENOTSUP.
2088 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2090         * allocatestack.c (__wait_lookup_done): New function.
2091         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2092         Add ptr_wait_lookup_done.
2093         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2094         * pthreadP.h: Declare __wait_lookup_done.
2095         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2096         Define macros to implement reference handling of global scope.
2097         * sysdeps/x86_64/tls.h: Likewise.
2098         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2099         Initialize GL(dl_wait_lookup_done).
2101 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2103         [BZ #4512]
2104         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2105         is detected.
2106         * pthread_mutex_timedlock.c: Likewise.
2107         * pthread_mutex_trylock.c: Likewise.
2108         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2110         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2111         * tst-robust9.c: New file.
2112         * tst-robustpi9.c: New file.
2114         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2115         unnecessary extra cancellation test.
2117 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2119         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2120         extra cancellation test.
2121         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2123 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2125         * descr.h (struct pthread): Rearrange members to fill hole in
2126         64-bit layout.
2128         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2129         (__pthread_setaffinity_new): If syscall was successful and
2130         RESET_VGETCPU_CACHE is defined, use it before returning.
2131         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2133 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2135         [BZ #4455]
2136         * tst-align2.c: Include stackinfo.h.
2137         * tst-getpid1.c: Likewise.
2139 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2141         [BZ #4455]
2142         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2143         * tst-getpid1.c (do_test): Likewise.
2145         [BZ #4456]
2146         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2147         (allocate_stack): Likewise.
2149 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2151         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2152         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2153         (__lll_robust_timedlock_wait): Likewise.
2154         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2156 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2158         [BZ #4465]
2159         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2160         * tst-cancel4.c (tf_fdatasync): New test.
2162 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2164         [BZ #4392]
2165         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2166         check mutexes like normal mutexes.
2168         [BZ #4306]
2169         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2170         Initialize the whole sigevent structure to appease valgrind.
2172 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2174         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2175         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2177 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2179         * tst-locale1.c: Avoid warnings.
2180         * tst-locale2.c: Likewise.
2182 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2184         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2185         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2187 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2189         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2190         __extern_always_inline where appropriate.
2191         * sysdeps/pthread/pthread.h: Likewise.
2193 2007-03-13  Richard Henderson  <rth@redhat.com>
2195         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2196         separate cfi regions for the two subsections.
2198 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2200         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2201         new thread, don't just decrement it.
2202         Patch by Suzuki K P <suzuki@in.ibm.com>.
2204 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2206         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2207         PTHFCT_CALL definition.
2209 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2211         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2212         available, don't use it.
2214 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2216         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2217         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2218         call into the kernel to delay.
2220 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2222         * tst-initializers1.c: We want to test the initializers as seen
2223         outside of libc, so undefined _LIBC.
2225         * pthread_join.c (cleanup): Avoid warning.
2227 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2229         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2230         (__lll_timedwait_tid): Add unwind info.
2232         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2233         function table, mangle the pointers.
2234         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2235         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2236         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2237         demangle pointers before use.
2238         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2239         demangle pointer.
2240         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2241         * sysdeps/pthread/setxid.h: Likewise.
2243 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2245         * tst-rwlock7.c: Show some more information in case of correct
2246         behavior.
2248 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2251         (lll_futex_timed_wait): Undo part of last change, don't negate
2252         return value.
2254 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2256         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2257         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2259 2006-12-28  David S. Miller  <davem@davemloft.net>
2261         * shlib-versions: Fix sparc64 linux target specification.
2263 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2265         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2266         Adjust include path for pthread_barrier_wait.c move.
2268 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2270         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2271         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2273 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2275         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2276         6 argument cancellable syscalls.
2277         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2278         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2279         6 argument cancellable syscalls.
2280         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2282 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2284         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2285         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2287 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2289         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2290         __sync_lock_release instead of __sync_lock_release_si.
2292 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2294         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2295         Define.
2296         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2297         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2298         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2299         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2300         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2301         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2302         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2303         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2304         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2305         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2306         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2308 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2310         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2311         * pthread_barrier_wait.c: ...here.
2312         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2313         * pthread_cond_broadcast.c: ...here.
2314         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2315         * pthread_cond_signal.c: ...here.
2316         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2317         * pthread_cond_timedwait.c: ...here.
2318         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2319         * pthread_cond_wait.c: ...here.
2320         * sysdeps/pthread/pthread_once.c: Move to...
2321         * pthread_once.c: ...here.
2322         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2323         * pthread_rwlock_rdlock.c: ...here.
2324         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2325         * pthread_rwlock_timedrdlock.c: ...here.
2326         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2327         * pthread_rwlock_timedwrlock.c: ...here.
2328         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2329         * pthread_rwlock_unlock.c: ...here.
2330         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2331         * pthread_rwlock_wrlock.c: ...here.
2332         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2333         * pthread_spin_destroy.c: ...here.
2334         * sysdeps/pthread/pthread_spin_init.c: Move to...
2335         * pthread_spin_init.c: ...here.
2336         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2337         * pthread_spin_unlock.c: ...here.
2338         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2339         * pthread_getcpuclockid.c: ...here.
2341         * init.c: USE_TLS support is now always enabled.
2342         * tst-tls5.h: Likewise.
2343         * sysdeps/alpha/tls.h: Likewise.
2344         * sysdeps/i386/tls.h: Likewise.
2345         * sysdeps/ia64/tls.h: Likewise.
2346         * sysdeps/powerpc/tls.h: Likewise.
2347         * sysdeps/s390/tls.h: Likewise.
2348         * sysdeps/sh/tls.h: Likewise.
2349         * sysdeps/sparc/tls.h: Likewise.
2350         * sysdeps/x86_64/tls.h: Likewise.
2352 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2354         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2355         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2356         failed.
2358         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2359         Define to THREAD_SELF->header.multiple_threads.
2360         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2361         Likewise.
2362         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2363         Likewise.
2364         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2365         (SINGLE_THREAD_P): Likewise.
2366         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2367         (SINGLE_THREAD_P): Likewise.
2368         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2369         (SINGLE_THREAD_P): Likewise.
2370         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2371         (SINGLE_THREAD_P): Likewise.
2372         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2373         Likewise.
2374         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2375         (SINGLE_THREAD_P): Likewise.
2376         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2377         (SINGLE_THREAD_P): Likewise.
2378         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2379         Likewise.
2381 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2383         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2384         by default rather than 2_3_3.
2386 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2388         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2389         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2390         atomic_* instead of catomic_* macros.
2392 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2394         [BZ #3285]
2395         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2396         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2397         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2398         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2399         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2400         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2401         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2402         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2403         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2404         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2405         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2406         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2407         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2409 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2411         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2412         cancelable syscalls with six parameters.
2414         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2415         operations instead of atomic_*.
2417 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2419         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2421 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2423         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2424         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2425         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2426         New file.
2427         * pthread_attr_setstack.c: Allow overwriting the version number of the
2428         new symbol.
2429         * pthread_attr_setstacksize.c: Likewise.
2430         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2431         it.
2432         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2433         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2435 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2437         [BZ #3251]
2438         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2439         Patch by Petr Baudis.
2441 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2443         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2445         * tst-cancel2.c (tf): Loop as long as something was written.
2447 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2449         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2450         mutexes wake all mutexes.
2451         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2452         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2453         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2455 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2457         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2458         to guarantee the thread is always canceled.
2460 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2462         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2463         Include stdlib.h.
2464         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2465         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2466         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2467         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2468         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2470 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2472         [BZ #3123]
2473         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2474         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2476         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2477         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2478         * Makefile (tests): Add tst-cond22.
2479         * tst-cond22.c: New file.
2481 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2483         [BZ #3124]
2484         * descr.h (struct pthread): Add parent_cancelhandling.
2485         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2486         cancelhandling value to child.
2487         * pthread_create.c (start_thread): If parent thread was canceled
2488         reset the SIGCANCEL mask.
2489         * Makefile (tests): Add tst-cancel25.
2490         * tst-cancel25.c: New file.
2492 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2493             Ulrich Drepper  <drepper@redhat.com>
2495         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2496         counterp if it is already zero.
2497         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2499 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2500             Roland McGrath  <roland@redhat.com>
2502         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2503         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2504         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2505         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2506         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2507         lll_robust_mutex_timedlock, lll_mutex_unlock,
2508         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2509         Add _L_*_ symbols around the subsection.
2510         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2511         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2513 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2514             Roland McGrath  <roland@redhat.com>
2516         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2517         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2518         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2519         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2520         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2521         lll_robust_mutex_timedlock, lll_mutex_unlock,
2522         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2523         Add _L_*_ symbols around the subsection.
2524         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2525         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2527 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2529         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2530         change because it can disturb too much existing code.  If real hard
2531         reader preference is needed we'll introduce another type.
2532         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2533         (pthread_rwlock_timedwrlock): Likewise.
2534         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2535         Likewise.
2537 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2539         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2540         reader preference.
2541         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2542         (pthread_rwlock_timedwrlock): Likewise.
2543         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2544         Likewise.
2546 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2548         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2549         Only define ifdef SHARED.
2551 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2553         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2554         (free_stacks): ...here.
2555         (__free_stack_cache): New function.
2556         * pthreadP.h: Declare __free_stack_cache.
2557         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2558         ptr_freeres.
2559         * init.c (pthread_functions): Initialize ptr_freeres.
2560         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2561         New freeres function.
2563 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2565         [BZ #3018]
2566         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2568 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2570         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2571         _XOPEN_REALTIME_THREADS.
2573 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2575         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2576         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2577         HAVE_CLOCK_GETTIME_VSYSCALL.
2578         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2580 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2582         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2583         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2584         * descr.h (struct priority_protection_data): New type.
2585         (struct pthread): Add tpp field.
2586         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2587         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2588         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2589         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2590         TPP mutexes.
2591         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2592         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2593         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2594         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2595         * tpp.c: New file.
2596         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2597         boosted by TPP.
2598         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2599         * pthread_mutexattr_getprioceiling.c
2600         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2601         in the SCHED_FIFO priority range.
2602         * pthread_mutexattr_setprioceiling.c
2603         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2604         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2605         if mutex is not TPP.  Ceiling is now in __data.__lock.
2606         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2607         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2608         is now in __data.__lock.  Add locking.
2609         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2610         * Makefile (libpthread-routines): Add tpp.
2611         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2612         * tst-tpp.h: New file.
2613         * tst-mutexpp1.c: New file.
2614         * tst-mutexpp6.c: New file.
2615         * tst-mutexpp10.c: New file.
2616         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2617         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2619 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2621         [BZ #2843]
2622         * pthread_join.c (pthread_join): Account for self being canceled
2623         when checking for deadlocks.
2624         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2625         (tf1): Don't print anything after pthread_join returns, this would be
2626         another cancellation point.
2627         (tf2): Likewise.
2628         * tst-join6.c: New file.
2629         * Makefile (tests): Add tst-join6.
2631 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2633         [BZ #2892]
2634         * pthread_setspecific.c (__pthread_setspecific): Check
2635         out-of-range index before checking for unused key.
2637         * sysdeps/pthread/gai_misc.h: New file.
2639 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2641         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2642         file.  Don't use sysctl.
2643         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2644         overwrite the file if this is likely not true.
2646 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2648         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2649         * Makefile (tests): Add tst-getpid3.
2650         * tst-getpid3.c: New file.
2652 2006-07-30  Roland McGrath  <roland@redhat.com>
2654         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2656         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2657         (pause_not_cancel): New macro.
2658         (nanosleep_not_cancel): New macro.
2659         (sigsuspend_not_cancel): New macro.
2660         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2661         nanosleep_not_cancel macro from <not-cancel.h>.
2662         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2663         macro from <not-cancel.h>.
2665 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2666             Jakub Jelinek  <jakub@redhat.com>
2668         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2669         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2670         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2671         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2672         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2673         * pthread_mutex_lock.c: Likewise.
2674         * pthread_mutex_timedlock.c: Likewise.
2675         * pthread_mutex_trylock.c: Likewise.
2676         * pthread_mutex_unlock.c: Likewise.
2677         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2678         all mutexes.
2679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2680         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2681         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2682         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2683         pthread-pi-defines.sym.
2684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2685         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2686         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2687         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2688         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2689         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2690         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2691         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2692         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2693         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2694         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2695         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2696         * tst-mutex2.c: Likewise.
2697         * tst-mutex3.c: Likewise.
2698         * tst-mutex4.c: Likewise.
2699         * tst-mutex5.c: Likewise.
2700         * tst-mutex6.c: Likewise.
2701         * tst-mutex7.c: Likewise.
2702         * tst-mutex7a.c: Likewise.
2703         * tst-mutex8.c: Likewise.
2704         * tst-mutex9.c: Likewise.
2705         * tst-robust1.c: Likewise.
2706         * tst-robust7.c: Likewise.
2707         * tst-robust8.c: Likewise.
2708         * tst-mutexpi1.c: New file.
2709         * tst-mutexpi2.c: New file.
2710         * tst-mutexpi3.c: New file.
2711         * tst-mutexpi4.c: New file.
2712         * tst-mutexpi5.c: New file.
2713         * tst-mutexpi6.c: New file.
2714         * tst-mutexpi7.c: New file.
2715         * tst-mutexpi7a.c: New file.
2716         * tst-mutexpi8.c: New file.
2717         * tst-mutexpi9.c: New file.
2718         * tst-robust1.c: New file.
2719         * tst-robust2.c: New file.
2720         * tst-robust3.c: New file.
2721         * tst-robust4.c: New file.
2722         * tst-robust5.c: New file.
2723         * tst-robust6.c: New file.
2724         * tst-robust7.c: New file.
2725         * tst-robust8.c: New file.
2726         * Makefile (tests): Add the new tests.
2728         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2729         * pthread_mutex_destroy.c: Remove unneeded label.
2731 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2733         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2734         computations to compile time.
2736 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2738         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2740 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2742         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2744 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2746         * pthread_key_create.c (__pthread_key_create): Do away with
2747         __pthread_keys_lock.
2749         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2750         (__kernel_cpumask_size): Mark as hidden.
2751         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2753         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2754         * semaphoreP.h (__sem_mappings_lock): Likewise.
2756 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2758         * pthread_atfork.c: Mark __dso_handle as hidden.
2760 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2762         [BZ #2644]
2763         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2764         the reload problem.  Change the one path in pthread_cancel_init
2765         which causes the problem.  Force gcc to reload.  Simplify callers.
2766         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2767         (_Unwind_GetBSP): Undo last patch.
2769 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2771         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2772         function pointer is reloaded after pthread_cancel_init calls.
2774         [BZ #2644]
2775         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2776         pointers are reloaded after pthread_cancel_init calls.
2778 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2780         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2781         __always_inline.
2783 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2785         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2786         Allocate new object which is passed to timer_sigev_thread so that
2787         the timer can be deleted before the new thread is scheduled.
2789 2006-04-26  Roland McGrath  <roland@redhat.com>
2791         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2793 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2795         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2796         suffix for conditional jumps.
2797         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2798         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2799         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2800         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2801         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2802         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2804         * init.c (sigcancel_handler): Compare with correct PID even if the
2805         thread is in the middle of a fork call.
2806         (sighandler_setxid): Likewise.
2807         Reported by Suzuki K P <suzuki@in.ibm.com> .
2809 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2811         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2813 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2815         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2816         fails [Coverity CID 105].
2818 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2820         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2822 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2824         [BZ #2505]
2825         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2826         Define __lll_rel_instr using lwsync.
2828 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2830         * allocatestack.c (allocate_stack): Always initialize robust_head.
2831         * descr.h: Define struct robust_list_head.
2832         (struct pthread): Use robust_list_head in robust mutex list definition.
2833         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2834         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2835         (__pthread_initialize_minimal_internal): Register robust_list with
2836         the kernel.
2837         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2838         Declare __set_robust_list_avail.
2839         * pthread_create.c (start_thread): Register robust_list of new thread.
2840         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2841         waiters.
2842         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2843         number of users, it's unreliable.
2844         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2845         set_robust_list syscall is available.
2846         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2847         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2848         Set robust_head.list_op_pending before trying to lock a robust mutex.
2849         * pthread_mutex_timedlock.c: Likewise.
2850         * pthread_mutex_trylock.c: Likewise.
2851         * pthread_mutex_unlock.c: Likewise for unlocking.
2852         * Makefile (tests): Add tst-robust8.
2853         * tst-robust8.c: New file.
2855 2006-03-08  Andreas Schwab  <schwab@suse.de>
2857         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2858         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2860 2006-03-05  Roland McGrath  <roland@redhat.com>
2862         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2863         and $config_os doesn't match *linux*.
2865 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2867         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2868         Use __syscall_error.
2869         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2870         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2871         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2872         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2873         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2874         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2876 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2878         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2880 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2882         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2883         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2884         mutex.
2885         (__lll_robust_timedlock_wait): Likewise.
2886         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2887         (__lll_robust_lock_wait): Likewise.
2888         (__lll_robust_timedlock_wait): Likewise.
2889         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2890         (__lll_robust_lock_wait): Likewise.
2891         (__lll_robust_timedlock_wait): Likewise.
2893 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2895         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2896         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2897         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2898         lll_robust_mutex_unlock): Define.
2899         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2901 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2903         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2904         instead of <clone.S>.
2906 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2908         * Makefile (libpthread-routines): Add
2909         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2910         and pthread_mutex_[sg]etprioceiling.
2911         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2912         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2913         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2914         pthread_mutex_setprioceiling.
2915         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2916         PTHREAD_PRIO_PROTECT): New enum values.
2917         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2918         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2919         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2920         prototypes.
2921         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2922         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2923         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2924         Define.
2925         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2926         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2927         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2928         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2929         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2930         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2931         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2932         protocol mutexes.
2933         * pthread_mutex_getprioceiling.c: New file.
2934         * pthread_mutex_setprioceiling.c: New file.
2935         * pthread_mutexattr_getprioceiling.c: New file.
2936         * pthread_mutexattr_setprioceiling.c: New file.
2937         * pthread_mutexattr_getprotocol.c: New file.
2938         * pthread_mutexattr_setprotocol.c: New file.
2940 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2942         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2944 2006-02-27  Roland McGrath  <roland@redhat.com>
2946         * sysdeps/pthread/Subdirs: List nptl here too.
2947         * configure (libc_add_on_canonical): New variable.
2949         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2951         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2952         self to get main source tree's file.
2953         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2954         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2955         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2956         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2957         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2958         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2959         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2960         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2961         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2962         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2963         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2964         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2965         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2967         * Makefile: Use $(sysdirs) in vpath directive.
2969         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2970         (CPPFLAGS-timer_routines.c): Likewise.
2972         * Makeconfig (includes): Variable removed.
2974 2006-02-26  Roland McGrath  <roland@redhat.com>
2976         * sysdeps/generic/pt-raise.c: Moved to ...
2977         * pt-raise.c: ... here.
2978         * sysdeps/generic/lowlevellock.h: Moved to ...
2979         * lowlevellock.h: ... here.
2981 2006-02-23  Roland McGrath  <roland@redhat.com>
2983         * descr.h (struct pthread): Add final member `end_padding'.
2984         (PTHREAD_STRUCT_END_PADDING): Use it.
2986 2006-02-20  Roland McGrath  <roland@redhat.com>
2988         * sysdeps/mips: Directory removed, saved in ports repository.
2989         * sysdeps/unix/sysv/linux/mips: Likewise.
2991 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2993         * tst-robust1.c: Add second mutex to check that the mutex list is
2994         handled correctly.
2996 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2998         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2999         lll_robust_mutex_trylock, lll_robust_mutex_lock,
3000         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
3001         lll_robust_mutex_unlock): New macros.
3002         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
3003         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
3004         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
3005         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
3006         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
3008 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3010         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
3011         definitions.
3012         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
3014 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
3016         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
3017         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
3018         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
3019         (lll_robust_mutex_unlock): Likewise.
3021 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
3023         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
3024         Set robust_list.__next rather than robust_list.
3025         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3026         (__pthread_list_t): New typedef.
3027         (pthread_mutex_t): Replace __next and __prev fields with __list.
3028         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
3029         (__pthread_list_t): New typedef.
3030         (pthread_mutex_t): Replace __next and __prev fields with __list.
3031         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3032         (__pthread_list_t, __pthread_slist_t): New typedefs.
3033         (pthread_mutex_t): Replace __next and __prev fields with __list.
3034         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
3035         (__pthread_list_t, __pthread_slist_t): New typedefs.
3036         (pthread_mutex_t): Replace __next and __prev fields with __list.
3037         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
3038         (__pthread_list_t, __pthread_slist_t): New typedefs.
3039         (pthread_mutex_t): Replace __next and __prev fields with __list.
3040         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
3041         (__pthread_slist_t): New typedef.
3042         (pthread_mutex_t): Replace __next field with __list.
3044 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
3046         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
3047         PTHREAD_MUTEX_OWNERDEAD.
3048         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
3049         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
3050         * Makefile (libpthread-routines): Add lowlevelrobustlock.
3051         * pthread_create.c (start_thread): Very much simplify robust_list loop.
3052         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
3053         to PTHREAD_MUTEX_INCONSISTENT.
3054         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
3055         * pthread_mutex_lock.c: Reimplement robust mutex handling.
3056         * pthread_mutex_trylock.c: Likewise.
3057         * pthread_mutex_timedlock.c: Likewise.
3058         * pthread_mutex_unlock.c: Likewise.
3059         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
3060         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
3061         lowlevelrobustlock.sym.
3062         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
3063         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
3064         definitions.
3065         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3066         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
3067         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
3068         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
3069         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
3071 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
3073         * allocatestack.c (allocate_stack): Initialize robust_list.
3074         * init.c (__pthread_initialize_minimal_internal): Likewise.
3075         * descr.h (struct xid_command): Pretty printing.
3076         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
3077         robust_list.  Adjust macros.
3078         * pthread_create.c (start_thread): Adjust robust_list handling.
3079         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
3080         but the owner for all robust mutex types.
3081         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3082         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3083         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3084         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3086         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3087         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3089 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3091         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3092         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3094 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3096         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3097         Return status.
3098         (lll_futex_timed_wait): Define.
3100 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3102         * tst-cancel4.c: Test ppoll.
3104 2006-01-18  Andreas Jaeger  <aj@suse.de>
3106         [BZ #2167]
3107         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3108         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3109         by Jim Gifford <patches@jg555.com>.
3111 2006-01-13  Richard Henderson  <rth@redhat.com>
3113         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3115 2006-01-10  Roland McGrath  <roland@redhat.com>
3117         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3118         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3119         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3120         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3121         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3122         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3123         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3124         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3125         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3126         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3128 2006-01-09  Roland McGrath  <roland@redhat.com>
3130         * tst-initializers1-c89.c: New file.
3131         * tst-initializers1-c99.c: New file.
3132         * tst-initializers1-gnu89.c: New file.
3133         * tst-initializers1-gnu99.c: New file.
3134         * Makefile (tests): Add them.
3135         (CFLAGS-tst-initializers1-c89.c): New variable.
3136         (CFLAGS-tst-initializers1-c99.c): New variable.
3137         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3138         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3140         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3141         Use __extension__ on anonymous union definition.
3142         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3143         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3144         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3145         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3146         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3148 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3150         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3151         Don't give the union a name because it changes the mangled name.
3152         Instead name the struct for __data.
3153         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3154         Likewise.
3155         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3156         Likewise.
3158 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3160         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3161         stack bias to mc_ftp field.
3163 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3165         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3166         being too clever and reloading the futex value where it shouldn't.
3168 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3170         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3171         correct type.
3173 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3175         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3176         Add cfi directives.
3178 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3180         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3181         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3182         rename in tcbhead_t.
3184         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3185         Don't give the union a name because it changes the mangled name.
3186         Instead name the struct for __data.
3187         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3188         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3189         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3190         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3191         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3192         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3194 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3196         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3197         Return status.
3198         (lll_futex_timed_wait): Define.
3199         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3200         * sysdeps/pthread/aio_misc.h: New file.
3202 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3204         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3206 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3208         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3209         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3210         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3212 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3214         * tst-cancel24.cc: Use C headers instead of C++ headers.
3216 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3218         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3219         sparc-linux configured glibc.
3220         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3221         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3222         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3223         atomic_compare_and_exchange_val_24_acq instead of
3224         atomic_compare_and_exchange_val_acq.
3225         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3226         instead of atomic_exchange_rel.
3227         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3228         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3229         file.
3230         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3231         file.
3232         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3233         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3234         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3235         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3236         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3237         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3238         New file.
3239         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3240         New file.
3241         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3242         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3243         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3244         file.
3245         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3246         file.
3247         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3249 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3251         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3252         mutex initializers.
3254 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3256         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3257         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3258         THREAD_COPY_POINTER_GUARD): Define.
3259         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3260         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3262 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3264         * version.c: Update copyright year.
3266 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3268         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3269         .eh_frame section, use cfi_* directives.
3270         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3272 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3274         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3275         now.
3277 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3279         * sysdeps/pthread/sigaction.c: Removed.
3280         * sigaction.c: New file.
3281         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3283 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3285         * Makefile (tests): Add tst-signal7.
3286         * tst-signal7.c: New file.
3288 2005-12-27  Roland McGrath  <roland@redhat.com>
3290         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3291         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3292         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3293         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3294         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3295         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3296         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3297         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3298         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3299         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3300         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3302 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3304         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3305         and __prev field to pthread_mutex_t.
3306         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3307         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3308         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3309         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3310         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3311         to pthread_mutex_t.
3313 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3315         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3316         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3317         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3318         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3319         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3320         and PTHREAD_MUTEXATTR_FLAG_BITS.
3321         * descr.h (struct pthread): Add robust_list field and define
3322         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3323         * pthread_mutexattr_getrobust.c: New file.
3324         * pthread_mutexattr_setrobust.c: New file.
3325         * pthread_mutex_consistent.c: New file.
3326         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3327         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3328         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3329         Adjust pthread_mutex_t initializers.
3330         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3331         field to pthread_mutex_t.
3332         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3333         and __prev field to pthread_mutex_t.
3334         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3335         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3336         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3337         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3338         * pthread_mutexattr_gettype.c: Likewise.
3339         * pthread_mutexattr_setpshared.c: Likewise.
3340         * pthread_mutexattr_settype.c: Likewise.
3341         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3342         Initialize mutex kind according to robust flag.
3343         * pthread_mutex_lock.c: Implement local robust mutex.
3344         * pthread_mutex_timedlock.c: Likewise.
3345         * pthread_mutex_trylock.c: Likewise.
3346         * pthread_mutex_unlock.c: Likewise.
3347         * pthread_create.c (start_thread): Mark robust mutexes which remained
3348         locked as dead.
3349         * tst-robust1.c: New file.
3350         * tst-robust2.c: New file.
3351         * tst-robust3.c: New file.
3352         * tst-robust4.c: New file.
3353         * tst-robust5.c: New file.
3354         * tst-robust6.c: New file.
3355         * tst-robust7.c: New file.
3356         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3357         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3358         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3359         tst-robust5, tst-robust6, and tst-robust7.
3361         * tst-typesizes.c: New file.
3362         * Makefile (tests): Add tst-typesizes.
3364         * tst-once3.c: More debug output.
3366 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3368         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3369         missing after last change.
3371         * version.c: Update copyright year.
3373 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3375         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3376         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3377         * pthread_mutex_trylock.c: Likewise.
3378         * pthread_mutex_timedlock.c: Likewise.
3379         * pthread_mutex_unlock.c: Likewise.
3381 2005-12-22  Roland McGrath  <roland@redhat.com>
3383         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3384         so that #include_next's search location is not reset to the -I..
3385         directory where <nptl/...> can be found.
3387 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3389         [BZ #1913]
3390         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3391         Fix unwind info.  Remove useless branch prediction prefix.
3392         * tst-cancel24.cc: New file.
3393         * Makefile: Add rules to build and run tst-cancel24.
3395 2005-12-21  Roland McGrath  <roland@redhat.com>
3397         * libc-cancellation.c: Use <> rather than "" #includes.
3398         * pt-cleanup.c: Likewise.
3399         * pthread_create.c: Likewise.
3400         * pthread_join.c: Likewise.
3401         * pthread_timedjoin.c: Likewise.
3402         * pthread_tryjoin.c: Likewise.
3403         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3404         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3405         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3406         * unwind.c: Likewise.
3408 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3410         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3411         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3412         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3413         THREAD_COPY_POINTER_GUARD): Define.
3415 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3417         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3418         rather than one.
3419         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3420         THREAD_COPY_POINTER_GUARD): Define.
3421         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3422         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3423         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3424         THREAD_COPY_POINTER_GUARD): Define.
3425         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3426         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3427         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3428         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3429         Use PTR_DEMANGLE for B0 if defined.
3431 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3433         * pthread_create.c (__pthread_create_2_1): Use
3434         THREAD_COPY_POINTER_GUARD if available.
3435         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3436         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3437         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3438         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3439         * sysdeps/x86_64/tls.h: Likewise.
3441 2005-12-15  Roland McGrath  <roland@redhat.com>
3443         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3445 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3447         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3448         sysdeps/generic.
3449         * errno-loc.c: New file.
3451 2005-12-12  Roland McGrath  <roland@redhat.com>
3453         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3454         adjustments before choosing stack size.  Update minimum stack size
3455         calculation to match allocate_stack change.
3457 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3459         * allocatestack.c (allocate_stack): Don't demand that there is an
3460         additional full page available on the stack beside guard, TLS, the
3461         minimum stack.
3463 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3465         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3466         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3468         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3469         compiling 32-bit code we must define __cleanup_fct_attribute.
3471 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3473         [BZ #1920]
3474         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3475         __attribute__ instead of __attribute.
3476         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3477         (__cleanup_fct_attribute): Likewise.
3479 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3481         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3482         a write barrier before writing libgcc_s_getcfa.
3484 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3486         * sysdeps/unix/sysv/linux/configure: Removed.
3488 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3490         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3491         optional init_array/fini_array support.
3493 2005-10-24  Roland McGrath  <roland@redhat.com>
3495         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3496         versioned_symbol use.
3498 2005-10-16  Roland McGrath  <roland@redhat.com>
3500         * init.c (__pthread_initialize_minimal_internal): Even when using a
3501         compile-time default stack size, apply the minimum that allocate_stack
3502         will require, and round up to page size.
3504 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3506         * Makefile ($(test-modules)): Remove static pattern rule.
3508 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3509             Ulrich Drepper  <drepper@redhat.com>
3511         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3512         alignment in callback function.
3513         * Makefile: Add rules to build and run tst-align3.
3514         * tst-align3.c: New file.
3516 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3518         * allocatestack.c (setxid_signal_thread): Add
3519         INTERNAL_SYSCALL_DECL (err).
3521 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3523         * allocatestack.c (setxid_signal_thread): Need to use
3524         atomic_compare_and_exchange_bool_acq.
3526 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3527             Jakub Jelinek  <jakub@redhat.com>
3529         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3530         CANCEL_RESTMASK.
3531         (struct pthread): Move specific_used field to avoid padding.
3532         Add setxid_futex field.
3533         * init.c (sighandler_setxid): Reset setxid flag and release the
3534         setxid futex.
3535         * allocatestack.c (setxid_signal_thread): New function.  Broken
3536         out of the bodies of the two loops in __nptl_setxid.  For undetached
3537         threads check whether they are exiting and if yes, don't send a signal.
3538         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3539         * pthread_create.c (start_thread): For undetached threads, check
3540         whether setxid bit is set.  If yes, wait until signal has been
3541         processed.
3543         * allocatestack.c (STACK_VARIABLES): Initialize them.
3544         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3546 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3548         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3549         waiters, awake all waiters on the associated mutex.
3551 2005-09-22  Roland McGrath  <roland@redhat.com>
3553         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3554         ../sysdeps/x86_64/hp-timing.h).
3556 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3559         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3560         (lll_futex_wake_unlock): Define.
3561         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3562         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3563         (lll_futex_wake_unlock): Define.
3564         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3565         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3566         (lll_futex_wake_unlock): Define.
3567         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3568         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3569         (lll_futex_wake_unlock): Define.
3570         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3571         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3572         (lll_futex_wake_unlock): Define.
3573         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3574         lll_futex_wake_unlock.
3575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3576         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3577         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3578         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3579         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3580         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3582 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3584         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3585         Fix typo in register name.
3587 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3589         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3590         Use __sigfillset.  Document that sigfillset does the right thing wrt
3591         to SIGSETXID.
3593 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3595         * tst-stackguard1.c (do_test): Likewise.
3597 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3599         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3600         randomization doesn't work well enough.
3602 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3604         [BZ #1102]
3605         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3606         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3607         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3608         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3609         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3610         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3611         in the structure.
3612         * Makefile (tests): Add tst-initializers1.
3613         (CFLAGS-tst-initializers1.c): Set.
3614         * tst-initializers1.c: New test.
3616 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3618         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3619         Make sure __flags are located at offset 48 from the start of the
3620         structure.
3622 2005-07-02  Roland McGrath  <roland@redhat.com>
3624         * Makeconfig: Comment fix.
3626 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3628         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3629         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3630         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3631         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3632         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3633         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3634         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3635         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3636         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3637         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3639 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3641         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3642         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3643         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3644         fields.
3645         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3646         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3647         field.  Put in sysinfo field unconditionally.
3648         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3649         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3650         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3651         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3652         fields.
3653         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3654         * pthread_create.c (__pthread_create_2_1): Use
3655         THREAD_COPY_STACK_GUARD macro.
3656         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3657         tests.
3658         * tst-stackguard1.c: New file.
3659         * tst-stackguard1-static.c: New file.
3661 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3663         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3664         Invoke CGOTSETUP and CGOTRESTORE.
3665         (CGOTSETUP, CGOTRESTORE): Define.
3667 2005-05-29  Richard Henderson  <rth@redhat.com>
3669         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3670         (tf_write, tf_writev): Use it.
3671         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3672         the system minimum.
3674 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3677         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3678         __librt_*_asynccancel@local.
3680 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3682         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3683         all occurrences of JUMPTARGET.  Instead append @local to labels.
3685 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3687         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3688         size/alignment of struct pthread rather than tcbhead_t.
3689         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3690         Likewise.
3691         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3692         Likewise.
3693         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3694         Likewise.
3696 2005-05-19  Richard Henderson  <rth@redhat.com>
3698         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3699         __sync_val_compare_and_swap, not explicit _si variant.
3700         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3702 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3704         [BZ #915]
3705         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3707 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3709         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3710         .eh_frame section, use cfi_* directives.
3712 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3714         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3715         of "" includes.
3717 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3719         [BZ #1075]
3720         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3721         aio_write blocks.
3723 2005-04-27  Roland McGrath  <roland@redhat.com>
3725         * Makefile (tests): Remove tst-clock2.
3727         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3728         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3729         translating to the kernel clockid_t for our own process/thread clock.
3731         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3733 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3735         * old_pthread_cond_init.c: Include <errno.h>.
3736         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3737         process shared or uses clock other than CLOCK_REALTIME.
3738         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3740 2005-04-13  David S. Miller  <davem@davemloft.net>
3742         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3743         * sysdeps/sparc/sparc64/clone.S: New file.
3745 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3747         [BZ #1102]
3748         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3749         __inline instead of inline.
3750         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3752 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3754         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3755         functionally equivalent, but shorter instructions.
3756         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3757         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3758         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3759         Likewise.
3760         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3761         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3762         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3763         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3765         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3766         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3767         Likewise.
3768         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3769         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3770         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3771         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3772         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3774 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3776         * sysdeps/mips/Makefile: New file.
3777         * sysdeps/mips/nptl-sysdep.S: New file.
3778         * sysdeps/mips/tcb-offsets.sym: New file.
3779         * sysdeps/mips/pthread_spin_lock.S: New file.
3780         * sysdeps/mips/pthread_spin_trylock.S: New file.
3781         * sysdeps/mips/pthreaddef.h: New file.
3782         * sysdeps/mips/tls.h: New file.
3783         * sysdeps/mips/jmpbuf-unwind.h: New file.
3784         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3785         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3786         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3787         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3788         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3789         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3790         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3791         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3792         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3793         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3795 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3797         [BZ #1112]
3798         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3799         variable to scerr.
3801 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3803         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3805 2005-02-25  Roland McGrath  <roland@redhat.com>
3807         * alloca_cutoff.c: Correct license text.
3808         * tst-unload.c: Likewise.
3809         * sysdeps/pthread/allocalim.h: Likewise.
3810         * sysdeps/pthread/pt-initfini.c: Likewise.
3811         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3812         * sysdeps/pthread/bits/sigthread.h: Likewise.
3813         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3814         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3816 2005-02-16  Roland McGrath  <roland@redhat.com>
3818         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3819         Use unsigned int * for ptr_nthreads.
3821 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3823         [BZ #721]
3824         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3825         gcc4.
3827 2005-02-07  Richard Henderson  <rth@redhat.com>
3829         [BZ #787]
3830         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3831         argument.
3833 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3835         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3836         order of arguments in invocation of atomic_add_zero.
3838 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3840         [BZ #737]
3841         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3842         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3843         at least gotntpoff relocation and addition.
3844         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3845         Likewise.
3846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3847         Likewise.
3848         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3849         Likewise.
3851 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3853         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3854         entry for static tls deallocation fix.
3855         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3856         also contains information whether the memory pointed to is static
3857         TLS or not.
3858         * sysdeps/i386/tls.h: Likewise.
3859         * sysdeps/ia64/tls.h: Likewise.
3860         * sysdeps/powerpc/tls.h: Likewise.
3861         * sysdeps/s390/tls.h: Likewise.
3862         * sysdeps/sh/tls.h: Likewise.
3863         * sysdeps/sparc/tls.h: Likewise.
3864         * sysdeps/x86_64/tls.h: Likewise.
3866 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3868         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3870 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3872         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3873         %esp.
3874         * Makefile (tests): Add tst-align2.
3875         * tst-align2.c: New test.
3876         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3877         -mpreferred-stack-boundary=4.
3879 2004-12-18  Roland McGrath  <roland@redhat.com>
3881         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3882         New file removed withdrawn for the moment.
3884 2004-12-17  Richard Henderson  <rth@redhat.com>
3886         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3887         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3889 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3891         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3892         Increased PTHREAD_STACK_MIN.
3894         * tst-context1.c (stacks): Use bigger stack size.
3896 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3898         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3899         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3901 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3903         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3904         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3905         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3907 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3911 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3913         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3914         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3916         * tst-getpid1.c: If child crashes, report this first.  Print which
3917         signal.
3919 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3921         * init.c (__pthread_initialize_minimal_internal): Also unblock
3922         SIGSETXID.
3924 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3926         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3927         _POSIX_THREAD_CPUTIME): Define to 0.
3928         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3929         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3930         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3931         __timer_signal_thread_tclk): Remove.
3932         (init_module): Remove their initialization.
3933         (thread_cleanup): Remove their cleanup assertions.
3934         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3935         __timer_signal_thread_tclk): Remove.
3936         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3937         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3938         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3940 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3942         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3943         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3945         * Makefile (tests): Add tst-getpid2.
3946         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3947         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3948         * tst-getpid2.c: New test.
3950 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3952         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3954 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3956         * Makefile (tests): Add tst-getpid1.
3957         * tst-getpid1.c: New file.
3958         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3959         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3961 2004-12-02  Roland McGrath  <roland@redhat.com>
3963         * Makefile (libpthread-nonshared): Variable removed.
3964         ($(objpfx)libpthread_nonshared.a): Target removed.
3965         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3966         These are now handled by generic magic from
3967         libpthread-static-only-routines being set.
3969 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3971         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3972         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3973         _POSIX_THREAD_PRIO_PROTECT): Define.
3974         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3975         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3976         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3978 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3980         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3981         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3982         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3983         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3984         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3985         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3986         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3988 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3990         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3992         * Makefile (libpthread-routines): Add pthread_setschedprio.
3993         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3994         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3995         * pthread_setschedprio.c: New file.
3997 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3999         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
4000         * pthread_cancel.c (pthread_create): Likewise.
4002         * Makefile (libpthread-routines): Add vars.
4003         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
4004         * init.c (__default_stacksize, __is_smp): Remove.
4005         * vars.c: New file.
4006         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
4007         and define a wrapper macro.
4008         (PTHREAD_STATIC_FN_REQUIRE): Define.
4009         * allocatestack.c (__find_thread_by_id): Undefine.
4010         * pthread_create (__pthread_keys): Remove.
4011         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
4012         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
4013         PTHREAD_STATIC_FN_REQUIRE.
4015 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4017         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
4018         parameter to REGISTER macro.
4020 2004-11-17  Roland McGrath  <roland@redhat.com>
4022         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
4023         Make sure SIGCANCEL is blocked as well.
4025 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4027         * sysdeps/pthread/setxid.h: New file.
4028         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
4029         (struct xid_command): Add forward decl.
4030         (struct pthread_functions): Change return type of __nptl_setxid hook
4031         to int.
4032         * pthreadP.h (__nptl_setxid): Change return type to int.
4033         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
4034         calling thread, return its return value and set errno on failure.
4035         * descr.h (struct xid_command): Change id type to long array.
4037         * Makefile: Add rules to build and test tst-setuid1 and
4038         tst-setuid1-static.
4039         * tst-setuid1.c: New test.
4040         * tst-setuid1-static.c: New test.
4042 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
4044         * Makefile (tests): Add tst-exit3.
4045         * tst-exit3.c: New test.
4047 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
4049         * Makefile (tests): Add tst-exit2.
4050         * tst-exit2.c: New file.
4052 2004-11-09  Roland McGrath  <roland@redhat.com>
4054         [BZ #530]
4055         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
4056         here, before calling clone.
4057         * pthread_create.c (start_thread): Don't do it here.
4059 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
4061         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
4063 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
4065         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4066         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
4067         assembler warning.
4069 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
4071         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
4072         if sched_priority is not between minprio and maxprio.
4074 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4076         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4077         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
4079         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4080         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
4082 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
4084         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
4085         not-cancelable I/O functions.
4087 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4089         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4090         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4091         make sure 2 is stored in the futex and we looked at the old value.
4092         Fix a few other problems to return the correct value.
4094 2004-10-14  Richard Henderson  <rth@redhat.com>
4096         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4097         make gcc4 happy.
4099 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4101         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4102         of pthread-functions.h and pthreaddef.h.
4103         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4105         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4106         Change __data.__nwaiters from int to unsigned int.
4108         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4109         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4111         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4112         before return type.
4114         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4115         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4117 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4119         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4120         test fails, remove message queue.
4121         (tf_msgsnd): Likewise.
4123 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4125         * tst-clock1.c: Change #ifdef to #if defined.
4126         * tst-clock2.c: Likewise.
4127         * tst-cond11.c: Likewise.
4129         * sysdeps/pthread/timer_create.c (timer_create): Use
4130         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4131         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4132         THREAD_CPUTIME.
4134 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4136         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4137         _POSIX_THREAD_CPUTIME): Define to 0.
4139 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4141         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4142         and _POSIX_THREAD_CPUTIME to zero.
4143         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4144         * tst-barrier2.c: Fix testing for POSIX feature.
4145         * tst-clock1.c: Likewise.
4146         * tst-clock2.c: Likewise.
4147         * tst-cond11.c: Likewise.
4148         * tst-cond4.c: Likewise.
4149         * tst-cond6.c: Likewise.
4150         * tst-flock2.c: Likewise.
4151         * tst-mutex4.c: Likewise.
4152         * tst-mutex9.c: Likewise.
4153         * tst-rwlock12.c: Likewise.
4154         * tst-rwlock4.c: Likewise.
4155         * tst-signal1.c: Likewise.
4156         * tst-spin2.c: Likewise.
4157         * sysdeps/pthread/posix-timer.h: Likewise.
4158         * sysdeps/pthread/timer_create.c: Likewise.
4159         * sysdeps/pthread/timer_routines.c: Likewise.
4161 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4164         (__lll_mutex_timedlock_wait): Address futex correctly.
4166         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4167         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4168         make sure 2 is stored in the futex and we looked at the old value.
4169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4170         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4171         which might very well made the code not working at all before.
4172         [BZ #417]
4174 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4176         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4177         allow SIGSETXID to be sent.
4178         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4179         for SIGSETXID to be defined.
4180         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4181         SIGSETXID cannot be blocked.
4183         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4184         Add __extension__ to long long types.
4185         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4186         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4187         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4188         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4189         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4190         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4191         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4193 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4195         * descr.h (struct pthread): Add stopped_start field.
4196         * sysdeps/pthread/createthread.c (create_thread): Set
4197         start_stopped flag in descriptor for new thread appropriately.
4198         * pthread_create.c (start_thread): Only take lock to be stopped on
4199         startup if stopped_start flag says so.
4201 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4203         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4204         is created detached and if yes, do not try to free the stack in case
4205         the thread creation failed.
4206         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4207         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4208         case there has been no error.  [BZ #405]
4210         * pthread_create.c (start_thread): Don't wait for scheduler data
4211         etc to be set at the beginning of the function.  The cancellation
4212         infrastructure must have been set up.  And enable async
4213         cancellation before potentially going to sleep.  [BZ #401]
4215 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4217         * Versions: Remove exports for pthread_set*id_np functions.
4218         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4219         for now.
4220         * Makefile: Don't build pthread_set*id code for now.
4222 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4224         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4225         internal use.
4226         * allocatestack.c (__nptl_setxid): New function.
4227         * descr.h (struct xid_command): Define type.
4228         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4229         (sighandler_setxid): New function.
4230         (__pthread_initialize_minimal): Register sighandler_setxid for
4231         SIGCANCEL.
4232         * pt-allocrtsig.c: Update comment.
4233         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4234         Declare __nptl_setxid.
4235         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4236         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4237         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4238         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4239         and pthread_setresuid_np.
4240         * pthread_setgid_np.c: New file.
4241         * pthread_setuid_np.c: New file.
4242         * pthread_setegid_np.c: New file.
4243         * pthread_seteuid_np.c: New file.
4244         * pthread_setregid_np.c: New file.
4245         * pthread_setreuid_np.c: New file.
4246         * pthread_setresgid_np.c: New file.
4247         * pthread_setresuid_np.c: New file.
4248         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4249         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4250         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4251         and pthread_setresuid_np.
4252         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4253         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4254         pthread_setregid, and pthread_setresgid.
4256 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4258         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4259         ENOMEM when out of memory.
4261 2004-09-10  Roland McGrath  <roland@redhat.com>
4263         [BZ #379]
4264         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4265         code, since we don't try to use the broken CLONE_STOPPED any more.
4266         * pthread_create.c (start_thread): Likewise.
4268 2004-09-15  Richard Henderson  <rth@redhat.com>
4270         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4272 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4274         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4275         (__libc_unwind_longjmp): Delete macro and declare as function.
4276         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4277         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4278         nptl directory.
4279         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4280         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4281         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4283 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4285         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4286         for __USE_XOPEN2K.
4287         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4288         types also for __USE_XOPEN2K.
4289         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4290         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4291         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4292         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4293         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4294         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4295         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4296         [BZ #320]
4298 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4300         * sysdeps/pthread/pthread.h
4301         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4302         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4303         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4304         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4305         [BZ #375]
4307 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4309         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4310         PSEUDO to be used with . prefix.
4312         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4313         Use atomic_increment instead of atomic_exchange_and_add.
4314         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4315         Likewise.
4316         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4317         Likewise.
4318         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4319         Likewise.
4321         * allocatestack.c (allocate_stack): Use atomic_increment_val
4322         instead of atomic_exchange_and_add.
4323         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4324         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4325         Likewise.
4326         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4327         Likewise.
4329         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4330         the initialization function might throw.
4332 2005-09-05  Richard Henderson  <rth@redhat.com>
4334         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4335         Move definition inside libpthread, libc, librt check.  Provide
4336         definition for rtld.
4338 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
4340         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
4341         waiters, awake all waiters on the associated mutex.
4343 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4345         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4346         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4347         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4348         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4349         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4350         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4351         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4352         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4353         * unwind.c: Use it.
4355         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4356         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4357         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4358         Likewise.
4359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4360         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4361         this is the last waiter, signal pthread_cond_destroy caller and
4362         avoid using the pthread_cond_t structure after unlock.
4363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4364         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4365         Read clock type from the least significant bits of __nwaiters instead
4366         of __clock.
4367         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4368         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4370 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4372         [BZ #342]
4373         * Makefile (tests): Add tst-cond20 and tst-cond21.
4374         * tst-cond20.c: New test.
4375         * tst-cond21.c: New test.
4376         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4377         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4378         it unsigned int.
4379         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4380         Likewise.
4381         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4382         (pthread_cond_t): Likewise.
4383         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4384         Likewise.
4385         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4386         Likewise.
4387         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4388         Likewise.
4389         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4390         (cond_nwaiters): New.
4391         (clock_bits): New.
4392         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4393         if there are waiters not signalled yet.
4394         Wait until all already signalled waiters wake up.
4395         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4396         __nwaiters.  If pthread_cond_destroy has been called and this is the
4397         last waiter, signal pthread_cond_destroy caller and avoid using
4398         the pthread_cond_t structure after unlock.
4399         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4400         decrement it when leaving.  If pthread_cond_destroy has been called
4401         and this is the last waiter, signal pthread_cond_destroy caller.
4402         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4403         Likewise.  Read clock type from the least significant bits of
4404         __nwaiters instead of __clock.
4405         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4406         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4407         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4408         clock type just from the last COND_CLOCK_BITS bits of value.
4409         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4410         instead of __clock, just from second bit of condattr's value.
4412 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4414         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4415         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4416         != 64.
4417         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4419 2004-08-15  Roland McGrath  <roland@frob.com>
4421         * pthread_atfork.c: Update copyright terms including special exception
4422         for these trivial files, which are statically linked into executables
4423         that use dynamic linking for the significant library code.
4425 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4427         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4428         pthread_rwlock_rdlock.
4429         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4430         Decrease __nr_readers_queued after reacquiring lock.
4431         * sysdeps/pthread/pthread_rwlock_timedrdlock
4432         (pthread_rwlock_timedrdlock): Likewise.
4433         Reported by Bob Cook <bobcook47@hotmail.com>.
4435 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4437         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4438         before pthread_barrier_wait.
4440 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4443         Remove unnecessary exception handling data.
4445 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4447         [BZ #284]
4448         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4449         instead of clockid_t.
4451 2004-07-21  Roland McGrath  <roland@redhat.com>
4453         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4455 2004-07-19  Roland McGrath  <roland@redhat.com>
4457         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4459 2004-07-02  Roland McGrath  <roland@redhat.com>
4461         * configure: Don't exit.
4463 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4465         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4466         (__pthread_cond_timedwait): Check for invalid nanosecond in
4467         timeout value.
4469 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4471         * Makefile: Add rules to build and run tst-fini1.
4472         * tst-fini1.c: New file.
4473         * tst-fini1mod.c: New file.
4475 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4477         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4478         if no cancellation support is needed.
4479         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4480         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4481         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4482         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4483         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4484         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4485         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4486         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4487         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4489         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4490         only if not already defined.
4492 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4494         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4495         constraint "m" instead of "0" for futex.
4497         * shlib-versions: Add powerpc64-.*-linux.*.
4499 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4501         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4502         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4503         for valid tv_nsec.
4504         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4505         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4506         bits.
4508 2004-06-29  Roland McGrath  <roland@redhat.com>
4510         * Banner: NPTL no longer has its own version number.
4511         * Makefile (nptl-version): Variable removed.
4512         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4513         using $(version), the glibc version number.
4515 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4517         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4518         Fix branch offset for a PLT entry.
4519         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4520         Likewise.
4521         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4522         Likewise.
4523         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4524         Likewise.
4525         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4526         Likewise.
4528 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4530         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4531         unconditionally.
4533 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4535         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4536         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4537         instead of tv_sec.
4538         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4539         (pthread_rwlock_timedrdlock): Likewise.
4541 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4543         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4544         Set __r7 to val, not mutex.
4546 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4548         * Makefile: Add rules to build tst-rwlock14.
4549         * tst-rwlock14.c: New file.
4551 2004-06-24  Boris Hu  <boris.hu@intel.com>
4553         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4554         check.
4555         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4557 2004-06-19  Andreas Jaeger  <aj@suse.de>
4559         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4560         assembler in last patch.
4562 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4564         * sysdeps/pthread/pthread_cond_timedwait.c
4565         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4566         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4567         (__pthread_cond_timedwait): Check for invalid nanosecond in
4568         timeout value.
4569         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4570         * tst-cond19.c: New file.
4571         * Makefile: Add rules to build and run tst-cond19.
4573 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4575         * tst-context1.c (GUARD_PATTERN): Defined.
4576         (tst_context_t): Define struct containing ucontext_t & guard words.
4577         (ctx): Declare as an array of tst_context_t.
4578         (fct): Verify uc_link & guard words are still valid.
4579         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4581 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4583         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4584         Add __data.__futex field, reshuffle __data.__clock.
4585         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4586         (__pthread_cond_signal): Increment __futex at the same time as
4587         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4588         address of low 32-bits of __wakeup_seq to futex syscall.
4589         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4590         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4591         releasing internal lock to FUTEX_WAIT.
4592         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4593         (__pthread_cond_timedwait): Likewise.
4594         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4595         (FUTEX_CMP_REQUEUE): Define.
4596         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4597         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4598         Pass __futex value from before the unlock and __futex address instead
4599         of address of low 32-bits of __wakeup_seq to futex syscall.
4600         Fallback to FUTEX_WAKE all on any errors.
4602 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4604         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4605         comment typo.
4606         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4607         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4608         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4609         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4610         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4612 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4614         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4615         Add memory clobber to inline assembly.
4616         (__lll_mutex_trylock): Likewise.
4617         (__lll_mutex_cond_trylock): Likewise.
4619 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4621         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4622         Pass val argument as 6th system call argument in %r7.
4624 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4626         * Makefile (tests): Add tst-cond16.
4627         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4628         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4629         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4630         Add __data.__futex field, reshuffle __data.__clock.
4631         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4632         (__pthread_cond_signal): Increment __futex at the same time as
4633         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4634         address of low 32-bits of __wakeup_seq to futex syscall.
4635         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4636         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4637         releasing internal lock to FUTEX_WAIT.
4638         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4639         (__pthread_cond_timedwait): Likewise.
4640         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4641         (FUTEX_CMP_REQUEUE): Define.
4642         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4643         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4644         Pass __futex value from before the unlock and __futex address instead
4645         of address of low 32-bits of __wakeup_seq to futex syscall.
4646         Fallback to FUTEX_WAKE all on any errors.
4647         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4648         Define.
4649         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4650         internally.  Return non-zero if error, zero if success.
4651         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4652         Add __data.__futex field, reshuffle __data.__clock.
4653         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4654         Define.
4655         (lll_futex_requeue): Add val argument, return 1 unconditionally
4656         for the time being.
4657         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4658         Add __data.__futex field, reshuffle __data.__clock.
4659         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4660         Define.
4661         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4662         internally.  Return non-zero if error, zero if success.
4663         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4664         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4665         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4666         Define.
4667         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4668         internally.  Return non-zero if error, zero if success.
4669         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4670         Add __data.__futex field, reshuffle __data.__clock.
4671         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4672         Define.
4673         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4674         internally.  Return non-zero if error, zero if success.
4675         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4676         Add __data.__futex field, reshuffle __data.__clock.
4677         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4678         Add __data.__futex field, reshuffle __data.__clock.
4679         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4680         Increment __futex at the same time as __wakeup_seq or __total_seq.
4681         Pass address of __futex instead of address of low 32-bits of
4682         __wakeup_seq to futex syscall.
4683         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4684         Pass __futex value from before releasing internal lock
4685         to FUTEX_WAIT.
4686         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4687         Likewise.  Avoid unnecessary shadowing of variables.
4688         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4689         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4690         unlock and __futex address instead of address of low 32-bits of
4691         __wakeup_seq to futex_requeue macro, adjust for new return value
4692         meaning.
4693         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4694         (__pthread_cond_signal): Increment __futex at the same time as
4695         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4696         address of low 32-bits of __wakeup_seq to futex syscall.
4697         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4698         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4699         releasing internal lock to FUTEX_WAIT.
4700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4701         (__pthread_cond_timedwait): Likewise.
4702         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4703         (FUTEX_CMP_REQUEUE): Define.
4704         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4705         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4706         Pass __futex value from before the unlock and __futex address instead
4707         of address of low 32-bits of __wakeup_seq to futex syscall.
4708         Fallback to FUTEX_WAKE all on any errors.
4710 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4712         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4713         Add nop to align the end of critical section.
4714         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4716 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4718         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4719         Add __broadcast_seq field.
4720         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4721         all waiters as woken with woken_seq and bump broadcast counter.
4722         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4723         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4724         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4725         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4727 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4730         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4731         Reported by Kaz Kojima.
4733 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4735         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4737 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4739         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4740         __broadcast_seq with bc_seq after acquiring internal lock instead of
4741         before it.
4743 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4745         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4746         compilation.
4747         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4748         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4749         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4750         (pthread_cond_t): Add __data.__broadcast_seq field.
4751         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4752         (FRAME_SIZE): Define.
4753         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4754         Comment typo fixes.
4755         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4756         Define.
4757         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4758         typo fixes.
4759         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4760         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4761         fixes.
4763 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4765         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4766         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4767         Add __broadcast_seq field.
4768         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4769         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4770         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4771         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4772         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4774         all waiters as woken with woken_seq and bump broadcast counter.
4775         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4777         __broadcast_seq field.
4778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4779         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4780         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4781         * pthread_cond_init.c: Initialize __broadcast_seq field.
4782         * Makefile (tests): Add tst-cond17 and tst-cond18.
4783         Add .NOTPARALLEL goal.
4784         * tst-cond16.c: New file.  From Jakub.
4785         * tst-cond17.c: New file.  From Jakub.
4786         * tst-cond18.c: New file.  From Jakub.
4788 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4790         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4791         unwind info.
4793         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4794         Parametrize frame size.  Correct some unwind info.
4795         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4797 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4799         * tst-stack3.c: Note testing functionality beyond POSIX.
4801 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4803         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4804         Change conditional from ifdef to if.
4806 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4808         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4809         SYSDEP_CANCEL_ERROR): Define.
4810         (PSEUDO): Use it.
4812 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4814         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4816 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4818         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4820 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4822         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4823         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4824         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4825         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4827 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4829         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4830         thread has all signals blocked.
4832 2004-04-18  Andreas Jaeger  <aj@suse.de>
4834         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4835         (SEM_VALUE_MAX): Add missing brace.
4837 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4839         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4840         in rt subdir.
4841         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4842         * sysdeps/pthread/tst-mqueue8x.c: New test.
4843         * tst-cancel4.c: Update comment about message queues.
4845         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4846         return it_value { 0, 0 }.
4847         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4848         like SIGEV_SIGNAL.
4849         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4850         assertion for SIGEV_NONE.
4851         (thread_attr_compare): Compare all attributes, not just a partial
4852         subset.
4854 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4856         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4858 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4860         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4861         Just use a plain number.
4862         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4863         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4864         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4865         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4866         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4867         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4868         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4870 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4872         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4873         frame info.
4874         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4876 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4878         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4879         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4880         of calling sigwaitinfo.
4882 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4884         * allocatestack.c (allocate_stack): Set reported_guardsize
4885         unconditionally.
4886         * pthread_getattr_np.c (pthread_getattr_np): Use
4887         reported_guardsize instead of guardsize.
4888         * descr.h (struct pthread): Add reported_guardsize field.
4890 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4892         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4894 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4896         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4898 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4900         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4901         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4902         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4903         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4904         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4905         Define.
4906         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4907         (_POSIX_MESSAGE_PASSING): Define.
4908         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4909         (_POSIX_MESSAGE_PASSING): Define.
4910         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4911         (_POSIX_MESSAGE_PASSING): Define.
4913 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4915         * tst-context1.c (fct): Check whether correct stack is used.
4917 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4919         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4920         matching constraints for asm mem parameters.
4922         * tst-clock2.c (tf): Don't define unless needed.
4924 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4926         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4927         $(gnulib).
4929 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4931         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4932         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4933         * pthreadP.h: Declare __nptl_deallocate_tsd.
4934         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4935         Adjust caller.
4937         * Makefile (tests): Add tst-tsd5.
4938         * tst-tsd5.c: New file.
4940 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4942         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4943         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4944         is SHLIB_COMPAT check.
4945         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4946         (__pthread_attr_getaffinity_old): Likewise.
4947         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4948         (__pthread_getaffinity_old): Likewise.
4949         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4950         (__pthread_setaffinity_old): Likewise.
4952 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4954         * allocatestack.c (_make_stacks_executable): Call
4955         _dl_make_stack_executable first.
4957 2004-03-24  Roland McGrath  <roland@redhat.com>
4959         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4960         constraint instead of "0".
4962 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4964         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4965         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4967         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4968         code to avoid warning.
4970 2004-03-24  Andreas Jaeger  <aj@suse.de>
4972         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4973         (__pthread_attr_setaffinity_old): Remove const.
4975 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4977         * sysdeps/unix/sysv/linux/smp.h: New file.
4978         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4979         * init.c: Define __is_smp.
4980         (__pthread_initialize_minimal_internal): Call is_smp_system to
4981         initialize __is_smp.
4982         * pthreadP.h: Declare __is_smp.
4983         Define MAX_ADAPTIVE_COUNT is necessary.
4984         * pthread_mutex_init.c: Add comment regarding __spins field.
4985         * pthread_mutex_lock.c: Implement adaptive mutex type.
4986         * pthread_mutex_timedlock.c: Likewise.
4987         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4988         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4989         Add __spins field.
4990         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4991         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4992         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4993         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4994         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4995         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4996         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4997         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4998         lll_mutex_cond_trylock.
4999         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5000         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5001         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5002         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5003         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5004         Define BUSY_WAIT_NOP.
5005         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5006         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
5008         * tst-mutex5.c: Add support for testing adaptive mutexes.
5009         * tst-mutex7.c: Likewise.
5010         * tst-mutex5a.c: New file.
5011         * tst-mutex7a.c: New file.
5012         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
5014         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5015         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
5016         vgettimeofday call might destroy the content.
5018         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
5019         @pause in the loop.
5021         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5022         No need to restrict type of ret.  Make it int.  Add comment.
5024         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
5025         Remove unnecessary setne instruction.
5027 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
5029         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5030         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
5031         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
5032         If realloc fails, break out of the loop.
5034 2004-03-20  Andreas Jaeger  <aj@suse.de>
5036         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5037         (__pthread_setaffinity_old): Fix interface.
5038         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5039         (__pthread_getaffinity_old): Likewise.
5041         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
5042         (__pthread_setaffinity_new): Remove duplicate declaration.
5044 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5046         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
5047         the return value to a safe register.
5048         (CDISABLE): Set the function argument correctly.
5050 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5052         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
5053         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
5054         Rewrite so that only one locked memory operation per round is needed.
5055         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
5056         (pthread_barrier_wait): After wakeup, release lock only when the
5057         last thread stopped using the barrier object.
5058         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
5059         (__pthread_cond_wait): Don't store mutex address if the current
5060         value is ~0l.  Add correct cleanup support and unwind info.
5061         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5062         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
5063         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
5064         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
5065         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
5066         Add correct cleanup support and unwind info.
5067         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
5068         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
5069         information for syscall wrappers.
5071 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
5073         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5074         cpusetsize field, remove next.
5075         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
5076         parameter for size of the CPU set.
5077         (pthread_setaffinity_np): Likewise.
5078         (pthread_attr_getaffinity_np): Likewise.
5079         (pthread_attr_setaffinity_np): Likewise.
5080         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
5081         interface change, keep compatibility code.
5082         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
5083         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
5084         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
5085         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
5086         __pthread_getaffinity_np.
5087         * Versions: Add version for changed interfaces.
5088         * tst-attr3.c: Adjust test for interface change.
5089         * pthread_getattr_np.c: Query the kernel about the affinity mask with
5090         increasing buffer sizes.
5091         * pthread_attr_destroy.c: Remove unused list handling.
5092         * pthread_attr_init.c: Likewise.
5094 2004-03-17  Roland McGrath  <roland@redhat.com>
5096         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5097         first argument to clock_getres so we ever enable kernel timers.
5099 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5101         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5103 2004-03-12  Richard Henderson  <rth@redhat.com>
5105         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5106         oldvalue from CENABLE to CDISABLE.
5108 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5110         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5111         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5112         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5113         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5115 2004-03-11  Richard Henderson  <rth@redhat.com>
5117         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5118         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5119         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5121 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5123         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5124         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5125         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5127 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5129         * forward.c (__pthread_cond_broadcast_2_0,
5130         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5131         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5132         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5134 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5136         * sysdeps/sh/tcb-offsets.sym: Add PID.
5137         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5138         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5140 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5142         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5143         include <sysdep-cancel.h>, vfork is no cancellation point.
5144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5145         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5146         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5148 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5150         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5151         libc_hidden_def.
5152         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5153         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5154         Likewise.
5155         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5156         Likewise.
5157         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5158         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5159         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5160         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5161         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5163         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5164         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5165         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5166         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5167         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5168         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5170         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5171         a local register for saving old PID.  Negate PID in parent upon exit.
5173         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5174         tcb-offsets.h.
5175         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5176         before syscall, set to the old value in the parent afterwards.
5177         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5178         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5179         tcb-offsets.h.
5180         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5181         before syscall, set to the old value in the parent afterwards.
5182         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5183         * sysdeps/s390/tcb-offsets.sym: Add PID.
5185         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5186         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5187         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5188         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5189         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5190         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5192 2004-03-10  Andreas Schwab  <schwab@suse.de>
5194         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5195         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5196         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5198 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5200         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5201         * tst-cancel21.c (do_one_test): Likewise.
5202         Reported by Gordon Jin <gordon.jin@intel.com>.
5204 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5206         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5207         if non-zero and set to INT_MIN if zero.
5208         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5209         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5210         (SAVE_PID, RESTORE_PID): Define.
5211         (__vfork): Use it.
5212         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5213         Use relative path to avoid including NPTL i386/vfork.S.
5214         (SAVE_PID, RESTORE_PID): Define.
5215         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5216         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5217         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5218         tst-vfork2x.
5219         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5220         * tst-vfork1.c: New test.
5221         * tst-vfork2.c: New test.
5222         * tst-vfork1x.c: New test.
5223         * tst-vfork2x.c: New test.
5225 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5227         * sysdeps/i386/tcb-offsets.sym: Add PID.
5228         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5229         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5230         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5232 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5234         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5236 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5238         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5239         _rtld_global_ro.
5241 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5243         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5244         _rtld_global_ro.
5246         * tst-once4.c: Remove unnecessary macro definition.
5248         * tst-mutex7.c (do_test): Limit thread stack size.
5249         * tst-once2.c (do_test): Likewise.
5250         * tst-tls3.c (do_test): Likewise.
5251         * tst-tls1.c (do_test): Likewise.
5252         * tst-signal3.c (do_test): Likewise.
5253         * tst-kill6.c (do_test): Likewise.
5254         * tst-key4.c (do_test): Likewise.
5255         * tst-join4.c (do_test): Likewise.
5256         * tst-fork1.c (do_test): Likewise.
5257         * tst-context1.c (do_test): Likewise.
5258         * tst-cond2.c (do_test): Likewise.
5259         * tst-cond10.c (do_test): Likewise.
5260         * tst-clock2.c (do_test): Likewise.
5261         * tst-cancel10.c (do_test): Likewise.
5262         * tst-basic2.c (do_test): Likewise.
5263         * tst-barrier4.c (do_test): Likewise.
5265 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5267         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5269 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5272         (__pthread_cond_timedwait): Optimize wakeup test.
5273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5274         (__pthread_cond_wait): Likewise.
5275         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5276         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5277         Likewise.
5279 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5281         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5282         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5283         the atomic instruction needed.
5284         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5285         (__lll_mutex_lock_wait): Likewise.
5287 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5289         * Makefile (tests): Add tst-cond14 and tst-cond15.
5290         * tst-cond14.c: New file.
5291         * tst-cond15.c: New file.
5293 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5295         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5296         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5297         needs to be implemented differently to be useful.
5299 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5301         * pthread_attr_setschedparam.c: Don't test priority against limits
5302         here.  Set ATTR_FLAG_SCHED_SET flag.
5303         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5304         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5305         from parent thread to child.  If attribute is used and scheduling
5306         parameters are not inherited, copy parameters from attribute or
5307         compute them.  Check priority value.
5308         * pthread_getschedparam.c: If the parameters aren't known yet get
5309         them from the kernel.
5310         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5311         ATTR_FLAG_POLICY_SET flag for thread.
5312         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5313         and ATTR_FLAG_POLICY_SET.
5315         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5317         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5318         fail if stack address hasn't been set.  Just return 0.
5320 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5322         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5323         libpthread for the files in this list.
5324         (CFLAGS-tst-unload): Removed.
5325         * tst-unload.c (do_test): Don't use complete path for
5326         LIBPHREAD_SO.
5328         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5329         tst-_res1mod2.
5331 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5333         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5334         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5335         operation per round is needed.
5336         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5337         (__lll_mutex_lock_wait): Likewise.
5339 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5341         * tst-cancel9.c (cleanup): Don't print to stderr.
5343 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5345         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5347 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5349         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5350         (__syscall_error_handler2): Call CDISABLE.
5351         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5352         (__syscall_error_handler2): Call CDISABLE.
5354         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5355         Release lock before the loop, don't reacquire it.
5357         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5359 2004-02-19  Andreas Schwab  <schwab@suse.de>
5361         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5362         Fix last change.
5364 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5366         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5367         (pthread_barrier_wait): After wakeup, release lock only when the
5368         last thread stopped using the barrier object.
5369         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5370         (pthread_barrier_wait): Likewise.
5371         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5372         Likewise.
5373         * Makefile (tests): Add tst-barrier4.
5374         * tst-barrier4.c: New file.
5376         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5377         (__pthread_cond_timedwait): Perform timeout test while holding
5378         internal lock to prevent wakeup race.
5379         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5380         * sysdeps/pthread/pthread_cond_timedwait.c
5381         (__pthread_cond_timedwait): Likewise.
5382         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5383         (__pthread_cond_timedwait): Likewise.
5385 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5387         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5388         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5389         * Makefile (tests): Add tst-rwlock13.
5390         * tst-rwlock13.c: New test.
5392 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5395         (__condvar_tw_cleanup): Little optimization.
5396         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5398 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5400         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5401         libpthread as "lib" parameter to SHLIB_COMPAT.
5402         (__novmx_siglongjmp): Fix typo in function name.
5403         (__novmx_longjmp): Fix typo in function name.
5405 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5407         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5408         __builtin_expect.
5410         * sysdeps/generic/pt-longjmp.c: Moved to...
5411         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5413 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5415         * Makefile (libpthread-routines): Add pt-cleanup.
5416         * pt-longjmp.c: Removed.
5417         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5418         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5419         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5420         Version longjmp, siglongjmp for GLIBC_2.3.4.
5421         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5423 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5425         * sysdeps/pthread/pthread_cond_timedwait.c
5426         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5427         Reuse code.  Add __builtin_expects.
5429         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5430         (__pthread_cond_timedwait): Get internal lock in case timeout has
5431         passed before the futex syscall.
5432         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5434 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5436         * allocatestack.c: Pretty printing.
5438         * sysdeps/pthread/createthread.c (create_thread): Don't add
5439         CLONE_DETACHED bit if it is not necessary.
5441 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5443         * pthread_getattr_np.c: Include ldsodefs.h.
5445 2004-01-16  Richard Henderson  <rth@redhat.com>
5447         * allocatestack.c: Don't declare __libc_stack_end.
5448         * init.c (__pthread_initialize_minimal_internal): Likewise.
5449         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5451 2004-01-15  Richard Henderson  <rth@redhat.com>
5453         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5454         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5455         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5456         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5457         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5458         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5459         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5460         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5462 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5464         * init.c (pthread_functions): Make array const.
5466 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5468         * allocatestack.c (__make_stacks_executable): Change interface.
5469         Check parameters.  Pass parameter on to libc counterpart.
5470         * pthreadP.h: Change declaration.
5472 2004-01-13  Richard Henderson  <rth@redhat.com>
5474         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5475         prototype form.
5476         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5477         Likewise.
5479         * sysdeps/alpha/Makefile: New file.
5480         * sysdeps/alpha/tcb-offsets.sym: New file.
5481         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5482         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5484         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5485         on powerpc version.
5487 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5489         * Makefile (tests): Add tst-backtrace1.
5490         * tst-backtrace1.c: New test.
5492 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5494         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5495         register as second parameter to the REGISTER macro.
5496         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5497         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5498         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5499         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5500         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5501         of thread register as second parameter to REGISTER macro in 64 case.
5503 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5505         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5506         (CFLAGS-getpid.o): Defined.
5507         (CFLAGS-getpid.os): Defined.
5509 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5511         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5512         returned for main thread does not overlap with any other VMA.
5513         Patch by Jakub Jelinek.
5515 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5517         * tst-raise1.c: Include stdio.h.
5519 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5521         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5522         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5523         If pid is 0, set it to selftid.
5524         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5525         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5526         != 0, return self->tid without doing a syscall.
5527         * descr.h (struct pthread): Move pid field after tid.
5529         * Makefile (tests): Add tst-raise1.
5530         * tst-raise1.c: New file.
5532 2003-12-23  Roland McGrath  <roland@redhat.com>
5534         * tst-oddstacklimit.c: New file.
5535         * Makefile (tests): Add it.
5536         (tst-oddstacklimit-ENV): New variable.
5538         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5539         value up to page size for __default_stacksize.
5541 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5543         * Makefile (tests): Add tst-eintr5.
5544         * tst-eintr5.c: New file.
5546         * eintr.c (eintr_source): Prevent sending signal to self.
5548         * tst-eintr2.c (tf1): Improve error message.
5550 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5552         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5553         * sysdeps/unix/sysv/linux/getpid.c: New file.
5554         * pthread_cancel.c: Add comment explaining use of PID field.
5555         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5556         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5557         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5558         temporarily to signal the field must not be relied on and updated
5559         by getpid().
5560         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5561         temporarily negative.
5562         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5564 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5566         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5567         (eintr_source): If ARG != NULL, use pthread_kill.
5568         * tst-eintr1.c: Adjust for this change.
5569         * tst-eintr2.c: Likewise.
5570         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5571         * tst-eintr3.c: New file.
5572         * tst-eintr4.c: New file.
5574 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5576         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5577         if CANCELSTATE_BITMASK is set.
5578         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5579         Likewise.
5581         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5582         (tests-reverse): Add tst-cancel23.
5583         * tst-cancel22.c: New test.
5584         * tst-cancel23.c: New test.
5586 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5588         * tst-eintr1.c: Better error messages.
5590         * Makefile (tests): Add tst-eintr2.
5591         * tst-eintr2.c: New file.
5593 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5595         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5596         (CFLAGS-tst-cancelx21.c): Set.
5597         * tst-cancel21.c: New test.
5598         * tst-cancelx21.c: New test.
5600         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5601         comparison operand.
5602         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5603         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5604         * pt-longjmp.c: Include jmpbuf-unwind.h.
5605         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5606         _JMPBUF_UNWINDS.  Adjust compared pointers.
5607         * init.c (__pthread_initialize_minimal_internal): Initialize
5608         pd->stackblock_size.
5609         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5610         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5611         * sysdeps/i386/jmpbuf-unwind.h: New file.
5612         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5613         * sysdeps/s390/jmpbuf-unwind.h: New file.
5614         * sysdeps/sh/jmpbuf-unwind.h: New file.
5615         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5616         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5617         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5618         (_JMPBUF_CFA_UNWINDS): Remove.
5619         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5621 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5623         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5624         (CFLAGS-tst-cancelx20.c): Set.
5625         * tst-cancel20.c: New test.
5626         * tst-cancelx20.c: New test.
5628 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5630         * init.c (__pthread_initialize_minimal_internal): Don't treat
5631         architectures with separate register stack special here when
5632         computing default stack size.
5634 2003-12-17  Roland McGrath  <roland@redhat.com>
5636         * Makefile (tst-cancelx7-ARGS): New variable.
5637         Reportd by Greg Schafer <gschafer@zip.com.au>.
5639 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5641         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5642         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5643         (tst-stack3-ENV): Set.
5644         ($(objpfx)tst-stack3-mem): New.
5645         * tst-stack3.c: New test.
5647 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5649         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5650         Add unwind directives.  Drop unused .regstk directive.
5651         (_fini_EPILOG_BEGINS): Add unwind directives.
5653 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5655         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5656         Assume parameter is a pointer.
5657         (lll_futex_wake): Likewise.
5658         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5659         Likewise.
5660         (lll_futex_wake): Likewise.
5661         Reported by Boris Hu.
5662         * sysdeps/unix/sysv/linux/unregister-atfork.c
5663         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5665         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5667 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5669         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5670         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5671         __rtld_lock_initialize for ld.so lock.
5672         Patch in part by Adam Li <adam.li@intel.com>.
5674 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5676         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5677         in $(gnulib).  Also, remove stale comment.
5679 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5681         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5682         advantage of new syscall stub and optimize accordingly.
5684         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5685         from SYS_futex, to match expectations of
5686         sysdep.h:DO_INLINE_SYSCALL.
5687         (lll_futex_clobbers): Remove.
5688         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5689         (lll_futex_wake): Likewise.
5690         (lll_futex_requeue): Likewise.
5691         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5692         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5693         Jelinek).
5694         (__lll_mutex_lock): Likewise.
5695         (__lll_mutex_cond_lock): Likewise.
5696         (__lll_mutex_timed_lock): Likewise.
5697         (__lll_mutex_unlock): Likewise.
5698         (__lll_mutex_unlock_force): Likewise.
5700         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5701         comes before the include of <sysdep.h>.
5702         (THREAD_SELF_SYSINFO): New macro.
5703         (THREAD_SYSINFO): Likewise.
5704         (INIT_SYSINFO): New macro.
5705         (TLS_INIT_TP): Call INIT_SYSINFO.
5707         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5709         * sysdeps/pthread/createthread.c (create_thread): Use
5710         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5711         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5712         THREAD_SELF_SYSINFO instead of open code.
5713         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5714         (THREAD_SYSINFO): Likewise.
5716         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5718         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5720 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5722         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5723         instead of .init.  Patch by David Mosberger.
5725 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5727         * sysdeps/pthread/configure.in: Remove broken declaration in C
5728         cleanup handling check.
5730 2003-11-30  Andreas Jaeger  <aj@suse.de>
5732         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5733         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5734         Likewise.
5736 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5738         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5739         * pthread_attr_destroy.c: Include shlib-compat.h.
5740         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5741         is set in iattr->flags.
5742         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5744 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5746         * Makefile (distribute): Add tst-cleanup4aux.c.
5748         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5749         include.
5751 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5753         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5754         pthread_cond_signal.
5756         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5757         store mutex address if the current value is ~0l.
5758         * sysdeps/pthread/pthread_cond_timedwait.c
5759         (__pthread_cond_timedwait): Likewise.
5760         * sysdeps/pthread/pthread_cond_broadcast.c
5761         (__pthread_cond_broadcast): Don't use requeue for pshared
5762         condvars.
5764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5765         (__pthread_cond_wait): Don't store mutex address if the current
5766         value is ~0l.
5767         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5768         (__pthread_cond_timedwait): Likewise.
5769         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5770         (__pthread_cond_broadcast): Don't use requeue for pshared
5771         condvars.
5773         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5774         element with ~0l for pshared condvars, with NULL otherwise.
5776         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5777         (__pthread_cond_wait): Don't store mutex address if the current
5778         value is ~0l.
5779         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5780         (__pthread_cond_timedwait): Likewise.
5781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5782         (__pthread_cond_broadcast): Don't use requeue for pshared
5783         condvars.
5785         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5786         * tst-cond12.c: New file.
5787         * tst-cond13.c: New file.
5789 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5791         * sysdeps/pthread/configure.in: Make missing forced unwind support
5792         fatal.
5794 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5796         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5798 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5800         * Makefile: Add magic to clean up correctly.
5802 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5804         * unwind.c (FRAME_LEFT): Define.
5805         (unwind_stop): Handle old style cleanups here.
5806         (__pthread_unwind): Handle old style cleanups only if
5807         !HAVE_FORCED_UNWIND.
5808         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5809         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5810         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5811         ($(objpfx)tst-cleanupx4): Likewise.
5812         * tst-cleanup4.c: New test.
5813         * tst-cleanup4aux.c: New.
5814         * tst-cleanupx4.c: New test.
5816 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5818         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5819         lll_mutex_*lock macros to skip atomic operations on some archs.
5821 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5823         * sysdeps/pthread/tst-timer.c (main): Initialize
5824         sigev2.sigev_value as well.
5826 2003-10-15  Roland McGrath  <roland@redhat.com>
5828         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5829         is missing.
5830         * sysdeps/pthread/configure: Regenerated.
5832 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5834         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5835         locking macros.  No distinction between normal and mutex locking
5836         anymore.
5837         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5838         Merge bits from lowlevelmutex.S we still need.
5839         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5840         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5841         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5842         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5843         new mutex implementation.
5844         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5845         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5846         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5847         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5848         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5850         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5851         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5853         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5854         symbol for entry point to avoid cancellation.
5856 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5858         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5859         changes.
5860         (SAVE_OLDTYPE_0): Fix a typo.
5862 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5864         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5865         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5867 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5869         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5870         correct offset.
5872 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5874         * Makefile (tests): Add tst-cancel19.
5875         * tst-cancel19.c: New test.
5877 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5879         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5880         restoring of the old cancellation type.
5882 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5884         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5886 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5888         * sysdeps/pthread/malloc-machine.h: New file
5890 2003-09-24  Roland McGrath  <roland@redhat.com>
5892         * allocatestack.c (__make_stacks_executable): Don't ignore return
5893         value from _dl_make_stack_executable.
5895 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5897         * allocatestack.c (__make_stacks_executable): Also change
5898         permission of the currently unused stacks.
5900         * allocatestack.c (change_stack_perm): Split out from
5901         __make_stacks_executable.
5902         (allocate_stack): If the required permission changed between the time
5903         we started preparing the stack and queueing it, change the permission.
5904         (__make_stacks_executable): Call change_stack_perm.
5906         * Makefile: Build tst-execstack-mod locally.
5907         * tst-execstack-mod.c: New file.
5909 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5911         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5913 2003-09-23  Roland McGrath  <roland@redhat.com>
5915         * tst-execstack.c: New file.
5916         * Makefile (tests): Add it.
5917         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5918         (LDFLAGS-tst-execstack): New variable.
5920         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5921         whether to use PROT_EXEC for stack mmap.
5922         (__make_stacks_executable): New function.
5923         * pthreadP.h: Declare it.
5924         * init.c (__pthread_initialize_minimal_internal): Set
5925         GL(dl_make_stack_executable_hook) to that.
5927 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5929         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5930         recommendation from AMD re avoidance of lock prefix.
5932 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5934         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5935         lll_futex_timed_wait instead of lll_futex_wait.
5936         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5937         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5938         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5939         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5940         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5941         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5942         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5943         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5944         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5945         Completely revamp the locking macros.  No distinction between
5946         normal and mutex locking anymore.
5947         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5948         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5949         __lll_lock_timedwait): Fix prototypes.
5950         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5951         __lll_lock_timedwait): Likewise.
5952         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5953         macros, add __builtin_expect.
5954         (lll_mutex_timedlock): Likewise.  Fix return value.
5955         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5956         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5957         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5958         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5959         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5960         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5961         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5962         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5964 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5966         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5967         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5968         operation if possible.
5970         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5971         like jumping over the lock prefix.
5973 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5975         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5976         locking macros.  No distinction between normal and mutex locking
5977         anymore.
5978         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5979         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5980         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5981         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5982         locking.  Merge bits from lowlevelmutex.S we still need.
5983         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5984         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5985         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5986         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5987         * Makefile (routines): Remove libc-lowlevelmutex.
5988         (libpthread-rountines): Remove lowlevelmutex.
5989         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5990         for new mutex implementation.
5991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5996         Likewise.
5997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5998         Likewise.
5999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
6000         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6001         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
6002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6003         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6005         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6006         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6007         Likewise.
6008         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6009         Likewise.
6010         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
6011         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6012         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6013         Don't use requeue.
6014         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6015         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
6017 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
6019         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
6020         in parameters of asm with output parameters.
6022         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
6023         type of DECR parameter to int.
6024         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
6026 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
6028         * tst-attr3.c (tf, do_test): Print stack start/end/size and
6029         guardsize for each thread.
6031 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6033         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
6034         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
6035         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
6037         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
6038         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
6039         NULL.
6040         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
6041         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
6042         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
6043         (pthread_getaffinity_np): Add hidden_def.
6045         * Makefile (tests): Add tst-attr3.
6046         * tst-attr3.c: New test.
6048         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
6050 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6052         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
6053         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
6055 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
6057         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
6058         * tst-align.c: Include tst-stack-align.h.
6059         (tf, do_test): Use TEST_STACK_ALIGN macro.
6061 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
6063         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
6064         variable.
6066 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
6068         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
6069         stack-related values for the initial thread.
6071 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
6073         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
6075 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
6077         * pthread_mutex_lock.c: Minor code rearrangements.
6079 2003-09-05  Roland McGrath  <roland@redhat.com>
6081         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
6082         Instead, include ../nptl_db/db_info.c to do its magic.
6083         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
6084         (__pthread_pthread_key_2ndlevel_size): Likewise.
6085         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
6086         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
6087         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
6088         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
6089         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
6090         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
6091         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
6092         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
6093         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
6094         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6095         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6096         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6097         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6098         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6099         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6100         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6101         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6103 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6105         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6106         of pthread_t to be compatible with LT.
6107         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6108         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6109         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6110         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6111         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6112         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6113         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6115 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6117         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6119 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6121         * unwind-forcedunwind.c: Move to...
6122         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6123         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6124         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6125         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6126         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6127         * unwind.c: Include jmpbuf-unwind.h.
6128         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6130 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6132         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6133         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6134         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6135         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6136         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6137         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6138         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6139         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6140         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6141         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6142         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6143         function.
6144         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6145         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6146         * Makefile (tests): Add tst-stack2.
6147         * tst-stack2.c: New test.
6148         * tst-stack1.c: Include limits.h and sys/param.h.
6149         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6151         * pthread_condattr_setpshared.c: Include errno.h.
6152         (pthread_condattr_setpshared): Return EINVAL if pshared
6153         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6155         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6156         defined symbol for entry point to avoid cancellation.
6157         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6158         Likewise.
6159         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6160         Likewise.
6161         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6162         Likewise.
6163         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6164         Likewise.
6165         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6166         Likewise.
6167         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6168         __close_nocancel, __read_nocancel, __write_nocancel,
6169         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6170         libpthread.so or librt.so, define to corresponding function
6171         without _nocancel suffix.
6172         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6173         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6174         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6176         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6178 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6180         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6181         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6183         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6184         in subsections has a symbol associated with it.
6186         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6187         defined symbol for entry point to avoid cancellation.
6188         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6190 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6192         * Makefile (tests): Add tst-tls5.
6193         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6194         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6195         ($(objpfx)tst-tls5): New.
6196         ($(objpfx)tst-tls6.out): Likewise.
6197         (tests): Depend on $(objpfx)tst-tls6.out.
6198         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6199         (do_test): Check pthread_self () return value alignment.
6200         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6201         (tf): Check pthread_self () return value alignment.
6202         * tst-tls5.c: New test.
6203         * tst-tls5.h: New.
6204         * tst-tls5mod.c: New.
6205         * tst-tls5moda.c: New.
6206         * tst-tls5modb.c: New.
6207         * tst-tls5modc.c: New.
6208         * tst-tls5modd.c: New.
6209         * tst-tls5mode.c: New.
6210         * tst-tls5modf.c: New.
6211         * tst-tls6.sh: New test.
6213         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6214         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6215         * init.c (pthread_functions): Initialize them.
6216         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6217         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6218         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6219         pthread_cond_timedwait@@GLIBC_2.3.2.
6221 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6223         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6224         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6225         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6226         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6227         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6228         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6230         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6232         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6233         _POSIX_THREAD_PRIORITY_SCHEDULING.
6234         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6236 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6238         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6239         nested function, use static inline function from libio.h.
6240         Code by Richard Henderson.
6242         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6243         weak.
6245 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6247         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6248         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6249         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6250         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6251         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6252         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6253         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6254         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6255         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6256         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6257         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6258         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6259         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6260         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6261         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6262         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6263         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6264         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6265         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6266         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6267         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6268         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6269         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6270         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6271         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6272         * sysdeps/sparc/tls.h: New file.
6273         * sysdeps/sparc/tcb-offsets.sym: New file.
6274         * sysdeps/sparc/Makefile: New file.
6275         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6276         * init.c [__sparc__] (__NR_set_tid_address): Define.
6278 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6280         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6281         _IO_release_lock): Define.
6283 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6285         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6286         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6288 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6290         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6291         (__pthread_cleanup_class): Add missing return types of member
6292         functions.
6294 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6296         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6297         (lll_mutex_unlock_force): Add memory barrier between store and futex
6298         syscall.
6300 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6302         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6303         tempmsg in first loop.
6305 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6307         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6308         _POSIX_THREAD_PRIORITY_SCHEDULING.
6309         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6311 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6313         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6314         (__rtld_lock_default_lock_recursive,
6315         __rtld_lock_default_unlock_recursive): Define.
6316         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6317         __rtld_lock_unlock_recursive): Define using
6318         GL(_dl_rtld_*lock_recursive).
6319         * init.c (__pthread_initialize_minimal_internal): Initialize
6320         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6321         Lock GL(_dl_load_lock) the same number of times as
6322         GL(_dl_load_lock) using non-mt implementation was nested.
6324         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6325         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6327 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6329         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6330         PIPE_BUF.
6332 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6334         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6336 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6338         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6339         to first syscall error check.  Move syscall error check for tkill
6340         into __ASSUME_CLONE_STOPPED #ifdef.
6342 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6344         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6345         is not defined, do explicit synchronization.
6346         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6347         is not defined also unlock pd->lock for non-debugging case in case
6348         it is necessary.
6349         * pthread_create.c (start_thread): Always get and release pd->lock
6350         if __ASSUME_CLONE_STOPPED is not defined.
6351         (start_thread_debug): Removed.  Adjust users.
6352         * allocatestack.c (allocate_stack): Always initialize lock if
6353         __ASSUME_CLONE_STOPPED is not defined.
6354         * Makefile (tests): Add tst-sched1.
6355         * tst-sched1.c: New file.
6357         * sysdeps/pthread/createthread.c (do_clone): Only use
6358         sched_setschduler and pass correct parameters.
6360 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6362         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6363         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6364         PTHREAD_STACK_MIN in comments.
6366 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6368         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6369         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6370         argument.
6371         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6372         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6373         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6374         (__pthread_cleanup_upto): Fix prototype.
6375         (_longjmp_unwind): Adjust caller.
6376         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6377         Change second argument to const struct pointer.
6378         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6379         * tst-sem9.c (main): Likewise.
6380         * unwind.c: Include string.h for strlen prototype.
6382 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6385         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6386         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6387         Define HAVE_CMOV.
6388         Patch by Nicholas Miell <nmiell@attbi.com>.
6390 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6392         * init.c (__pthread_initialize_minimal_internal): Initialize
6393         GL(dl_init_static_tls).
6394         * pthreadP.h (__pthread_init_static_tls): New prototype.
6395         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6396         New functions.
6397         * Makefile (tests): Add tst-tls4.
6398         (modules-names): Add tst-tls4moda and tst-tls4modb.
6399         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6400         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6401         tst-tls4modb.so.
6402         * tst-tls4.c: New file.
6403         * tst-tls4moda.c: New file.
6404         * tst-tls4modb.c: New file.
6406 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6408         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6409         before __timer_dealloc.
6410         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6411         Don't call list_unlink.
6413 2003-07-29  Roland McGrath  <roland@redhat.com>
6415         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6417 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6419         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
6420         if __need_struct_pthread_size, instead define lll_lock_t.
6422 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6424         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6425         Don't reuse struct aiocb A if it failed.
6426         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6427         not just one byte, as that does not block.
6429 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6431         * sysdeps/pthread/unwind-resume.c: New file.
6432         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6433         unwind-resume in csu subdir.
6434         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6435         exceptions.
6436         (librt-sysdep_routines, librt-shared-only-routines): Add
6437         rt-unwind-resume.
6438         * sysdeps/pthread/rt-unwind-resume.c: New file.
6439         * unwind-forcedunwind.c: New file.
6440         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6441         (libpthread-shared-only-routines): Likewise.
6442         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6443         * pthreadP.h (pthread_cancel_init): New prototype.
6444         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6446         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6447         attr argument const struct pthread_attr *.
6449         * res.c (__res_state): Return __resp.
6450         * descr.h: Include resolv.h.
6451         (struct pthread): Add res field.
6452         * pthread_create.c: Include resolv.h.
6453         (start_thread): Initialize __resp.
6454         * Makefile (tests): Add tst-_res1.
6455         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6456         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6457         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6458         libpthread.
6459         * tst-_res1.c: New file.
6460         * tst-_res1mod1.c: New file.
6461         * tst-_res1mod2.c: New file.
6463 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6465         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6467         * Makefile: Define various *-no-z-defs variables for test DSOs
6468         which has undefined symbols.
6470 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6472         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6473         Retry if the stwcx fails to store once_control.
6475 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6477         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6478         pthread_attr_setaffinity.
6479         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6480         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6481         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6482         * pthread_attr_destroy.c: Free cpuset element if allocated.
6483         * pthread_create.c: Pass iattr as additional parameter to
6484         create_thread.
6485         * sysdeps/pthread/createthread.c: If attribute is provided and
6486         a new thread is created with affinity set or scheduling parameters,
6487         start thread with CLONE_STOPPED.
6488         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6489         pthread_attr_setaffinity.
6490         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6491         cpuset element.
6493 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6495         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6497 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6499         * sysdeps/pthread/configure.in: Require CFI directives also for
6500         ppc and s390.
6502 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6504         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6505         Add cfi directives.
6507 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6509         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6510         CLEANUP_JMP_BUF.
6511         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6512         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6513         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6514         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6515         not self pointer in __writer.  Compare with TID to determine
6516         deadlocks.
6517         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6518         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6519         Likewise.
6520         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6521         Likewise.
6522         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6523         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6524         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6525         macros also when compiling librt.
6527 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6529         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6530         -fasynchronous-unwind-tables.
6531         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6532         (PSEUDO): Add cfi directives.
6533         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6534         Likewise.
6535         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6536         Likewise.
6538 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6540         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6541         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6542         * unwind.c (__pthread_unwind_next): Add hidden_def.
6543         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6544         Likewise.
6545         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6546         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6547         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6548         Likewise.
6549         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6550         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6551         Likewise.
6552         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6553         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6554         __pthread_unregister_cancel and __pthread_unwind_next.
6556 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6558         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6559         different symbol for the cancellation syscall wrapper and
6560         non-cancellation syscall wrapper.
6561         (PSEUDO_END): Define.
6563 2003-07-05  Richard Henderson  <rth@redhat.com>
6565         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6566         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6567         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6568         return actual return value from the syscall, not 0.
6570 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6572         * descr.h (struct pthread): Add pid field.
6573         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6574         (__reclaim_stacks): Likewise.
6575         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6576         also check for PID of the signal source.
6577         (__pthread_initialize_minimal_internal): Also initialize pid field
6578         of initial thread's descriptor.
6579         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6580         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6581         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6582         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6583         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6585 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6587         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6588         Fix use of parameter.
6589         (__libc_cleanup_pop): Likewise.
6591 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6593         * init.c (sigcancel_handler): Change parameters to match handler
6594         for SA_SIGACTION.  Check signal number and code to recognize
6595         invalid invocations.
6597 2003-07-03  Roland McGrath  <roland@redhat.com>
6599         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6600         Apply sizeof (struct pthread) bias to r13 value.
6602 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6604         * sysdeps/pthread/configure.in: Require CFI directives.
6606         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6607         definition.
6608         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6609         libpthread compilation.
6610         * unwind.c (__pthread_unwind): Add hidden_def.
6611         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6613 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6615         * libc-cancellation.c (__libc_cleanup_routine): Define.
6616         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6617         (__pthread_cleanup_pop): Define.
6619 2003-07-01  Richard Henderson  <rth@redhat.com>
6621         * sysdeps/alpha/elf/pt-initfini.c: New file.
6622         * sysdeps/alpha/pthread_spin_lock.S: New file.
6623         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6624         * sysdeps/alpha/pthreaddef.h: New file.
6625         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6626         * sysdeps/alpha/tls.h: New file.
6627         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6628         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6629         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6630         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6631         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6632         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6633         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6634         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6635         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6636         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6638 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6640         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6641         cleanup support and unwind info.
6643 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6645         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6646         Use correct cleanup handler registration.  Add unwind info.
6647         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6648         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6649         * tst-once3.c: Add cleanup handler and check it is called.
6650         * tst-once4.c: Likewise.
6651         * tst-oncex3.c: New file.
6652         * tst-oncex4.c: New file.
6653         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6655 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6657         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6659 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6661         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6662         (tf_msgsnd): Likewise.
6664         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6665         premature returns a bit more.
6667 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6669         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6670         definition to the front.
6672         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6673         the cleanup functions to make the names unique.  Fix dwarf opcode
6674         un unwind table.
6675         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6676         functions to make the names unique.  Fix CFA offset for two blocks.
6678 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6680         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6681         missing closing braces.
6682         Patch by Christophe Saout <christophe@saout.de>.
6684 2003-06-24  Roland McGrath  <roland@redhat.com>
6686         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6688 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6690         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6691         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6693         * pthreadP.h: Declare __find_thread_by_id.
6694         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6695         * pthread_clock_gettime.c: Allow using other thread's clock.
6696         * pthread_clock_settime.c: Likewise.
6697         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6698         * Makefile: Add rules to build and run tst-clock2.
6699         * tst-clock2.c: New file.
6701 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6704         to use exception-based cleanup handler.
6705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6707         * tst-cond8.c (ch): Announce that we are done.
6709         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6711         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6712         Also test aio_suspend with timeout value.
6714 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6716         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6717         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6718         attribute_hidden.
6720         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6721         (__pthread_mutex_lock_internal): Likewise.
6722         (__pthread_mutex_unlock_internal): Likewise.
6723         (__pthread_mutex_unlock_usercnt): Declare.
6724         * pthread_mutex_destroy.c: Always fail if used in any way.
6725         * pthread_mutex_init.c: Update comment.
6726         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6727         * pthread_mutex_timedlock.c: Adjust __nusers.
6728         * pthread_mutex_trylock.c: Adjust __nusers.
6729         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6730         and public interfaces are wrapper with pass additional parameter.
6731         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6732         parameter zero.
6733         * tst-mutex8.c: New file.
6734         * Makefile (tests): Add tst-mutex8.
6735         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6736         __pthread_mutex_unlock_usercnt.
6737         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6738         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6739         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6740         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6742         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6743         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6744         Add __nusers.
6745         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6746         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6747         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6748         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6749         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6751         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6752         * pthread_mutex_timedlock.c: Likewise.
6753         * pthread_mutex_trylock.c: Adjust __nusers.
6754         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6755         * tst-mutex9.c: New file.
6756         * Makefile (tests): Add tst-mutex9.
6757         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6758         * sysdeps/ia64/tls.h: Likewise.
6759         * sysdeps/powerpc/tls.h: Likewise.
6760         * sysdeps/s390/tls.h: Likewise.
6761         * sysdeps/sh/tls.h: Likewise.
6762         * sysdeps/x86_64/tls.h: Likewise.
6763         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6764         Change type of __owner.
6765         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6766         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6767         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6768         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6769         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6771 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6773         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6774         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6776         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6777         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6778         instead of nr to lll_futex_wake.  Only set errno and return -1
6779         if err < 0.
6781         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6782         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6783         return actual return value from the syscall, not 0.
6785 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6787         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6788         find a random value.
6789         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6790         errno==EIDRM.
6792         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6793         compat_timer_settime.
6794         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6795         compat_timer_gettime.
6796         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6797         compat_timer_getoverrun.
6798         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6799         compat_timer_delete.
6801         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6802         error-checking mutex detect busy mutexes.
6804 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6806         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6807         Add ax to clobber list.
6808         (lll_mutex_cond_lock): Likewise.
6809         (lll_mutex_unlock): Likewise.
6810         (lll_lock): Likewise.
6811         (lll_unlock): Likewise.
6813         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6814         * tst-cancel18.c: New file.
6815         * tst-cancelx18.c: New file.
6817         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6818         and tcdrain.
6820         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6821         * tst-cancel17.c: New file.
6822         * tst-cancelx17.c: New file.
6824         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6825         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6826         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6828         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6830 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6832         * sysdeps/pthread/createthread.c (create_thread): Set
6833         header.multiple_threads unconditionally.
6834         * allocatestack.c (allocate_stack): Likewise.
6835         * descr.h (struct pthread): Add header.multiple_threads
6836         unconditionally.
6837         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6838         Define for librt.  #error if neither libpthread, libc nor librt.
6839         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6840         Likewise.
6841         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6842         CDISABLE): Likewise.
6843         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6844         CDISABLE): Likewise.
6845         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6846         CDISABLE): Likewise.
6847         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6848         CDISABLE): Likewise.  Access header.multiple_threads outside of
6849         libc and libpthread.
6850         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6851         Likewise.
6852         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6853         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6855 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6857         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6858         Also test early cancellation before the thread reaches the cancellation
6859         point.
6861         * Makefile: Compile forward.c with exceptions.
6863         * sysdeps/unix/sysv/linux/sleep.c: New file.
6865 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6867         * Makefile: Add CFLAGS definition to compile function wrappers
6868         duplicated from libc with exceptions.
6869         * tst-cancel4.c: Also check cancellation handlers.
6871         * Makefile: Add rules to build and run tst-cancel16 and
6872         tst-cancelx16.  Add missing CFLAGS definitions.
6873         * tst-cancel16.c: New file.
6874         * tst-cancelx16.c: New file.
6876 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6878         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6879         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6880         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6881         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6883         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6884         (LIBC_CANCEL_RESET): Likewise.
6885         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6886         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6887         librt-cancellation.
6888         (CFLAGS-libcrt-cancellation.c): Define.
6889         * sysdeps/pthread/librt-cancellation.c: New file.
6890         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6891         macros also when compiling librt.
6892         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6893         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6894         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6895         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6896         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6897         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6898         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6900         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6901         compat_timer_create.
6903 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6905         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6907         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6908         __register_atfork.
6909         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6910         Add libc_hidden_def.
6912 2003-06-13  Roland McGrath  <roland@redhat.com>
6914         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6915         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6917 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6919         * allocatestack.c (queue_stack): Always inline.
6920         * ptreadhP.h (__do_cancel): Likewise.
6922 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6924         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6925         a typo.
6927 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6929         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6930         (__pthread_cond_signal): Remove incorrect second addition for
6931         cond_lock!=0.
6933 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6935         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6936         (__pthread_cond_signal): Use correct futex pointer in
6937         __lll_mutex_lock_wait call.
6939         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6940         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6942 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6944         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6945         cancelable.
6946         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6947         Likewise.
6949         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6950         hand-written CFI generation code.  Since ENTRY/END also initiated
6951         CFI frames this caused two CFI sets to be generated.
6953 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6955         * cleanup_routine.c: New file.
6956         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6957         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6958         cleanup handling.
6959         * Makefile (libpthread-routines): Add cleanup_routine.
6960         Add more CFLAGS variables to compile with exceptions.  Add comments
6961         why which file needs unwind tables.
6962         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6963         tests.
6964         * tst-cancelx1.c: New file.
6965         * tst-cancelx2.c: New file.
6966         * tst-cancelx3.c: New file.
6967         * tst-cancelx4.c: New file.
6968         * tst-cancelx5.c: New file.
6969         * tst-cancelx6.c: New file.
6970         * tst-cancelx7.c: New file.
6971         * tst-cancelx8.c: New file.
6972         * tst-cancelx9.c: New file.
6973         * tst-cancelx10.c: New file.
6974         * tst-cancelx11.c: New file.
6975         * tst-cancelx12.c: New file.
6976         * tst-cancelx13.c: New file.
6977         * tst-cancelx14.c: New file.
6978         * tst-cancelx15.c: New file.
6979         * tst-cleanupx0.c: New file.
6980         * tst-cleanupx0.expect: New file.
6981         * tst-cleanupx1.c: New file.
6982         * tst-cleanupx2.c: New file.
6983         * tst-cleanupx3.c: New file.
6985         * tst-cleanup0.c: Make standard compliant.
6986         * tst-cleanup1.c: Likewise.
6988         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6989         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6990         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6991         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6992         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6993         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6994         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6995         CLEANUP_JMP_BUF.
6996         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6997         * tst-cancel12.c: New file.
6998         * tst-cancel13.c: New file.
6999         * tst-cancel14.c: New file.
7000         * tst-cancel15.c: New file.
7001         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
7002         and tst-cancel15.
7004         * tst-cancel1.c: Add some comments.
7006         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
7007         timeout correctly.
7009 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
7011         * Makefile (CFLAGS-pthread_cancel.c): Define.
7013 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
7015         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
7016         Change type of __writer element to int.
7017         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7018         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7019         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7020         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7021         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7022         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
7023         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7024         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
7025         Compare with TID to determine deadlocks.
7026         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
7027         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7028         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
7029         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7030         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7031         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7032         Likewise.
7033         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7034         Likewise.
7035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7036         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7037         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
7038         Likewise.
7039         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
7040         Likewise.
7041         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7042         * Makefile (tests): Add tst-rwlock12.
7043         * tst-rwlock12.c: New file.
7045 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
7047         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
7048         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
7049         Remove bogus hidden_proto.
7050         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
7051         Likewise.
7052         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
7053         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
7054         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
7055         ___lll_mutex_timedlock): Likewise.
7057 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
7060         (__pthread_cond_signal): Add some code to eventually handle
7061         cond_lock!=0.
7063 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
7065         * Makefile (tests): Add tst-exec4.
7066         (tst-exec4-ARGS): Define.
7067         * tst-exec4.c: New file.
7069 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
7071         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7072         Also fail if tv_nsec < 0.
7073         (__lll_timedwait_tid): Likewise.
7074         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
7075         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
7076         Likewise.
7077         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
7078         Likewise.
7079         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
7080         Likewise.
7081         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
7082         Likewise.
7083         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
7084         Likewise.
7085         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
7086         Likewise.
7088         * Makefile (tests): Add tst-sem8 and tst-sem9.
7089         * tst-sem8.c: New file.
7090         * tst-sem9.c: New file.
7091         * sem_open.c: Fix creation of in_use record if the file exists but
7092         no internal record.
7094         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
7095         definitions.
7097         * sysdeps/pthread/timer_create.c (timer_create): In case
7098         evp==NULL, assign timer ID to sival_ptr.
7100         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7101         struct pthread_unwind_buf *.
7102         (struct pthread): Likewise for cleanup_jmp_buf element.
7104         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7105         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7106         * unwind.c (__pthread_unwind_next): Likewise.
7108 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7110         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7111         (lll_futex_timed_wait): Use int for futex value parameter.
7112         (lll_futex_wake): Likewise.
7113         (lll_futex_requeue): Likewise.
7115         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7116         Replace one memory operation with one register operation.
7118         * tst-join4.c (do_test): Fix error message.
7120         * tst-rwlock6.c (do_test): Use correct format specifier.
7122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7123         (__lll_mutex_lock_wait): Replace one memory operation with one
7124         register operation.
7125         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7126         (__lll_mutex_lock_wait): Likewise.
7128         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7129         (__lll_mutex_cond_lock): Add one to value parameter of
7130         __lll_lock_wait to reflect reality in the futex syscall.
7131         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7132         (lll_mutex_cond_lock): Likewise.
7134 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7136         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7137         New function.
7138         (lll_mutex_cond_lock): Define.
7140 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7142         * Makefile (tests): Add tst-signal6.
7143         * tst-signal6.c: New file.
7145         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7146         (__lll_mutex_unlock_force): New function
7147         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7149         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7150         (__lll_mutex_unlock_force): New function.
7151         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7153         * tst-rwlock7.c (do_test): Use correct format specifier.
7155         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7156         Find break parameter in correct asm argument.
7158 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7160         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7161         Remove out4.
7162         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7163         error occured.
7164         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7165         Add __mutex.
7166         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7167         lll_futex_requeue, lll_mutex_unlock_force): Define.
7169 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7171         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7172         (pthread_cond_t): Add __mutex.
7173         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7174         lll_futex_requeue, lll_mutex_unlock_force): Define.
7176 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7178         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7179         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7180         Add __mutex field.
7181         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7182         Define.
7183         (lll_futex_wait, lll_futex_wake): Define.
7184         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7185         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7186         FUTEX_REQUEUE instead of FUTEX_WAIT.
7187         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7188         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7189         mutex which was used in condvar structure.  Call
7190         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7191         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7193         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7194         include tcb-offsets.h.  Read wakeup value in locked region.
7195         Use the value of gbr register as THREAD_ID.
7196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7197         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7198         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7200         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7201         macros.
7203 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7205         * sysdeps/pthread/pthread_cond_broadcast.c
7206         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7208 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7211         typo in register name.
7212         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7213         correctly.  Actually use requeue.  Little optimization.
7214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7215         mutex address early.  Handle cancellation state as 32-bit value.
7216         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7217         Remove unnecessary label.
7219 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7221         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7222         instead of FUTEX_WAIT.
7223         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7224         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7228         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7229         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7230         of __pthread_mutex_lock_internal.
7231         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7232         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7233         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7234         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7235         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7236         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7237         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7238         Add pthread_mutex_cond_lock.
7239         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7240         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7241         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7242         lll_mutex_cond_lock.
7243         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7244         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7245         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7246         Add __mutex field.
7247         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7248         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7250         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7251         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7253         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7254         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7255         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7256         macro don't define aliases.
7258         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7259         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7260         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7261         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7263         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7264         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7265         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7266         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7268 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7270         * sem_open.c: Fix one endless loop.  Implement correct semantics
7271         wrt opening the same semaphore more then once.
7272         * sem_close.c: Adjust for sem_open change.
7273         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7274         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7275         * Makefile (tests): Add tst-sem7.
7276         * tst-sem7.c: New file.
7278 2003-05-16  Roland McGrath  <roland@redhat.com>
7280         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7281         uninitialized variable braino.
7283 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7285         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7286         test for syscall availability.
7288         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7289         __no_posix_timers to -1 if the syscalls don't exist.
7291         * pthread_join.c (pthread_join): Set tid field of the joined
7292         thread to -1.  This isn't necessary but helps to recognize some
7293         error conditions with almost no cost.
7295         * allocatestack.c (FREE_P): Also negative values indicate an
7296         unused stack.
7298         * unwind.c: Include <unistd.h>.
7300 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7302         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7304 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7306         * Makefile (crti-objs, crtn-objs): New variables.
7307         (omit-deps, extra-objs): Add crtn.
7308         ($(objpfx)libpthread.so): Depend on both crti and crtn
7309         and links to them in multidir.
7310         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7312 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7314         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7315         (lll_mutex_unlock): Use atomic_exchange_rel.
7317 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7319         * cond-perf.c (cons): Add missing locking around setting of alldone.
7321 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7323         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7324         related macros.
7325         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7327 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7329         * tst-sem6.c: New file.
7330         * Makefile (tests): Add tst-sem6.
7332         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7333         Use atomic_exchange_rel instead of atomic_exchange.
7334         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7335         Likewise.
7337         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7338         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7339         vsyscall is possible.
7341         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7342         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7343         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7344         pthread_setaffinity_np.
7345         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7346         and pthread_setaffinity_np.
7347         * Makefile (libpthread-routines): Add pthread_getaffinity and
7348         pthread_setaffinity.
7350         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7351         use it in case mmap to allocate the stack fails.
7352         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7353         ARCH_MAP_FLAGS here.
7354         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7355         ARCH_RETRY_MMAP.
7357 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7359         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7360         handler implementation.  It is now lockless in fork().
7361         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7362         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7363         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7364         declare the __fork_*_lists.
7365         (struct fork_handler): Include pointers to all three functions.
7366         Add next, refcntr and need_signal elements.
7367         (__fork_handlers): New declaration.
7368         (__register_atfork_malloc): Remove declaration.
7369         (HAVE_register_atfork_malloc): Remove definition.
7370         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7371         __pthread_child_handler variable.
7372         (__libc_pthread_init): Use __register_atfork instead of explicitly
7373         adding to the list.
7374         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7375         and lll_futex_wake.
7376         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7378         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7379         function must never be reached.
7381         * cond-perf.c: New file.
7383 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7385         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7387 2003-05-04  Roland McGrath  <roland@redhat.com>
7389         * Makefile ($(objpfx)../libc.so): New target.
7391 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7393         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7394         (pthread_condattr_t): Size is only an int, don't use long for
7395         alignment.
7396         (pthread_mutexattr_t): Likewise.
7397         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7398         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7399         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7401 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7403         * sysdeps/i386/tls.h: Define THREAD_ID.
7404         * sysdeps/ia64/tls.h: Likewise.
7405         * sysdeps/powerpc/tls.h: Likewise.
7406         * sysdeps/s390/tls.h: Likewise.
7407         * sysdeps/sh/tls.h: Likewise.
7408         * sysdeps/x86_64/tls.h: Likewise.
7409         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7410         record ownership.
7411         * pthread_mutex_timedlock.c: Likewise.
7412         * pthread_mutex_trylock.c: Likewise.
7413         * pthread_mutex_unlock.c: Likewise.
7414         * pthread_rwlock_trywrlock.c: Likewise.
7415         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7416         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7417         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7418         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7420         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7421         flag.
7423 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7425         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7426         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7427         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7428         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7429         Make __align long long instead of long.
7430         (pthread_rwlock_t): Formatting.
7431         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7432         (pthread_rwlock_t): Formatting.
7433         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7434         (pthread_cond_t): Make __align long long instead of long.
7435         (pthread_rwlock_t): Move __flags field to the same position as in
7436         linuxthreads.
7438 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7440         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7441         * tst-rwlock7.c (do_test): Likewise.
7443 2003-04-26  Roland McGrath  <roland@redhat.com>
7445         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7447 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7449         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7450         sizeof (struct pthread).
7451         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7452         1 struct pthread.
7453         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7454         to 0.
7455         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7456         struct pthread.
7457         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7458         to 32-bit bytes.
7459         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7460         tcbp.
7461         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7462         unneccessarily.
7463         (NO_TLS_OFFSET): Define.
7464         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7465         add TLS_TCB_SIZE unnecessarily.
7467 2003-04-22  Roland McGrath  <roland@redhat.com>
7469         * Makeconfig (shared-thread-library): Reverse link order to work
7470         around linker bug.
7472 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7474         * semaphore.h: Fix typo in comment.
7476 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7478         * sysdeps/pthread/sigfillset.c: New file.
7480         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7481         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7482         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7483         * sysdeps/pthread/sigaction.c: Likewise.
7484         * sysdeps/pthread/sigprocmask.c: New file.
7485         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7486         __SIGRTMIN+1.
7487         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7488         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7489         in this case.
7491 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7493         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7494         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7496         * sysdeps/unix/sysv/linux/unregister-atfork.c
7497         (__unregister_atfork): Don't free memory not allocated dynamically.
7499         * semaphore.h: Remove __THROW marker from cancellation points.
7500         * nptl/sysdeps/pthread/pthread.h: Likewise.
7502 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7504         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7505         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7506         __THROW.
7508 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7510         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7512 2003-04-15  Roland McGrath  <roland@redhat.com>
7514         * forward.c (__pthread_unwind): Tweak to avoid warning.
7516 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7518         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7520 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7523         overflow CFA advance instructions.
7524         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7526 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7528         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7529         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7530         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7531         defined.
7533         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7534         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7536         DW_CFA_advance_loc for .Laddl-.Lsubl.
7538 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7540         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7541         position-independent unwind data for static libraries.
7542         Add missing unwind info.  Add comments.
7544         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7545         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7546         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7547         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7549 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7551         * Makefile: Make sure all cancellation points are compiled with
7552         exception and asynchronous unwind tables.
7554         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7555         which mishandles loading of global object addresses in PIC.
7556         (THREAD_SETMEM_NC): Likewise.
7558 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7560         * pthread.h: Define new data structure for cleanup buffer.  Declare
7561         new cleanup handler interfaces.
7562         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7563         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7564         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7565         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7566         it.  Declare old cleanup handler installation functions.
7567         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7568         handling.
7569         * cleanup_defer.c: Likewise.
7570         * cleanup_compat.c: New file.  Old cleanup code.
7571         * cleanup_def_compat.c: New file.  Old cleanup code.
7572         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7573         if own thread descriptor.
7574         * unwind.c: New file.
7575         * forward.c: Add __pthread_unwind.
7576         * init.c (pthread_functions): Add __pthread_unwind.
7577         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7578         Add ptr___pthread_unwind.
7579         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7580         and unwind function.
7581         * Makefile (libpthread-routines): Add cleanup_compat,
7582         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7583         table generation if necessary.
7584         * version.c: Record whether unwind support is compiled in.
7585         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7586         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7587         handler interfaces.
7588         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7589         complication to generate unwind information for syscall wrappers.
7590         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7591         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7592         __cleanup_fct_attribute.
7594         * Makefile: Add rules to build and run tst-cleanup0.
7595         * tst-cleanup0.c: New file.
7596         * tst-cleanup0.expect: New file.
7598         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7599         caller.  Optimize to avoid often unecessary local variable.
7601 2003-04-11  Roland McGrath  <roland@redhat.com>
7603         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7604         sets variable `multidir'; include that.
7605         (generated): Add it.
7606         ($(objpfx)$(multidir)/crti.o): New target.
7607         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7609 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7611         * tst-attr2.c (do_test): Add cast to avoid warning.
7612         * tst-mutex4.c (do_test): Likewise.
7614 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7616         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7617         in child.
7619 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7621         * Makefile (tests): Add tst-detach1.
7622         * tst-detach1.c: New file.
7624 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7626         * sysdeps/pthread/pthread.h: Remove duplicate
7627         pthread_cleanup_{push,pop} definitions.
7629         * tst-barrier2.c: Eliminate warnings.
7630         * tst-cancel4.c: Likewise.
7631         * tst-cond4.c: Likewise.
7632         * tst-cond6.c: Likewise.
7633         * tst-detach1.c: Likewise.
7634         * tst-rwlock4.c: Likewise.
7635         * tst-rwlock6.c: Likewise.
7636         * tst-rwlock7.c: Likewise.
7637         * tst-sem3.c: Likewise.
7638         * tst-spin2.c: Likewise.
7639         * tst-umask1.c: Likewise.
7641 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7643         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7645 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7647         * descr.h (struct pthread): Move cancelhandling member to the front.
7649 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7651         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7652         malloc_parent, and malloc_child statically.
7653         (__register_atfork_malloc): New function.
7654         (free_mem): Don't free any of the malloc_* variables on the list.
7655         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7656         Define HAVE_register_atfork_malloc.
7658 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7660         * sysdeps/pthread/createthread.c (create_thread): Add some more
7661         comments explaining when to set multiple_threads and when not.
7663         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7664         THREAD_ATOMIC_BIT_SET if not already defined.
7665         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7666         THREAD_ATOMIC_BIT_SET:
7667         * sysdeps/x86_64/tls.h: Likewise.
7668         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7669         THREAD_ATOMIC_CMPXCHG_VAL.
7670         (_pthread_cleanup_pop_restore): Likewise.
7671         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7672         (__pthread_enable_asynccancel_2): Likewise.
7673         (__pthread_disable_asynccancel): Likewise.
7674         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7675         (__libc_disable_asynccancel): Likewise.
7676         * init.c (sigcancel_handler): Likewise.
7677         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7678         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7680 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7682         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7683         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7684         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7685         * Makefile (tests): Add tst-cancel11.
7686         * tst-cancel11.c: New file.
7688 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7690         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7691         round, not the first.  Use specific_used flag instead of local
7692         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7693         (__free_tcb): Don't call deallocate_tsd here.
7694         (start_thread): Call deallocate_tsd here.
7695         * pthread_setspecific.c: Set specific_used flag really only when
7696         needed.
7697         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7698         * tst-tsd3.c: New file.
7699         * tst-tsd4.c: New file.
7701 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7703         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7704         Use atomic_exchange_and_add instead of __lll_add.
7705         (__lll_mutex_timedlock): Likewise.
7706         Patch by Ian Wienand.
7708 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7710         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7711         (SINGLE_THREAD_P): Fix typo.
7712         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7714 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7716         * Makefile (tests): Add tst-align.
7717         * tst-align.c: New file.
7718         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7720         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7721         function correctly.
7723         * tst-tsd2.c: Add casts to avoid warnings.
7725 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7727         * descr.h (struct pthread): Move most often used elements to the front.
7729 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7731         * Makefile (libpthread-routines): Add pthread_atfork.
7732         (libpthread-static-only-routines): Add pthread_atfork.
7734 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7736         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7737         of TLS_DTV_AT_TP.
7738         (INSTALL_DTV): Add parens.
7739         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7740         Use passed descr instead of THREAD_SELF.
7741         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7742         (__lll_mutex_timedlock_wait): Correct expected value after
7743         spurious wakeup.
7744         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7745         Release lock before waking up the waiters.
7746         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7747         criteria.  Reorderstruct passed to cleanup handler.  Fix
7748         handling of cancellation and failung pthread_mutex_unlock call.
7749         Use __pthread_enable_asynccancel_2 instead of
7750         __pthread_enable_asynccancel.
7751         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7752         Return result of lock re-get if it fails.
7753         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7754         for __pthread_cleanup_push.
7755         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7756         completely broken rwlock implementation.
7757         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7758         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7759         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7760         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7761         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7762         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7763         versioned_symbol macro.
7764         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7765         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7767 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7769         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7770         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7771         and __helper_tid.
7772         (struct timer): Remove th and bar field.
7773         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7774         debugging code.  Create only one helper thread.
7775         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7776         helper thread.
7777         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7778         Renamed.  Define statically.  Use thread info from siginfo.
7779         (__helper_once): New variable.
7780         (__helper_tid): New variable.
7781         (__reset_helper_control): New function.
7782         (__start_helper_thread): New function.
7784         * pthread_create.c (start_thread): Don't use setjmp inside
7785         __builtin_expect to work around gcc bug.
7787         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7788         timer_delete syscall fails, but not with ENOSYS, set
7789         __no_posix_timers.
7791         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7792         (timer_settime): Fix typo.
7793         * sysdeps/unix/sysv/linux/timer_getoverr.c
7794         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7796 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7798         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7799         offset of cleanupbuf.__prev.
7801 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7803         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7804         of included file.
7806 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7808         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7809         NULL provide default definition to syscall.
7811 2003-03-25  Roland McGrath  <roland@redhat.com>
7813         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7814         (timer_id2ptr): Fix typo.
7816 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7818         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7819         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7820         * sysdeps/ia64/pthreaddef.h: Likewise.
7821         * sysdeps/powerpc/pthreaddef.h: Likewise.
7822         * sysdeps/s390/pthreaddef.h: Likewise.
7823         * sysdeps/sh/pthreaddef.h: Likewise.
7824         * sysdeps/x86_64/pthreaddef.h: Likewise.
7825         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7826         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7827         being changed.
7828         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7829         SIGTIMER is not unblocked.
7830         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7831         RT signal taken.
7832         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7833         be send.
7834         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7835         pass pointer through as ID.
7836         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7837         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7838         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7839         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7840         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7841         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7842         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7843         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7844         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7845         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7846         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7847         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7848         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7849         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7850         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7851         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7852         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7853         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7854         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7855         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7856         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7857         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7858         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7859         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7860         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7861         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7862         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7863         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7864         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7865         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7866         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7867         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7868         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7870         * pthreadP.h: Remove FRAME_LEFT definition.
7871         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7872         already left frame.  Programs which have this problem are not POSIX
7873         compliant.
7874         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7876 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7878         * sysdeps/pthread/tst-timer.c: Check return values of the
7879         functions we test.
7881 2003-03-23  Roland McGrath  <roland@redhat.com>
7883         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7884         * tst-tls3mod.c: Likewise.
7885         * tst-tls1.c: Likewise.
7886         * tst-tls2.c: Likewise.
7888         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7889         undefined behavior.
7891         * tst-join5.c (tf1, tf2): Add a cast.
7893         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7895         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7896         Don't test anything.
7897         * tst-cond4.c: Likewise.
7898         * tst-cond6.c: Likewise.
7899         * tst-flock2.c: Likewise.
7900         * tst-mutex4.c: Likewise.
7901         * tst-rwlock4.c: Likewise.
7902         * tst-signal1.c: Likewise.
7903         * tst-spin2.c: Likewise.
7904         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7906         * tst-mutex4.c: Use test-skeleton.c.
7907         * tst-spin2.c: Likewise.
7908         * tst-sysconf.c: Likewise.
7909         * tst-barrier2.c: Likewise.
7910         * tst-cond4.c: Likewise.
7911         * tst-cond6.c: Likewise.
7912         * tst-rwlock4.c: Likewise.
7913         * tst-unload.c: Likewise.
7914         * tst-flock2.c (do_test): Use return instead of exit.
7916 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7918         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7920 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7922         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7923         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7924         instead of __lll_compare_and_swap.
7925         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7926         Likewise.
7927         Removed definition if __lll_compare_and_swap.
7929         * cancellation.c: Adjust for new form of compare&exchange macros.
7930         * cleanup_defer.c: Likewise.
7931         * init.c: Likewise.
7932         * libc-cancellation.c: Likewise.
7933         * old_pthread_cond_broadcast.c: Likewise.
7934         * old_pthread_cond_signal.c: Likewise.
7935         * old_pthread_cond_timedwait.c: Likewise.
7936         * old_pthread_cond_wait.c: Likewise.
7937         * pthread_cancel.c: Likewise.
7938         * pthread_create.c: Likewise.
7939         * pthread_detach.c: Likewise.
7940         * pthread_join.c: Likewise.
7941         * pthread_key_delete.c: Likewise.
7942         * pthread_setcancelstate.c: Likewise.
7943         * pthread_setcanceltype.c: Likewise.
7944         * pthread_timedjoin.c: Likewise.
7945         * pthread_tryjoin.c: Likewise.
7946         * sysdeps/pthread/createthread.c: Likewise.
7948 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7950         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7951         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7952         definitions.  Replace uses with calls to atomic_* functions.
7953         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7954         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7955         __lll_test_and_set calls with atomic_exchange_and_add and
7956         atomic_exchange calls respectively.
7957         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7958         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7959         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7960         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7961         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7962         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7963         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7965         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7966         returns the old value.
7968 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7970         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7971         int for variable OLDVAL and correct inline assembler contraint.
7972         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7973         type int for variable OLD.
7975         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7976         only for s390-32.
7977         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7978         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7979         instead of multiple_threads field in the TCB.
7981 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7983         * sysdeps/i386/i686/bits/atomic.h: Removed.
7984         * sysdeps/i386/i586/bits/atomic.h: Removed.
7985         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7986         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7987         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7988         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7989         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7990         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7991         * atomic.h: Removed.  Moved to glibc.
7993         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7994         support for clock selection.
7996         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7997         signalling waiters.
7999 2003-03-18  Roland McGrath  <roland@redhat.com>
8001         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8002         Add __lll_rel_instr first.  Add memory clobber.
8003         (lll_mutex_unlock): Use __lll_test_and_set.
8004         From Paul Mackerras <paulus@samba.org>.
8006         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
8007         unconditionally.
8008         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
8009         (SINGLE_THREAD_P):  Add `header.' prefix.
8010         From Paul Mackerras <paulus@samba.org>.
8012         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
8013         pthread_timedjoin_np to ...
8014         (libpthread: GLIBC_2.3.3): ... here.
8015         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
8017         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8018         Avoid shadowing VAL variable.
8020         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
8021         New macro.
8023 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
8025         * Makefile (tests): Add tst-cond11.
8026         * tst-cond11.c: New file.
8028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
8029         struct passed to cleanup handler to eliminate one more
8030         instruction.
8031         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8033         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8034         (pthrad_cond_t): Replace __unused field with __clock.
8036         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
8037         waken all waiters in cleanup handler.
8038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8039         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8041         * pthread_condattr_getclock.c: New file.
8042         * pthread_condattr_setclock.c: New file.
8043         * sysdeps/pthread/pthread.h: Declare these new functions.
8044         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
8045         * Makefile (libpthread-routines): Add the new functions.
8046         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
8047         Renamed field to value.  Document use of the bits.
8048         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
8049         change.
8050         * pthread_condattr_setpshared.c: Likewise.
8051         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
8052         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
8053         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
8054         Add __clock field.
8055         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
8056         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
8057         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
8058         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
8059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
8060         Implement clock selection.
8061         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8062         * pthread-errnos.sym: Add ENOSYS.
8063         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8064         _POSIX_CLOCK_SELECTION.
8065         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8067         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
8068         invalid .size directive.
8070 2003-03-17  Roland McGrath  <roland@redhat.com>
8072         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
8073         Formatting tweaks.
8075 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8077         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
8078         Use __lll_add instead of spelling it out.  Use protected symbol names.
8079         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
8080         Use __lll_add.
8081         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
8082         Renamed from lll_compare_and_swap.  Use new name where necessary.
8083         (__lll_add): Defined.
8084         (__lll_dec_if_positive): Defined.
8085         (__lll_test_and_set): Defined.
8086         * sysdeps/ia64/pthread_spin_init.c: Removed.
8087         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
8088         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
8089         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
8090         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
8091         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
8092         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
8093         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
8094         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
8095         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
8096         __sync_lock_release_si.
8097         Patch by Jakub Jelinek.
8099         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8100         Fix timeout handling.
8101         (__lll_timedwait_tid): Likewise.
8102         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8103         Patch by Jakub Jelinek.
8105         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8107 2003-03-17  Roland McGrath  <roland@redhat.com>
8109         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8110         * sysdeps/pthread/pthread_spin_init.c: New file.
8111         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8112         * sysdeps/powerpc/Makefile: New file.
8113         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8114         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8115         * sysdeps/powerpc/pthreaddef.h: New file.
8116         * sysdeps/powerpc/tcb-offsets.sym: New file.
8117         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8118         * sysdeps/powerpc/tls.h: New file.
8119         * sysdeps/powerpc/bits/atomic.h: New file.
8120         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8121         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8122         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8124         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8125         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8126         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8127         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8128         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8129         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8130         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8131         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8132         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8133         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8134         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8135         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8136         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8137         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8138         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8140         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8141         not gettimeofday.
8142         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8143         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8144         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8145         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8146         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8148 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8150         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8151         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8154         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8156 2003-03-16  Roland McGrath  <roland@redhat.com>
8158         * tst-fork4.c: Include <string.h>.
8159         * tst-signal2.c: Likewise.
8160         * tst-mutex5.c (do_test): exit -> return.
8161         * tst-mutex2.c: Include <stdlib.h>.
8163 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8165         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8166         (__lll_mutex_timedlock_wait): Correct expected value after
8167         spurious wakeup.  Otherwise we would never wait again.
8169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8170         zone versus inline asm stupidity.  Use correct instructions.
8172         * tst-rwlock6.c: Add some more status output.
8174 2003-03-15  Roland McGrath  <roland@redhat.com>
8176         * sysdeps/pthread/configure.in: New file.
8177         * sysdeps/pthread/configure: New file (generated).
8179 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8181         * allocatestack.c (allocate_stack): Store the exact stack size of
8182         user allocated stacks.
8184 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8186         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8187         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8188         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8189         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8190         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8191         Use `header.' prefix.
8192         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8194 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8196         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8197         __builtin_frame_address, use stack pointer.
8199         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8200         instead of __builtin_frame_pointer.
8202 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8204         * tst-basic1.c (do_test): Add cast to avoid warning.
8205         * tst-basic2.c (do_test): Likewise.
8207         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8208         amount of stack correction.
8210         * tst-fork4.c: Use test-skeleton.c.
8212 2003-03-14  Roland McGrath  <roland@redhat.com>
8214         * init.c: Fix typo "#eli" for "#else".
8216 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8218         * allocatestack.c (__stack_user): Use hidden_data_def.
8219         * pthread_create.c (__pthread_keys): Likewise.
8221         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8223 2003-03-14  Roland McGrath  <roland@redhat.com>
8225         * tst-fork4.c: New file.
8226         * Makefile (tests): Add it.
8228         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8229         we always define the padding space.
8230         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8231         stopped supporting its own extensions fully.
8232         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8233         struct also called `header', so `header.multiple_threads' is the field
8234         name to use on all machines.
8235         * allocatestack.c (allocate_stack): Use `header.' prefix.
8236         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8237         * pthread_create.c (__pthread_create_2_1): Likewise.
8238         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8239         (THREAD_SELF): Likewise.
8240         * sysdeps/x86_64/tls.h: Likewise.
8241         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8242         (SINGLE_THREAD_P): Likewise.
8243         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8244         (SINGLE_THREAD_P): Likewise.
8245         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8246         (SINGLE_THREAD_P): Likewise.
8248         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8249         value directly.
8251 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8253         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8254         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8256         * pthread_create.c (start_thread): setjmp is expected to return 0.
8258         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8259         (THREAD_GETMEM_NC): Likewise.
8261 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8263         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8264         and the size of the stack which must be allocated is a multiple,
8265         allocate one more page.
8266         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8267         MULTI_PAGE_ALIASING.
8269 2003-03-13  Roland McGrath  <roland@redhat.com>
8271         * pthread_create.c (start_thread): Set EXITING_BIT after the
8272         event-reporting (and destructors), not before.
8274 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8276         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8277         lll_futex_wake): Declare register variables as long int instead of
8278         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8279         Make syscall arguments clobbered by the syscall.
8280         (lll_futex_wait): Define using lll_futex_timed_wait.
8282         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8283         to void *.
8285         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8286         PPID if [! NDEBUG].
8288         * allocatestack.c (nptl_ncreated): Only declare if
8289         COLORING_INCREMENT != 0.
8291         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8292         (__libc_enable_asynccancel_2): Remove prototype.
8294         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8295         ctid to match kernel.
8297 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8299         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8300         libc_multiple_threads.
8301         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8302         __libc_multiple_threads to...
8303         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8305         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8306         versioning.
8307         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8308         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8310         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8311         (__pthread_once_internal): Define.
8313         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8314         macros instead of .symver directly.
8315         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8316         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8318         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8319         * sysdeps/x86_64/tcb-offsets.sym: New file.
8320         * sysdeps/x86_64/Makefile: New file.
8322         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8323         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8324         to access own pthread_t in TCB.
8325         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8326         Likewise.
8327         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8328         Likewise.
8329         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8331 2003-03-12  Roland McGrath  <roland@redhat.com>
8333         * pthread-errnos.sym: New file.
8334         * Makefile (gen-as-const-headers): New variable, list that file.
8335         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8336         header <pthread-errnos.h> instead of defining errno values here.
8337         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8338         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8339         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8340         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8342         Likewise.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8344         Likewise.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8347         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8348         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8349         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8350         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8351         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8352         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8354         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8355         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8356         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8357         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8358         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8359         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8361         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8362         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8363         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8364         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8365         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8366         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8367         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8368         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8369         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8370         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8371         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8373         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8374         CLONE_CHILD_SETTID worked.
8376 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8378         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8379         file.
8380         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8381         file.
8383         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8384         (pthread_cond_t): Add padding.
8386         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8387         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8388         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8391         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8392         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8393         (__pthread_rwlock_timedrdlock): Likewise.
8394         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8395         (__pthread_rwlock_wrlock): Likewise.
8396         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8397         (__pthread_rwlock_rdlock): Likewise.
8399         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8402         result of lock re-get if it fails.
8404 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8406         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8408         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8409         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8410         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8411         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8412         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8413         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8414         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8415         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8417         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8418         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8420         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8421         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8422         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8423         (create_thread): Likewise.
8424         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8425         * init.c (__pthread_initialize_minimal_internal): Initialize
8426         __libc_multiple_threads_ptr if necessary.
8427         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8428         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8429         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8430         __libc_multiple_threads.
8431         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8432         necessary.
8434         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8435         (THREAD_SETMEM_NC): Likewise.
8437         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8438         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8439         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8440         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8442         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8443         Eliminate one entire instruction.
8445         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8446         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8448         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8449         instead of __pthread_enable_asynccancel.
8450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8451         (__pthread_cond_wait): Likewise.
8452         * sysdeps/pthread/pthread_cond_timedwait.c
8453         (__pthread_cond_timedwait): Likewise.
8454         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8457         (__condvar_cleanup): Wake up all waiters in case we got signaled
8458         after being woken up but before disabling asynchronous
8459         cancellation.
8460         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8461         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8462         (__condvar_cleanup): Likewise.
8464         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8465         Make it an error if architecture has no #if case.  Add x86-64.
8467         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8468         pt-initfini.s generation.
8470         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8471         (TLS_INIT_TP): Fix typo.
8473 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8475         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8476         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8478         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8479         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8480         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8481         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8482         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8483         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8484         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8485         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8487 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8489         * sysdeps/pthread/pthread_cond_timedwait.c
8490         (__pthread_cond_timedwait): Return the result of the final
8491         locking.  If it succeeds, the regular function return value.
8493         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8494         Return result of the final locking.
8495         * version.c (__nptl_main): Work around problems with the strange
8496         INTERNAL_SYSCALL macro on ppc32.
8497         * init.c (__pthread_initialize_minimal_internal): Unblock
8498         SIGCANCEL in case the parent blocked it.
8499         Reported by Paul Mackerras <paulus@samba.org>.
8501         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8502         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8503         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8505 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8507         * sysdeps/pthread/pthread_cond_timedwait.c
8508         (__pthread_cond_timedwait): Unlock and fail if
8509         __pthread_mutex_unlock_internal failed.
8511         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8512         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8513         Use ARCH_CLONE.
8514         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8515         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8516         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8517         ALLOCATE_STACK): New macros.
8518         (TLS_TPADJ): New macro.
8519         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8520         (allocate_stack): Handle TLS_DTV_AT_TP and
8521         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8522         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8523         Don't set PD->self.
8524         * init.c [__ia64__] (__NR_set_tid_address): Define.
8526         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8527         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8528         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8529         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8530         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8531         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8532         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8533         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8534         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8535         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8536         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8537         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8538         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8539         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8540         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8541         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8542         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8543         * sysdeps/ia64/bits/atomic.h: New file.
8544         * sysdeps/ia64/Makefile: New file.
8545         * sysdeps/ia64/pthread_spin_init.c: New file.
8546         * sysdeps/ia64/pthread_spin_lock.c: New file.
8547         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8548         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8549         * sysdeps/ia64/pthreaddef.h: New file.
8550         * sysdeps/ia64/tcb-offsets.sym: New file.
8551         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8552         * sysdeps/ia64/tls.h: New file.
8554         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8555         to syscall instead of no arguments.
8557 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8559         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8560         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8561         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8562         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8564         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8565         unused code.
8567         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8569         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8570         lowlevelbarrier.sym.
8571         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8572         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8573         Include lowlevelbarrier.h and don't define offsets locally.
8574         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8576         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8577         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8578         (__lll_mutex_timedlock_wait): Likewise.
8579         (lll_mutex_lock): Adjust asm for that.
8580         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8581         (lll_lock): Adjust asm for operand order change.
8582         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8583         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8585         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8586         Reverse order of parameters.
8587         (__lll_timedwait_tid): Remove regparms attribute.
8588         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8589         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8591         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8592         (__lll_timedwait_tid): Remove one unnecessary instruction.
8594         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8595         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8596         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8597         lowlevelmutex.S.
8599         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8600         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8601         for NOT_IN_libc.
8602         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8603         lowlevellock.S.
8605         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8606         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8607         for libc.so.
8608         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8609         define LOCK here (if UP is not defined).  The actual code is in
8610         lowlevelmutex.S.
8612         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8613         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8614         __lll_timedwait_tid for libc.so.
8615         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8616         define LOCK here (if UP is not defined).  The actual code is in
8617         lowlevellock.S.
8619         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8620         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8621         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8622         instead of lowlevelsem.h.
8623         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8624         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8625         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8627         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8628         lowlevelrwlock.sym.
8629         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8630         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8631         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8633         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8634         register loading.
8635         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8636         last changed.  D'oh.
8638         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8640         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8641         of __libc_locking_needed.
8642         (lll_trylock): Initialize %eax to zero.
8644         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8645         pthread_cond_t definition.
8647 2003-03-10  Roland McGrath  <roland@redhat.com>
8649         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8650         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8651         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8652         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8653         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8655         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8656         Instead of setting PD->multiple_threads, set globals
8657         __pthread_multiple_threads and __libc_multiple_threads.
8658         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8659         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8660         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8662         * descr.h (struct pthread): Conditionalize first member on
8663         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8664         containing an anonymous tcbhead_t.  Move `list' member out.
8665         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8666         * allocatestack.c: Remove use of `header.data.' prefix.
8667         * pthread_create.c: Likewise.
8668         * init.c (__pthread_initialize_minimal_internal): Likewise.
8669         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8670         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8671         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8672         * sysdeps/x86_64/tls.h: Likewise.
8673         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8674         (SINGLE_THREAD_P): Likewise.
8675         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8676         (SINGLE_THREAD_P): Likewise.
8677         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8678         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8680 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8682         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8684         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8685         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8687         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8688         leftovers from the ia32 code.
8690         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8691         memory load.
8692         (clear_once_control): Don't load %esi.
8694         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8695         handling.
8697         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8699         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8700         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8702         * Makefile (tests): Add tst-cond10.
8703         * tst-cond10.c: New file.
8705 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8707         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8708         * tst-signal3.c (do_test): Likewise.
8709         * tst-sem5.c (do_test): Likewise.
8710         * tst-kill6.c (do_test): Likewise.
8711         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8713         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8714         of inc/dec.
8715         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8716         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8717         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8718         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8719         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8720         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8721         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8722         Likewise.
8723         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8724         Likewise.
8725         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8726         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8727         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8728         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8730         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8731         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8732         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8734         * allocatestack.c (allocate_stack): If mprotect() fails free the
8735         TLS memory.
8737 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8739         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8741         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8742         lll_wake_tid.  This was used only to work around kernel limits in
8743         the early days.
8744         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8745         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8746         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8747         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8749         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8750         (__pthread_initialize_minimal_internal): Change initialization of
8751         __static_tls_align_m1 appropriately.
8752         * pthreadP.h (__static_tls_align_m1): Renamed from
8753         __static_tls_align.
8754         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8755         instead of __static_tls_align-1.
8757 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8759         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8761         * pthread_create.c: Define __pthread_keys using nocommon
8762         attribute, not by placing it explicitly in bss.
8763         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8765         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8766         Use it in mmap call to allocate stacks.
8768         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8770         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8771         result of the thread function.
8773 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8775         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8776         version is just fine.
8778         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8779         (__pthread_child_handler): Renamed from pthread_child_handler,
8780         exported, and marked hidden.  Change all users.
8781         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8782         free __pthread_child_handler from child list.
8784 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8786         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8788         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8789         Fix handling of cancellation and failing pthread_mutex_unlock call.
8790         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8791         (__pthread_cond_wait): Likewise.
8793         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8794         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8795         lll_futex_timed_wait call.
8796         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8797         (pthread_rwlock_timedwrlock): Likewise.
8799         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8800         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8801         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8803         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8804         check of lll_futex_wake return value.
8806 2003-03-03  Roland McGrath  <roland@redhat.com>
8808         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8810         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8811         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8812         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8814 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8816         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8817         error for CPU clocks.
8819         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8820         _POSIX_MONOTONIC_CLOCK.
8821         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8823         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8824         recent kernels.
8826 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8828         * descr.h (struct pthread): Move cleanup field to the front.
8830 2003-03-01  Roland McGrath  <roland@redhat.com>
8832         * sem_open.c (sem_open): Braino fix.
8834 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8836         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8837         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8838         __pthread_cleanup_pop functionality.
8839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8841         * descr.h (struct pthread): Move tid field to the front now that
8842         it is often used.
8844         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8845         (__lll_mutex_timedlock_wait): Remove.
8846         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8847         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8848         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8849         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8850         (lll_unlock_wake_cb): Don't save and restore %esi.
8851         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8852         %esi.
8853         (__lll_timedwait_tid): Add alignment.
8854         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8855         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8856         %esi.
8857         (__lll_timedwait_tid): Removed.
8858         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8859         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8860         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8861         (pthread_barrier_wait): Don't save, load, and restore %esi for
8862         last thread.
8863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8864         (__pthread_cond_signal): Don't save, load, and restore %esi.
8865         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8866         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8867         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8868         Don't save, load, and restore %esi.
8870 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8872         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8873         Release lock before waking up the waiters.
8875         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8877         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8878         (reader_thread): Likewise.
8880         * sysdeps/pthread/pthread_rwlock_unlock.c
8881         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8882         to wake up readers if there are none.
8884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8885         Release internal lock before wake threads.
8887 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8889         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8890         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8891         predefined.
8892         * tst-rwlock9.c: Likewise.
8893         * tst-rwlock10.c: New file.
8894         * tst-rwlock11.c: New file.
8896         * Makefile (tests): Add tst-dlsym1.
8897         * tst-dlsym1.c: New file.
8899         * init.c (__pthread_initialize_minimal_internal): Set
8900         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8901         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8903 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8905         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8907         * tst-cond2.c: Fix sychronization with child.
8909         * tst-rwlock8.c (reader_thread): Remove unused variable.
8911         * Makefile: Add rules to build and run tst-tls3.
8912         * tst-tls3.c: New file.
8913         * tst-tls3mod.c: New file.
8915         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8916         * tst-rwlock8.c: New file.
8917         * tst-rwlock9.c: New file.
8918         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8919         complete broken rwlock implementation.
8920         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8921         Likewise.
8922         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8923         Likewise.
8924         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8925         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8926         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8927         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8928         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8929         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8930         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8932 2003-02-23  Roland McGrath  <roland@redhat.com>
8934         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8936 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8938         * Makefile (tests): Add tst-context1.
8939         * tst-context1.c: New file.
8941         * Makefile (tests): Add tst-tls1 and tst-tls2.
8942         * tst-tls1.c: New file.
8943         * tst-tls2.c: New file.
8945         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8946         for failed cmpxchg.
8948         * pthread_create.c (start_thread): Set EXITING_BIT early.
8950         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8951         (THREAD_GETMEM_NC): Likewise.
8953 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8955         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8956         off 3 more bytes by using offset-less instructions when possible.
8958         * Makefile: Add dependency for $(objpfx)version.d.
8960         * eintr.c (eintr_source): Add unnecessary return but the compiler
8961         insists.
8963         * tst-kill3.c: Include <unistd.h>.
8965 2003-02-21  Roland McGrath  <roland@redhat.com>
8967         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8969 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8971         * Makefile (tests): Add tst-eintr1.
8972         (distribute): Add eintr.c.
8973         * tst-eintr1.c: New file.
8974         * eintr.c: New file.
8976         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8978         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8979         Disallow sending SIGCANCEL.
8981         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8982         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8983         * tst-kill1.c: New file.
8984         * tst-kill2.c: New file.
8985         * tst-kill3.c: New file.
8986         * tst-kill5.c: New file.
8987         * tst-kill6.c: New file.
8988         * tst-basic7.c: Renamed to...
8989         * tst-kill4.c: ...this.
8991 2003-02-21  Roland McGrath  <roland@redhat.com>
8993         * Makefile (install-lib-ldscripts): New variable.
8995 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8997         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8998         * pthread_cancel.c: Use INVALID_TD_P.
8999         * pthread_detach.c: Likewise.
9000         * pthread_getschedparam.c: Likewise.
9001         * pthread_setschedparam.c: Likewise.
9002         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
9003         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
9004         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
9005         * pthread_timedjoin.c: Likewise.
9007         * tst-basic7.c: Include <signal.h>.
9009         * pthread_join.c (pthread_join): Limited checking for invalid
9010         descriptors.
9011         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
9013 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
9015         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
9016         beginning of the loop.  Clear the entire first block of TSD.
9017         * Makefile (tests): Add tst-key4.
9018         * tst-key4.c: New file.
9020 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
9022         * Makefile (tests): Add tst-basic7.
9023         * tst-basic7.c: New file.
9025         * pthread_create.c (deallocate_tsd): Mark as internal_function.
9026         Add some more __builtin_expect.
9028         * pthreadP.h: Define dummy version of DEBUGGING_P.
9030 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
9032         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
9033         _POSIX_THREAD_PRIORITY_SCHEDULING.
9034         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
9035         _XOPEN_REALTIME_THREADS.
9036         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
9038         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
9039         kernel returns EINVAL for PID <= 0, work around it.
9041         * Makefile (tests): Add tst-signal5.
9042         * tst-signal5.c: New file.
9044         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
9045         and LOGIN_NAME_MAX.
9047         * tst-cancel1.c (tf): Block all signals.
9049         * Makefile (tests): Add tst-basic6.
9050         * tst-basic6.c: New file.
9052         * tst-basic1.c: Add test for process ID.
9054         * Makefile (tests): Add tst-cancel10.
9055         * tst-cancel10.c: New file.
9057         * Makefile (tests): Add tst-signal4.
9058         * tst-signal4.c: New file.
9060         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
9061         __sigismember instead of sigismember.  Add __builtin_expect.
9063 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
9065         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
9066         pthread_setcancelstate, and pthread_rwlock_setpshared.
9068         * tst-cancel7.c (do_test): Make sure the pid file exists before
9069         canceling the thread.
9071         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
9072         pthread_rwlock_timedrdlock tests.
9073         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
9074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9075         Check for invalid tv_nsec field.
9076         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9077         Likewise.
9079         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
9080         recursive mutex of overflow.
9082         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
9084         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
9085         going into an endless loop.
9086         * Makefile (tests): Add tst-cancel9.
9087         * tst-cancel9.c: New file.
9089         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
9091 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
9093         * tst-mutex5.c (do_test): Add more timedlock tests.
9095         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
9096         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
9098         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
9099         use INLINE_SYSCALL.  Error number is returned, not -1.
9101         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9102         and __deallocate_stack with internal_function.
9103         * pthread_create.c: Adjust definitions appropriately.
9104         * allocatestack.c: Likewise.
9106         * pthread_join.c: Add one more __builtin_expect.
9107         * pthread_timedjoin.c: Likewise.
9109         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9110         not data of sequence number does not match.
9111         Add one __builtin_expect.
9113         * Makefile (tests): Add tst-clock1.
9114         * tst-clock1.c: New file.
9116         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9117         negative arguments.
9118         * Makefile (tests): Add tst-basic5.
9119         * tst-basic5.c: New file.
9121 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9123         * Makefile (tests): Add tst-basic4.
9124         * tst-basic4.c: New file.
9126         * pthreadP.h: Add declaraction for __nptl_nthreads.
9127         * pthread_create.c: Define __nptl_nthreads
9128         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9129         after thread is done.  If then zero, call exit(0).
9130         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9131         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9132         * init.c (pthread_functions): Initialize ptr_nthreads.
9133         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9134         (__reclaim_stacks): Decrement __nptl_nthreads.
9135         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9136         Define.
9137         * Makefile (tests): Add tst-basic3.
9138         * tst-basic3.c: New file.
9140         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9141         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9142         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9143         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9144         if asynchronous canceling is enabled.
9145         * pthread_join.c (pthread_join): When recognizing circular joins,
9146         take into account the other thread might be already canceled.
9147         * Makefile (tests): Add tst-join5.
9148         * tst-join5.c: New file.
9150         * Makefile (tests): Add tst-join4.
9151         * tst-join4.c: New file.
9153 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9155         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9157 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9159         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9160         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9161         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9162         warning.
9163         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9164         to avoid warning.
9165         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9166         error if lll_futex_wake failed.
9168 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9171         handling of cancellation and failung pthread_mutex_unlock call.
9172         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9173         * Makefile (tests): Add tst-cond8 and tst-cond9.
9174         * tst-cond8.c: New file.
9175         * tst-cond9.c: New file.
9177         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9179         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9180         non-standard initializers with __USE_GNU.
9182         * Makefile (tests): Add tst-cleanup3.
9183         * tst-cleanup3.c: New file.
9185 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9187         * Makefile (tests): Add tst-attr1 and tst-attr2.
9188         * tst-attr1.c: New file.
9189         * tst-attr2.c: New file.
9191         * Makefile: Add rules to build and run tst-atfork2 test.
9192         * tst-atfork2.c: New file.
9193         * tst-atfork2mod.c: New file.
9195         * sysdeps/unix/sysv/linux/unregister-atfork.c
9196         (__unregister_atfork): Free the memory allocated for the handlers
9197         after removing them from the lists.
9199         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9200         cleanup function.
9202         * tst-atfork1.c (do_test): Wait for the child we forked.
9203         Report error in child.
9205         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9207         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9209 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9211         * Makefile (tests): Add tst-cancel8.
9212         * tst-cancel8.c: New file.
9214         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9215         clearing of control variable.
9216         * Makefile (tests): Add tst-once3 and tst-once4.
9217         * tst-once3.c: New file.
9218         * tst-once4.c: New file.
9220 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9222         * sysdeps/sh/Makefile: New file.
9223         * sysdeps/sh/bits/atomic.h: New file.
9224         * sysdeps/sh/pthread_spin_init.c: New file.
9225         * sysdeps/sh/pthread_spin_lock.c: New file.
9226         * sysdeps/sh/pthread_spin_trylock.S: New file.
9227         * sysdeps/sh/pthread_spin_unlock.S: New file.
9228         * sysdeps/sh/pthreaddef.h: New file.
9229         * sysdeps/sh/tcb-offsets.sym: New file.
9230         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9231         * sysdeps/sh/tls.h: New file.
9232         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9233         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9234         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9235         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9236         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9237         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9238         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9239         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9240         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9241         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9242         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9243         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9244         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9245         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9246         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9247         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9248         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9249         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9250         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9251         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9252         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9253         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9254         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9255         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9256         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9257         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9258         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9259         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9260         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9261         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9263 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9265         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9266         according to POSIX.
9268         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9270 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9272         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9273         (TLS_GET_FS): New #define.
9274         (TLS_SET_FS): New #define.
9275         Correct value of __NR_set_thread_area.
9277         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9279 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9281         * Makefile (tests): Add tst-popen1.
9282         * tst-popen1.c: New file.
9284         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9285         but inactive generalization.
9286         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9287         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9288         Minor optimization, remove one instruction.
9289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9291 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9293         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9295 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9297         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9298         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9299         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9300         * sysdeps/pthread/pthread_cond_signal.c: New file.
9301         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9302         * sysdeps/pthread/pthread_cond_wait.c: New file.
9303         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9304         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9305         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9306         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9307         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9308         * sysdeps/s390/Makefile: New file.
9309         * sysdeps/s390/bits/atomic.h: New file.
9310         * sysdeps/s390/pthread_spin_init.c: New file.
9311         * sysdeps/s390/pthread_spin_lock.c: New file.
9312         * sysdeps/s390/pthread_spin_trylock.c: New file.
9313         * sysdeps/s390/pthread_spin_unlock.c: New file.
9314         * sysdeps/s390/pthreaddef.h: New file.
9315         * sysdeps/s390/tcb-offsets.sym: New file.
9316         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9317         * sysdeps/s390/tls.h: New file.
9318         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9319         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9320         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9321         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9322         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9323         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9324         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9325         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9326         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9327         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9328         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9329         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9330         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9331         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9332         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9333         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9334         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9335         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9336         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9337         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9338         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9339         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9340         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9342 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9344         * atomic.h: Add a couple more default implementations.
9345         (atomic_compare_and_exchange_acq): Use
9346         __arch_compare_and_exchange_32_acq in return value definition.  It
9347         always exists.
9348         (atomic_bit_set): Renamed from atomic_set_bit.
9349         Add missing atomic_ prefixes.
9351         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9352         thread library is available, use correct value to mark initialized
9353         once variable.
9355 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9357         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9358         __sysconf to determine pagesize.
9360         * pthread_create.c: Include <atomic.h>.
9361         * allocatestack.c (allocate_stack): Implement coloring of the
9362         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9363         size minus one.  Adjust users.
9364         * sysdeps/i386/i686/Makefile: New file.
9366 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9368         * allocatestack.c: Improve comment throughout the file.
9370         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9371         (__lll_lock_wait): Add branch prediction.
9372         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9373         (__lll_lock_wait): Likewise.
9374         (lll_unlock_wake_cb): Removed.
9376 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9378         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9379         _POSIX_THREAD_PRIORITY_SCHEDULING.
9381 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9383         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9384         Fix return type of ptr___pthread_getspecific.
9386 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9388         * Makefile (tests): Add tst-umask1.
9389         (tst-umask1-ARGS): Define.
9390         * tst-umask1.c: New file.
9392 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9394         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9395         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9396         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9397         pthread_rwlock_unlock.
9398         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9399         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9400         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9401         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9402         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9403         New file.
9404         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9406         New file.
9407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9408         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9409         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9410         New file.
9411         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9412         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9413         New file.
9414         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9415         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9416         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9417         New file.
9418         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9419         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9420         New file.
9421         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9423         * Makefile (libpthread-routines): Remove lowlevelcond and
9424         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9425         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9426         and pthread_cond_broadcast.
9427         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9428         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9429         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9430         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9431         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9432         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9433         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9434         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9435         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9436         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9438         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9440         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9441         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9442         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9443         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9444         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9445         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9446         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9447         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9448         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9449         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9450         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9451         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9452         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9453         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9454         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9455         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9456         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9457         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9459         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9460         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9461         of the code is moved to ...
9462         * sysdeps/pthread/createthread.c: ...here.  New file.
9464 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9466         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9467         (__new_sem_post): Clear %eax before returning.
9468         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9470         * Makefile (tests): Add tst-cleanup2.
9471         * tst-cleanup2.c: New file.
9473         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9474         Interpret first parameter correctly.
9476 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9478         * Makefile (headers): Add bits/semaphore.h.
9480 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9482         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9483         if not SHARED.
9485 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9487         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9488         must be used and mapping failed.
9489         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9491         * Makefile (CFLAGS-pthread_self.os): Define this, not
9492         CFLAGS-pthread_self.c.
9494 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9496         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9497         lll_unlock_wake_cb.
9499         * Makefile (libpthread-routines): Add version.  Add rules to build
9500         version.os and banner.h.
9501         * version.c: New file.
9503 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9505         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9506         the alias unconditional.
9507         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9509 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9511         * Makefile (CFLAGS-pthread_self.c): New definition.
9513 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9515         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9516         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9517         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9518         * init.c (__pthread_initialize_minimal_internal): Likewise.
9520 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9522         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9524         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9525         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9526         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9527         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9528         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9529         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9531 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9533         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9534         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9535         * tst-cancel-wrappers.sh: Remove all exceptions.
9537 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9539         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9540         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9542         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9543         Use __libc_pthread_functions array if SHARED.
9545         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9546         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9548         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9549         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9550         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9551         __libc_ptf_call instead of __libc_maybe_call.
9552         (PTF): New #define.
9553         (__libc_cleanup_region_start): Wrap function name with PTF call.
9554         (__libc_cleanup_region_end): Likewise.
9555         (__libc_cleanup_end): Likewise.
9557         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9558         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9559         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9560         * pthreadP.h: Add prototypes.
9562         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9563         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9564         __pthread_rwlock_unlock aliases.
9565         * pthreadP.h: Add prototypes for new aliases.
9567         * pthreadP.h (struct pthead_functions): Moved to...
9568         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9569         * init.c (pthread_functions): Add initializers for new elements.
9571         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9572         __pthread_cleanup_pop_restore aliases.
9573         * pthreadP.h: Add prototypes.
9575         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9576         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9577         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9578         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9579         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9580         * pthreadP.h: Adjust prototypes and callers.
9582 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9584         * Makefile (tests): Add tst-cancel7.
9585         (tst-cancel7-ARGS): New variable.
9586         * tst-cancel7.c: New file.
9588         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9589         around gcc defficiencies.
9590         * old_pthread_cond_signal.c: Likewise.
9591         * old_pthread_cond_timedwait.c: Likewise.
9592         * old_pthread_cond_wait.c: Likewise.
9594         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9596 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9598         * Makefile (tests): Add tst-cond7.
9599         * tst-cond7.c: New file.
9601         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9602         (condvar_cleanup): Get condvar address from the right place.
9604         * atomic.h: Correct definitions of atomic_full_barrier,
9605         atomic_read_barrier, atomic_write_barrier.
9607         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9608         race-free.
9609         * old_pthread_cond_signal.c: Likewise.
9610         * old_pthread_cond_timedwait.c: Likewise.
9611         * old_pthread_cond_wait.c: Likewise.
9613 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9615         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9617 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9619         * pthreadP.h (pthread_cond_2_0_t): New type.
9620         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9621         Use new type for the 2.0 condvar function prototypes.
9622         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9623         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9624         parameter.
9625         * old_pthread_cond_destroy.c: Likewise.
9626         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9627         * old_pthread_cond_signal.c: Likewise.
9628         * old_pthread_cond_timedwait.c: Likewise.
9629         * old_pthread_cond_wait.c: Likewise.
9631         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9632         (__pthread_cond_wait): Don't save cancellation mode and seq value
9633         in same location.
9635         * herrno.c (__h_errno_location): Don't define as weak.
9637 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9639         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9640         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9641         and pthread_cond_wait.
9642         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9643         Renamed to...
9644         (__pthread_cond_broadcast_2_0): ... this.
9645         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9646         Renamed to...
9647         (__pthread_cond_destroy_2_0): ... this.
9648         * old_pthread_cond_init.c (__old_pthread_cond_init):
9649         Renamed to...
9650         (__pthread_cond_init_2_0): ... this.
9651         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9652         Renamed to...
9653         (__pthread_cond_signal_2_0): ... this.
9654         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9655         Renamed to...
9656         (__pthread_cond_wait_2_0): ... this.
9657         * pthread_cond_destroy.c: Include shlib-compat.h.
9658         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9659         * pthread_cond_init.c: Include shlib-compat.h.
9660         (pthread_cond_init): Change strong_alias into versioned_symbol.
9661         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9662         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9663         fields.
9664         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9665         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9666         __pthread_cond_wait_2_0): New prototypes.
9667         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9668         __old_pthread_cond_init, __old_pthread_cond_signal,
9669         __old_pthread_cond_wait): Removed.
9670         * init.c: Include shlib-compat.h.
9671         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9672         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9673         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9674         ptr___pthread_cond_*_2_0 fields.
9675         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9676         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9678         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9679         LIBC_SIGACTION was not yet defined.
9680         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9681         [!defined LIBC_SIGACTION] (__sigaction): New function and
9682         libc_hidden_weak.
9683         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9684         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9686 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9688         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9690 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9692         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9693         New, larger type definition.
9694         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9695         implementation.
9696         * Versions [libpthread]: Add definitions for new pthread_cond_*
9697         interfaces for version GLIBC_2.3.2.
9698         * pthread_cond_init.c: Update initialization for new type definition.
9699         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9700         pthread_cond_timedwait, pthread_cond_signal, and
9701         pthread_cond_broadcast.  Add old_pthread_cond_init,
9702         old_pthread_cond_destroy, old_pthread_cond_wait,
9703         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9704         old_pthread_cond_broadcast.
9705         * old_pthread_cond_broadcast.c: New file.
9706         * old_pthread_cond_destroy.c: New file.
9707         * old_pthread_cond_init.c: New file.
9708         * old_pthread_cond_signal.c: New file.
9709         * old_pthread_cond_timedwait.c: New file.
9710         * old_pthread_cond_wait.c: New file.
9711         * pthreadP.h: Add prototypes for the compatibility interfaces.
9713         * pthread_cond_destroy.c: Don't include <errno.h>.
9715 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9717         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9718         unnecessary zero offset when addressing MUTEX.
9720 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9722         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9723         __register_atfork.
9724         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9725         for __register_atfork.
9727 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9729         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9730         instead of ASSEMBLER test macro.
9732         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9733         __libc_current_sigrtmax): Add libc_hidden_def.
9735         * sysdeps/pthread/list.h: Remove assert.h include.
9737 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9739         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9740         __pthread_initialize_minimal_internal not
9741         __pthread_initialize_minimal.
9743 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9745         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9746         __pthread_initialize_minimal as hidden.
9748         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9749         constructor.
9751 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9753         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9754         $(common-objpfx)format.lds, include that into the output script.
9755         Fix comment.
9756         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9758 2002-12-28  Andreas Jaeger  <aj@suse.de>
9760         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9761         nsec resolution changes.
9762         (xstat64_conv): Likewise.
9763         (xstat32_conv): Likewise.
9764         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9765         struct kernel_stat.
9766         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9767         structs stat and stat64.
9768         * time/time.h (__timespec_defined): Define for __USE_MISC.
9769         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9771 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9773         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9774         argument.
9775         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9776         (pthread_exit): Use strong_alias to avoid warnings.
9777         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9778         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9779         ptr___pthread_attr_init_2_*.
9780         * init.c (pthread_functions): Adjust.
9782 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9784         * forward.c: Make all functions available by default again.  It
9785         caused too much trouble.
9787         * pt-siglongjmp.c: Removed.
9789 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9791         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9792         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9793         * sysdeps/i386/Makefile: New file.
9794         * sysdeps/i386/tcb-offsets.sym: New file.
9795         * sysdeps/pthread/tcb-offsets.h: New file.
9796         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9797         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9799         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9800         __register_atfork...
9801         (GLIBC_2.3.2): ...here.
9803 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9805         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9806         pthread_attr_setstackaddr with __attribute_deprecated__.
9808 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9810         * pt-system.c (system): Remove cancellation handling.
9811         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9812         cancellation routines.
9814 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9816         * descr.h: Include <dl-sysdep.h>.
9817         (struct pthread): Move header.data.list to the back of the struct.
9818         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9819         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9820         (SYSINFO_OFFSEET): Likewise.
9822 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9824         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9825         Define.
9826         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9827         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9828         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9829         (USE_DL_SYSINFO): Undef.
9831 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9833         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9834         $(common-objpfx)libc.so.
9835         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9836         it is bigger than pipe buffer size even on arches with bigger
9837         page size.
9838         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9840 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9842         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9843         correct errno access for case that USE___THREAD is not defined.
9845 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9847         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9848         Patch by Marijn Ros <marijn@mad.scientist.com>.
9850 2002-12-22  Roland McGrath  <roland@redhat.com>
9852         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9854 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9856         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9858 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9860         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9861         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9862         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9864         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9865         of int $0x80.
9866         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9867         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9868         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9869         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9870         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9871         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9872         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9873         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9875         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9876         sysenter.
9877         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9879         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9881         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9882         in new TCB.
9883         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9884         that sysinfo is properly initialized.
9885         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9886         to 1 only for ld.so.
9888         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9889         RTLD_CORRECT_DYNAMIC_WEAK.
9891 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9893         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9894         Use return 0 as 6th argument to FORWARD4.
9895         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9897 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9899         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9900         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9901         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9902         (INIT_SYSINFO): New #define.
9903         (TLS_TP_INIT): Use INIT_SYSINFO.
9904         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9905         At test to make sure SYSINFO_OFFSET value is correct.
9906         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9908 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9910         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9911         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9912         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9913         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9914         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9915         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9916         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9918 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9920         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9921         macro instead of using int $0x80 directly.
9923         * sysdeps/pthread/bits/stdio-lock.h: New file.
9924         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9925         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9926         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9927         * Makefile (routines): Add libc-lowlevelmutex.
9929         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9930         __i686.get_pc_thunk.dx.
9932 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9934         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9935         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9936         ($(objpfx)tst-cancel-wrappers.out): New rule.
9937         * tst-cancel-wrappers.sh: New test.
9938         * tst-locale1.c: Include signal.h.
9939         (uselocale): Test static linking of __libc_current_sigrt*.
9941 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9943         * Makefile (tests): Add tst-cancel6.
9944         * tst-cancel6.c: New file
9946 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9948         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9949         Define meaningfully for assembler as well.
9950         * pthreadP.h (struct pthread_functions): Remove
9951         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9952         and ptr_pthread_attr_init_2_1 fields.
9953         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9954         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9955         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9956         (FORWARD3): Define using FORWARD4.
9957         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9958         versions.
9959         * pt-system.c: Remove duplicate stdlib.h include.
9961 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9963         * sem_init.c: Define sem_init@GLIBC_2.0.
9964         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9965         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9967         * flockfile.c: Moved to...
9968         * sysdeps/pthread/flockfile.c: ...here.  New file.
9969         * funlockfile.c: Moved to...
9970         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9971         * ftrylockfile.c: Moved to...
9972         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9974 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9976         * libc-cancellation.c: Guard both function with
9977         #if !defined NOT_IN_libc.
9978         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9979         automatically provided pthread wrappers.
9980         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9981         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9982         nor in libpthread.
9983         * pt-open.c: Removed.
9984         * pt-fcntl.c: Removed.
9985         * pt-fsync.c: Removed.
9986         * pt-lseek.c: Removed.
9987         * pt-msgrcv.c: Removed.
9988         * pt-msgsnd.c: Removed.
9989         * pt-msync.c: Removed.
9990         * pt-nanosleep.c: Removed.
9991         * pt-open64.c: Removed.
9992         * pt-pause.c: Removed.
9993         * pt-pread.c: Removed.
9994         * pt-pread64.c: Removed.
9995         * pt-pwrite.c: Removed.
9996         * pt-pwrite64.c: Removed.
9997         * pt-read.c: Removed.
9998         * pt-recv.c: Removed.
9999         * pt-recvfrom.c: Removed.
10000         * pt-recvmsg.c: Removed.
10001         * pt-send.c: Removed.
10002         * pt-sendto.c: Removed.
10003         * pt-sigtimedwait.c: Removed.
10004         * pt-sigwait.c: Removed.
10005         * pt-wait.c: Removed.
10006         * pt-waitpid.c: Removed.
10007         * pt-write.c: Removed.
10008         * pt-accept.c: Removed.
10009         * pt-close.c: Removed.
10010         * pt-connect.c: Removed.
10011         * pt-lseek64.c: Removed.
10012         * pt-sendmsg.c: Removed.
10013         * pt-tcdrain.c: Removed.
10015 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
10017         * init.c (__pthread_initialize_minimal_internal): Renamed from
10018         __pthread_initialize_minimal.  Make old name an alias.  This
10019         converts a normal relocation into a relative relocation.
10021         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
10023         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
10024         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
10025         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
10026         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
10027         pt-sigwaitinfo, pt-waitid, and pt-writev.
10028         * pt-creat.c: Removed.
10029         * pt-poll.c: Removed.
10030         * pt-pselect.c: Removed.
10031         * pt-readv.c: Removed.
10032         * pt-select.c: Removed.
10033         * pt-sigpause.c: Removed.
10034         * pt-sigsuspend.c: Removed.
10035         * pt-sigwaitinfo.c: Removed.
10036         * pt-waitid.c: Removed.
10037         * pt-writev.c: Removed.
10039         * init.c (pthread_functions): New variable.
10040         (__pthread_initialize_minimal): Pass pointer to pthread_functions
10041         (or NULL) to __libc_pthread_init.
10042         * forward.c: Rewrite to use __libc:pthread_functions array to get
10043         function addresses.
10044         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
10045         prototype.
10046         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
10047         Take new parameter.  Copy content of variable pointed to by it
10048         to __libc_pthread_init.
10050         * pthreadP.h (struct pthread_functions): New type.
10051         (__libc_pthread_init): Declare.
10053         * pthread_attr_destroy.c: Add namespace protected alias.
10054         * pthread_attr_getdetachstate.c: Likewise.
10055         * pthread_attr_getinheritsched.c: Likewise.
10056         * pthread_attr_getschedparam.c: Likewise.
10057         * pthread_attr_getschedpolicy.c: Likewise.
10058         * pthread_attr_getscope.c: Likewise.
10059         * pthread_attr_setdetachstate.c: Likewise.
10060         * pthread_attr_setinheritsched.c: Likewise.
10061         * pthread_attr_setschedparam.c: Likewise.
10062         * pthread_attr_setschedpolicy.c: Likewise.
10063         * pthread_attr_setscope.c: Likewise.
10064         * pthread_cond_broadcast.c: Likewise.
10065         * pthread_cond_destroy.c: Likewise.
10066         * pthread_cond_init.c: Likewise.
10067         * pthread_cond_signal.c: Likewise.
10068         * pthread_cond_wait.c: Likewise.
10069         * pthread_condattr_destroy.c: Likewise.
10070         * pthread_condattr_init.c: Likewise.
10071         * pthread_equal.c: Likewise.
10072         * pthread_exit.c: Likewise.
10073         * pthread_getschedparam.c: Likewise.
10074         * pthread_self.c: Likewise.
10075         * pthread_setcancelstate.c: Likewise.
10076         * pthread_setschedparam.c: Likewise.
10077         * pthread_mutex_destroy.c: Likewise.
10078         * pthread_mutex_init.c: Likewise.
10079         * pthreadP.h: Add prototypes for the aliases.
10081         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
10082         multiple_threads member in correct TCB to 1.
10084         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
10085         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
10086         member of thread decriptor, otherwise return unconditionally 1.
10088 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10090         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
10091         regular Linux version.  Remove file.
10092         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
10093         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
10094         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
10095         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
10096         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
10097         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
10098         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
10099         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10100         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10101         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10102         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10103         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10104         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10105         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10106         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10107         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10108         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10109         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10110         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10111         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10112         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10113         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10114         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10115         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10116         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10117         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10118         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10119         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10120         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10121         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10123 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10125         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10126         * sysdeps/unix/sysv/linux/open.c: Removed.
10127         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10128         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10129         * sysdeps/unix/sysv/linux/msync.c: Removed.
10130         * sysdeps/unix/sysv/linux/read.c: Removed.
10131         * sysdeps/unix/sysv/linux/close.c: Removed.
10132         * sysdeps/unix/sysv/linux/creat.c: Removed.
10133         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10134         * sysdeps/unix/sysv/linux/pause.c: Removed.
10135         * sysdeps/unix/sysv/linux/select.c: Removed.
10136         * sysdeps/unix/sysv/linux/write.c: Removed.
10138 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10140         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10141         element in TCB to see whether locking is needed.
10143         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10144         MULTIPLE_THREADS_OFFSET value is correct.
10146         * sysdeps/unix/sysv/linux/close.c: New file.
10147         * sysdeps/unix/sysv/linux/connect.S: New file.
10148         * sysdeps/unix/sysv/linux/creat.c: New file.
10149         * sysdeps/unix/sysv/linux/fsync.c: New file.
10150         * sysdeps/unix/sysv/linux/llseek.c: New file.
10151         * sysdeps/unix/sysv/linux/lseek.c: New file.
10152         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10153         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10154         * sysdeps/unix/sysv/linux/msync.c: New file.
10155         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10156         * sysdeps/unix/sysv/linux/open.c: New file.
10157         * sysdeps/unix/sysv/linux/open64.c: New file.
10158         * sysdeps/unix/sysv/linux/pause.c: New file.
10159         * sysdeps/unix/sysv/linux/poll.c: New file.
10160         * sysdeps/unix/sysv/linux/pread.c: New file.
10161         * sysdeps/unix/sysv/linux/pread64.c: New file.
10162         * sysdeps/unix/sysv/linux/pselect.c: New file.
10163         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10164         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10165         * sysdeps/unix/sysv/linux/readv.c: New file.
10166         * sysdeps/unix/sysv/linux/recv.S: New file.
10167         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10168         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10169         * sysdeps/unix/sysv/linux/select.c: New file.
10170         * sysdeps/unix/sysv/linux/send.S: New file.
10171         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10172         * sysdeps/unix/sysv/linux/sendto.S: New file.
10173         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10174         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10175         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10176         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10177         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10178         * sysdeps/unix/sysv/linux/system.c: New file.
10179         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10180         * sysdeps/unix/sysv/linux/wait.c: New file.
10181         * sysdeps/unix/sysv/linux/waitid.c: New file.
10182         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10183         * sysdeps/unix/sysv/linux/writev.c: New file.
10184         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10186         * pt-readv.c: Fix comment.
10188 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10190         * tst-cleanup1.c: Include stdlib.h.
10192         * tst-cancel5.c: New test.
10193         * Makefile (tests): Add tst-cancel5.
10194         (tst-cancel5): Link against libc.so libpthread.so in that order.
10196 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10198         * forward.c (test_loaded): Prevent recursive calls.
10200         * Makefile (routines): Add libc-cancellation.
10201         * libc-cancellation.c: New file.
10202         * descr.h (struct pthread): Add multiple_threads field.
10203         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10204         new thread descriptor to 1.
10205         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10206         Initialize multiple_thread field after successful thread creation.
10207         * cancellation.c (__do_cancel): Move to pthreadP.h.
10208         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10209         (__pthread_disable_asynccancel): Add internal_function attribute.
10210         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10211         * pthread_setcancelstate.c: Likewise.
10212         * pthread_setcanceltype.c: Likewise.
10213         * pthread_exit.c: Likewise.
10214         * pthreadP.h (CANCELLATION_P): Likewise.
10215         (__do_cancel): Define as static inline.
10216         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10217         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10218         declarations.
10219         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10220         fields.  Define MULTIPLE_THREADS_OFFSET.
10221         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10222         declaration.
10223         * sysdeps/unix/sysv/linux/accept.S: New file.
10224         * sysdeps/unix/sysv/linux/read.c: New file.
10225         * sysdeps/unix/sysv/linux/write.c: New file.
10226         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10227         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10228         initialization of __libc_locking_needed.
10229         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10230         __libc_locking_needed, use multiple_threads field in TCB.
10231         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10233 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10235         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10236         version.
10237         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10239         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10240         access to __libc_locking_needed for PIC.
10242 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10244         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10245         declare for libc.so.
10246         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10247         expression.
10248         (__libc_lock_lock): Put into statement expression.
10249         (__libc_lock_unlock): Remove trailing semicolon.
10250         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10252 2002-12-12  Roland McGrath  <roland@redhat.com>
10254         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10255         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10257 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10259         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10260         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10261         Initialize __libc_locking_needed.
10262         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10263         instead of __register_pthread_fork_handler.
10264         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10265         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10266         fork-gen with libc_pthread_init.
10267         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10268         of __register_pthread_fork_handler.
10269         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10270         of __register_pthread_fork_handler.
10271         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10272         __libc_locking_needed to determine whether lock prefix can be avoided.
10273         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10275 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10277         * Makefile (tests): Add tst-cleanup1.
10278         * tst-cleanup1.c: New file.
10279         * cancellation.c (__cleanup_thread): Removed.
10280         (__do_cancel): Remove call to __cleanup_thread.
10281         * pthreadP.h: Remove __cleanup_thread prorotype.
10283         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10284         Remember function and argument even if cancellation handler
10285         function is not available.
10286         (__libc_cleanup_region_end): Execute registered function directly if
10287         pthread functions are not available.
10288         (__libc_cleanup_end): Likewise.
10290         * init.c (__pthread_initialize_minimal): Fix initialization in
10291         static lib by preventing gcc from being too clever.
10293 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10295         * init.c (__pthread_initialize_minimal): Remove unneccesary
10296         sigaddset call.
10298         * Makefile (tests): We can run tst-locale2 now.
10300 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10302         * Versions: Remove duplicated sigwait entry.
10304 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10306         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10307         inside libpthread.
10309         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10311         * pthreadP.h: Declare __pthread_enable_asynccancel and
10312         __pthread_disable_asynccancel.
10313         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10314         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10315         * cancellation.c (__pthread_enable_asynccancel): New function.
10316         (__pthread_disable_asynccancel): New function.
10317         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10318         * pt-close.c: Likewise.
10319         * pt-connect.c: Likewise.
10320         * pt-creat.c: Likewise.
10321         * pt-fcntl.c: Likewise.
10322         * pt-fsync.c: Likewise.
10323         * pt-lseek.c: Likewise.
10324         * pt-lseek64.c: Likewise.
10325         * pt-msgrcv.c: Likewise.
10326         * pt-msgsnd.c: Likewise.
10327         * pt-msync.c: Likewise.
10328         * pt-nanosleep.c: Likewise.
10329         * pt-open.c: Likewise.
10330         * pt-open64.c: Likewise.
10331         * pt-pause.c: Likewise.
10332         * pt-poll.c: Likewise.
10333         * pt-pread.c: Likewise.
10334         * pt-pread64.c: Likewise.
10335         * pt-pselect.c: Likewise.
10336         * pt-pwrite.c: Likewise.
10337         * pt-pwrite64.c: Likewise.
10338         * pt-read.c: Likewise.
10339         * pt-readv.c: Likewise.
10340         * pt-recv.c: Likewise.
10341         * pt-recvfrom.c: Likewise.
10342         * pt-recvmsg.c: Likewise.
10343         * pt-select.c: Likewise.
10344         * pt-send.c: Likewise.
10345         * pt-sendmsg.c: Likewise.
10346         * pt-sendto.c: Likewise.
10347         * pt-sigpause.c: Likewise.
10348         * pt-sigsuspend.c: Likewise.
10349         * pt-sigtimedwait.c: Likewise.
10350         * pt-sigwait.c: Likewise.
10351         * pt-sigwaitinfo.c: Likewise.
10352         * pt-system.c: Likewise.
10353         * pt-tcdrain.c: Likewise.
10354         * pt-wait.c: Likewise.
10355         * pt-waitid.c: Likewise.
10356         * pt-waitpid.c: Likewise.
10357         * pt-write.c: Likewise.
10358         * pt-writev.c: Likewise.
10359         * pthread_join.c: Likewise.
10360         * pthread_timedjoin.c: Likewise.
10362         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10363         (__xpg_sigpause): New function.
10364         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10366 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10368         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10370         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10371         _GI_pthread_cleanup_pop to pthreadP.h.
10373         * ftrylockfile.c: Use _IO_lock_trylock instead of
10374         pthread_mutex_trylock.
10376         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10377         (CANCEL_RESET): Likewise.
10378         (__pthread_setcanceltype_): Declare.
10379         (__pthread_mutex_lock_internal): Declare.
10380         (__pthread_mutex_unlock_internal): Declare.
10381         (__pthread_once_internal): Declare.
10382         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10383         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10385         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10386         and pthread_mutex_unlock.
10387         * pthread_cond_wait.c: Likewise.
10388         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10389         * pthread_mutex_unlock.c: Likewise.
10391         * pthread_setcanceltype.c: Add additional alias
10392         __pthread_setcanceltype.
10394         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10395         * sem_open.c (sem_open): Likewise.
10396         Use __libc_open, __libc_write, and __libc_close instead of
10397         open, write, and close respectively.
10399         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10400         Rewrite as statement expression since it must return a value.
10402         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10403         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10404         __pthread_kill.
10406         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10407         alias __pthread_once_internal.
10409         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10411 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10413         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10414         * tst-stdio1.c: New file.
10415         * tst-stdio2.c: New file.
10417         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10419         * Makefile (tests): Comment out tst-locale2 for now.
10420         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10422         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10423         -D_IO_MTSAFE_IO.
10424         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10425         Use _IO_lock_init instead of explicit assignment.
10427         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10428         Define __libc_lock_* and __libc_lock_recursive macros with
10429         lowlevellock macros, not pthread mutexes.
10431         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10432         of pthread_mutex_lock.
10433         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10434         instead of pthread_mutex_unlock.
10436 2002-12-06  Roland McGrath  <roland@redhat.com>
10438         * allocatestack.c (__stack_user): Use uninitialized defn.
10439         * init.c (__pthread_initialize_minimal): Initialize it here.
10441 2002-12-05  Roland McGrath  <roland@redhat.com>
10443         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10444         string.
10445         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10447         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10448         missing & here too.
10450 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10452         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10453         lowlevellock.
10454         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10455         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10456         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10457         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10458         for __libc_lock_* macros.
10459         * Makefile (routines): Add libc-lowlevellock.
10461 2002-10-09  Roland McGrath  <roland@redhat.com>
10463         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10464         Under [__PIC__], call the function via the pointer fetched for
10465         comparison rather than a call by name that uses the PLT.
10466         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10467         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10468         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10469         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10470         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10472 2002-12-04  Roland McGrath  <roland@redhat.com>
10474         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10476         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10477         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10479         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10481 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10483         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10484         a completely opaque, non-integer type.
10485         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10487 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10489         * sysdeps/i386/tls.h: Include stdlib.h.
10490         * sysdeps/x86_64/tls.h: Likewise.
10492 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10494         * Makefile (tests): Add tst-locale2.
10495         (tests-static): Likewise.
10496         * tst-locale2.c: New file.
10498         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10499         volatile and add memory clobbers to lock operations.
10501 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10503         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10504         * sysdeps/i386/i486/bits/atomic.h: New file.
10505         * sysdeps/i386/i586/bits/atomic.h: New file.
10506         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10507         include i486 version.
10508         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10509         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10510         Patch by Marijn Ros <marijn@mad.scientist.com>.
10512         * allocatestack.c (get_cached_stack): Don't crash if we first
10513         found a stack with a larger size then needed.
10514         Reported by Hui Huang <hui.huang@sun.com>.
10516         * Makefile (tests): Add tst-sysconf.
10517         * tst-sysconf.c: New file.
10519         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10520         PTHREAD_THREADS_MAX.
10522 2002-12-02  Roland McGrath  <roland@redhat.com>
10524         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10525         Declare using hidden_proto instead of attribute_hidden, so there are
10526         non-.hidden static symbols for gdb to find.
10527         (__pthread_keys): Likewise.
10528         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10529         * allocatestack.c (__stack_user): Likewise.
10530         * pthread_create.c (__pthread_keys): Likewise.
10531         (__nptl_threads_events, __nptl_last_event): Make these static instead
10532         of hidden.
10533         * pthread_key_create.c (__pthread_pthread_keys_max,
10534         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10536 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10538         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10539         statically.
10540         * tst-locale1.c: New file.
10542         * pthread_cond_timedwait.c: Include <stdlib.h>.
10544         * Makefile (tests): Add tst-fork2 and tst-fork3.
10545         * tst-fork2.c: New file.
10546         * tst-fork3.c: New file.
10548 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10550         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10552         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10553         require it to 200112L.
10555         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10556         instruction only if HAVE_CMOV is defined.
10557         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10559         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10561         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10563         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10565         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10567 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10569         * sysdeps/x86_64/bits/atomic.h: New file.
10571         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10572         16-bit operations.
10574         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10575         possible since gettid cannot fail.
10577         * sysdeps/x86_64/pthreaddef.h: New file.
10579         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10581         * sysdeps/x86_64/pthread_spin_init.c: New file.
10582         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10583         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10584         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10586         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10587         Add missing lock prefix.  Minute optimization.
10589         * tst-spin2.c (main): Also check successful trylock call.
10591         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10592         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10594         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10595         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10597         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10598         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10599         value in case of an error.  Add support for INTERNAL_SYSCALL.
10601         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10602         value in case of an error.
10604         * sysdeps/x86_64/tls.h: New file.
10606 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10608         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10609         takes the array member name and the index as parameters.
10610         (THREAD_SETMEM_NC): Likewise.
10611         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10612         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10613         interfaces.
10615         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10616         to decide which code to use.
10617         (THREAD_SETMEM_NC): Likewise.
10619         * allocatestack.c (queue_stack): Don't remove stack from list here.
10620         Do it in the caller.  Correct condition to prematurely terminate
10621         loop to free stacks.
10622         (__deallocate_stack): Remove stack from list here.
10624 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10626         * Makefile (tests): Add tst-stack1.
10627         * tst-stack1.c: New file.
10629         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10630         provided stack.
10632         * pthread_attr_getstack.c: Return bottom of the thread area.
10634 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10636         * Makefile (libpthread-routines): Add pt-allocrtsig and
10637         pthread_kill_other_threads.
10638         * pt-allocrtsig.c: New file.
10639         * pthread_kill_other_threads.c: New file.
10640         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10641         all three functions.
10642         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10643         allocrtsig.
10644         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10645         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10646         and __libc_allocate_rtsig_private.
10647         * Versions (libpthread): Export pthread_kill_other_threads_np,
10648         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10650 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10652         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10653         the end of the stack.  Adjust computations.
10654         When mprotect call fails dequeue stack and free it.
10655         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10656         attribute.
10657         * pthread_getattr_np.c: Likewise.
10659         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10660         surprises.
10662 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10664         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10665         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10667 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10669         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10670         * pthread_setspecific.c: Likewise.
10672 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10674         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10675         definitions.  Get them from the official place.
10676         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10678         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10679         Use new CLONE_ flags in clone() calls.
10681         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10682         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10684         * Versions: Add pthread_* functions for libc.
10685         * forward.c: New file.
10687         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10688         errno-loc.
10689         * herrno.c: New file.
10690         * res.c: New file.
10692         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10693         sem_trywait, and sem_timedwait.  Add herrno and res.
10694         * sem_init.c: Don't initialize lock and waiters members.
10695         * sem_open.c: Likewise.
10696         * sem_post.c: Removed.
10697         * sem_wait.c: Removed.
10698         * sem_trywait.c: Removed.
10699         * sem_timedwait.c: Removed.
10700         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10701         Includes full implementations of sem_post, sem_wait, sem_trywait,
10702         and sem_timedwait.
10703         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10704         for new implementation.
10705         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10706         and waiters fields.
10708         * tst-sem3.c: Improve error message.
10709         * tst-signal3.c: Likewise.
10711         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10712         to tell the kernel about the termination futex and to initialize tid
10713         member.  Don't initialize main_thread.
10714         * descr.h (struct pthread): Remove main_thread member.
10715         * cancelllation.c (__do_cancel): Remove code handling main thread.
10716         The main thread is not special anymore.
10718         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10719         size of the stacks to stack_cache_actsize.
10721         * pt-readv.c: Add missing "defined".
10722         * pt-sigwait.c: Likewise.
10723         * pt-writev.c: Likewise.
10725 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10727         * Versions: Export __connect from libpthread.
10728         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10730         * Makefile (libpthread-routines): Add pt-raise.
10731         * sysdeps/unix/sysv/linux/raise.c: New file.
10732         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10733         * sysdeps/generic/pt-raise.c: New file.
10735         * pthread_cond_init.c: Initialize all data elements of the condvar
10736         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10738         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10739         * pthread_create.c: Likewise.
10741         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10742         * tst-key1.c: New file.
10743         * tst-key2.c: New file.
10744         * tst-key3.c: New file.
10746         * Versions: Export pthread_detach for version GLIBC_2.0.
10747         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10749 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10751         * pthread_key_create.c: Terminate search after an unused key was found.
10752         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10754         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10755         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10757 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10759         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10760         dynamic lookup for errno in PIC.
10762         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10763         release the stack lock as soon as possible.
10764         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10765         the static TLS block.
10766         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10768         * cancellation.c: Renamed from cancelation.c.
10769         * Makefile: Adjust accordingly.
10770         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10771         * cleanup_defer.c: Use CANCELLATION_P.
10772         * pthread_testcancel.c: Likewise.
10773         * descr.h: Fix spelling in comments.
10774         * init.c: Likewise.
10775         * pthread_getattr_np.c: Likewise.
10776         * pthread_getschedparam.c: Likewise.
10777         * pthread_setschedparam.c: Likewise.
10778         * Versions: Likewise.
10780         * pt-pselect.c: New file.
10781         * Makefile (libpthread-routines): Add pt-pselect.
10782         * Versions: Add pselect.
10784         * tst-cancel4.c: New file.
10785         * Makefile (tests): Add tst-cancel4.
10787 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10789         * pthread_mutex_lock.c: Always record lock ownership.
10790         * pthread_mutex_timedlock.c: Likewise.
10791         * pthread_mutex_trylock.c: Likewise.
10793         * pt-readv.c: New file.
10794         * pt-writev.c: New file.
10795         * pt-creat.c: New file.
10796         * pt-msgrcv.c: New file.
10797         * pt-msgsnd.c: New file.
10798         * pt-poll.c: New file.
10799         * pt-select.c: New file.
10800         * pt-sigpause.c: New file.
10801         * pt-sigsuspend.c: New file.
10802         * pt-sigwait.c: New file.
10803         * pt-sigwaitinfo.c: New file.
10804         * pt-waitid.c: New file.
10805         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10806         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10807         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10808         * Versions: Add all the new functions.
10810         * tst-exit1.c: New file.
10811         * Makefile (tests): Add tst-exit1.
10813         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10815 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10817         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10819         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10820         call.  pthread_join is an official cancellation point.
10821         * pthread_timedjoin.c: Likewise.
10823         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10824         and the condvar's mutex are retrieved.
10825         * pthread_cond_timedwait.c: Likewise.
10826         Reported by dice@saros.East.Sun.COM.
10828 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10830         * pthreadP.h: Cut out all type definitions and move them...
10831         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10832         * pthreadP.h: Include <internaltypes.h>.
10834         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10835         performance tweaks.
10837         * sem_trywait.c: Shuffle #includes around to get right order.
10838         * sem_timedwait.c: Likewise.
10839         * sem_post.c: Likewise.
10840         * sem_wait.c: Likewise.
10842         * nptl 0.3 released.
10844         * Makefile (tests): Add tst-signal3.
10845         * tst-signal3.c: New file.
10847 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10849         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10850         the asms modify the sem object.
10851         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10853         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10854         the actual members.
10855         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10856         * semaphoreP.h: Include pthreadP.h.
10857         * sem_getvalue.c: Adjust to sem_t change.
10858         * sem_init.c: Likewise.
10859         * sem_open.c: Likewise.
10860         * sem_post.c: Likewise.
10861         * sem_timedwait.c: Likewise.
10862         * sem_trywait.c: Likewise.
10863         * sem_wait.c: Likewise.
10865 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10867         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10868         * tst-basic2.c: New file.
10869         * tst-exec1.c: New file.
10870         * tst-exec2.c: New file.
10871         * tst-exec3.c: New file.
10873         * tst-fork1.c: Remove extra */.
10875         * nptl 0.2 released.  The API for IA-32 is complete.