Test for ELF IFUNC functionality.
[glibc.git] / nptl / ChangeLog
blobd83b46125c6d69e54ca9f676328de1c25ecedacf
1 2009-05-16  Ulrich Drepper  <drepper@redhat.com>
3         * libc-cancellation.c: Move __libc_cleanup_routine to...
4         * libc-cleanup.c: ...here.  New file.
5         * Makefile (routines): Add libc-cleanup.
7         * cancellation.c (__pthread_disable_asynccancel): Remove unnecessary
8         test.
9         * libc-cancellation.c: Use <nptl/cancellation.c: to define the code.
10         * sysdeps/pthread/librt-cancellation.c: Likewise.
12         [BZ #9924]
13         * nptl-init.c: Renamed from init.c.
14         * Makefile: Change all occurences of init.c to nptl-init.c.
16 2009-05-15  Ulrich Drepper  <drepper@redhat.com>
18         * cancellation.c (__pthread_disable_asynccancel): Correct the bits
19         to test when deciding on the delay.
20         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
21         * pthread_cancel.c: Close race between deciding on sending a signal
22         and setting the CANCELING_BIT bit.
24         * cancellation.c (__pthread_disable_asynccancel): Don't return if
25         thread is canceled.
26         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
28 2009-04-27  Ulrich Drepper  <drepper@redhat.com>
30         * cancellation.c (__pthread_disable_asynccancel): Use THREAD_ATOMIC_AND
31         is available.
32         * libc-cancellation.c (__libc_disable_asynccancel): Likewise.
33         * sysdeps/x86_64/tls.h: Define THREAD_ATOMIC_AND.
34         * sysdeps/i386/tls.h: Likewise.
35         (tcbhead_t): Add __private_tm member.
37 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
39         * sem_open.c (sem_open): Rewrite initialization of initsem to
40         avoid warnings.
42         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
43         Avoid warning by using may_alias attribute on ptrhack.
45 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
47         [BZ #10090]
48         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
49         Check policy and priority for validity.
50         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
52 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
54         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
55         (__pthread_cond_timedwait): Change to use cfi directives instead of
56         hand-coded unwind sections.
58 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
60         * init.c (nptl_freeres): Compile only for SHARED.
62 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
64         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
65         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
66         FUTEX_BITSET_MATCH_ANY.
68 2009-02-27  Roland McGrath  <roland@redhat.com>
70         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
71         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
73 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
75         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
76         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
77         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
78         200112L to 200809L.
80 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
82         * sysdeps/pthread/pthread.h: The robust mutex functions are in
83         POSIX 2008.
85 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
87         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
88         Unify name of include protector macro.
90 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
92         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
93         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
95 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
97         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
98         pointer variables.
100         * allocatestack.c (__free_stacks): Renamed from free_stacks.
101         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
102         * init.c (nptl_freeres): New function.
103         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
104         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
105         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
106         variable.
107         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
108         load DSO.  Assign last.
109         (__unwind_freeres): New function.
111         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
112         for better debugging.  No need to use stack_list_add here.
114 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
116         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
117         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
118         instead of computing relative timeout.
119         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
120         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
122 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
124         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
126 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
128         * sysdeps/pthread/list.h (list_add): Initialize new element first.
129         (list_add_tail): Removed.
131 2009-01-07  Ulrich Drepper  <drepper@redhat.com>
133         * (in_flight_stack): New variable.
134         (stack_list_del): New function.  Use instead of list_del.
135         (stack_list_add): New function.  Use instead of list_add when adding to
136         stack_cache and stack_used lists.
137         (__reclaim_stacks): Complete operations on stack_cache and stack_used lists
138         when the fork call interrupted another thread.
140 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
142         * init.c (__pthread_initialize_minimal_internal): Optimize test
143         FUTEX_CLOCK_REALTIME a bit.
145 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
147         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
148         only passing five parameters to FUTEX_WAIT_BITSET call.
150         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
151         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
152         instead of computing relative timeout.
154 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
156         * init.c (__pthread_initialize_minimal_internal): Check for
157         FUTEX_CLOCK_REALTIME flag.
158         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
159         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
160         relative timeout.
162         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
163         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
164         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
165         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
166         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
167         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
169 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
171         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
172         loop body instead of ; to avoid gcc warnings.
173         (pthread_cleanup_pop_restore_np): Likewise.
174         Patch by Caolán McNamara <caolanm@redhat.com>.
176 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
178         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
179         fast path here, for robust/PI/PP mutexes call
180         __pthread_mutex_lock_full.  Don't use switch, instead use a series
181         of ifs according to their probability.
182         (__pthread_mutex_lock_full): New function.
183         * pthread_mutex_unlock.c: Include assert.h.
184         (__pthread_mutex_unlock_usercnt): Handle only the
185         fast path here, for robust/PI/PP mutexes call
186         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
187         of ifs according to their probability.
188         (__pthread_mutex_unlock_full): New function.
189         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
190         (__pthread_mutex_lock_full): Define.
192 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
194         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
195         implementation.  Add necessary padding and.
196         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
197         words.
199 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
201         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
202         and FUTEX_WAKE_BITSET.
204 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
206         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
207         and FUTEX_WAKE_BITSET.
208         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
209         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
210         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
211         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
213 2008-11-25  Roland McGrath  <roland@redhat.com>
215         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
216         Subdirectories moved to ports repository as
217         sysdeps/.../nptl subdirectories.
219 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
221         [BZ #7008]
222         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
223         of old value.
224         * pthread_cond_init.c (__pthread_cond_init): Fix
225         cond->__data.__nwaiters initialization.
226         * Makefile (tests): Add tst-cond23.
227         * tst-cond23.c: New test.
229 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
231         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
232         arguments.
233         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
234         arguments.
236 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
238         [BZ #6955]
239         * pthread_mutex_lock.c: Add support for private PI mutexes.
240         * pthread_mutex_timedlock.c: Likewise.
241         * pthread_mutex_trylock.c: Likewise.
242         * pthread_mutex_unlock.c: Likewise.
243         Patch mostly by Ben Jackson <ben@ben.com>.
245 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
247         [BZ #6843]
248         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
249         Increase stack size for helper thread.
251 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
253         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
254         assembly with a clobber list for access registers a0 and a1.
256 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
258         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
259         to force runp->refcntr to be read from memory.
261 2008-09-08  Richard Guenther  <rguenther@suse.de>
263         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
264         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
265         lll_timedlock, lll_robust_timedlock, lll_unlock,
266         lll_robust_unlock): Promote private to int.
268 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
270         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
271         ARCH_RETRY_MMAP definitions.
272         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
273         Define MAP_STACK when not defined.
274         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
275         handling of ARCH_RETRY_MMAP.
277 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
279         * tst-align2.c (f): Print message that f is reached.
281 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
283         [BZ #6740]
284         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
285         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
287 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
289         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
290         SOCK_CLOEXEC if possible.
292 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
294         * Makefile (tests): Add tst-rwlock2a.
295         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
296         * tst-rwlock2a.c: New file.
298 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
300         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
302 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
304         * sysdeps/pthread/pthread.h: Fix typo in comment.
306 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
308         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
309         of CPU set to the kernel.
311 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
313         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
314         cfi directives.
315         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
316         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
317         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
318         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
319         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
320         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
322 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
324         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
325         cfi directives.
326         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
327         Likewise.
328         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
329         Likewise.
330         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
331         Likewise.
333 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
335         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
337 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
339         David S. Miller  <davem@davemloft.net>
341         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
343 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
346         __pshared correctly.
347         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
348         Likewise.
349         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
350         Likewise.
351         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
352         Likewise.
353         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
354         Likewise.
355         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
357 2008-04-14  David S. Miller  <davem@davemloft.net>
359         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
360         (__old_sem_wait): Fix argument to lll_futex_wait().
362 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
364         * pthread_create.c: Require pthread_mutex_trylock and
365         pthread_key_delete for libgcc.
367 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
369         [BZ #6020]
370         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
371         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
372         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
374 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
376         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
377         <linux/limits.h> has defined it.
378         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
379         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
380         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
381         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
383 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
385         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
386         of ASSEMBLER.
387         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
388         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
390 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
392         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
393         HAVE_DL_DISCOVER_OSVERSION.
394         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
395         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
397 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
399         [BZ #5778]
400         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
401         _POSIX_CHOWN_RESTRICTED value to zero.
403 2008-01-31  Roland McGrath  <roland@redhat.com>
405         * Makefile (omit-deps): Variable removed.
407 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
409         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
410         unnecessary addr32 prefix.
412 2008-01-29  Roland McGrath  <roland@redhat.com>
414         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
416 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
418         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
420 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
422         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
423         a scratch register.
424         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
425         (__lll_lock_wait_private): Fix typo.
426         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
427         (pthread_barrier_wait): Likewise.  Adjust XADD use.
428         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
429         Adjust XADD use.
430         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
431         (pthread_rwlock_timedrdlock): Return correct return value.
432         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
433         (pthread_rwlock_timedwrlock): Likewise.
435 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
437         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
438         thread returns the program exits with an error code.
440 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
442         * pthread-errnos.sym: Add EOVERFLOW.
443         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
444         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
445         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
446         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
448 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
450         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
451         parameter.  Passed it as permission to mmap.
452         * allocatestack.c (allocate_stack): Pass prot as second parameter
453         to ARCH_RETRY_MMAP.
455 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
457         * tst-basic7.c: Allocate memory for the stack.
459         [BZ #5465]
460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
461         (__pthread_cond_timedwait): Don't use VDSO.
462         Patch by Michal Januszewski.
464 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
466         [BZ #5455]
467         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
468         Allow label before pthread_cleanup_pop.
469         (pthread_cleanup_pop_restore_np): Likewise.
471 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
473         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
474         Store 2 before returning ETIMEDOUT.
476 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
478         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
479         Store 2 before returning ETIMEDOUT.
480         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
481         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
482         (__lll_lock_wait_private): Optimize.
483         (__lll_lock_wait): Likewise.
485 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
487         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
488         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
489         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
491 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
493         [BZ #5240]
494         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
495         If we time out, try one last time to lock the futex to avoid
496         losing a wakeup signal.
497         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
498         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
500         [BZ #5245]
501         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
502         if necessary.
504 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
506         [BZ #5245]
507         * allocatestack.c (allocate_stack): Change ENOMEM error in case
508         mmap failed to EAGAIN.
509         * Makefile (tests): Add tst-basic7.
510         * tst-basic7.c: New file.
512 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
514         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
515         Use __linkin_atfork.
517 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
519         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
520         missing line continuations.
521         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
522         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
524 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
526         [BZ #5220]
527         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
528         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
529         (struct timer): Add next element.
530         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
531         enqueue timer structure into __active_timer_sigev_thread list.
532         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
533         remove timer struct from __active_timer_sigev_thread.
534         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
535         Before using timer structure make sure it is still on the
536         __active_timer_sigev_thread list.  Keep lock until done.
537         Define __active_timer_sigev_thread and
538         __active_timer_sigev_thread_lock.
540 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
542         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
543         Redefine thread_atfork for use of ATFORK_MEM.
544         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
545         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
546         function.
547         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
548         Use atomic operation when removing first element of list.
550 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
552         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
553         routine instead of an alias to __new_sem_post.
555 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
557         * init.c (__pthread_initialize_minimal): Initialize word to appease
558         valgrind.
560 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
562         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
563         libc.so just clear NAME.
564         (__libc_rwlock_fini): Nop inside of libc.so.
565         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
566         all zeros.
568 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
570         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
571         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
572         unlocking failed.
573         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
575 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
577         [BZ #4938]
578         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
579         reclaimed stack if necessary.
580         * Makefile (tests): Add tst-tsd6.
581         * tst-tsd6.c: New file.
583 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
585         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
586         Add private argument.
588 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
590         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
591         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
593 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
595         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
596         (__lll_robust_timedlock): Pass private as last argument to
597         __lll_robust_timedlock_wait.
598         (__lll_unlock): Fix a pasto.
600 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
602         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
603         sparc_old_sem): New structs.
604         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
605         (__sem_wait_cleanup): New function.
606         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
607         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
608         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
609         lll_futex_wait.
610         (__old_sem_wait): New function.
611         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
612         nptl/sysdeps/unix/sysv/linux/sparc version.
613         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
614         Likewise.
615         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
616         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
617         (__new_sem_trywait): Use sparc_old_sem structure.
618         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
619         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
620         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
621         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
622         lll_futex_timed_wait.
623         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
624         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
625         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
626         lll_futex_wake.
627         (__old_sem_post): New function.
628         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
629         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
630         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
631         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
632         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
633         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
635 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
637         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
638         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
639         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
640         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
641         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
642         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
643         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
644         Use FUTEX_WAKE_OP.
645         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
646         kernel-features.h and tcb-offsets.h.
647         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
648         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
649         process private.
650         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
651         tcb-offsets.h.
652         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
653         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
654         process private.
655         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
656         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
657         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
658         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
659         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
660         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
661         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
663 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
665         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
666         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
667         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
668         lll_futex_timed_wait.
670         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
671         __lll_robust_unlock): Rewrite as macros instead of inline functions.
672         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
673         __lll_robust_unlock, __lll_wait_tid): Likewise.
675 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
677         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
678         Fix a pasto.
679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
680         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
681         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
682         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
684         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
685         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
686         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
687         kernel-features.h.
688         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
689         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
690         process private.  Switch DW_CFA_advance_loc1 and some
691         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
692         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
693         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
694         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
695         process private.  Switch DW_CFA_advance_loc{1,2} and some
696         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
697         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
698         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
699         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
700         Likewise.
701         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
702         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
703         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
704         Likewise.
705         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
706         (__pthread_cond_broadcast): Compare %r8 instead of
707         dep_mutex-cond_*(%rdi) with $-1.
708         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
709         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
710         of oring.
712 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
714         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
716 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
718         * allocatestack.c: Include kernel-features.h.
719         * pthread_create.c: Likewise.
720         * pthread_mutex_init.c: Likewise.
721         * init.c: Likewise.
722         * pthread_cond_timedwait.c: Likewise.
723         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
724         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
725         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
726         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
727         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
728         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
729         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
730         Likewise.
731         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
732         Likewise.
733         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
734         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
735         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
736         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
738 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
740         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
741         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
742         byte elements.  One of them is the new __shared element.
743         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
744         adjust names of other padding elements.
745         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
746         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
747         byte elements.  One of them is the new __shared element.
748         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
749         adjust names of other padding elements.
750         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
751         Renamed __pad1 element to __shared, adjust names of other padding
752         elements.
753         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
754         (pthread_rwlock_t): Likewise.
755         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
756         typo.
758 2007-08-09  Anton Blanchard  <anton@samba.org>
760         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
762 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
764         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
765         <kernel-features.h>.
766         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
768 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
770         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
771         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
772         dealing with robust mutexes.
773         * pthread_mutex_timedlock.c: Likewise.
774         * pthread_mutex_trylock.c: Likewise.
775         * pthread_mutex_unlock.c: Likewise.
776         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
778 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
780         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
781         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
782         (PTHREAD_MUTEX_PSHARED): Define.
783         * pthread_mutex_init.c (__pthread_mutex_init): Set
784         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
785         mutexes.
786         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
787         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
788         as second argument to lll_lock.
789         (LLL_MUTEX_TRYLOCK): Take mutex as argument
790         instead of its __data.__lock field.
791         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
792         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
793         to lll_robust_lock.
794         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
795         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
796         instead of mutex->__data.__kind directly, pass
797         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
798         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
799         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
800         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
801         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
802         to lll_timedlock, lll_robust_timedlock, lll_unlock and
803         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
804         of mutex->__data.__kind directly.
805         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
806         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
807         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
808         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
809         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
810         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
811         and lll_futex_wake.
812         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
813         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
814         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
815         directly.
816         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
817         Take mutex as argument instead of its __data.__lock field, pass
818         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
819         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
820         __data.__lock field.
821         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
822         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
823         to lll_robust_cond_lock.
824         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
825         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
826         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
827         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
828         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
829         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
830         lll_futex_wait.
831         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
832         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
833         lll_futex_wake.
834         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
835         pshared variable, pass it to lll_lock, lll_unlock,
836         lll_futex_timedwait and lll_futex_wake.
837         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
838         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
839         and lll_futex_wake.
840         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
841         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
842         macro.
843         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
844         lll_futex_wake_unlock): Likewise.
845         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
846         Likewise.
847         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
848         lll_futex_wake_unlock): Likewise.
849         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
850         Likewise.
851         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
852         lll_futex_wake_unlock): Likewise.
853         (lll_futex_wake): Fix a typo.
854         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
855         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
856         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
857         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
858         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
859         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
860         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
861         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
863         (__pthread_cond_timedwait): Likewise.
864         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
865         (__condvar_cleanup, __pthread_cond_wait): Likewise.
867 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
869         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
870         Don't use CGOTSETUP and CGOTRESTORE macros.
871         (CGOTSETUP, CGOTRESTORE): Remove.
872         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
873         @local symbol.
875 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
877         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
878         definitions for private futexes.
879         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
880         kernel-features.h and lowlevellock.h.  Use private futexes if
881         they are available.
882         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
883         (__lll_mutex_lock_wait): Rename to
884         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
885         (__lll_mutex_timedlock_wait): Rename to ...
886         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
887         Don't compile in for libc.so.
888         (__lll_mutex_unlock_wake): Rename to ...
889         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
890         (__lll_timedwait_tid): Use __NR_gettimeofday.
891         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
892         the header from assembler.  Renamed all lll_mutex_* resp.
893         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
894         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
895         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
896         Define.
897         (__lll_lock_wait_private): Add prototype.
898         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
899         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
900         __lll_unlock_wake): Likewise.
901         (lll_lock): Add private argument.  Call __lll_lock_wait_private
902         if private is constant LLL_PRIVATE.
903         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
904         lll_timedlock, lll_robust_timedlock): Add private argument.
905         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
906         if private is constant LLL_PRIVATE.
907         (lll_robust_unlock, lll_robust_dead): Add private argument.
908         (lll_lock_t): Remove.
909         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
910         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
911         lll_cond_wake, lll_cond_broadcast): Remove.
912         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
913         kernel-features.h and lowlevellock.h.
914         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
915         (LOAD_FUTEX_WAIT): Define.
916         (__lll_robust_mutex_lock_wait): Rename to ...
917         (__lll_robust_lock_wait): ... this.  Add private argument.
918         Use LOAD_FUTEX_WAIT macro.
919         (__lll_robust_mutex_timedlock_wait): Rename to ...
920         (__lll_robust_timedlock_wait): ... this.    Add private argument.
921         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
922         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
923         lowlevellock.h.
924         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
925         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
926         __lll_mutex_{lock,unlock}_*.
927         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
928         lowlevellock.h and pthread-errnos.h.
929         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
930         FUTEX_CMP_REQUEUE, EINVAL): Remove.
931         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
932         __lll_mutex_{lock,unlock}_*.
933         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
934         lowlevellock.h and pthread-errnos.h.
935         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
936         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
937         __lll_mutex_{lock,unlock}_*.
938         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
939         lowlevellock.h.
940         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
941         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
942         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
943         (__condvar_tw_cleanup): Likewise.
944         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
945         lowlevellock.h.
946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
947         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
948         __lll_mutex_{lock,unlock}_*.
949         ( __condvar_w_cleanup): Likewise.
950         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
951         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
952         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
953         lowlevellock.h.
954         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
955         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
956         __lll_mutex_{lock,unlock}_*.
957         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
958         lowlevellock.h.
959         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
960         FUTEX_PRIVATE_FLAG): Remove.
961         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
962         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
964         lowlevellock.h.
965         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
966         FUTEX_PRIVATE_FLAG): Remove.
967         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
968         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
969         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
970         lowlevellock.h.
971         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
972         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
973         __lll_mutex_{lock,unlock}_*.
974         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
975         lowlevellock.h.
976         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
977         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
978         __lll_mutex_{lock,unlock}_*.
979         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
980         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
981         (__new_sem_post): Use standard initial exec code sequences.
982         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
983         lowlevellock.h.
984         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
985         FUTEX_PRIVATE_FLAG): Remove.
986         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
987         exec code sequences.
988         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
989         (__new_sem_trywait): Use standard initial exec code sequences.
990         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
991         (__new_sem_wait): Use standard initial exec code sequences.
993 2007-07-31  Anton Blanchard  <anton@samba.org>
995         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
996         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
997         atomic_full_barrier.
999 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1001         * allocatestack.c (stack_cache_lock): Change type to int.
1002         (get_cached_stack, allocate_stack, __deallocate_stack,
1003         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
1004         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
1005         as second argument to lll_lock and lll_unlock macros on
1006         stack_cache_lock.
1007         * pthread_create.c (__find_in_stack_list): Likewise.
1008         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
1009         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
1010         as second argument.
1011         * descr.h (struct pthread): Change lock and setxid_futex field
1012         type to int.
1013         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
1014         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
1015         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
1016         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
1017         Likewise.
1018         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
1019         * pthread_cond_init.c (__pthread_cond_init): Likewise.
1020         * pthreadP.h (__attr_list_lock): Change type to int.
1021         * pthread_attr_init.c (__attr_list_lock): Likewise.
1022         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
1023         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
1024         lll_{,un}lock.
1025         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
1026         also for lll_futex_{wake,wait}.
1027         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
1028         a pointer to const.
1029         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
1030         LLL_SHARED as second argument to lll_{,un}lock.
1031         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
1032         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
1033         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
1034         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
1035         Likewise.
1036         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
1037         as second argument to lll_{,un}lock macros on pd->lock.
1038         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
1039         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
1040         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
1041         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
1042         Likewise.
1043         * sysdeps/pthread/createthread.c (do_clone, create_thread):
1044         Likewise.
1045         * pthread_once.c (once_lock): Change type to int.
1046         (__pthread_once): Pass LLL_PRIVATE as second argument to
1047         lll_{,un}lock macros on once_lock.
1048         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1049         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1050         rwlock->__data.__shared as second argument to them and similarly
1051         for lll_futex_w*.
1052         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1053         Likewise.
1054         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1055         Likewise.
1056         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1057         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1058         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1059         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1060         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1061         to lll_{,un}lock macros on __sem_mappings_lock.
1062         * sem_open.c (check_add_mapping): Likewise.
1063         (__sem_mappings_lock): Change type to int.
1064         * semaphoreP.h (__sem_mappings_lock): Likewise.
1065         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1066         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1067         instead of lll_*mutex_*, pass LLL_SHARED as last
1068         argument.
1069         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1070         pass LLL_SHARED as last argument.
1071         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1072         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1073         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1074         pass LLL_SHARED as last argument.
1075         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1076         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1077         LLL_SHARED as last argument.
1078         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1079         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1080         Similarly.
1081         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1082         __libc_lock_lock_recursive, __libc_lock_unlock,
1083         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1084         argument to lll_{,un}lock.
1085         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1086         _IO_lock_unlock): Likewise.
1087         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1088         compound literal.
1089         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1090         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1091         __fork_lock.
1092         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1093         free_mem): Likewise.
1094         (__fork_lock): Change type to int.
1095         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1096         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1097         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1098         lll_futex_wake.
1099         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1100         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1101         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1102         New function.
1103         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1104         pass it through to lll_futex_*wait, only compile in when
1105         IS_IN_libpthread.
1106         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1107         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1108         argument and pass it through to lll_futex_*wait.
1109         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1110         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1111         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1112         inline functions to __lll_* resp. __lll_robust_*.
1113         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1114         (lll_mutex_dead): Add private argument.
1115         (__lll_lock_wait_private): New prototype.
1116         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1117         __lll_robust_lock_timedwait): Add private argument to prototypes.
1118         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1119         call __lll_lock_wait_private, otherwise pass private to
1120         __lll_lock_wait.
1121         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1122         __lll_robust_timedlock): Add private argument, pass it to
1123         __lll_*wait functions.
1124         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1125         call __lll_unlock_wake_private, otherwise pass private to
1126         __lll_unlock_wake.
1127         (__lll_robust_unlock): Add private argument, pass it to
1128         __lll_robust_unlock_wake.
1129         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1130         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1131         argument, pass it through to __lll_* inline function.
1132         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1133         (lll_lock_t): Remove.
1134         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1135         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1136         lll_cond_wake, lll_cond_broadcast): Remove.
1137         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1138         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1139         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1140         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1141         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1142         the header from assembler.  Renamed all lll_mutex_* resp.
1143         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1144         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1145         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1146         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1147         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1148         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1149         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1150         Remove prototype.
1151         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1152         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1153         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1154         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1155         MULTIPLE_THREADS_OFFSET as another asm operand.
1156         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1157         MULTIPLE_THREADS_OFFSET as last asm operand, call
1158         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1159         otherwise pass private as another argument to __lll_lock_wait.
1160         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1161         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1162         private as another argument to __lll_*lock_wait call.
1163         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1164         MULTIPLE_THREADS_OFFSET as another asm operand, call
1165         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1166         otherwise pass private as another argument to __lll_unlock_wake.
1167         (lll_robust_unlock): Add private argument, pass private as another
1168         argument to __lll_unlock_wake.
1169         (lll_robust_dead): Add private argument, use __lll_private_flag
1170         macro.
1171         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1172         LLL_MUTEX_LOCK_INITIALIZER.
1173         (lll_lock_t): Remove.
1174         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1175         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1176         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1177         lll_cond_wake, lll_cond_broadcast): Remove.
1178         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1179         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1180         2007-05-2{3,9} changes.
1181         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1182         kernel-features.h and lowlevellock.h.
1183         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1184         (LOAD_FUTEX_WAIT): Rewritten.
1185         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1186         define.
1187         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1188         (__lll_mutex_lock_wait): Rename to ...
1189         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1190         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1191         (__lll_mutex_timedlock_wait): Rename to ...
1192         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1193         contains private argument.  Don't compile in for libc.so.
1194         (__lll_mutex_unlock_wake): Rename to ...
1195         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1196         Don't compile in for libc.so.
1197         (__lll_timedwait_tid): Use __NR_gettimeofday.
1198         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1199         kernel-features.h and lowlevellock.h.
1200         (LOAD_FUTEX_WAIT): Define.
1201         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1202         define.
1203         (__lll_robust_mutex_lock_wait): Rename to ...
1204         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1205         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1206         macro.
1207         (__lll_robust_mutex_timedlock_wait): Rename to ...
1208         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1209         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1210         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1211         lowlevellock.h.
1212         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1213         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1214         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1215         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1216         to __lll_lock_wait in %edx.
1217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1218         Include lowlevellock.h and pthread-errnos.h.
1219         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1220         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1221         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1222         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1223         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1224         __lll_unlock_wake.
1225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1226         Include lowlevellock.h and pthread-errnos.h.
1227         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1228         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1229         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1230         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1231         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1232         __lll_unlock_wake.
1233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1234         Include lowlevellock.h.
1235         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1236         Don't define.
1237         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1238         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1239         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1240         __lll_unlock_wake.  Use __NR_gettimeofday.
1241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1242         Include lowlevellock.h.
1243         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1244         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1245         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1246         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1247         and __lll_unlock_wake.
1248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1249         Include lowlevellock.h.
1250         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1251         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1252         MUTEX(%ebx) address in %edx rather than %ecx to
1253         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1254         and __lll_unlock_wake.  Move return value from %ecx to %edx
1255         register.
1256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1257         Include lowlevellock.h.
1258         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1259         Don't define.
1260         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1261         MUTEX(%ebp) address in %edx rather than %ecx to
1262         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1263         and __lll_unlock_wake.  Move return value from %ecx to %edx
1264         register.  Use __NR_gettimeofday.
1265         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1266         Include lowlevellock.h.
1267         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1268         Don't define.
1269         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1270         MUTEX(%ebp) address in %edx rather than %ecx to
1271         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1272         and __lll_unlock_wake.  Move return value from %ecx to %edx
1273         register.  Use __NR_gettimeofday.
1274         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1275         Include lowlevellock.h.
1276         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1277         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1278         MUTEX(%edi) address in %edx rather than %ecx to
1279         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1280         and __lll_unlock_wake.
1281         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1282         Include lowlevellock.h.
1283         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1284         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1285         MUTEX(%ebx) address in %edx rather than %ecx to
1286         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1287         and __lll_unlock_wake.  Move return value from %ecx to %edx
1288         register.
1289         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1290         lowlevellock.h.
1291         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1292         define.
1293         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1294         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1295         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1296         lowlevellock.h.
1297         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1298         (sem_timedwait): Use __NR_gettimeofday.
1299         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1300         lowlevellock.h.
1301         (LOCK): Don't define.
1302         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1303         lowlevellock.h.
1304         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1305         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1306         are waiters.
1307         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1308         2007-05-2{3,9} changes.
1309         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1310         kernel-features.h and lowlevellock.h.
1311         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1312         (LOAD_FUTEX_WAIT): Rewritten.
1313         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1314         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1315         (__lll_mutex_lock_wait): Rename to ...
1316         (__lll_lock_wait): ... this.  %esi is now private argument.
1317         Don't compile in for libc.so.
1318         (__lll_mutex_timedlock_wait): Rename to ...
1319         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1320         Don't compile in for libc.so.
1321         (__lll_mutex_unlock_wake): Rename to ...
1322         (__lll_unlock_wake): ... this.  %esi contains private argument.
1323         Don't compile in for libc.so.
1324         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1325         kernel-features.h and lowlevellock.h.
1326         (LOAD_FUTEX_WAIT): Define.
1327         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1328         (__lll_robust_mutex_lock_wait): Rename to ...
1329         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1330         Use LOAD_FUTEX_WAIT macro.
1331         (__lll_robust_mutex_timedlock_wait): Rename to ...
1332         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1333         private, use LOAD_FUTEX_WAIT macro.
1334         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1335         lowlevellock.h.
1336         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1337         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1338         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1339         __lll_lock_wait and __lll_unlock_wake.
1340         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1341         Include lowlevellock.h and pthread-errnos.h.
1342         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1343         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1344         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1345         pass LLL_SHARED in %esi to both __lll_lock_wait and
1346         __lll_unlock_wake.
1347         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1348         Include lowlevellock.h and pthread-errnos.h.
1349         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1350         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1351         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1352         pass LLL_SHARED in %esi to both __lll_lock_wait and
1353         __lll_unlock_wake.
1354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1355         Include lowlevellock.h.
1356         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1357         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1358         pass LLL_SHARED in %esi to both __lll_lock_wait and
1359         __lll_unlock_wake.
1360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1361         Include lowlevellock.h.
1362         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1363         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1364         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1365         and __lll_unlock_wake.
1366         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1367         Include lowlevellock.h.
1368         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1369         Don't define.
1370         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1371         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1372         and __lll_unlock_wake.
1373         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1374         Include lowlevellock.h.
1375         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1376         Don't define.
1377         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1378         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1379         and __lll_unlock_wake.
1380         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1381         Include lowlevellock.h.
1382         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1383         Don't define.
1384         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1385         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1386         and __lll_unlock_wake.
1387         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1388         Include lowlevellock.h.
1389         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1390         Don't define.
1391         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1392         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1393         and __lll_unlock_wake.
1394         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1395         Include lowlevellock.h.
1396         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1397         Don't define.
1398         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1399         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1400         and __lll_unlock_wake.
1401         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1402         lowlevellock.h.
1403         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1404         define.
1405         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1406         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1407         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1408         lowlevellock.h.
1409         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1410         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1411         lowlevellock.h.
1412         (LOCK): Don't define.
1413         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1414         lowlevellock.h.
1415         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1416         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1417         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1418         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1419         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1420         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1421         (__lll_lock_wait_private): New function.
1422         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1423         it to lll_futex_*wait.  Don't compile in for libc.so.
1424         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1425         Remove.
1426         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1427         (struct sparc_pthread_barrier): Remove.
1428         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1429         struct sparc_pthread_barrier.  Pass
1430         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1431         and lll_futex_wait macros.
1432         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1433         Remove.
1434         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1435         Include sparc pthread_barrier_wait.c instead of generic one.
1437 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1439         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1441         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1442         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1443         %ecx.
1444         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1445         (pthread_rwlock_timedwrlock): Likewise.
1446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1447         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1449 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1451         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1453 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1455         * tst-locale2.c (useless): Add return statement.
1457 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1459         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1460         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1461         * pthread_create.c (start_thread): Likewise.
1462         * init.c (sighandler_setxid): Likewise.
1463         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1464         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1465         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1466         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1467         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1468         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1469         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1470         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1471         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1472         Likewise.
1473         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1474         Likewise.
1475         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1476         Likewise.
1477         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1478         __rtld_notify): Likewise.
1479         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1480         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1481         __pthread_once): Likewise.
1482         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1483         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1484         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1485         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1486         (lll_futex_wait): Add private argument, define as wrapper around
1487         lll_futex_timed_wait.
1488         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1489         use __lll_private_flag macro.
1490         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1491         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1492         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1493         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1494         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1495         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1496         (lll_futex_wait): Add private argument, define as wrapper around
1497         lll_futex_timed_wait.
1498         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1499         use __lll_private_flag macro.
1500         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1501         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1502         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1503         Define.
1504         (lll_futex_timed_wait, lll_futex_wake): Use it.
1505         (lll_private_futex_wait, lll_private_futex_timed_wait,
1506         lll_private_futex_wake): Removed.
1507         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1508         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1509         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1510         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1511         (lll_futex_wait): Add private argument, define as wrapper around
1512         lll_futex_timed_wait.
1513         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1514         use __lll_private_flag macro.
1515         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1516         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1517         to lll_futex_*.
1518         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1519         (lll_private_futex_wait, lll_private_futex_timed_wait,
1520         lll_private_futex_wake): Removed.
1521         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1522         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1523         (lll_private_futex_wait, lll_private_futex_timed_wait,
1524         lll_private_futex_wake): Removed.
1525         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1526         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1527         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1528         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1529         (lll_futex_wait): Add private argument, define as wrapper around
1530         lll_futex_timed_wait.
1531         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1532         use __lll_private_flag macro.
1533         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1534         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1535         to lll_futex_*.
1536         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1537         Define.
1538         (lll_futex_timed_wait, lll_futex_wake): Use it.
1539         (lll_private_futex_wait, lll_private_futex_timed_wait,
1540         lll_private_futex_wake): Removed.
1542 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1544         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1545         of the structure for sparc32.
1547 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1549         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1551 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1553         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1554         code used when private futexes are assumed.
1555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1556         Likewise.
1558 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1560         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1561         (__lll_private_flag): Define.
1562         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1563         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1564         __lll_private_flag.
1565         (lll_private_futex_wait, lll_private_futex_timedwait,
1566         lll_private_futex_wake): Define as wrapper around non-_private
1567         macros.
1568         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1569         (__lll_private_flag): Define.
1570         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1571         (lll_private_futex_wait, lll_private_futex_timedwait,
1572         lll_private_futex_wake): Define as wrapper around non-_private
1573         macros.
1575 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1577         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1578         parameter to lll_futex_wait call.
1579         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1581         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1582         Replace lll_futex_wait with lll_private_futex_wait.
1583         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1584         Add LLL_SHARED parameter to lll_futex_wake().
1586         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1587         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1588         lll_private_futex_wake.
1589         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1590         bit from private parm before syscall.
1591         (lll_futex_timed_wait): Likewise.
1592         (lll_futex_wake): Likewise.
1593         (lll_futex_wake_unlock): Likewise.
1594         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1595         (lll_robust_mutex_unlock): Likewise.
1596         (lll_mutex_unlock_force): Likewise.
1597         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1599 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1601         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1602         compilation when unconditionally using private futexes.
1603         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1604         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1605         Likewise.
1606         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1607         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1609 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1611         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1612         Define.
1614 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1616         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1617         kernel-features.h.
1619 2007-05-16  Roland McGrath  <roland@redhat.com>
1621         * init.c (__nptl_initial_report_events): New variable.
1622         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1623         to that.
1625 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1627         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1628         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1630 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1632         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1633         implementation.
1635 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1637         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1638         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1639         * pthread_mutex_timedlock.c: Likewise.
1640         * pthread_mutex_trylock.c: Likewise.
1641         * pthread_mutex_unlock.c: Likewise.
1643 2007-06-17  Andreas Schwab  <schwab@suse.de>
1645         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1646         sections.
1648 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1650         * allocatestack.c (allocate_stack): Make code compile if
1651         __ASSUME_PRIVATE_FUTEX is set.
1653 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1655         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1656         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1657         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1658         (__pthread_rwlock_wrlock): Likewise.
1659         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1660         (pthread_rwlock_timedrdlock): Likewise.
1661         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1662         (pthread_rwlock_timedwrlock): Likewise.
1663         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1664         (__pthread_rwlock_unlock): Likewise.
1666 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1668         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1669         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1670         Split __flags into __flags, __shared, __pad1 and __pad2.
1671         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1672         futexes if they are available.
1673         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1674         in libc-lowlevellock.S allow using private futexes.
1675         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1676         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1677         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1678         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1679         lll_private_futex_timed_wait and lll_private_futex_wake.
1680         (lll_robust_mutex_unlock): Fix typo.
1681         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1682         field in futex command setup.
1683         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1684         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1685         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1686         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1687         if they are available.  Remove clear_once_control.
1688         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1689         futexes if they are available.
1690         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1691         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1692         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1693         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1694         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1695         Wake only when there are waiters.
1696         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1697         support.  Indicate that there are waiters.  Remove unnecessary
1698         extra cancellation test.
1699         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1700         left-over duplication of __sem_wait_cleanup.
1702 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1704         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1705         parameter to lll_futex_wait, lll_futex_timed_wait, and
1706         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1707         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1708         lll_private_futex_wake.
1709         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1710         * allocatestack.c: Adjust use of lll_futex_* macros.
1711         * init.c: Likewise.
1712         * lowlevellock.h: Likewise.
1713         * pthread_barrier_wait.c: Likewise.
1714         * pthread_cond_broadcast.c: Likewise.
1715         * pthread_cond_destroy.c: Likewise.
1716         * pthread_cond_signal.c: Likewise.
1717         * pthread_cond_timedwait.c: Likewise.
1718         * pthread_cond_wait.c: Likewise.
1719         * pthread_create.c: Likewise.
1720         * pthread_mutex_lock.c: Likewise.
1721         * pthread_mutex_setprioceiling.c: Likewise.
1722         * pthread_mutex_timedlock.c: Likewise.
1723         * pthread_mutex_unlock.c: Likewise.
1724         * pthread_rwlock_timedrdlock.c: Likewise.
1725         * pthread_rwlock_timedwrlock.c: Likewise.
1726         * pthread_rwlock_unlock.c: Likewise.
1727         * sysdeps/alpha/tls.h: Likewise.
1728         * sysdeps/i386/tls.h: Likewise.
1729         * sysdeps/ia64/tls.h: Likewise.
1730         * sysdeps/powerpc/tls.h: Likewise.
1731         * sysdeps/pthread/aio_misc.h: Likewise.
1732         * sysdeps/pthread/gai_misc.h: Likewise.
1733         * sysdeps/s390/tls.h: Likewise.
1734         * sysdeps/sh/tls.h: Likewise.
1735         * sysdeps/sparc/tls.h: Likewise.
1736         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1737         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1738         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1739         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1740         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1741         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1742         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1743         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1744         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1745         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1746         Likewise.
1747         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1748         * sysdeps/x86_64/tls.h: Likewise.
1750 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1752         * pthread_getattr_np.c: No need to install a cancellation handler,
1753         this is no cancellation point.
1754         * pthread_getschedparam.c: Likewise.
1755         * pthread_setschedparam.c: Likewise.
1756         * pthread_setschedprio.c: Likewise.
1757         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1758         lll_unlock_wake_cb.
1759         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1760         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1761         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1762         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1763         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1764         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1765         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1766         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1767         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1768         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1769         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1770         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1772         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1773         whether there are more than one thread makes no sense here since
1774         we only call the slow path if the locks are taken.
1775         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1777         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1778         COND_NWAITERS_SHIFT.
1779         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1780         COND_CLOCK_BITS.
1781         * pthread_cond_init.c: Likewise.
1782         * pthread_cond_timedwait.c: Likewise.
1783         * pthread_cond_wait.c: Likewise.
1784         * pthread_condattr_getclock.c: Likewise.
1785         * pthread_condattr_setclock.c: Likewise.
1786         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1787         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1788         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1789         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1790         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1792 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1794         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1795         unistd.h.
1797         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1798         insn suffix.
1799         (THREAD_GSCOPE_GET_FLAG): Remove.
1800         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1801         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1802         changes.
1803         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1804         (THREAD_GSCOPE_GET_FLAG): Remove.
1805         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1806         instead of THREAD_GSCOPE_GET_FLAG.
1807         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1808         it.
1809         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1810         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1811         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1812         THREAD_GSCOPE_WAIT): Define.
1813         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1814         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1815         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1816         THREAD_GSCOPE_WAIT): Define.
1817         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1818         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1819         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1820         THREAD_GSCOPE_WAIT): Define.
1821         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1822         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1823         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1824         THREAD_GSCOPE_WAIT): Define.
1826 2007-05-24  Richard Henderson  <rth@redhat.com>
1828         * descr.h (struct pthread): Add header.gscope_flag.
1829         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1830         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1831         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1832         THREAD_GSCOPE_WAIT): Define.
1834 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1836         * init.c: Make it compile with older kernel headers.
1838         * tst-initializers1.c: Show through exit code which test failed.
1840         * pthread_rwlock_init.c: Also initialize __shared field.
1841         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1842         element in rwlock structure into four byte elements.  One of them is
1843         the new __shared element.
1844         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1845         Likewise.
1846         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1847         __shared, adjust names of other padding elements.
1848         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1849         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1850         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1851         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1852         FUTEX_PRIVATE_FLAG.
1853         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1854         futex to use private operations if possible.
1855         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1856         Likewise.
1857         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1858         Likewise.
1859         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1860         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1861         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1862         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1863         Likewise.
1864         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1865         Likewise.
1866         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1867         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1869 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1871         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1872         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1873         * pthread_rwlock_timedrdlock.c: Likewise.
1874         * pthread_rwlock_tryrdlock.c: Likewise.
1876         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1877         optimization.
1879         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1880         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1881         duplication of __sem_wait_cleanup.
1883         * allocatestack.c: Revert last change.
1884         * init.c: Likewise.
1885         * sysdeps/i386/tls.h: Likewise.
1886         * sysdeps/x86_64/tls.h: Likewise.
1887         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1888         header structure.
1889         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1891         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1892         Add private field.
1893         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1894         * pthread_barrier_init.c: Set private flag if pshared and private
1895         futexes are supported.
1896         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1897         private field in futex command setup.
1898         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1900 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1902         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1903         support.
1904         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1905         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1906         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1907         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1908         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1910         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1911         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1912         fields in the structure.
1913         (__old_sem_init): New function.
1914         * sem_open.c: Initialize all fields of the structure.
1915         * sem_getvalue.c: Adjust for renamed element.
1916         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1917         (gen-as-const-headers): Add structsem.sym.
1918         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1919         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1920         struct new_sem.  Add struct old_sem.
1921         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1922         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1923         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1924         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1925         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1926         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1927         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1928         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1929         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1930         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1931         * tst-sem10.c: New file.
1932         * tst-sem11.c: New file.
1933         * tst-sem12.c: New file.
1934         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1935         of struct sem.
1937 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1938             Jakub Jelinek  <jakub@redhat.com>
1940         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1941         Move __pthread_enable_asynccancel right before futex syscall.
1942         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1943         Likewise.
1945 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1947         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1948         THREAD_COPY_PRIVATE_FUTEX): Define.
1949         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1950         THREAD_COPY_PRIVATE_FUTEX): Define.
1951         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1952         * init.c (__pthread_initialize_minimal_internal): Use
1953         THREAD_SET_PRIVATE_FUTEX.
1955         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1956         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1957         THREAD_GSCOPE_FLAG_WAIT): Define.
1958         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1959         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1960         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1961         PTR_DEMANGLE.
1962         (THREAD_GSCOPE_GET_FLAG): Define.
1963         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1964         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1965         instead of ->header.gscope_flag directly.
1967 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1969         * init.c (__pthread_initialize_minimal_internal): Check whether
1970         private futexes are available.
1971         * allocatestack.c (allocate_stack): Copy private_futex field from
1972         current thread into the new stack.
1973         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1974         futexes if they are available.
1975         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1977         in libc-lowlevellock.S allow using private futexes.
1978         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1979         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1980         FUTEX_PRIVATE_FLAG.
1981         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1982         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1983         if they are available.
1984         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1985         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1986         * sysdeps/i386/tcb-offsets.sym: Likewise.
1987         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1988         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1990 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1992         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1993         Remove ptr_wait_lookup_done again.
1994         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1995         (__pthread_initialize_minimal_internal): Initialize
1996         _dl_wait_lookup_done pointer in _rtld_global directly.
1997         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1998         Remove code to code _dl_wait_lookup_done.
1999         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
2000         encrypted for now.
2002 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
2004         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
2005         pthread_mutex_init failed with ENOTSUP.
2007 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
2009         * allocatestack.c (__wait_lookup_done): New function.
2010         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
2011         Add ptr_wait_lookup_done.
2012         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
2013         * pthreadP.h: Declare __wait_lookup_done.
2014         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
2015         Define macros to implement reference handling of global scope.
2016         * sysdeps/x86_64/tls.h: Likewise.
2017         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
2018         Initialize GL(dl_wait_lookup_done).
2020 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
2022         [BZ #4512]
2023         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
2024         is detected.
2025         * pthread_mutex_timedlock.c: Likewise.
2026         * pthread_mutex_trylock.c: Likewise.
2027         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
2029         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
2030         * tst-robust9.c: New file.
2031         * tst-robustpi9.c: New file.
2033         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
2034         unnecessary extra cancellation test.
2036 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
2038         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
2039         extra cancellation test.
2040         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
2042 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
2044         * descr.h (struct pthread): Rearrange members to fill hole in
2045         64-bit layout.
2047         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2048         (__pthread_setaffinity_new): If syscall was successful and
2049         RESET_VGETCPU_CACHE is defined, use it before returning.
2050         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2052 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2054         [BZ #4455]
2055         * tst-align2.c: Include stackinfo.h.
2056         * tst-getpid1.c: Likewise.
2058 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2060         [BZ #4455]
2061         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2062         * tst-getpid1.c (do_test): Likewise.
2064         [BZ #4456]
2065         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2066         (allocate_stack): Likewise.
2068 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2070         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2071         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2072         (__lll_robust_timedlock_wait): Likewise.
2073         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2075 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2077         [BZ #4465]
2078         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2079         * tst-cancel4.c (tf_fdatasync): New test.
2081 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2083         [BZ #4392]
2084         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2085         check mutexes like normal mutexes.
2087         [BZ #4306]
2088         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2089         Initialize the whole sigevent structure to appease valgrind.
2091 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2093         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2094         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2096 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2098         * tst-locale1.c: Avoid warnings.
2099         * tst-locale2.c: Likewise.
2101 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2103         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2104         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2106 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2108         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2109         __extern_always_inline where appropriate.
2110         * sysdeps/pthread/pthread.h: Likewise.
2112 2007-03-13  Richard Henderson  <rth@redhat.com>
2114         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2115         separate cfi regions for the two subsections.
2117 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2119         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2120         new thread, don't just decrement it.
2121         Patch by Suzuki K P <suzuki@in.ibm.com>.
2123 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2125         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2126         PTHFCT_CALL definition.
2128 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2130         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2131         available, don't use it.
2133 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2135         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2136         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2137         call into the kernel to delay.
2139 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2141         * tst-initializers1.c: We want to test the initializers as seen
2142         outside of libc, so undefined _LIBC.
2144         * pthread_join.c (cleanup): Avoid warning.
2146 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2148         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2149         (__lll_timedwait_tid): Add unwind info.
2151         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2152         function table, mangle the pointers.
2153         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2154         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2155         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2156         demangle pointers before use.
2157         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2158         demangle pointer.
2159         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2160         * sysdeps/pthread/setxid.h: Likewise.
2162 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2164         * tst-rwlock7.c: Show some more information in case of correct
2165         behavior.
2167 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2169         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2170         (lll_futex_timed_wait): Undo part of last change, don't negate
2171         return value.
2173 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2175         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2176         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2178 2006-12-28  David S. Miller  <davem@davemloft.net>
2180         * shlib-versions: Fix sparc64 linux target specification.
2182 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2184         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2185         Adjust include path for pthread_barrier_wait.c move.
2187 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2189         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2190         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2192 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2194         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2195         6 argument cancellable syscalls.
2196         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2197         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2198         6 argument cancellable syscalls.
2199         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2201 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2203         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2204         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2206 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2208         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2209         __sync_lock_release instead of __sync_lock_release_si.
2211 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2213         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2214         Define.
2215         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2216         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2217         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2218         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2219         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2220         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2221         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2222         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2223         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2224         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2225         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2227 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2229         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2230         * pthread_barrier_wait.c: ...here.
2231         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2232         * pthread_cond_broadcast.c: ...here.
2233         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2234         * pthread_cond_signal.c: ...here.
2235         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2236         * pthread_cond_timedwait.c: ...here.
2237         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2238         * pthread_cond_wait.c: ...here.
2239         * sysdeps/pthread/pthread_once.c: Move to...
2240         * pthread_once.c: ...here.
2241         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2242         * pthread_rwlock_rdlock.c: ...here.
2243         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2244         * pthread_rwlock_timedrdlock.c: ...here.
2245         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2246         * pthread_rwlock_timedwrlock.c: ...here.
2247         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2248         * pthread_rwlock_unlock.c: ...here.
2249         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2250         * pthread_rwlock_wrlock.c: ...here.
2251         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2252         * pthread_spin_destroy.c: ...here.
2253         * sysdeps/pthread/pthread_spin_init.c: Move to...
2254         * pthread_spin_init.c: ...here.
2255         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2256         * pthread_spin_unlock.c: ...here.
2257         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2258         * pthread_getcpuclockid.c: ...here.
2260         * init.c: USE_TLS support is now always enabled.
2261         * tst-tls5.h: Likewise.
2262         * sysdeps/alpha/tls.h: Likewise.
2263         * sysdeps/i386/tls.h: Likewise.
2264         * sysdeps/ia64/tls.h: Likewise.
2265         * sysdeps/powerpc/tls.h: Likewise.
2266         * sysdeps/s390/tls.h: Likewise.
2267         * sysdeps/sh/tls.h: Likewise.
2268         * sysdeps/sparc/tls.h: Likewise.
2269         * sysdeps/x86_64/tls.h: Likewise.
2271 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2273         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2274         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2275         failed.
2277         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2278         Define to THREAD_SELF->header.multiple_threads.
2279         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2280         Likewise.
2281         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2282         Likewise.
2283         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2284         (SINGLE_THREAD_P): Likewise.
2285         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2286         (SINGLE_THREAD_P): Likewise.
2287         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2288         (SINGLE_THREAD_P): Likewise.
2289         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2290         (SINGLE_THREAD_P): Likewise.
2291         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2292         Likewise.
2293         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2294         (SINGLE_THREAD_P): Likewise.
2295         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2296         (SINGLE_THREAD_P): Likewise.
2297         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2298         Likewise.
2300 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2302         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2303         by default rather than 2_3_3.
2305 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2307         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2308         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2309         atomic_* instead of catomic_* macros.
2311 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2313         [BZ #3285]
2314         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2315         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2316         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2317         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2318         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2319         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2320         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2321         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2322         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2323         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2324         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2325         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2326         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2328 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2330         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2331         cancelable syscalls with six parameters.
2333         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2334         operations instead of atomic_*.
2336 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2338         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2340 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2342         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2343         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2344         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2345         New file.
2346         * pthread_attr_setstack.c: Allow overwriting the version number of the
2347         new symbol.
2348         * pthread_attr_setstacksize.c: Likewise.
2349         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2350         it.
2351         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2352         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2354 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2356         [BZ #3251]
2357         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2358         Patch by Petr Baudis.
2360 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2362         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2364         * tst-cancel2.c (tf): Loop as long as something was written.
2366 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2368         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2369         mutexes wake all mutexes.
2370         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2371         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2372         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2374 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2376         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2377         to guarantee the thread is always canceled.
2379 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2381         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2382         Include stdlib.h.
2383         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2384         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2389 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2391         [BZ #3123]
2392         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2393         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2397         * Makefile (tests): Add tst-cond22.
2398         * tst-cond22.c: New file.
2400 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2402         [BZ #3124]
2403         * descr.h (struct pthread): Add parent_cancelhandling.
2404         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2405         cancelhandling value to child.
2406         * pthread_create.c (start_thread): If parent thread was canceled
2407         reset the SIGCANCEL mask.
2408         * Makefile (tests): Add tst-cancel25.
2409         * tst-cancel25.c: New file.
2411 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2412             Ulrich Drepper  <drepper@redhat.com>
2414         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2415         counterp if it is already zero.
2416         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2418 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2419             Roland McGrath  <roland@redhat.com>
2421         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2422         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2423         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2424         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2425         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2426         lll_robust_mutex_timedlock, lll_mutex_unlock,
2427         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2428         Add _L_*_ symbols around the subsection.
2429         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2430         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2432 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2433             Roland McGrath  <roland@redhat.com>
2435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2436         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2437         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2438         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2439         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2440         lll_robust_mutex_timedlock, lll_mutex_unlock,
2441         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2442         Add _L_*_ symbols around the subsection.
2443         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2444         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2446 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2448         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2449         change because it can disturb too much existing code.  If real hard
2450         reader preference is needed we'll introduce another type.
2451         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2452         (pthread_rwlock_timedwrlock): Likewise.
2453         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2454         Likewise.
2456 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2458         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2459         reader preference.
2460         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2461         (pthread_rwlock_timedwrlock): Likewise.
2462         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2463         Likewise.
2465 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2467         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2468         Only define ifdef SHARED.
2470 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2472         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2473         (free_stacks): ...here.
2474         (__free_stack_cache): New function.
2475         * pthreadP.h: Declare __free_stack_cache.
2476         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2477         ptr_freeres.
2478         * init.c (pthread_functions): Initialize ptr_freeres.
2479         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2480         New freeres function.
2482 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2484         [BZ #3018]
2485         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2487 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2489         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2490         _XOPEN_REALTIME_THREADS.
2492 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2494         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2495         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2496         HAVE_CLOCK_GETTIME_VSYSCALL.
2497         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2499 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2501         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2502         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2503         * descr.h (struct priority_protection_data): New type.
2504         (struct pthread): Add tpp field.
2505         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2506         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2507         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2508         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2509         TPP mutexes.
2510         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2511         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2512         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2513         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2514         * tpp.c: New file.
2515         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2516         boosted by TPP.
2517         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2518         * pthread_mutexattr_getprioceiling.c
2519         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2520         in the SCHED_FIFO priority range.
2521         * pthread_mutexattr_setprioceiling.c
2522         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2523         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2524         if mutex is not TPP.  Ceiling is now in __data.__lock.
2525         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2526         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2527         is now in __data.__lock.  Add locking.
2528         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2529         * Makefile (libpthread-routines): Add tpp.
2530         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2531         * tst-tpp.h: New file.
2532         * tst-mutexpp1.c: New file.
2533         * tst-mutexpp6.c: New file.
2534         * tst-mutexpp10.c: New file.
2535         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2536         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2538 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2540         [BZ #2843]
2541         * pthread_join.c (pthread_join): Account for self being canceled
2542         when checking for deadlocks.
2543         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2544         (tf1): Don't print anything after pthread_join returns, this would be
2545         another cancellation point.
2546         (tf2): Likewise.
2547         * tst-join6.c: New file.
2548         * Makefile (tests): Add tst-join6.
2550 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2552         [BZ #2892]
2553         * pthread_setspecific.c (__pthread_setspecific): Check
2554         out-of-range index before checking for unused key.
2556         * sysdeps/pthread/gai_misc.h: New file.
2558 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2560         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2561         file.  Don't use sysctl.
2562         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2563         overwrite the file if this is likely not true.
2565 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2567         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2568         * Makefile (tests): Add tst-getpid3.
2569         * tst-getpid3.c: New file.
2571 2006-07-30  Roland McGrath  <roland@redhat.com>
2573         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2575         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2576         (pause_not_cancel): New macro.
2577         (nanosleep_not_cancel): New macro.
2578         (sigsuspend_not_cancel): New macro.
2579         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2580         nanosleep_not_cancel macro from <not-cancel.h>.
2581         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2582         macro from <not-cancel.h>.
2584 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2585             Jakub Jelinek  <jakub@redhat.com>
2587         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2588         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2589         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2590         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2591         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2592         * pthread_mutex_lock.c: Likewise.
2593         * pthread_mutex_timedlock.c: Likewise.
2594         * pthread_mutex_trylock.c: Likewise.
2595         * pthread_mutex_unlock.c: Likewise.
2596         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2597         all mutexes.
2598         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2599         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2600         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2601         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2602         pthread-pi-defines.sym.
2603         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2604         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2605         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2606         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2607         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2608         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2609         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2610         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2611         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2612         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2613         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2614         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2615         * tst-mutex2.c: Likewise.
2616         * tst-mutex3.c: Likewise.
2617         * tst-mutex4.c: Likewise.
2618         * tst-mutex5.c: Likewise.
2619         * tst-mutex6.c: Likewise.
2620         * tst-mutex7.c: Likewise.
2621         * tst-mutex7a.c: Likewise.
2622         * tst-mutex8.c: Likewise.
2623         * tst-mutex9.c: Likewise.
2624         * tst-robust1.c: Likewise.
2625         * tst-robust7.c: Likewise.
2626         * tst-robust8.c: Likewise.
2627         * tst-mutexpi1.c: New file.
2628         * tst-mutexpi2.c: New file.
2629         * tst-mutexpi3.c: New file.
2630         * tst-mutexpi4.c: New file.
2631         * tst-mutexpi5.c: New file.
2632         * tst-mutexpi6.c: New file.
2633         * tst-mutexpi7.c: New file.
2634         * tst-mutexpi7a.c: New file.
2635         * tst-mutexpi8.c: New file.
2636         * tst-mutexpi9.c: New file.
2637         * tst-robust1.c: New file.
2638         * tst-robust2.c: New file.
2639         * tst-robust3.c: New file.
2640         * tst-robust4.c: New file.
2641         * tst-robust5.c: New file.
2642         * tst-robust6.c: New file.
2643         * tst-robust7.c: New file.
2644         * tst-robust8.c: New file.
2645         * Makefile (tests): Add the new tests.
2647         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2648         * pthread_mutex_destroy.c: Remove unneeded label.
2650 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2652         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2653         computations to compile time.
2655 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2657         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2659 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2661         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2663 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2665         * pthread_key_create.c (__pthread_key_create): Do away with
2666         __pthread_keys_lock.
2668         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2669         (__kernel_cpumask_size): Mark as hidden.
2670         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2672         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2673         * semaphoreP.h (__sem_mappings_lock): Likewise.
2675 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2677         * pthread_atfork.c: Mark __dso_handle as hidden.
2679 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2681         [BZ #2644]
2682         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2683         the reload problem.  Change the one path in pthread_cancel_init
2684         which causes the problem.  Force gcc to reload.  Simplify callers.
2685         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2686         (_Unwind_GetBSP): Undo last patch.
2688 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2690         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2691         function pointer is reloaded after pthread_cancel_init calls.
2693         [BZ #2644]
2694         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2695         pointers are reloaded after pthread_cancel_init calls.
2697 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2699         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2700         __always_inline.
2702 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2704         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2705         Allocate new object which is passed to timer_sigev_thread so that
2706         the timer can be deleted before the new thread is scheduled.
2708 2006-04-26  Roland McGrath  <roland@redhat.com>
2710         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2712 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2714         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2715         suffix for conditional jumps.
2716         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2717         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2718         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2719         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2720         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2721         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2723         * init.c (sigcancel_handler): Compare with correct PID even if the
2724         thread is in the middle of a fork call.
2725         (sighandler_setxid): Likewise.
2726         Reported by Suzuki K P <suzuki@in.ibm.com> .
2728 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2730         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2732 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2734         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2735         fails [Coverity CID 105].
2737 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2739         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2741 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2743         [BZ #2505]
2744         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2745         Define __lll_rel_instr using lwsync.
2747 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2749         * allocatestack.c (allocate_stack): Always initialize robust_head.
2750         * descr.h: Define struct robust_list_head.
2751         (struct pthread): Use robust_list_head in robust mutex list definition.
2752         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2753         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2754         (__pthread_initialize_minimal_internal): Register robust_list with
2755         the kernel.
2756         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2757         Declare __set_robust_list_avail.
2758         * pthread_create.c (start_thread): Register robust_list of new thread.
2759         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2760         waiters.
2761         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2762         number of users, it's unreliable.
2763         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2764         set_robust_list syscall is available.
2765         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2766         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2767         Set robust_head.list_op_pending before trying to lock a robust mutex.
2768         * pthread_mutex_timedlock.c: Likewise.
2769         * pthread_mutex_trylock.c: Likewise.
2770         * pthread_mutex_unlock.c: Likewise for unlocking.
2771         * Makefile (tests): Add tst-robust8.
2772         * tst-robust8.c: New file.
2774 2006-03-08  Andreas Schwab  <schwab@suse.de>
2776         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2777         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2779 2006-03-05  Roland McGrath  <roland@redhat.com>
2781         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2782         and $config_os doesn't match *linux*.
2784 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2786         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2787         Use __syscall_error.
2788         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2789         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2790         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2791         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2792         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2793         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2795 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2797         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2799 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2801         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2802         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2803         mutex.
2804         (__lll_robust_timedlock_wait): Likewise.
2805         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2806         (__lll_robust_lock_wait): Likewise.
2807         (__lll_robust_timedlock_wait): Likewise.
2808         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2809         (__lll_robust_lock_wait): Likewise.
2810         (__lll_robust_timedlock_wait): Likewise.
2812 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2814         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2815         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2816         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2817         lll_robust_mutex_unlock): Define.
2818         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2820 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2822         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2823         instead of <clone.S>.
2825 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2827         * Makefile (libpthread-routines): Add
2828         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2829         and pthread_mutex_[sg]etprioceiling.
2830         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2831         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2832         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2833         pthread_mutex_setprioceiling.
2834         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2835         PTHREAD_PRIO_PROTECT): New enum values.
2836         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2837         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2838         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2839         prototypes.
2840         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2841         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2842         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2843         Define.
2844         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2845         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2846         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2847         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2848         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2849         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2850         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2851         protocol mutexes.
2852         * pthread_mutex_getprioceiling.c: New file.
2853         * pthread_mutex_setprioceiling.c: New file.
2854         * pthread_mutexattr_getprioceiling.c: New file.
2855         * pthread_mutexattr_setprioceiling.c: New file.
2856         * pthread_mutexattr_getprotocol.c: New file.
2857         * pthread_mutexattr_setprotocol.c: New file.
2859 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2861         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2863 2006-02-27  Roland McGrath  <roland@redhat.com>
2865         * sysdeps/pthread/Subdirs: List nptl here too.
2866         * configure (libc_add_on_canonical): New variable.
2868         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2870         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2871         self to get main source tree's file.
2872         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2873         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2874         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2875         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2876         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2877         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2878         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2879         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2880         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2881         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2882         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2883         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2884         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2886         * Makefile: Use $(sysdirs) in vpath directive.
2888         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2889         (CPPFLAGS-timer_routines.c): Likewise.
2891         * Makeconfig (includes): Variable removed.
2893 2006-02-26  Roland McGrath  <roland@redhat.com>
2895         * sysdeps/generic/pt-raise.c: Moved to ...
2896         * pt-raise.c: ... here.
2897         * sysdeps/generic/lowlevellock.h: Moved to ...
2898         * lowlevellock.h: ... here.
2900 2006-02-23  Roland McGrath  <roland@redhat.com>
2902         * descr.h (struct pthread): Add final member `end_padding'.
2903         (PTHREAD_STRUCT_END_PADDING): Use it.
2905 2006-02-20  Roland McGrath  <roland@redhat.com>
2907         * sysdeps/mips: Directory removed, saved in ports repository.
2908         * sysdeps/unix/sysv/linux/mips: Likewise.
2910 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2912         * tst-robust1.c: Add second mutex to check that the mutex list is
2913         handled correctly.
2915 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2917         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2918         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2919         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2920         lll_robust_mutex_unlock): New macros.
2921         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2922         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2923         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2924         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2925         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2927 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2929         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2930         definitions.
2931         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2933 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2935         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2936         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2937         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2938         (lll_robust_mutex_unlock): Likewise.
2940 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2942         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2943         Set robust_list.__next rather than robust_list.
2944         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2945         (__pthread_list_t): New typedef.
2946         (pthread_mutex_t): Replace __next and __prev fields with __list.
2947         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2948         (__pthread_list_t): New typedef.
2949         (pthread_mutex_t): Replace __next and __prev fields with __list.
2950         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2951         (__pthread_list_t, __pthread_slist_t): New typedefs.
2952         (pthread_mutex_t): Replace __next and __prev fields with __list.
2953         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2954         (__pthread_list_t, __pthread_slist_t): New typedefs.
2955         (pthread_mutex_t): Replace __next and __prev fields with __list.
2956         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2957         (__pthread_list_t, __pthread_slist_t): New typedefs.
2958         (pthread_mutex_t): Replace __next and __prev fields with __list.
2959         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2960         (__pthread_slist_t): New typedef.
2961         (pthread_mutex_t): Replace __next field with __list.
2963 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2965         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2966         PTHREAD_MUTEX_OWNERDEAD.
2967         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2968         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2969         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2970         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2971         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2972         to PTHREAD_MUTEX_INCONSISTENT.
2973         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2974         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2975         * pthread_mutex_trylock.c: Likewise.
2976         * pthread_mutex_timedlock.c: Likewise.
2977         * pthread_mutex_unlock.c: Likewise.
2978         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2979         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2980         lowlevelrobustlock.sym.
2981         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2982         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2983         definitions.
2984         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2985         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2986         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2987         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2988         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2990 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2992         * allocatestack.c (allocate_stack): Initialize robust_list.
2993         * init.c (__pthread_initialize_minimal_internal): Likewise.
2994         * descr.h (struct xid_command): Pretty printing.
2995         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2996         robust_list.  Adjust macros.
2997         * pthread_create.c (start_thread): Adjust robust_list handling.
2998         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2999         but the owner for all robust mutex types.
3000         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
3001         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
3002         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3003         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
3005         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
3006         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
3008 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
3010         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
3011         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
3013 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3015         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
3016         Return status.
3017         (lll_futex_timed_wait): Define.
3019 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
3021         * tst-cancel4.c: Test ppoll.
3023 2006-01-18  Andreas Jaeger  <aj@suse.de>
3025         [BZ #2167]
3026         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
3027         (pthread_mutex_t): Follow changes for other archs.  Based on patch
3028         by Jim Gifford <patches@jg555.com>.
3030 2006-01-13  Richard Henderson  <rth@redhat.com>
3032         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
3034 2006-01-10  Roland McGrath  <roland@redhat.com>
3036         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
3037         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3038         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3039         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3040         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3041         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3042         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3043         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3044         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3045         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3047 2006-01-09  Roland McGrath  <roland@redhat.com>
3049         * tst-initializers1-c89.c: New file.
3050         * tst-initializers1-c99.c: New file.
3051         * tst-initializers1-gnu89.c: New file.
3052         * tst-initializers1-gnu99.c: New file.
3053         * Makefile (tests): Add them.
3054         (CFLAGS-tst-initializers1-c89.c): New variable.
3055         (CFLAGS-tst-initializers1-c99.c): New variable.
3056         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3057         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3059         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3060         Use __extension__ on anonymous union definition.
3061         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3062         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3063         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3064         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3065         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3067 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3069         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3070         Don't give the union a name because it changes the mangled name.
3071         Instead name the struct for __data.
3072         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3073         Likewise.
3074         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3075         Likewise.
3077 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3079         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3080         stack bias to mc_ftp field.
3082 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3084         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3085         being too clever and reloading the futex value where it shouldn't.
3087 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3089         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3090         correct type.
3092 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3094         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3095         Add cfi directives.
3097 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3099         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3100         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3101         rename in tcbhead_t.
3103         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3104         Don't give the union a name because it changes the mangled name.
3105         Instead name the struct for __data.
3106         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3107         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3108         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3109         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3110         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3111         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3113 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3115         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3116         Return status.
3117         (lll_futex_timed_wait): Define.
3118         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3119         * sysdeps/pthread/aio_misc.h: New file.
3121 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3123         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3125 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3127         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3128         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3129         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3131 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3133         * tst-cancel24.cc: Use C headers instead of C++ headers.
3135 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3137         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3138         sparc-linux configured glibc.
3139         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3140         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3141         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3142         atomic_compare_and_exchange_val_24_acq instead of
3143         atomic_compare_and_exchange_val_acq.
3144         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3145         instead of atomic_exchange_rel.
3146         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3147         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3148         file.
3149         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3150         file.
3151         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3152         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3153         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3154         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3155         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3156         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3157         New file.
3158         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3159         New file.
3160         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3161         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3162         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3163         file.
3164         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3165         file.
3166         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3168 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3170         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3171         mutex initializers.
3173 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3175         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3176         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3177         THREAD_COPY_POINTER_GUARD): Define.
3178         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3179         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3181 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3183         * version.c: Update copyright year.
3185 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3187         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3188         .eh_frame section, use cfi_* directives.
3189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3191 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3193         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3194         now.
3196 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3198         * sysdeps/pthread/sigaction.c: Removed.
3199         * sigaction.c: New file.
3200         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3202 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3204         * Makefile (tests): Add tst-signal7.
3205         * tst-signal7.c: New file.
3207 2005-12-27  Roland McGrath  <roland@redhat.com>
3209         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3210         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3211         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3212         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3213         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3214         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3215         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3216         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3217         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3218         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3219         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3221 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3223         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3224         and __prev field to pthread_mutex_t.
3225         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3226         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3227         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3228         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3229         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3230         to pthread_mutex_t.
3232 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3234         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3235         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3236         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3237         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3238         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3239         and PTHREAD_MUTEXATTR_FLAG_BITS.
3240         * descr.h (struct pthread): Add robust_list field and define
3241         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3242         * pthread_mutexattr_getrobust.c: New file.
3243         * pthread_mutexattr_setrobust.c: New file.
3244         * pthread_mutex_consistent.c: New file.
3245         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3246         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3247         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3248         Adjust pthread_mutex_t initializers.
3249         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3250         field to pthread_mutex_t.
3251         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3252         and __prev field to pthread_mutex_t.
3253         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3254         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3255         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3256         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3257         * pthread_mutexattr_gettype.c: Likewise.
3258         * pthread_mutexattr_setpshared.c: Likewise.
3259         * pthread_mutexattr_settype.c: Likewise.
3260         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3261         Initialize mutex kind according to robust flag.
3262         * pthread_mutex_lock.c: Implement local robust mutex.
3263         * pthread_mutex_timedlock.c: Likewise.
3264         * pthread_mutex_trylock.c: Likewise.
3265         * pthread_mutex_unlock.c: Likewise.
3266         * pthread_create.c (start_thread): Mark robust mutexes which remained
3267         locked as dead.
3268         * tst-robust1.c: New file.
3269         * tst-robust2.c: New file.
3270         * tst-robust3.c: New file.
3271         * tst-robust4.c: New file.
3272         * tst-robust5.c: New file.
3273         * tst-robust6.c: New file.
3274         * tst-robust7.c: New file.
3275         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3276         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3277         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3278         tst-robust5, tst-robust6, and tst-robust7.
3280         * tst-typesizes.c: New file.
3281         * Makefile (tests): Add tst-typesizes.
3283         * tst-once3.c: More debug output.
3285 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3287         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3288         missing after last change.
3290         * version.c: Update copyright year.
3292 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3294         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3295         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3296         * pthread_mutex_trylock.c: Likewise.
3297         * pthread_mutex_timedlock.c: Likewise.
3298         * pthread_mutex_unlock.c: Likewise.
3300 2005-12-22  Roland McGrath  <roland@redhat.com>
3302         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3303         so that #include_next's search location is not reset to the -I..
3304         directory where <nptl/...> can be found.
3306 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3308         [BZ #1913]
3309         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3310         Fix unwind info.  Remove useless branch prediction prefix.
3311         * tst-cancel24.cc: New file.
3312         * Makefile: Add rules to build and run tst-cancel24.
3314 2005-12-21  Roland McGrath  <roland@redhat.com>
3316         * libc-cancellation.c: Use <> rather than "" #includes.
3317         * pt-cleanup.c: Likewise.
3318         * pthread_create.c: Likewise.
3319         * pthread_join.c: Likewise.
3320         * pthread_timedjoin.c: Likewise.
3321         * pthread_tryjoin.c: Likewise.
3322         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3323         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3324         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3325         * unwind.c: Likewise.
3327 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3329         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3330         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3331         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3332         THREAD_COPY_POINTER_GUARD): Define.
3334 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3336         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3337         rather than one.
3338         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3339         THREAD_COPY_POINTER_GUARD): Define.
3340         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3341         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3342         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3343         THREAD_COPY_POINTER_GUARD): Define.
3344         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3345         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3346         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3347         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3348         Use PTR_DEMANGLE for B0 if defined.
3350 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3352         * pthread_create.c (__pthread_create_2_1): Use
3353         THREAD_COPY_POINTER_GUARD if available.
3354         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3355         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3356         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3357         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3358         * sysdeps/x86_64/tls.h: Likewise.
3360 2005-12-15  Roland McGrath  <roland@redhat.com>
3362         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3364 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3366         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3367         sysdeps/generic.
3368         * errno-loc.c: New file.
3370 2005-12-12  Roland McGrath  <roland@redhat.com>
3372         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3373         adjustments before choosing stack size.  Update minimum stack size
3374         calculation to match allocate_stack change.
3376 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3378         * allocatestack.c (allocate_stack): Don't demand that there is an
3379         additional full page available on the stack beside guard, TLS, the
3380         minimum stack.
3382 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3384         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3385         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3387         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3388         compiling 32-bit code we must define __cleanup_fct_attribute.
3390 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3392         [BZ #1920]
3393         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3394         __attribute__ instead of __attribute.
3395         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3396         (__cleanup_fct_attribute): Likewise.
3398 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3400         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3401         a write barrier before writing libgcc_s_getcfa.
3403 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3405         * sysdeps/unix/sysv/linux/configure: Removed.
3407 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3409         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3410         optional init_array/fini_array support.
3412 2005-10-24  Roland McGrath  <roland@redhat.com>
3414         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3415         versioned_symbol use.
3417 2005-10-16  Roland McGrath  <roland@redhat.com>
3419         * init.c (__pthread_initialize_minimal_internal): Even when using a
3420         compile-time default stack size, apply the minimum that allocate_stack
3421         will require, and round up to page size.
3423 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3425         * Makefile ($(test-modules)): Remove static pattern rule.
3427 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3428             Ulrich Drepper  <drepper@redhat.com>
3430         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3431         alignment in callback function.
3432         * Makefile: Add rules to build and run tst-align3.
3433         * tst-align3.c: New file.
3435 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3437         * allocatestack.c (setxid_signal_thread): Add
3438         INTERNAL_SYSCALL_DECL (err).
3440 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3442         * allocatestack.c (setxid_signal_thread): Need to use
3443         atomic_compare_and_exchange_bool_acq.
3445 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3446             Jakub Jelinek  <jakub@redhat.com>
3448         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3449         CANCEL_RESTMASK.
3450         (struct pthread): Move specific_used field to avoid padding.
3451         Add setxid_futex field.
3452         * init.c (sighandler_setxid): Reset setxid flag and release the
3453         setxid futex.
3454         * allocatestack.c (setxid_signal_thread): New function.  Broken
3455         out of the bodies of the two loops in __nptl_setxid.  For undetached
3456         threads check whether they are exiting and if yes, don't send a signal.
3457         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3458         * pthread_create.c (start_thread): For undetached threads, check
3459         whether setxid bit is set.  If yes, wait until signal has been
3460         processed.
3462         * allocatestack.c (STACK_VARIABLES): Initialize them.
3463         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3465 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3467         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3468         waiters, awake all waiters on the associated mutex.
3470 2005-09-22  Roland McGrath  <roland@redhat.com>
3472         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3473         ../sysdeps/x86_64/hp-timing.h).
3475 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3477         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3478         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3479         (lll_futex_wake_unlock): Define.
3480         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3481         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3482         (lll_futex_wake_unlock): Define.
3483         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3484         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3485         (lll_futex_wake_unlock): Define.
3486         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3487         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3488         (lll_futex_wake_unlock): Define.
3489         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3490         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3491         (lll_futex_wake_unlock): Define.
3492         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3493         lll_futex_wake_unlock.
3494         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3495         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3496         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3497         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3498         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3499         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3501 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3503         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3504         Fix typo in register name.
3506 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3508         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3509         Use __sigfillset.  Document that sigfillset does the right thing wrt
3510         to SIGSETXID.
3512 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3514         [BZ #1102]
3515         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3516         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3517         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3518         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3519         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3520         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3521         in the structure.
3522         * Makefile (tests): Add tst-initializers1.
3523         (CFLAGS-tst-initializers1.c): Set.
3524         * tst-initializers1.c: New test.
3526 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3528         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3529         Make sure __flags are located at offset 48 from the start of the
3530         structure.
3532 2005-07-02  Roland McGrath  <roland@redhat.com>
3534         * Makeconfig: Comment fix.
3536 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3538         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3539         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3540         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3541         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3542         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3543         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3544         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3545         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3546         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3547         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3549 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3551         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3552         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3553         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3554         fields.
3555         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3556         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3557         field.  Put in sysinfo field unconditionally.
3558         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3559         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3560         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3561         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3562         fields.
3563         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3564         * pthread_create.c (__pthread_create_2_1): Use
3565         THREAD_COPY_STACK_GUARD macro.
3566         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3567         tests.
3568         * tst-stackguard1.c: New file.
3569         * tst-stackguard1-static.c: New file.
3571 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3573         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3574         Invoke CGOTSETUP and CGOTRESTORE.
3575         (CGOTSETUP, CGOTRESTORE): Define.
3577 2005-05-29  Richard Henderson  <rth@redhat.com>
3579         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3580         (tf_write, tf_writev): Use it.
3581         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3582         the system minimum.
3584 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3586         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3587         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3588         __librt_*_asynccancel@local.
3590 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3592         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3593         all occurrences of JUMPTARGET.  Instead append @local to labels.
3595 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3597         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3598         size/alignment of struct pthread rather than tcbhead_t.
3599         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3600         Likewise.
3601         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3602         Likewise.
3603         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3604         Likewise.
3606 2005-05-19  Richard Henderson  <rth@redhat.com>
3608         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3609         __sync_val_compare_and_swap, not explicit _si variant.
3610         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3612 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3614         [BZ #915]
3615         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3617 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3619         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3620         .eh_frame section, use cfi_* directives.
3622 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3624         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3625         of "" includes.
3627 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3629         [BZ #1075]
3630         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3631         aio_write blocks.
3633 2005-04-27  Roland McGrath  <roland@redhat.com>
3635         * Makefile (tests): Remove tst-clock2.
3637         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3638         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3639         translating to the kernel clockid_t for our own process/thread clock.
3641         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3643 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3645         * old_pthread_cond_init.c: Include <errno.h>.
3646         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3647         process shared or uses clock other than CLOCK_REALTIME.
3648         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3650 2005-04-13  David S. Miller  <davem@davemloft.net>
3652         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3653         * sysdeps/sparc/sparc64/clone.S: New file.
3655 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3657         [BZ #1102]
3658         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3659         __inline instead of inline.
3660         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3662 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3664         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3665         functionally equivalent, but shorter instructions.
3666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3667         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3668         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3669         Likewise.
3670         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3671         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3672         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3673         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3675         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3676         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3677         Likewise.
3678         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3679         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3680         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3681         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3682         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3684 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3686         * sysdeps/mips/Makefile: New file.
3687         * sysdeps/mips/nptl-sysdep.S: New file.
3688         * sysdeps/mips/tcb-offsets.sym: New file.
3689         * sysdeps/mips/pthread_spin_lock.S: New file.
3690         * sysdeps/mips/pthread_spin_trylock.S: New file.
3691         * sysdeps/mips/pthreaddef.h: New file.
3692         * sysdeps/mips/tls.h: New file.
3693         * sysdeps/mips/jmpbuf-unwind.h: New file.
3694         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3695         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3696         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3697         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3698         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3699         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3700         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3701         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3702         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3703         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3705 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3707         [BZ #1112]
3708         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3709         variable to scerr.
3711 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3713         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3715 2005-02-25  Roland McGrath  <roland@redhat.com>
3717         * alloca_cutoff.c: Correct license text.
3718         * tst-unload.c: Likewise.
3719         * sysdeps/pthread/allocalim.h: Likewise.
3720         * sysdeps/pthread/pt-initfini.c: Likewise.
3721         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3722         * sysdeps/pthread/bits/sigthread.h: Likewise.
3723         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3724         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3726 2005-02-16  Roland McGrath  <roland@redhat.com>
3728         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3729         Use unsigned int * for ptr_nthreads.
3731 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3733         [BZ #721]
3734         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3735         gcc4.
3737 2005-02-07  Richard Henderson  <rth@redhat.com>
3739         [BZ #787]
3740         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3741         argument.
3743 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3745         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3746         order of arguments in invocation of atomic_add_zero.
3748 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3750         [BZ #737]
3751         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3752         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3753         at least gotntpoff relocation and addition.
3754         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3755         Likewise.
3756         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3757         Likewise.
3758         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3759         Likewise.
3761 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3763         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3764         entry for static tls deallocation fix.
3765         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3766         also contains information whether the memory pointed to is static
3767         TLS or not.
3768         * sysdeps/i386/tls.h: Likewise.
3769         * sysdeps/ia64/tls.h: Likewise.
3770         * sysdeps/powerpc/tls.h: Likewise.
3771         * sysdeps/s390/tls.h: Likewise.
3772         * sysdeps/sh/tls.h: Likewise.
3773         * sysdeps/sparc/tls.h: Likewise.
3774         * sysdeps/x86_64/tls.h: Likewise.
3776 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3778         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3780 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3782         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3783         %esp.
3784         * Makefile (tests): Add tst-align2.
3785         * tst-align2.c: New test.
3786         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3787         -mpreferred-stack-boundary=4.
3789 2004-12-18  Roland McGrath  <roland@redhat.com>
3791         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3792         New file removed withdrawn for the moment.
3794 2004-12-17  Richard Henderson  <rth@redhat.com>
3796         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3797         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3799 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3801         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3802         Increased PTHREAD_STACK_MIN.
3804         * tst-context1.c (stacks): Use bigger stack size.
3806 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3808         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3809         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3811 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3813         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3814         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3815         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3817 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3819         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3821 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3823         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3824         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3826         * tst-getpid1.c: If child crashes, report this first.  Print which
3827         signal.
3829 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3831         * init.c (__pthread_initialize_minimal_internal): Also unblock
3832         SIGSETXID.
3834 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3836         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3837         _POSIX_THREAD_CPUTIME): Define to 0.
3838         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3839         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3840         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3841         __timer_signal_thread_tclk): Remove.
3842         (init_module): Remove their initialization.
3843         (thread_cleanup): Remove their cleanup assertions.
3844         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3845         __timer_signal_thread_tclk): Remove.
3846         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3847         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3848         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3850 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3852         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3853         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3855         * Makefile (tests): Add tst-getpid2.
3856         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3857         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3858         * tst-getpid2.c: New test.
3860 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3862         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3864 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3866         * Makefile (tests): Add tst-getpid1.
3867         * tst-getpid1.c: New file.
3868         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3869         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3871 2004-12-02  Roland McGrath  <roland@redhat.com>
3873         * Makefile (libpthread-nonshared): Variable removed.
3874         ($(objpfx)libpthread_nonshared.a): Target removed.
3875         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3876         These are now handled by generic magic from
3877         libpthread-static-only-routines being set.
3879 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3881         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3882         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3883         _POSIX_THREAD_PRIO_PROTECT): Define.
3884         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3885         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3886         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3888 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3890         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3891         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3892         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3893         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3894         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3895         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3896         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3898 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3900         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3902         * Makefile (libpthread-routines): Add pthread_setschedprio.
3903         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3904         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3905         * pthread_setschedprio.c: New file.
3907 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3909         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3910         * pthread_cancel.c (pthread_create): Likewise.
3912         * Makefile (libpthread-routines): Add vars.
3913         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3914         * init.c (__default_stacksize, __is_smp): Remove.
3915         * vars.c: New file.
3916         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3917         and define a wrapper macro.
3918         (PTHREAD_STATIC_FN_REQUIRE): Define.
3919         * allocatestack.c (__find_thread_by_id): Undefine.
3920         * pthread_create (__pthread_keys): Remove.
3921         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3922         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3923         PTHREAD_STATIC_FN_REQUIRE.
3925 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3927         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3928         parameter to REGISTER macro.
3930 2004-11-17  Roland McGrath  <roland@redhat.com>
3932         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3933         Make sure SIGCANCEL is blocked as well.
3935 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3937         * sysdeps/pthread/setxid.h: New file.
3938         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3939         (struct xid_command): Add forward decl.
3940         (struct pthread_functions): Change return type of __nptl_setxid hook
3941         to int.
3942         * pthreadP.h (__nptl_setxid): Change return type to int.
3943         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3944         calling thread, return its return value and set errno on failure.
3945         * descr.h (struct xid_command): Change id type to long array.
3947         * Makefile: Add rules to build and test tst-setuid1 and
3948         tst-setuid1-static.
3949         * tst-setuid1.c: New test.
3950         * tst-setuid1-static.c: New test.
3952 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3954         * Makefile (tests): Add tst-exit3.
3955         * tst-exit3.c: New test.
3957 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3959         * Makefile (tests): Add tst-exit2.
3960         * tst-exit2.c: New file.
3962 2004-11-09  Roland McGrath  <roland@redhat.com>
3964         [BZ #530]
3965         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3966         here, before calling clone.
3967         * pthread_create.c (start_thread): Don't do it here.
3969 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3971         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3973 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3975         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3976         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3977         assembler warning.
3979 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3981         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3982         if sched_priority is not between minprio and maxprio.
3984 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3986         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3987         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3989         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3990         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3992 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3994         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3995         not-cancelable I/O functions.
3997 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3999         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
4000         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4001         make sure 2 is stored in the futex and we looked at the old value.
4002         Fix a few other problems to return the correct value.
4004 2004-10-14  Richard Henderson  <rth@redhat.com>
4006         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
4007         make gcc4 happy.
4009 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
4011         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
4012         of pthread-functions.h and pthreaddef.h.
4013         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
4015         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4016         Change __data.__nwaiters from int to unsigned int.
4018         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
4019         sysconf (_SC_THREAD_CPUTIME) returns negative value.
4021         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
4022         before return type.
4024         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
4025         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
4027 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
4029         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
4030         test fails, remove message queue.
4031         (tf_msgsnd): Likewise.
4033 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4035         * tst-clock1.c: Change #ifdef to #if defined.
4036         * tst-clock2.c: Likewise.
4037         * tst-cond11.c: Likewise.
4039         * sysdeps/pthread/timer_create.c (timer_create): Use
4040         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
4041         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
4042         THREAD_CPUTIME.
4044 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
4046         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
4047         _POSIX_THREAD_CPUTIME): Define to 0.
4049 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4051         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4052         and _POSIX_THREAD_CPUTIME to zero.
4053         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4054         * tst-barrier2.c: Fix testing for POSIX feature.
4055         * tst-clock1.c: Likewise.
4056         * tst-clock2.c: Likewise.
4057         * tst-cond11.c: Likewise.
4058         * tst-cond4.c: Likewise.
4059         * tst-cond6.c: Likewise.
4060         * tst-flock2.c: Likewise.
4061         * tst-mutex4.c: Likewise.
4062         * tst-mutex9.c: Likewise.
4063         * tst-rwlock12.c: Likewise.
4064         * tst-rwlock4.c: Likewise.
4065         * tst-signal1.c: Likewise.
4066         * tst-spin2.c: Likewise.
4067         * sysdeps/pthread/posix-timer.h: Likewise.
4068         * sysdeps/pthread/timer_create.c: Likewise.
4069         * sysdeps/pthread/timer_routines.c: Likewise.
4071 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4073         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4074         (__lll_mutex_timedlock_wait): Address futex correctly.
4076         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4077         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4078         make sure 2 is stored in the futex and we looked at the old value.
4079         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4080         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4081         which might very well made the code not working at all before.
4082         [BZ #417]
4084 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4087         allow SIGSETXID to be sent.
4088         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4089         for SIGSETXID to be defined.
4090         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4091         SIGSETXID cannot be blocked.
4093         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4094         Add __extension__ to long long types.
4095         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4096         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4097         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4098         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4099         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4100         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4101         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4103 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4105         * descr.h (struct pthread): Add stopped_start field.
4106         * sysdeps/pthread/createthread.c (create_thread): Set
4107         start_stopped flag in descriptor for new thread appropriately.
4108         * pthread_create.c (start_thread): Only take lock to be stopped on
4109         startup if stopped_start flag says so.
4111 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4113         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4114         is created detached and if yes, do not try to free the stack in case
4115         the thread creation failed.
4116         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4117         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4118         case there has been no error.  [BZ #405]
4120         * pthread_create.c (start_thread): Don't wait for scheduler data
4121         etc to be set at the beginning of the function.  The cancellation
4122         infrastructure must have been set up.  And enable async
4123         cancellation before potentially going to sleep.  [BZ #401]
4125 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4127         * Versions: Remove exports for pthread_set*id_np functions.
4128         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4129         for now.
4130         * Makefile: Don't build pthread_set*id code for now.
4132 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4134         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4135         internal use.
4136         * allocatestack.c (__nptl_setxid): New function.
4137         * descr.h (struct xid_command): Define type.
4138         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4139         (sighandler_setxid): New function.
4140         (__pthread_initialize_minimal): Register sighandler_setxid for
4141         SIGCANCEL.
4142         * pt-allocrtsig.c: Update comment.
4143         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4144         Declare __nptl_setxid.
4145         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4146         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4147         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4148         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4149         and pthread_setresuid_np.
4150         * pthread_setgid_np.c: New file.
4151         * pthread_setuid_np.c: New file.
4152         * pthread_setegid_np.c: New file.
4153         * pthread_seteuid_np.c: New file.
4154         * pthread_setregid_np.c: New file.
4155         * pthread_setreuid_np.c: New file.
4156         * pthread_setresgid_np.c: New file.
4157         * pthread_setresuid_np.c: New file.
4158         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4159         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4160         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4161         and pthread_setresuid_np.
4162         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4163         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4164         pthread_setregid, and pthread_setresgid.
4166 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4168         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4169         ENOMEM when out of memory.
4171 2004-09-10  Roland McGrath  <roland@redhat.com>
4173         [BZ #379]
4174         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4175         code, since we don't try to use the broken CLONE_STOPPED any more.
4176         * pthread_create.c (start_thread): Likewise.
4178 2004-09-15  Richard Henderson  <rth@redhat.com>
4180         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4182 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4184         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4185         (__libc_unwind_longjmp): Delete macro and declare as function.
4186         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4187         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4188         nptl directory.
4189         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4190         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4191         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4193 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4195         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4196         for __USE_XOPEN2K.
4197         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4198         types also for __USE_XOPEN2K.
4199         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4200         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4201         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4202         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4203         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4204         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4205         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4206         [BZ #320]
4208 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4210         * sysdeps/pthread/pthread.h
4211         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4212         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4213         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4214         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4215         [BZ #375]
4217 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4219         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4220         PSEUDO to be used with . prefix.
4222         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4223         Use atomic_increment instead of atomic_exchange_and_add.
4224         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4225         Likewise.
4226         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4227         Likewise.
4228         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4229         Likewise.
4231         * allocatestack.c (allocate_stack): Use atomic_increment_val
4232         instead of atomic_exchange_and_add.
4233         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4234         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4235         Likewise.
4236         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4237         Likewise.
4239         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4240         the initialization function might throw.
4242 2005-09-05  Richard Henderson  <rth@redhat.com>
4244         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4245         Move definition inside libpthread, libc, librt check.  Provide
4246         definition for rtld.
4248 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4250         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4251         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4252         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4253         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4254         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4255         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4256         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4257         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4258         * unwind.c: Use it.
4260         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4261         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4262         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4263         Likewise.
4264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4265         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4266         this is the last waiter, signal pthread_cond_destroy caller and
4267         avoid using the pthread_cond_t structure after unlock.
4268         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4269         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4270         Read clock type from the least significant bits of __nwaiters instead
4271         of __clock.
4272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4273         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4275 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4277         [BZ #342]
4278         * Makefile (tests): Add tst-cond20 and tst-cond21.
4279         * tst-cond20.c: New test.
4280         * tst-cond21.c: New test.
4281         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4282         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4283         it unsigned int.
4284         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4285         Likewise.
4286         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4287         (pthread_cond_t): Likewise.
4288         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4289         Likewise.
4290         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4291         Likewise.
4292         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4293         Likewise.
4294         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4295         (cond_nwaiters): New.
4296         (clock_bits): New.
4297         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4298         if there are waiters not signalled yet.
4299         Wait until all already signalled waiters wake up.
4300         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4301         __nwaiters.  If pthread_cond_destroy has been called and this is the
4302         last waiter, signal pthread_cond_destroy caller and avoid using
4303         the pthread_cond_t structure after unlock.
4304         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4305         decrement it when leaving.  If pthread_cond_destroy has been called
4306         and this is the last waiter, signal pthread_cond_destroy caller.
4307         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4308         Likewise.  Read clock type from the least significant bits of
4309         __nwaiters instead of __clock.
4310         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4311         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4312         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4313         clock type just from the last COND_CLOCK_BITS bits of value.
4314         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4315         instead of __clock, just from second bit of condattr's value.
4317 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4319         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4320         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4321         != 64.
4322         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4324 2004-08-15  Roland McGrath  <roland@frob.com>
4326         * pthread_atfork.c: Update copyright terms including special exception
4327         for these trivial files, which are statically linked into executables
4328         that use dynamic linking for the significant library code.
4330 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4332         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4333         pthread_rwlock_rdlock.
4334         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4335         Decrease __nr_readers_queued after reacquiring lock.
4336         * sysdeps/pthread/pthread_rwlock_timedrdlock
4337         (pthread_rwlock_timedrdlock): Likewise.
4338         Reported by Bob Cook <bobcook47@hotmail.com>.
4340 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4342         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4343         before pthread_barrier_wait.
4345 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4348         Remove unnecessary exception handling data.
4350 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4352         [BZ #284]
4353         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4354         instead of clockid_t.
4356 2004-07-21  Roland McGrath  <roland@redhat.com>
4358         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4360 2004-07-19  Roland McGrath  <roland@redhat.com>
4362         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4364 2004-07-02  Roland McGrath  <roland@redhat.com>
4366         * configure: Don't exit.
4368 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4370         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4371         (__pthread_cond_timedwait): Check for invalid nanosecond in
4372         timeout value.
4374 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4376         * Makefile: Add rules to build and run tst-fini1.
4377         * tst-fini1.c: New file.
4378         * tst-fini1mod.c: New file.
4380 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4382         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4383         if no cancellation support is needed.
4384         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4385         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4386         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4387         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4388         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4389         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4390         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4391         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4392         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4394         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4395         only if not already defined.
4397 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4399         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4400         constraint "m" instead of "0" for futex.
4402         * shlib-versions: Add powerpc64-.*-linux.*.
4404 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4406         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4407         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4408         for valid tv_nsec.
4409         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4410         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4411         bits.
4413 2004-06-29  Roland McGrath  <roland@redhat.com>
4415         * Banner: NPTL no longer has its own version number.
4416         * Makefile (nptl-version): Variable removed.
4417         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4418         using $(version), the glibc version number.
4420 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4422         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4423         Fix branch offset for a PLT entry.
4424         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4425         Likewise.
4426         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4427         Likewise.
4428         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4429         Likewise.
4430         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4431         Likewise.
4433 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4435         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4436         unconditionally.
4438 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4440         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4441         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4442         instead of tv_sec.
4443         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4444         (pthread_rwlock_timedrdlock): Likewise.
4446 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4448         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4449         Set __r7 to val, not mutex.
4451 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4453         * Makefile: Add rules to build tst-rwlock14.
4454         * tst-rwlock14.c: New file.
4456 2004-06-24  Boris Hu  <boris.hu@intel.com>
4458         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4459         check.
4460         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4462 2004-06-19  Andreas Jaeger  <aj@suse.de>
4464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4465         assembler in last patch.
4467 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4469         * sysdeps/pthread/pthread_cond_timedwait.c
4470         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4471         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4472         (__pthread_cond_timedwait): Check for invalid nanosecond in
4473         timeout value.
4474         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4475         * tst-cond19.c: New file.
4476         * Makefile: Add rules to build and run tst-cond19.
4478 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4480         * tst-context1.c (GUARD_PATTERN): Defined.
4481         (tst_context_t): Define struct containing ucontext_t & guard words.
4482         (ctx): Declare as an array of tst_context_t.
4483         (fct): Verify uc_link & guard words are still valid.
4484         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4486 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4488         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4489         Add __data.__futex field, reshuffle __data.__clock.
4490         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4491         (__pthread_cond_signal): Increment __futex at the same time as
4492         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4493         address of low 32-bits of __wakeup_seq to futex syscall.
4494         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4495         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4496         releasing internal lock to FUTEX_WAIT.
4497         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4498         (__pthread_cond_timedwait): Likewise.
4499         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4500         (FUTEX_CMP_REQUEUE): Define.
4501         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4502         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4503         Pass __futex value from before the unlock and __futex address instead
4504         of address of low 32-bits of __wakeup_seq to futex syscall.
4505         Fallback to FUTEX_WAKE all on any errors.
4507 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4509         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4510         comment typo.
4511         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4512         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4513         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4514         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4515         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4517 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4519         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4520         Add memory clobber to inline assembly.
4521         (__lll_mutex_trylock): Likewise.
4522         (__lll_mutex_cond_trylock): Likewise.
4524 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4526         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4527         Pass val argument as 6th system call argument in %r7.
4529 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4531         * Makefile (tests): Add tst-cond16.
4532         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4533         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4534         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4535         Add __data.__futex field, reshuffle __data.__clock.
4536         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4537         (__pthread_cond_signal): Increment __futex at the same time as
4538         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4539         address of low 32-bits of __wakeup_seq to futex syscall.
4540         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4541         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4542         releasing internal lock to FUTEX_WAIT.
4543         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4544         (__pthread_cond_timedwait): Likewise.
4545         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4546         (FUTEX_CMP_REQUEUE): Define.
4547         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4548         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4549         Pass __futex value from before the unlock and __futex address instead
4550         of address of low 32-bits of __wakeup_seq to futex syscall.
4551         Fallback to FUTEX_WAKE all on any errors.
4552         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4553         Define.
4554         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4555         internally.  Return non-zero if error, zero if success.
4556         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4557         Add __data.__futex field, reshuffle __data.__clock.
4558         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4559         Define.
4560         (lll_futex_requeue): Add val argument, return 1 unconditionally
4561         for the time being.
4562         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4563         Add __data.__futex field, reshuffle __data.__clock.
4564         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4565         Define.
4566         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4567         internally.  Return non-zero if error, zero if success.
4568         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4569         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4570         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4571         Define.
4572         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4573         internally.  Return non-zero if error, zero if success.
4574         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4575         Add __data.__futex field, reshuffle __data.__clock.
4576         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4577         Define.
4578         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4579         internally.  Return non-zero if error, zero if success.
4580         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4581         Add __data.__futex field, reshuffle __data.__clock.
4582         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4583         Add __data.__futex field, reshuffle __data.__clock.
4584         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4585         Increment __futex at the same time as __wakeup_seq or __total_seq.
4586         Pass address of __futex instead of address of low 32-bits of
4587         __wakeup_seq to futex syscall.
4588         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4589         Pass __futex value from before releasing internal lock
4590         to FUTEX_WAIT.
4591         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4592         Likewise.  Avoid unnecessary shadowing of variables.
4593         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4594         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4595         unlock and __futex address instead of address of low 32-bits of
4596         __wakeup_seq to futex_requeue macro, adjust for new return value
4597         meaning.
4598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4599         (__pthread_cond_signal): Increment __futex at the same time as
4600         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4601         address of low 32-bits of __wakeup_seq to futex syscall.
4602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4603         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4604         releasing internal lock to FUTEX_WAIT.
4605         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4606         (__pthread_cond_timedwait): Likewise.
4607         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4608         (FUTEX_CMP_REQUEUE): Define.
4609         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4610         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4611         Pass __futex value from before the unlock and __futex address instead
4612         of address of low 32-bits of __wakeup_seq to futex syscall.
4613         Fallback to FUTEX_WAKE all on any errors.
4615 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4617         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4618         Add nop to align the end of critical section.
4619         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4621 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4623         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4624         Add __broadcast_seq field.
4625         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4626         all waiters as woken with woken_seq and bump broadcast counter.
4627         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4628         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4629         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4630         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4632 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4635         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4636         Reported by Kaz Kojima.
4638 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4640         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4642 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4644         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4645         __broadcast_seq with bc_seq after acquiring internal lock instead of
4646         before it.
4648 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4650         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4651         compilation.
4652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4653         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4654         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4655         (pthread_cond_t): Add __data.__broadcast_seq field.
4656         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4657         (FRAME_SIZE): Define.
4658         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4659         Comment typo fixes.
4660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4661         Define.
4662         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4663         typo fixes.
4664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4665         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4666         fixes.
4668 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4670         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4671         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4672         Add __broadcast_seq field.
4673         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4674         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4675         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4676         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4677         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4679         all waiters as woken with woken_seq and bump broadcast counter.
4680         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4682         __broadcast_seq field.
4683         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4684         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4685         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4686         * pthread_cond_init.c: Initialize __broadcast_seq field.
4687         * Makefile (tests): Add tst-cond17 and tst-cond18.
4688         Add .NOTPARALLEL goal.
4689         * tst-cond16.c: New file.  From Jakub.
4690         * tst-cond17.c: New file.  From Jakub.
4691         * tst-cond18.c: New file.  From Jakub.
4693 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4695         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4696         unwind info.
4698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4699         Parametrize frame size.  Correct some unwind info.
4700         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4702 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4704         * tst-stack3.c: Note testing functionality beyond POSIX.
4706 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4708         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4709         Change conditional from ifdef to if.
4711 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4713         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4714         SYSDEP_CANCEL_ERROR): Define.
4715         (PSEUDO): Use it.
4717 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4719         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4721 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4723         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4725 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4727         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4728         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4729         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4730         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4732 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4734         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4735         thread has all signals blocked.
4737 2004-04-18  Andreas Jaeger  <aj@suse.de>
4739         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4740         (SEM_VALUE_MAX): Add missing brace.
4742 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4744         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4745         in rt subdir.
4746         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4747         * sysdeps/pthread/tst-mqueue8x.c: New test.
4748         * tst-cancel4.c: Update comment about message queues.
4750         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4751         return it_value { 0, 0 }.
4752         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4753         like SIGEV_SIGNAL.
4754         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4755         assertion for SIGEV_NONE.
4756         (thread_attr_compare): Compare all attributes, not just a partial
4757         subset.
4759 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4761         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4763 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4765         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4766         Just use a plain number.
4767         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4768         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4769         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4770         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4771         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4772         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4773         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4775 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4777         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4778         frame info.
4779         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4781 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4783         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4784         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4785         of calling sigwaitinfo.
4787 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4789         * allocatestack.c (allocate_stack): Set reported_guardsize
4790         unconditionally.
4791         * pthread_getattr_np.c (pthread_getattr_np): Use
4792         reported_guardsize instead of guardsize.
4793         * descr.h (struct pthread): Add reported_guardsize field.
4795 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4797         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4799 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4801         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4803 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4805         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4806         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4807         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4808         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4809         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4810         Define.
4811         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4812         (_POSIX_MESSAGE_PASSING): Define.
4813         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4814         (_POSIX_MESSAGE_PASSING): Define.
4815         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4816         (_POSIX_MESSAGE_PASSING): Define.
4818 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4820         * tst-context1.c (fct): Check whether correct stack is used.
4822 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4824         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4825         matching constraints for asm mem parameters.
4827         * tst-clock2.c (tf): Don't define unless needed.
4829 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4831         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4832         $(gnulib).
4834 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4836         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4837         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4838         * pthreadP.h: Declare __nptl_deallocate_tsd.
4839         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4840         Adjust caller.
4842         * Makefile (tests): Add tst-tsd5.
4843         * tst-tsd5.c: New file.
4845 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4847         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4848         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4849         is SHLIB_COMPAT check.
4850         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4851         (__pthread_attr_getaffinity_old): Likewise.
4852         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4853         (__pthread_getaffinity_old): Likewise.
4854         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4855         (__pthread_setaffinity_old): Likewise.
4857 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4859         * allocatestack.c (_make_stacks_executable): Call
4860         _dl_make_stack_executable first.
4862 2004-03-24  Roland McGrath  <roland@redhat.com>
4864         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4865         constraint instead of "0".
4867 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4869         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4870         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4872         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4873         code to avoid warning.
4875 2004-03-24  Andreas Jaeger  <aj@suse.de>
4877         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4878         (__pthread_attr_setaffinity_old): Remove const.
4880 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4882         * sysdeps/unix/sysv/linux/smp.h: New file.
4883         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4884         * init.c: Define __is_smp.
4885         (__pthread_initialize_minimal_internal): Call is_smp_system to
4886         initialize __is_smp.
4887         * pthreadP.h: Declare __is_smp.
4888         Define MAX_ADAPTIVE_COUNT is necessary.
4889         * pthread_mutex_init.c: Add comment regarding __spins field.
4890         * pthread_mutex_lock.c: Implement adaptive mutex type.
4891         * pthread_mutex_timedlock.c: Likewise.
4892         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4893         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4894         Add __spins field.
4895         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4896         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4897         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4898         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4899         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4900         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4901         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4902         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4903         lll_mutex_cond_trylock.
4904         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4905         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4906         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4907         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4908         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4909         Define BUSY_WAIT_NOP.
4910         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4911         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4913         * tst-mutex5.c: Add support for testing adaptive mutexes.
4914         * tst-mutex7.c: Likewise.
4915         * tst-mutex5a.c: New file.
4916         * tst-mutex7a.c: New file.
4917         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4919         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4920         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4921         vgettimeofday call might destroy the content.
4923         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4924         @pause in the loop.
4926         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4927         No need to restrict type of ret.  Make it int.  Add comment.
4929         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4930         Remove unnecessary setne instruction.
4932 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4934         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4935         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4936         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4937         If realloc fails, break out of the loop.
4939 2004-03-20  Andreas Jaeger  <aj@suse.de>
4941         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4942         (__pthread_setaffinity_old): Fix interface.
4943         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4944         (__pthread_getaffinity_old): Likewise.
4946         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4947         (__pthread_setaffinity_new): Remove duplicate declaration.
4949 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4951         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4952         the return value to a safe register.
4953         (CDISABLE): Set the function argument correctly.
4955 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4957         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4958         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4959         Rewrite so that only one locked memory operation per round is needed.
4960         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4961         (pthread_barrier_wait): After wakeup, release lock only when the
4962         last thread stopped using the barrier object.
4963         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4964         (__pthread_cond_wait): Don't store mutex address if the current
4965         value is ~0l.  Add correct cleanup support and unwind info.
4966         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4967         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4968         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4969         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4970         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4971         Add correct cleanup support and unwind info.
4972         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4973         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4974         information for syscall wrappers.
4976 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4978         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4979         cpusetsize field, remove next.
4980         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4981         parameter for size of the CPU set.
4982         (pthread_setaffinity_np): Likewise.
4983         (pthread_attr_getaffinity_np): Likewise.
4984         (pthread_attr_setaffinity_np): Likewise.
4985         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4986         interface change, keep compatibility code.
4987         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4988         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4989         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4990         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4991         __pthread_getaffinity_np.
4992         * Versions: Add version for changed interfaces.
4993         * tst-attr3.c: Adjust test for interface change.
4994         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4995         increasing buffer sizes.
4996         * pthread_attr_destroy.c: Remove unused list handling.
4997         * pthread_attr_init.c: Likewise.
4999 2004-03-17  Roland McGrath  <roland@redhat.com>
5001         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
5002         first argument to clock_getres so we ever enable kernel timers.
5004 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
5006         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
5008 2004-03-12  Richard Henderson  <rth@redhat.com>
5010         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
5011         oldvalue from CENABLE to CDISABLE.
5013 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
5015         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
5016         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
5017         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
5018         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
5020 2004-03-11  Richard Henderson  <rth@redhat.com>
5022         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
5023         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
5024         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
5026 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5028         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
5029         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
5030         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
5032 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
5034         * forward.c (__pthread_cond_broadcast_2_0,
5035         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
5036         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
5037         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
5039 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5041         * sysdeps/sh/tcb-offsets.sym: Add PID.
5042         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
5043         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
5045 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
5047         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5048         include <sysdep-cancel.h>, vfork is no cancellation point.
5049         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5050         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5051         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5053 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5055         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5056         libc_hidden_def.
5057         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5058         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5059         Likewise.
5060         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5061         Likewise.
5062         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5063         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5064         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5065         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5066         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5068         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5069         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5070         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5071         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5072         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5073         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5075         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5076         a local register for saving old PID.  Negate PID in parent upon exit.
5078         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5079         tcb-offsets.h.
5080         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5081         before syscall, set to the old value in the parent afterwards.
5082         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5083         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5084         tcb-offsets.h.
5085         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5086         before syscall, set to the old value in the parent afterwards.
5087         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5088         * sysdeps/s390/tcb-offsets.sym: Add PID.
5090         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5091         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5092         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5093         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5094         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5095         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5097 2004-03-10  Andreas Schwab  <schwab@suse.de>
5099         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5100         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5101         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5103 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5105         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5106         * tst-cancel21.c (do_one_test): Likewise.
5107         Reported by Gordon Jin <gordon.jin@intel.com>.
5109 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5111         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5112         if non-zero and set to INT_MIN if zero.
5113         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5114         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5115         (SAVE_PID, RESTORE_PID): Define.
5116         (__vfork): Use it.
5117         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5118         Use relative path to avoid including NPTL i386/vfork.S.
5119         (SAVE_PID, RESTORE_PID): Define.
5120         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5121         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5122         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5123         tst-vfork2x.
5124         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5125         * tst-vfork1.c: New test.
5126         * tst-vfork2.c: New test.
5127         * tst-vfork1x.c: New test.
5128         * tst-vfork2x.c: New test.
5130 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5132         * sysdeps/i386/tcb-offsets.sym: Add PID.
5133         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5134         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5135         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5137 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5139         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5141 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5143         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5144         _rtld_global_ro.
5146 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5148         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5149         _rtld_global_ro.
5151         * tst-once4.c: Remove unnecessary macro definition.
5153         * tst-mutex7.c (do_test): Limit thread stack size.
5154         * tst-once2.c (do_test): Likewise.
5155         * tst-tls3.c (do_test): Likewise.
5156         * tst-tls1.c (do_test): Likewise.
5157         * tst-signal3.c (do_test): Likewise.
5158         * tst-kill6.c (do_test): Likewise.
5159         * tst-key4.c (do_test): Likewise.
5160         * tst-join4.c (do_test): Likewise.
5161         * tst-fork1.c (do_test): Likewise.
5162         * tst-context1.c (do_test): Likewise.
5163         * tst-cond2.c (do_test): Likewise.
5164         * tst-cond10.c (do_test): Likewise.
5165         * tst-clock2.c (do_test): Likewise.
5166         * tst-cancel10.c (do_test): Likewise.
5167         * tst-basic2.c (do_test): Likewise.
5168         * tst-barrier4.c (do_test): Likewise.
5170 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5172         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5174 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5176         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5177         (__pthread_cond_timedwait): Optimize wakeup test.
5178         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5179         (__pthread_cond_wait): Likewise.
5180         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5181         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5182         Likewise.
5184 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5186         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5187         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5188         the atomic instruction needed.
5189         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5190         (__lll_mutex_lock_wait): Likewise.
5192 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5194         * Makefile (tests): Add tst-cond14 and tst-cond15.
5195         * tst-cond14.c: New file.
5196         * tst-cond15.c: New file.
5198 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5200         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5201         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5202         needs to be implemented differently to be useful.
5204 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5206         * pthread_attr_setschedparam.c: Don't test priority against limits
5207         here.  Set ATTR_FLAG_SCHED_SET flag.
5208         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5209         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5210         from parent thread to child.  If attribute is used and scheduling
5211         parameters are not inherited, copy parameters from attribute or
5212         compute them.  Check priority value.
5213         * pthread_getschedparam.c: If the parameters aren't known yet get
5214         them from the kernel.
5215         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5216         ATTR_FLAG_POLICY_SET flag for thread.
5217         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5218         and ATTR_FLAG_POLICY_SET.
5220         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5222         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5223         fail if stack address hasn't been set.  Just return 0.
5225 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5227         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5228         libpthread for the files in this list.
5229         (CFLAGS-tst-unload): Removed.
5230         * tst-unload.c (do_test): Don't use complete path for
5231         LIBPHREAD_SO.
5233         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5234         tst-_res1mod2.
5236 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5238         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5239         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5240         operation per round is needed.
5241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5242         (__lll_mutex_lock_wait): Likewise.
5244 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5246         * tst-cancel9.c (cleanup): Don't print to stderr.
5248 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5250         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5252 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5254         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5255         (__syscall_error_handler2): Call CDISABLE.
5256         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5257         (__syscall_error_handler2): Call CDISABLE.
5259         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5260         Release lock before the loop, don't reacquire it.
5262         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5264 2004-02-19  Andreas Schwab  <schwab@suse.de>
5266         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5267         Fix last change.
5269 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5271         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5272         (pthread_barrier_wait): After wakeup, release lock only when the
5273         last thread stopped using the barrier object.
5274         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5275         (pthread_barrier_wait): Likewise.
5276         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5277         Likewise.
5278         * Makefile (tests): Add tst-barrier4.
5279         * tst-barrier4.c: New file.
5281         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5282         (__pthread_cond_timedwait): Perform timeout test while holding
5283         internal lock to prevent wakeup race.
5284         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5285         * sysdeps/pthread/pthread_cond_timedwait.c
5286         (__pthread_cond_timedwait): Likewise.
5287         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5288         (__pthread_cond_timedwait): Likewise.
5290 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5292         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5293         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5294         * Makefile (tests): Add tst-rwlock13.
5295         * tst-rwlock13.c: New test.
5297 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5300         (__condvar_tw_cleanup): Little optimization.
5301         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5303 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5305         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5306         libpthread as "lib" parameter to SHLIB_COMPAT.
5307         (__novmx_siglongjmp): Fix typo in function name.
5308         (__novmx_longjmp): Fix typo in function name.
5310 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5312         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5313         __builtin_expect.
5315         * sysdeps/generic/pt-longjmp.c: Moved to...
5316         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5318 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5320         * Makefile (libpthread-routines): Add pt-cleanup.
5321         * pt-longjmp.c: Removed.
5322         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5323         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5324         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5325         Version longjmp, siglongjmp for GLIBC_2.3.4.
5326         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5328 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5330         * sysdeps/pthread/pthread_cond_timedwait.c
5331         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5332         Reuse code.  Add __builtin_expects.
5334         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5335         (__pthread_cond_timedwait): Get internal lock in case timeout has
5336         passed before the futex syscall.
5337         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5339 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5341         * allocatestack.c: Pretty printing.
5343         * sysdeps/pthread/createthread.c (create_thread): Don't add
5344         CLONE_DETACHED bit if it is not necessary.
5346 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5348         * pthread_getattr_np.c: Include ldsodefs.h.
5350 2004-01-16  Richard Henderson  <rth@redhat.com>
5352         * allocatestack.c: Don't declare __libc_stack_end.
5353         * init.c (__pthread_initialize_minimal_internal): Likewise.
5354         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5356 2004-01-15  Richard Henderson  <rth@redhat.com>
5358         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5359         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5360         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5361         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5362         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5363         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5364         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5365         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5367 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5369         * init.c (pthread_functions): Make array const.
5371 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5373         * allocatestack.c (__make_stacks_executable): Change interface.
5374         Check parameters.  Pass parameter on to libc counterpart.
5375         * pthreadP.h: Change declaration.
5377 2004-01-13  Richard Henderson  <rth@redhat.com>
5379         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5380         prototype form.
5381         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5382         Likewise.
5384         * sysdeps/alpha/Makefile: New file.
5385         * sysdeps/alpha/tcb-offsets.sym: New file.
5386         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5387         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5389         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5390         on powerpc version.
5392 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5394         * Makefile (tests): Add tst-backtrace1.
5395         * tst-backtrace1.c: New test.
5397 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5399         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5400         register as second parameter to the REGISTER macro.
5401         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5402         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5403         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5404         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5405         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5406         of thread register as second parameter to REGISTER macro in 64 case.
5408 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5410         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5411         (CFLAGS-getpid.o): Defined.
5412         (CFLAGS-getpid.os): Defined.
5414 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5416         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5417         returned for main thread does not overlap with any other VMA.
5418         Patch by Jakub Jelinek.
5420 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5422         * tst-raise1.c: Include stdio.h.
5424 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5426         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5427         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5428         If pid is 0, set it to selftid.
5429         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5430         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5431         != 0, return self->tid without doing a syscall.
5432         * descr.h (struct pthread): Move pid field after tid.
5434         * Makefile (tests): Add tst-raise1.
5435         * tst-raise1.c: New file.
5437 2003-12-23  Roland McGrath  <roland@redhat.com>
5439         * tst-oddstacklimit.c: New file.
5440         * Makefile (tests): Add it.
5441         (tst-oddstacklimit-ENV): New variable.
5443         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5444         value up to page size for __default_stacksize.
5446 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5448         * Makefile (tests): Add tst-eintr5.
5449         * tst-eintr5.c: New file.
5451         * eintr.c (eintr_source): Prevent sending signal to self.
5453         * tst-eintr2.c (tf1): Improve error message.
5455 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5457         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5458         * sysdeps/unix/sysv/linux/getpid.c: New file.
5459         * pthread_cancel.c: Add comment explaining use of PID field.
5460         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5461         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5462         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5463         temporarily to signal the field must not be relied on and updated
5464         by getpid().
5465         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5466         temporarily negative.
5467         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5469 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5471         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5472         (eintr_source): If ARG != NULL, use pthread_kill.
5473         * tst-eintr1.c: Adjust for this change.
5474         * tst-eintr2.c: Likewise.
5475         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5476         * tst-eintr3.c: New file.
5477         * tst-eintr4.c: New file.
5479 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5481         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5482         if CANCELSTATE_BITMASK is set.
5483         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5484         Likewise.
5486         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5487         (tests-reverse): Add tst-cancel23.
5488         * tst-cancel22.c: New test.
5489         * tst-cancel23.c: New test.
5491 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5493         * tst-eintr1.c: Better error messages.
5495         * Makefile (tests): Add tst-eintr2.
5496         * tst-eintr2.c: New file.
5498 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5500         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5501         (CFLAGS-tst-cancelx21.c): Set.
5502         * tst-cancel21.c: New test.
5503         * tst-cancelx21.c: New test.
5505         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5506         comparison operand.
5507         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5508         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5509         * pt-longjmp.c: Include jmpbuf-unwind.h.
5510         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5511         _JMPBUF_UNWINDS.  Adjust compared pointers.
5512         * init.c (__pthread_initialize_minimal_internal): Initialize
5513         pd->stackblock_size.
5514         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5515         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5516         * sysdeps/i386/jmpbuf-unwind.h: New file.
5517         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5518         * sysdeps/s390/jmpbuf-unwind.h: New file.
5519         * sysdeps/sh/jmpbuf-unwind.h: New file.
5520         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5521         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5522         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5523         (_JMPBUF_CFA_UNWINDS): Remove.
5524         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5526 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5528         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5529         (CFLAGS-tst-cancelx20.c): Set.
5530         * tst-cancel20.c: New test.
5531         * tst-cancelx20.c: New test.
5533 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5535         * init.c (__pthread_initialize_minimal_internal): Don't treat
5536         architectures with separate register stack special here when
5537         computing default stack size.
5539 2003-12-17  Roland McGrath  <roland@redhat.com>
5541         * Makefile (tst-cancelx7-ARGS): New variable.
5542         Reportd by Greg Schafer <gschafer@zip.com.au>.
5544 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5546         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5547         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5548         (tst-stack3-ENV): Set.
5549         ($(objpfx)tst-stack3-mem): New.
5550         * tst-stack3.c: New test.
5552 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5554         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5555         Add unwind directives.  Drop unused .regstk directive.
5556         (_fini_EPILOG_BEGINS): Add unwind directives.
5558 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5560         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5561         Assume parameter is a pointer.
5562         (lll_futex_wake): Likewise.
5563         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5564         Likewise.
5565         (lll_futex_wake): Likewise.
5566         Reported by Boris Hu.
5567         * sysdeps/unix/sysv/linux/unregister-atfork.c
5568         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5570         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5572 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5574         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5575         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5576         __rtld_lock_initialize for ld.so lock.
5577         Patch in part by Adam Li <adam.li@intel.com>.
5579 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5581         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5582         in $(gnulib).  Also, remove stale comment.
5584 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5586         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5587         advantage of new syscall stub and optimize accordingly.
5589         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5590         from SYS_futex, to match expectations of
5591         sysdep.h:DO_INLINE_SYSCALL.
5592         (lll_futex_clobbers): Remove.
5593         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5594         (lll_futex_wake): Likewise.
5595         (lll_futex_requeue): Likewise.
5596         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5597         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5598         Jelinek).
5599         (__lll_mutex_lock): Likewise.
5600         (__lll_mutex_cond_lock): Likewise.
5601         (__lll_mutex_timed_lock): Likewise.
5602         (__lll_mutex_unlock): Likewise.
5603         (__lll_mutex_unlock_force): Likewise.
5605         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5606         comes before the include of <sysdep.h>.
5607         (THREAD_SELF_SYSINFO): New macro.
5608         (THREAD_SYSINFO): Likewise.
5609         (INIT_SYSINFO): New macro.
5610         (TLS_INIT_TP): Call INIT_SYSINFO.
5612         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5614         * sysdeps/pthread/createthread.c (create_thread): Use
5615         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5616         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5617         THREAD_SELF_SYSINFO instead of open code.
5618         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5619         (THREAD_SYSINFO): Likewise.
5621         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5623         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5625 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5627         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5628         instead of .init.  Patch by David Mosberger.
5630 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5632         * sysdeps/pthread/configure.in: Remove broken declaration in C
5633         cleanup handling check.
5635 2003-11-30  Andreas Jaeger  <aj@suse.de>
5637         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5638         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5639         Likewise.
5641 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5643         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5644         * pthread_attr_destroy.c: Include shlib-compat.h.
5645         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5646         is set in iattr->flags.
5647         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5649 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5651         * Makefile (distribute): Add tst-cleanup4aux.c.
5653         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5654         include.
5656 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5658         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5659         pthread_cond_signal.
5661         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5662         store mutex address if the current value is ~0l.
5663         * sysdeps/pthread/pthread_cond_timedwait.c
5664         (__pthread_cond_timedwait): Likewise.
5665         * sysdeps/pthread/pthread_cond_broadcast.c
5666         (__pthread_cond_broadcast): Don't use requeue for pshared
5667         condvars.
5669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5670         (__pthread_cond_wait): Don't store mutex address if the current
5671         value is ~0l.
5672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5673         (__pthread_cond_timedwait): Likewise.
5674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5675         (__pthread_cond_broadcast): Don't use requeue for pshared
5676         condvars.
5678         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5679         element with ~0l for pshared condvars, with NULL otherwise.
5681         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5682         (__pthread_cond_wait): Don't store mutex address if the current
5683         value is ~0l.
5684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5685         (__pthread_cond_timedwait): Likewise.
5686         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5687         (__pthread_cond_broadcast): Don't use requeue for pshared
5688         condvars.
5690         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5691         * tst-cond12.c: New file.
5692         * tst-cond13.c: New file.
5694 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5696         * sysdeps/pthread/configure.in: Make missing forced unwind support
5697         fatal.
5699 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5701         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5703 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5705         * Makefile: Add magic to clean up correctly.
5707 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5709         * unwind.c (FRAME_LEFT): Define.
5710         (unwind_stop): Handle old style cleanups here.
5711         (__pthread_unwind): Handle old style cleanups only if
5712         !HAVE_FORCED_UNWIND.
5713         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5714         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5715         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5716         ($(objpfx)tst-cleanupx4): Likewise.
5717         * tst-cleanup4.c: New test.
5718         * tst-cleanup4aux.c: New.
5719         * tst-cleanupx4.c: New test.
5721 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5723         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5724         lll_mutex_*lock macros to skip atomic operations on some archs.
5726 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5728         * sysdeps/pthread/tst-timer.c (main): Initialize
5729         sigev2.sigev_value as well.
5731 2003-10-15  Roland McGrath  <roland@redhat.com>
5733         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5734         is missing.
5735         * sysdeps/pthread/configure: Regenerated.
5737 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5739         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5740         locking macros.  No distinction between normal and mutex locking
5741         anymore.
5742         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5743         Merge bits from lowlevelmutex.S we still need.
5744         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5745         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5746         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5747         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5748         new mutex implementation.
5749         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5750         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5751         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5752         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5753         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5754         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5755         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5756         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5757         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5758         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5759         symbol for entry point to avoid cancellation.
5761 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5763         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5764         changes.
5765         (SAVE_OLDTYPE_0): Fix a typo.
5767 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5769         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5770         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5772 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5774         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5775         correct offset.
5777 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5779         * Makefile (tests): Add tst-cancel19.
5780         * tst-cancel19.c: New test.
5782 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5784         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5785         restoring of the old cancellation type.
5787 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5789         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5791 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5793         * sysdeps/pthread/malloc-machine.h: New file
5795 2003-09-24  Roland McGrath  <roland@redhat.com>
5797         * allocatestack.c (__make_stacks_executable): Don't ignore return
5798         value from _dl_make_stack_executable.
5800 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5802         * allocatestack.c (__make_stacks_executable): Also change
5803         permission of the currently unused stacks.
5805         * allocatestack.c (change_stack_perm): Split out from
5806         __make_stacks_executable.
5807         (allocate_stack): If the required permission changed between the time
5808         we started preparing the stack and queueing it, change the permission.
5809         (__make_stacks_executable): Call change_stack_perm.
5811         * Makefile: Build tst-execstack-mod locally.
5812         * tst-execstack-mod.c: New file.
5814 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5816         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5818 2003-09-23  Roland McGrath  <roland@redhat.com>
5820         * tst-execstack.c: New file.
5821         * Makefile (tests): Add it.
5822         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5823         (LDFLAGS-tst-execstack): New variable.
5825         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5826         whether to use PROT_EXEC for stack mmap.
5827         (__make_stacks_executable): New function.
5828         * pthreadP.h: Declare it.
5829         * init.c (__pthread_initialize_minimal_internal): Set
5830         GL(dl_make_stack_executable_hook) to that.
5832 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5834         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5835         recommendation from AMD re avoidance of lock prefix.
5837 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5839         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5840         lll_futex_timed_wait instead of lll_futex_wait.
5841         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5842         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5843         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5844         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5845         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5846         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5847         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5848         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5849         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5850         Completely revamp the locking macros.  No distinction between
5851         normal and mutex locking anymore.
5852         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5853         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5854         __lll_lock_timedwait): Fix prototypes.
5855         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5856         __lll_lock_timedwait): Likewise.
5857         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5858         macros, add __builtin_expect.
5859         (lll_mutex_timedlock): Likewise.  Fix return value.
5860         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5861         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5862         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5863         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5864         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5865         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5866         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5867         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5869 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5871         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5872         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5873         operation if possible.
5875         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5876         like jumping over the lock prefix.
5878 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5880         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5881         locking macros.  No distinction between normal and mutex locking
5882         anymore.
5883         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5884         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5885         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5886         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5887         locking.  Merge bits from lowlevelmutex.S we still need.
5888         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5889         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5890         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5891         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5892         * Makefile (routines): Remove libc-lowlevelmutex.
5893         (libpthread-rountines): Remove lowlevelmutex.
5894         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5895         for new mutex implementation.
5896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5897         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5898         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5899         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5900         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5901         Likewise.
5902         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5903         Likewise.
5904         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5905         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5906         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5907         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5909         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5910         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5911         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5912         Likewise.
5913         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5914         Likewise.
5915         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5916         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5918         Don't use requeue.
5919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5920         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5922 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5924         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5925         in parameters of asm with output parameters.
5927         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5928         type of DECR parameter to int.
5929         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5931 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5933         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5934         guardsize for each thread.
5936 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5938         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5939         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5940         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5942         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5943         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5944         NULL.
5945         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5946         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5947         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5948         (pthread_getaffinity_np): Add hidden_def.
5950         * Makefile (tests): Add tst-attr3.
5951         * tst-attr3.c: New test.
5953         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5955 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5957         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5958         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5960 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5962         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5963         * tst-align.c: Include tst-stack-align.h.
5964         (tf, do_test): Use TEST_STACK_ALIGN macro.
5966 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5968         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5969         variable.
5971 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5973         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5974         stack-related values for the initial thread.
5976 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5978         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5980 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5982         * pthread_mutex_lock.c: Minor code rearrangements.
5984 2003-09-05  Roland McGrath  <roland@redhat.com>
5986         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5987         Instead, include ../nptl_db/db_info.c to do its magic.
5988         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5989         (__pthread_pthread_key_2ndlevel_size): Likewise.
5990         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5991         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5992         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5993         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5994         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5995         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5996         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5997         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5998         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5999         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
6000         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
6001         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
6002         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
6003         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
6004         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
6005         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
6006         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
6008 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
6010         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
6011         of pthread_t to be compatible with LT.
6012         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
6013         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6014         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6015         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6016         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
6017         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6018         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
6020 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
6022         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
6024 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
6026         * unwind-forcedunwind.c: Move to...
6027         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
6028         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
6029         * sysdeps/pthread/jmpbuf-unwind.h: New file.
6030         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
6031         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
6032         * unwind.c: Include jmpbuf-unwind.h.
6033         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
6035 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
6037         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
6038         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
6039         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
6040         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
6041         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6042         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
6043         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
6044         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
6045         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
6046         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
6047         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6048         function.
6049         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6050         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6051         * Makefile (tests): Add tst-stack2.
6052         * tst-stack2.c: New test.
6053         * tst-stack1.c: Include limits.h and sys/param.h.
6054         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6056         * pthread_condattr_setpshared.c: Include errno.h.
6057         (pthread_condattr_setpshared): Return EINVAL if pshared
6058         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6060         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6061         defined symbol for entry point to avoid cancellation.
6062         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6063         Likewise.
6064         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6065         Likewise.
6066         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6067         Likewise.
6068         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6069         Likewise.
6070         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6071         Likewise.
6072         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6073         __close_nocancel, __read_nocancel, __write_nocancel,
6074         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6075         libpthread.so or librt.so, define to corresponding function
6076         without _nocancel suffix.
6077         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6078         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6079         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6081         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6083 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6085         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6086         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6088         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6089         in subsections has a symbol associated with it.
6091         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6092         defined symbol for entry point to avoid cancellation.
6093         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6095 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6097         * Makefile (tests): Add tst-tls5.
6098         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6099         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6100         ($(objpfx)tst-tls5): New.
6101         ($(objpfx)tst-tls6.out): Likewise.
6102         (tests): Depend on $(objpfx)tst-tls6.out.
6103         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6104         (do_test): Check pthread_self () return value alignment.
6105         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6106         (tf): Check pthread_self () return value alignment.
6107         * tst-tls5.c: New test.
6108         * tst-tls5.h: New.
6109         * tst-tls5mod.c: New.
6110         * tst-tls5moda.c: New.
6111         * tst-tls5modb.c: New.
6112         * tst-tls5modc.c: New.
6113         * tst-tls5modd.c: New.
6114         * tst-tls5mode.c: New.
6115         * tst-tls5modf.c: New.
6116         * tst-tls6.sh: New test.
6118         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6119         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6120         * init.c (pthread_functions): Initialize them.
6121         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6122         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6123         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6124         pthread_cond_timedwait@@GLIBC_2.3.2.
6126 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6128         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6129         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6130         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6131         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6132         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6133         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6135         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6137         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6138         _POSIX_THREAD_PRIORITY_SCHEDULING.
6139         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6141 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6143         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6144         nested function, use static inline function from libio.h.
6145         Code by Richard Henderson.
6147         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6148         weak.
6150 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6152         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6153         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6154         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6155         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6156         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6157         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6158         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6159         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6160         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6161         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6162         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6163         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6164         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6165         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6166         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6167         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6168         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6169         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6170         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6171         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6172         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6173         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6174         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6175         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6176         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6177         * sysdeps/sparc/tls.h: New file.
6178         * sysdeps/sparc/tcb-offsets.sym: New file.
6179         * sysdeps/sparc/Makefile: New file.
6180         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6181         * init.c [__sparc__] (__NR_set_tid_address): Define.
6183 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6185         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6186         _IO_release_lock): Define.
6188 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6190         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6191         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6193 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6195         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6196         (__pthread_cleanup_class): Add missing return types of member
6197         functions.
6199 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6201         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6202         (lll_mutex_unlock_force): Add memory barrier between store and futex
6203         syscall.
6205 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6207         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6208         tempmsg in first loop.
6210 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6212         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6213         _POSIX_THREAD_PRIORITY_SCHEDULING.
6214         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6216 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6218         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6219         (__rtld_lock_default_lock_recursive,
6220         __rtld_lock_default_unlock_recursive): Define.
6221         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6222         __rtld_lock_unlock_recursive): Define using
6223         GL(_dl_rtld_*lock_recursive).
6224         * init.c (__pthread_initialize_minimal_internal): Initialize
6225         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6226         Lock GL(_dl_load_lock) the same number of times as
6227         GL(_dl_load_lock) using non-mt implementation was nested.
6229         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6230         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6232 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6234         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6235         PIPE_BUF.
6237 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6239         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6241 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6243         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6244         to first syscall error check.  Move syscall error check for tkill
6245         into __ASSUME_CLONE_STOPPED #ifdef.
6247 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6249         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6250         is not defined, do explicit synchronization.
6251         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6252         is not defined also unlock pd->lock for non-debugging case in case
6253         it is necessary.
6254         * pthread_create.c (start_thread): Always get and release pd->lock
6255         if __ASSUME_CLONE_STOPPED is not defined.
6256         (start_thread_debug): Removed.  Adjust users.
6257         * allocatestack.c (allocate_stack): Always initialize lock if
6258         __ASSUME_CLONE_STOPPED is not defined.
6259         * Makefile (tests): Add tst-sched1.
6260         * tst-sched1.c: New file.
6262         * sysdeps/pthread/createthread.c (do_clone): Only use
6263         sched_setschduler and pass correct parameters.
6265 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6267         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6268         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6269         PTHREAD_STACK_MIN in comments.
6271 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6273         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6274         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6275         argument.
6276         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6277         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6278         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6279         (__pthread_cleanup_upto): Fix prototype.
6280         (_longjmp_unwind): Adjust caller.
6281         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6282         Change second argument to const struct pointer.
6283         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6284         * tst-sem9.c (main): Likewise.
6285         * unwind.c: Include string.h for strlen prototype.
6287 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6290         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6291         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6292         Define HAVE_CMOV.
6293         Patch by Nicholas Miell <nmiell@attbi.com>.
6295 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6297         * init.c (__pthread_initialize_minimal_internal): Initialize
6298         GL(dl_init_static_tls).
6299         * pthreadP.h (__pthread_init_static_tls): New prototype.
6300         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6301         New functions.
6302         * Makefile (tests): Add tst-tls4.
6303         (modules-names): Add tst-tls4moda and tst-tls4modb.
6304         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6305         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6306         tst-tls4modb.so.
6307         * tst-tls4.c: New file.
6308         * tst-tls4moda.c: New file.
6309         * tst-tls4modb.c: New file.
6311 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6313         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6314         before __timer_dealloc.
6315         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6316         Don't call list_unlink.
6318 2003-07-29  Roland McGrath  <roland@redhat.com>
6320         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6322 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6324         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6325         Don't reuse struct aiocb A if it failed.
6326         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6327         not just one byte, as that does not block.
6329 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6331         * sysdeps/pthread/unwind-resume.c: New file.
6332         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6333         unwind-resume in csu subdir.
6334         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6335         exceptions.
6336         (librt-sysdep_routines, librt-shared-only-routines): Add
6337         rt-unwind-resume.
6338         * sysdeps/pthread/rt-unwind-resume.c: New file.
6339         * unwind-forcedunwind.c: New file.
6340         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6341         (libpthread-shared-only-routines): Likewise.
6342         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6343         * pthreadP.h (pthread_cancel_init): New prototype.
6344         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6346         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6347         attr argument const struct pthread_attr *.
6349         * res.c (__res_state): Return __resp.
6350         * descr.h: Include resolv.h.
6351         (struct pthread): Add res field.
6352         * pthread_create.c: Include resolv.h.
6353         (start_thread): Initialize __resp.
6354         * Makefile (tests): Add tst-_res1.
6355         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6356         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6357         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6358         libpthread.
6359         * tst-_res1.c: New file.
6360         * tst-_res1mod1.c: New file.
6361         * tst-_res1mod2.c: New file.
6363 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6365         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6367         * Makefile: Define various *-no-z-defs variables for test DSOs
6368         which has undefined symbols.
6370 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6372         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6373         Retry if the stwcx fails to store once_control.
6375 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6377         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6378         pthread_attr_setaffinity.
6379         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6380         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6381         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6382         * pthread_attr_destroy.c: Free cpuset element if allocated.
6383         * pthread_create.c: Pass iattr as additional parameter to
6384         create_thread.
6385         * sysdeps/pthread/createthread.c: If attribute is provided and
6386         a new thread is created with affinity set or scheduling parameters,
6387         start thread with CLONE_STOPPED.
6388         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6389         pthread_attr_setaffinity.
6390         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6391         cpuset element.
6393 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6395         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6397 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6399         * sysdeps/pthread/configure.in: Require CFI directives also for
6400         ppc and s390.
6402 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6404         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6405         Add cfi directives.
6407 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6409         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6410         CLEANUP_JMP_BUF.
6411         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6412         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6413         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6414         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6415         not self pointer in __writer.  Compare with TID to determine
6416         deadlocks.
6417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6418         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6419         Likewise.
6420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6421         Likewise.
6422         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6423         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6424         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6425         macros also when compiling librt.
6427 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6429         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6430         -fasynchronous-unwind-tables.
6431         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6432         (PSEUDO): Add cfi directives.
6433         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6434         Likewise.
6435         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6436         Likewise.
6438 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6440         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6441         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6442         * unwind.c (__pthread_unwind_next): Add hidden_def.
6443         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6444         Likewise.
6445         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6446         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6447         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6448         Likewise.
6449         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6450         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6451         Likewise.
6452         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6453         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6454         __pthread_unregister_cancel and __pthread_unwind_next.
6456 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6458         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6459         different symbol for the cancellation syscall wrapper and
6460         non-cancellation syscall wrapper.
6461         (PSEUDO_END): Define.
6463 2003-07-05  Richard Henderson  <rth@redhat.com>
6465         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6466         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6467         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6468         return actual return value from the syscall, not 0.
6470 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6472         * descr.h (struct pthread): Add pid field.
6473         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6474         (__reclaim_stacks): Likewise.
6475         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6476         also check for PID of the signal source.
6477         (__pthread_initialize_minimal_internal): Also initialize pid field
6478         of initial thread's descriptor.
6479         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6480         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6481         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6482         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6483         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6485 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6487         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6488         Fix use of parameter.
6489         (__libc_cleanup_pop): Likewise.
6491 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6493         * init.c (sigcancel_handler): Change parameters to match handler
6494         for SA_SIGACTION.  Check signal number and code to recognize
6495         invalid invocations.
6497 2003-07-03  Roland McGrath  <roland@redhat.com>
6499         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6500         Apply sizeof (struct pthread) bias to r13 value.
6502 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6504         * sysdeps/pthread/configure.in: Require CFI directives.
6506         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6507         definition.
6508         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6509         libpthread compilation.
6510         * unwind.c (__pthread_unwind): Add hidden_def.
6511         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6513 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6515         * libc-cancellation.c (__libc_cleanup_routine): Define.
6516         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6517         (__pthread_cleanup_pop): Define.
6519 2003-07-01  Richard Henderson  <rth@redhat.com>
6521         * sysdeps/alpha/elf/pt-initfini.c: New file.
6522         * sysdeps/alpha/pthread_spin_lock.S: New file.
6523         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6524         * sysdeps/alpha/pthreaddef.h: New file.
6525         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6526         * sysdeps/alpha/tls.h: New file.
6527         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6528         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6529         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6530         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6531         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6532         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6533         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6534         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6535         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6536         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6538 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6540         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6541         cleanup support and unwind info.
6543 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6545         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6546         Use correct cleanup handler registration.  Add unwind info.
6547         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6548         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6549         * tst-once3.c: Add cleanup handler and check it is called.
6550         * tst-once4.c: Likewise.
6551         * tst-oncex3.c: New file.
6552         * tst-oncex4.c: New file.
6553         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6555 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6557         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6559 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6561         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6562         (tf_msgsnd): Likewise.
6564         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6565         premature returns a bit more.
6567 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6569         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6570         definition to the front.
6572         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6573         the cleanup functions to make the names unique.  Fix dwarf opcode
6574         un unwind table.
6575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6576         functions to make the names unique.  Fix CFA offset for two blocks.
6578 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6580         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6581         missing closing braces.
6582         Patch by Christophe Saout <christophe@saout.de>.
6584 2003-06-24  Roland McGrath  <roland@redhat.com>
6586         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6588 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6590         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6591         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6593         * pthreadP.h: Declare __find_thread_by_id.
6594         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6595         * pthread_clock_gettime.c: Allow using other thread's clock.
6596         * pthread_clock_settime.c: Likewise.
6597         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6598         * Makefile: Add rules to build and run tst-clock2.
6599         * tst-clock2.c: New file.
6601 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6604         to use exception-based cleanup handler.
6605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6607         * tst-cond8.c (ch): Announce that we are done.
6609         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6611         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6612         Also test aio_suspend with timeout value.
6614 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6616         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6617         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6618         attribute_hidden.
6620         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6621         (__pthread_mutex_lock_internal): Likewise.
6622         (__pthread_mutex_unlock_internal): Likewise.
6623         (__pthread_mutex_unlock_usercnt): Declare.
6624         * pthread_mutex_destroy.c: Always fail if used in any way.
6625         * pthread_mutex_init.c: Update comment.
6626         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6627         * pthread_mutex_timedlock.c: Adjust __nusers.
6628         * pthread_mutex_trylock.c: Adjust __nusers.
6629         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6630         and public interfaces are wrapper with pass additional parameter.
6631         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6632         parameter zero.
6633         * tst-mutex8.c: New file.
6634         * Makefile (tests): Add tst-mutex8.
6635         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6636         __pthread_mutex_unlock_usercnt.
6637         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6639         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6640         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6642         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6643         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6644         Add __nusers.
6645         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6646         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6647         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6648         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6649         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6651         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6652         * pthread_mutex_timedlock.c: Likewise.
6653         * pthread_mutex_trylock.c: Adjust __nusers.
6654         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6655         * tst-mutex9.c: New file.
6656         * Makefile (tests): Add tst-mutex9.
6657         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6658         * sysdeps/ia64/tls.h: Likewise.
6659         * sysdeps/powerpc/tls.h: Likewise.
6660         * sysdeps/s390/tls.h: Likewise.
6661         * sysdeps/sh/tls.h: Likewise.
6662         * sysdeps/x86_64/tls.h: Likewise.
6663         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6664         Change type of __owner.
6665         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6666         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6667         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6668         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6669         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6671 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6673         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6674         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6676         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6677         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6678         instead of nr to lll_futex_wake.  Only set errno and return -1
6679         if err < 0.
6681         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6682         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6683         return actual return value from the syscall, not 0.
6685 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6687         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6688         find a random value.
6689         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6690         errno==EIDRM.
6692         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6693         compat_timer_settime.
6694         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6695         compat_timer_gettime.
6696         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6697         compat_timer_getoverrun.
6698         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6699         compat_timer_delete.
6701         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6702         error-checking mutex detect busy mutexes.
6704 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6706         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6707         Add ax to clobber list.
6708         (lll_mutex_cond_lock): Likewise.
6709         (lll_mutex_unlock): Likewise.
6710         (lll_lock): Likewise.
6711         (lll_unlock): Likewise.
6713         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6714         * tst-cancel18.c: New file.
6715         * tst-cancelx18.c: New file.
6717         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6718         and tcdrain.
6720         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6721         * tst-cancel17.c: New file.
6722         * tst-cancelx17.c: New file.
6724         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6725         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6726         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6728         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6730 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6732         * sysdeps/pthread/createthread.c (create_thread): Set
6733         header.multiple_threads unconditionally.
6734         * allocatestack.c (allocate_stack): Likewise.
6735         * descr.h (struct pthread): Add header.multiple_threads
6736         unconditionally.
6737         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6738         Define for librt.  #error if neither libpthread, libc nor librt.
6739         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6740         Likewise.
6741         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6742         CDISABLE): Likewise.
6743         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6744         CDISABLE): Likewise.
6745         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6746         CDISABLE): Likewise.
6747         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6748         CDISABLE): Likewise.  Access header.multiple_threads outside of
6749         libc and libpthread.
6750         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6751         Likewise.
6752         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6753         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6755 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6757         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6758         Also test early cancellation before the thread reaches the cancellation
6759         point.
6761         * Makefile: Compile forward.c with exceptions.
6763         * sysdeps/unix/sysv/linux/sleep.c: New file.
6765 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6767         * Makefile: Add CFLAGS definition to compile function wrappers
6768         duplicated from libc with exceptions.
6769         * tst-cancel4.c: Also check cancellation handlers.
6771         * Makefile: Add rules to build and run tst-cancel16 and
6772         tst-cancelx16.  Add missing CFLAGS definitions.
6773         * tst-cancel16.c: New file.
6774         * tst-cancelx16.c: New file.
6776 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6778         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6779         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6780         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6781         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6783         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6784         (LIBC_CANCEL_RESET): Likewise.
6785         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6786         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6787         librt-cancellation.
6788         (CFLAGS-libcrt-cancellation.c): Define.
6789         * sysdeps/pthread/librt-cancellation.c: New file.
6790         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6791         macros also when compiling librt.
6792         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6793         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6794         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6795         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6796         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6797         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6798         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6800         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6801         compat_timer_create.
6803 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6805         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6807         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6808         __register_atfork.
6809         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6810         Add libc_hidden_def.
6812 2003-06-13  Roland McGrath  <roland@redhat.com>
6814         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6815         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6817 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6819         * allocatestack.c (queue_stack): Always inline.
6820         * ptreadhP.h (__do_cancel): Likewise.
6822 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6824         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6825         a typo.
6827 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6829         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6830         (__pthread_cond_signal): Remove incorrect second addition for
6831         cond_lock!=0.
6833 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6835         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6836         (__pthread_cond_signal): Use correct futex pointer in
6837         __lll_mutex_lock_wait call.
6839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6840         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6842 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6844         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6845         cancelable.
6846         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6847         Likewise.
6849         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6850         hand-written CFI generation code.  Since ENTRY/END also initiated
6851         CFI frames this caused two CFI sets to be generated.
6853 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6855         * cleanup_routine.c: New file.
6856         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6857         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6858         cleanup handling.
6859         * Makefile (libpthread-routines): Add cleanup_routine.
6860         Add more CFLAGS variables to compile with exceptions.  Add comments
6861         why which file needs unwind tables.
6862         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6863         tests.
6864         * tst-cancelx1.c: New file.
6865         * tst-cancelx2.c: New file.
6866         * tst-cancelx3.c: New file.
6867         * tst-cancelx4.c: New file.
6868         * tst-cancelx5.c: New file.
6869         * tst-cancelx6.c: New file.
6870         * tst-cancelx7.c: New file.
6871         * tst-cancelx8.c: New file.
6872         * tst-cancelx9.c: New file.
6873         * tst-cancelx10.c: New file.
6874         * tst-cancelx11.c: New file.
6875         * tst-cancelx12.c: New file.
6876         * tst-cancelx13.c: New file.
6877         * tst-cancelx14.c: New file.
6878         * tst-cancelx15.c: New file.
6879         * tst-cleanupx0.c: New file.
6880         * tst-cleanupx0.expect: New file.
6881         * tst-cleanupx1.c: New file.
6882         * tst-cleanupx2.c: New file.
6883         * tst-cleanupx3.c: New file.
6885         * tst-cleanup0.c: Make standard compliant.
6886         * tst-cleanup1.c: Likewise.
6888         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6889         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6890         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6891         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6892         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6893         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6894         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6895         CLEANUP_JMP_BUF.
6896         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6897         * tst-cancel12.c: New file.
6898         * tst-cancel13.c: New file.
6899         * tst-cancel14.c: New file.
6900         * tst-cancel15.c: New file.
6901         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6902         and tst-cancel15.
6904         * tst-cancel1.c: Add some comments.
6906         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6907         timeout correctly.
6909 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6911         * Makefile (CFLAGS-pthread_cancel.c): Define.
6913 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6915         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6916         Change type of __writer element to int.
6917         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6918         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6919         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6920         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6921         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6922         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6923         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6924         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6925         Compare with TID to determine deadlocks.
6926         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6927         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6928         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6929         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6930         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6931         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6932         Likewise.
6933         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6934         Likewise.
6935         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6936         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6937         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6938         Likewise.
6939         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6940         Likewise.
6941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6942         * Makefile (tests): Add tst-rwlock12.
6943         * tst-rwlock12.c: New file.
6945 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6947         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6948         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6949         Remove bogus hidden_proto.
6950         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6951         Likewise.
6952         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6953         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6954         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6955         ___lll_mutex_timedlock): Likewise.
6957 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6960         (__pthread_cond_signal): Add some code to eventually handle
6961         cond_lock!=0.
6963 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6965         * Makefile (tests): Add tst-exec4.
6966         (tst-exec4-ARGS): Define.
6967         * tst-exec4.c: New file.
6969 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6971         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6972         Also fail if tv_nsec < 0.
6973         (__lll_timedwait_tid): Likewise.
6974         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6975         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6976         Likewise.
6977         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6978         Likewise.
6979         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6980         Likewise.
6981         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6982         Likewise.
6983         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6984         Likewise.
6985         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6986         Likewise.
6988         * Makefile (tests): Add tst-sem8 and tst-sem9.
6989         * tst-sem8.c: New file.
6990         * tst-sem9.c: New file.
6991         * sem_open.c: Fix creation of in_use record if the file exists but
6992         no internal record.
6994         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6995         definitions.
6997         * sysdeps/pthread/timer_create.c (timer_create): In case
6998         evp==NULL, assign timer ID to sival_ptr.
7000         * descr.h (struct pthread_unwind_buf): Change type of prev element to
7001         struct pthread_unwind_buf *.
7002         (struct pthread): Likewise for cleanup_jmp_buf element.
7004         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
7005         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
7006         * unwind.c (__pthread_unwind_next): Likewise.
7008 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
7010         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7011         (lll_futex_timed_wait): Use int for futex value parameter.
7012         (lll_futex_wake): Likewise.
7013         (lll_futex_requeue): Likewise.
7015         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7016         Replace one memory operation with one register operation.
7018         * tst-join4.c (do_test): Fix error message.
7020         * tst-rwlock6.c (do_test): Use correct format specifier.
7022         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7023         (__lll_mutex_lock_wait): Replace one memory operation with one
7024         register operation.
7025         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
7026         (__lll_mutex_lock_wait): Likewise.
7028         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7029         (__lll_mutex_cond_lock): Add one to value parameter of
7030         __lll_lock_wait to reflect reality in the futex syscall.
7031         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7032         (lll_mutex_cond_lock): Likewise.
7034 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7036         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
7037         New function.
7038         (lll_mutex_cond_lock): Define.
7040 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
7042         * Makefile (tests): Add tst-signal6.
7043         * tst-signal6.c: New file.
7045         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
7046         (__lll_mutex_unlock_force): New function
7047         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7049         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7050         (__lll_mutex_unlock_force): New function.
7051         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7053         * tst-rwlock7.c (do_test): Use correct format specifier.
7055         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7056         Find break parameter in correct asm argument.
7058 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7060         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7061         Remove out4.
7062         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7063         error occured.
7064         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7065         Add __mutex.
7066         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7067         lll_futex_requeue, lll_mutex_unlock_force): Define.
7069 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7071         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7072         (pthread_cond_t): Add __mutex.
7073         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7074         lll_futex_requeue, lll_mutex_unlock_force): Define.
7076 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7078         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7079         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7080         Add __mutex field.
7081         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7082         Define.
7083         (lll_futex_wait, lll_futex_wake): Define.
7084         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7085         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7086         FUTEX_REQUEUE instead of FUTEX_WAIT.
7087         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7088         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7089         mutex which was used in condvar structure.  Call
7090         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7091         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7093         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7094         include tcb-offsets.h.  Read wakeup value in locked region.
7095         Use the value of gbr register as THREAD_ID.
7096         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7097         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7098         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7100         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7101         macros.
7103 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7105         * sysdeps/pthread/pthread_cond_broadcast.c
7106         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7108 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7111         typo in register name.
7112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7113         correctly.  Actually use requeue.  Little optimization.
7114         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7115         mutex address early.  Handle cancellation state as 32-bit value.
7116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7117         Remove unnecessary label.
7119 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7121         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7122         instead of FUTEX_WAIT.
7123         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7124         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7125         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7128         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7129         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7130         of __pthread_mutex_lock_internal.
7131         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7132         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7133         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7134         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7135         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7137         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7138         Add pthread_mutex_cond_lock.
7139         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7140         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7141         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7142         lll_mutex_cond_lock.
7143         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7144         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7145         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7146         Add __mutex field.
7147         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7148         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7150         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7151         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7153         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7154         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7155         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7156         macro don't define aliases.
7158         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7159         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7160         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7161         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7164         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7168 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7170         * sem_open.c: Fix one endless loop.  Implement correct semantics
7171         wrt opening the same semaphore more then once.
7172         * sem_close.c: Adjust for sem_open change.
7173         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7174         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7175         * Makefile (tests): Add tst-sem7.
7176         * tst-sem7.c: New file.
7178 2003-05-16  Roland McGrath  <roland@redhat.com>
7180         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7181         uninitialized variable braino.
7183 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7185         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7186         test for syscall availability.
7188         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7189         __no_posix_timers to -1 if the syscalls don't exist.
7191         * pthread_join.c (pthread_join): Set tid field of the joined
7192         thread to -1.  This isn't necessary but helps to recognize some
7193         error conditions with almost no cost.
7195         * allocatestack.c (FREE_P): Also negative values indicate an
7196         unused stack.
7198         * unwind.c: Include <unistd.h>.
7200 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7202         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7204 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7206         * Makefile (crti-objs, crtn-objs): New variables.
7207         (omit-deps, extra-objs): Add crtn.
7208         ($(objpfx)libpthread.so): Depend on both crti and crtn
7209         and links to them in multidir.
7210         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7212 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7214         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7215         (lll_mutex_unlock): Use atomic_exchange_rel.
7217 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7219         * cond-perf.c (cons): Add missing locking around setting of alldone.
7221 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7223         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7224         related macros.
7225         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7227 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7229         * tst-sem6.c: New file.
7230         * Makefile (tests): Add tst-sem6.
7232         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7233         Use atomic_exchange_rel instead of atomic_exchange.
7234         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7235         Likewise.
7237         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7238         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7239         vsyscall is possible.
7241         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7242         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7243         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7244         pthread_setaffinity_np.
7245         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7246         and pthread_setaffinity_np.
7247         * Makefile (libpthread-routines): Add pthread_getaffinity and
7248         pthread_setaffinity.
7250         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7251         use it in case mmap to allocate the stack fails.
7252         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7253         ARCH_MAP_FLAGS here.
7254         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7255         ARCH_RETRY_MMAP.
7257 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7259         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7260         handler implementation.  It is now lockless in fork().
7261         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7262         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7263         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7264         declare the __fork_*_lists.
7265         (struct fork_handler): Include pointers to all three functions.
7266         Add next, refcntr and need_signal elements.
7267         (__fork_handlers): New declaration.
7268         (__register_atfork_malloc): Remove declaration.
7269         (HAVE_register_atfork_malloc): Remove definition.
7270         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7271         __pthread_child_handler variable.
7272         (__libc_pthread_init): Use __register_atfork instead of explicitly
7273         adding to the list.
7274         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7275         and lll_futex_wake.
7276         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7278         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7279         function must never be reached.
7281         * cond-perf.c: New file.
7283 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7285         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7287 2003-05-04  Roland McGrath  <roland@redhat.com>
7289         * Makefile ($(objpfx)../libc.so): New target.
7291 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7293         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7294         (pthread_condattr_t): Size is only an int, don't use long for
7295         alignment.
7296         (pthread_mutexattr_t): Likewise.
7297         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7298         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7299         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7301 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7303         * sysdeps/i386/tls.h: Define THREAD_ID.
7304         * sysdeps/ia64/tls.h: Likewise.
7305         * sysdeps/powerpc/tls.h: Likewise.
7306         * sysdeps/s390/tls.h: Likewise.
7307         * sysdeps/sh/tls.h: Likewise.
7308         * sysdeps/x86_64/tls.h: Likewise.
7309         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7310         record ownership.
7311         * pthread_mutex_timedlock.c: Likewise.
7312         * pthread_mutex_trylock.c: Likewise.
7313         * pthread_mutex_unlock.c: Likewise.
7314         * pthread_rwlock_trywrlock.c: Likewise.
7315         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7316         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7317         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7318         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7320         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7321         flag.
7323 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7325         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7326         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7327         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7328         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7329         Make __align long long instead of long.
7330         (pthread_rwlock_t): Formatting.
7331         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7332         (pthread_rwlock_t): Formatting.
7333         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7334         (pthread_cond_t): Make __align long long instead of long.
7335         (pthread_rwlock_t): Move __flags field to the same position as in
7336         linuxthreads.
7338 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7340         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7341         * tst-rwlock7.c (do_test): Likewise.
7343 2003-04-26  Roland McGrath  <roland@redhat.com>
7345         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7347 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7349         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7350         sizeof (struct pthread).
7351         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7352         1 struct pthread.
7353         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7354         to 0.
7355         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7356         struct pthread.
7357         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7358         to 32-bit bytes.
7359         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7360         tcbp.
7361         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7362         unneccessarily.
7363         (NO_TLS_OFFSET): Define.
7364         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7365         add TLS_TCB_SIZE unnecessarily.
7367 2003-04-22  Roland McGrath  <roland@redhat.com>
7369         * Makeconfig (shared-thread-library): Reverse link order to work
7370         around linker bug.
7372 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7374         * semaphore.h: Fix typo in comment.
7376 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7378         * sysdeps/pthread/sigfillset.c: New file.
7380         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7381         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7382         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7383         * sysdeps/pthread/sigaction.c: Likewise.
7384         * sysdeps/pthread/sigprocmask.c: New file.
7385         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7386         __SIGRTMIN+1.
7387         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7388         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7389         in this case.
7391 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7393         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7394         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7396         * sysdeps/unix/sysv/linux/unregister-atfork.c
7397         (__unregister_atfork): Don't free memory not allocated dynamically.
7399         * semaphore.h: Remove __THROW marker from cancellation points.
7400         * nptl/sysdeps/pthread/pthread.h: Likewise.
7402 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7404         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7405         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7406         __THROW.
7408 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7410         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7412 2003-04-15  Roland McGrath  <roland@redhat.com>
7414         * forward.c (__pthread_unwind): Tweak to avoid warning.
7416 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7418         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7420 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7422         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7423         overflow CFA advance instructions.
7424         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7426 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7428         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7429         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7430         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7431         defined.
7433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7434         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7436         DW_CFA_advance_loc for .Laddl-.Lsubl.
7438 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7440         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7441         position-independent unwind data for static libraries.
7442         Add missing unwind info.  Add comments.
7444         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7447         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7449 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7451         * Makefile: Make sure all cancellation points are compiled with
7452         exception and asynchronous unwind tables.
7454         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7455         which mishandles loading of global object addresses in PIC.
7456         (THREAD_SETMEM_NC): Likewise.
7458 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7460         * pthread.h: Define new data structure for cleanup buffer.  Declare
7461         new cleanup handler interfaces.
7462         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7463         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7464         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7465         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7466         it.  Declare old cleanup handler installation functions.
7467         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7468         handling.
7469         * cleanup_defer.c: Likewise.
7470         * cleanup_compat.c: New file.  Old cleanup code.
7471         * cleanup_def_compat.c: New file.  Old cleanup code.
7472         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7473         if own thread descriptor.
7474         * unwind.c: New file.
7475         * forward.c: Add __pthread_unwind.
7476         * init.c (pthread_functions): Add __pthread_unwind.
7477         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7478         Add ptr___pthread_unwind.
7479         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7480         and unwind function.
7481         * Makefile (libpthread-routines): Add cleanup_compat,
7482         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7483         table generation if necessary.
7484         * version.c: Record whether unwind support is compiled in.
7485         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7486         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7487         handler interfaces.
7488         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7489         complication to generate unwind information for syscall wrappers.
7490         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7491         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7492         __cleanup_fct_attribute.
7494         * Makefile: Add rules to build and run tst-cleanup0.
7495         * tst-cleanup0.c: New file.
7496         * tst-cleanup0.expect: New file.
7498         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7499         caller.  Optimize to avoid often unecessary local variable.
7501 2003-04-11  Roland McGrath  <roland@redhat.com>
7503         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7504         sets variable `multidir'; include that.
7505         (generated): Add it.
7506         ($(objpfx)$(multidir)/crti.o): New target.
7507         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7509 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7511         * tst-attr2.c (do_test): Add cast to avoid warning.
7512         * tst-mutex4.c (do_test): Likewise.
7514 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7516         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7517         in child.
7519 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7521         * Makefile (tests): Add tst-detach1.
7522         * tst-detach1.c: New file.
7524 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7526         * sysdeps/pthread/pthread.h: Remove duplicate
7527         pthread_cleanup_{push,pop} definitions.
7529         * tst-barrier2.c: Eliminate warnings.
7530         * tst-cancel4.c: Likewise.
7531         * tst-cond4.c: Likewise.
7532         * tst-cond6.c: Likewise.
7533         * tst-detach1.c: Likewise.
7534         * tst-rwlock4.c: Likewise.
7535         * tst-rwlock6.c: Likewise.
7536         * tst-rwlock7.c: Likewise.
7537         * tst-sem3.c: Likewise.
7538         * tst-spin2.c: Likewise.
7539         * tst-umask1.c: Likewise.
7541 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7543         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7545 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7547         * descr.h (struct pthread): Move cancelhandling member to the front.
7549 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7551         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7552         malloc_parent, and malloc_child statically.
7553         (__register_atfork_malloc): New function.
7554         (free_mem): Don't free any of the malloc_* variables on the list.
7555         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7556         Define HAVE_register_atfork_malloc.
7558 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7560         * sysdeps/pthread/createthread.c (create_thread): Add some more
7561         comments explaining when to set multiple_threads and when not.
7563         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7564         THREAD_ATOMIC_BIT_SET if not already defined.
7565         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7566         THREAD_ATOMIC_BIT_SET:
7567         * sysdeps/x86_64/tls.h: Likewise.
7568         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7569         THREAD_ATOMIC_CMPXCHG_VAL.
7570         (_pthread_cleanup_pop_restore): Likewise.
7571         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7572         (__pthread_enable_asynccancel_2): Likewise.
7573         (__pthread_disable_asynccancel): Likewise.
7574         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7575         (__libc_disable_asynccancel): Likewise.
7576         * init.c (sigcancel_handler): Likewise.
7577         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7578         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7580 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7582         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7583         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7584         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7585         * Makefile (tests): Add tst-cancel11.
7586         * tst-cancel11.c: New file.
7588 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7590         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7591         round, not the first.  Use specific_used flag instead of local
7592         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7593         (__free_tcb): Don't call deallocate_tsd here.
7594         (start_thread): Call deallocate_tsd here.
7595         * pthread_setspecific.c: Set specific_used flag really only when
7596         needed.
7597         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7598         * tst-tsd3.c: New file.
7599         * tst-tsd4.c: New file.
7601 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7603         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7604         Use atomic_exchange_and_add instead of __lll_add.
7605         (__lll_mutex_timedlock): Likewise.
7606         Patch by Ian Wienand.
7608 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7610         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7611         (SINGLE_THREAD_P): Fix typo.
7612         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7614 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7616         * Makefile (tests): Add tst-align.
7617         * tst-align.c: New file.
7618         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7620         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7621         function correctly.
7623         * tst-tsd2.c: Add casts to avoid warnings.
7625 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7627         * descr.h (struct pthread): Move most often used elements to the front.
7629 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7631         * Makefile (libpthread-routines): Add pthread_atfork.
7632         (libpthread-static-only-routines): Add pthread_atfork.
7634 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7636         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7637         of TLS_DTV_AT_TP.
7638         (INSTALL_DTV): Add parens.
7639         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7640         Use passed descr instead of THREAD_SELF.
7641         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7642         (__lll_mutex_timedlock_wait): Correct expected value after
7643         spurious wakeup.
7644         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7645         Release lock before waking up the waiters.
7646         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7647         criteria.  Reorderstruct passed to cleanup handler.  Fix
7648         handling of cancellation and failung pthread_mutex_unlock call.
7649         Use __pthread_enable_asynccancel_2 instead of
7650         __pthread_enable_asynccancel.
7651         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7652         Return result of lock re-get if it fails.
7653         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7654         for __pthread_cleanup_push.
7655         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7656         completely broken rwlock implementation.
7657         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7658         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7659         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7660         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7661         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7662         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7663         versioned_symbol macro.
7664         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7665         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7667 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7669         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7670         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7671         and __helper_tid.
7672         (struct timer): Remove th and bar field.
7673         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7674         debugging code.  Create only one helper thread.
7675         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7676         helper thread.
7677         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7678         Renamed.  Define statically.  Use thread info from siginfo.
7679         (__helper_once): New variable.
7680         (__helper_tid): New variable.
7681         (__reset_helper_control): New function.
7682         (__start_helper_thread): New function.
7684         * pthread_create.c (start_thread): Don't use setjmp inside
7685         __builtin_expect to work around gcc bug.
7687         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7688         timer_delete syscall fails, but not with ENOSYS, set
7689         __no_posix_timers.
7691         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7692         (timer_settime): Fix typo.
7693         * sysdeps/unix/sysv/linux/timer_getoverr.c
7694         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7696 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7698         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7699         offset of cleanupbuf.__prev.
7701 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7703         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7704         of included file.
7706 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7708         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7709         NULL provide default definition to syscall.
7711 2003-03-25  Roland McGrath  <roland@redhat.com>
7713         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7714         (timer_id2ptr): Fix typo.
7716 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7718         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7719         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7720         * sysdeps/ia64/pthreaddef.h: Likewise.
7721         * sysdeps/powerpc/pthreaddef.h: Likewise.
7722         * sysdeps/s390/pthreaddef.h: Likewise.
7723         * sysdeps/sh/pthreaddef.h: Likewise.
7724         * sysdeps/x86_64/pthreaddef.h: Likewise.
7725         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7726         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7727         being changed.
7728         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7729         SIGTIMER is not unblocked.
7730         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7731         RT signal taken.
7732         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7733         be send.
7734         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7735         pass pointer through as ID.
7736         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7737         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7738         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7739         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7740         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7741         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7742         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7743         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7744         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7745         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7746         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7747         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7748         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7749         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7750         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7751         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7752         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7753         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7754         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7755         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7756         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7757         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7758         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7759         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7760         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7761         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7762         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7763         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7764         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7765         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7766         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7767         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7768         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7770         * pthreadP.h: Remove FRAME_LEFT definition.
7771         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7772         already left frame.  Programs which have this problem are not POSIX
7773         compliant.
7774         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7776 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7778         * sysdeps/pthread/tst-timer.c: Check return values of the
7779         functions we test.
7781 2003-03-23  Roland McGrath  <roland@redhat.com>
7783         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7784         * tst-tls3mod.c: Likewise.
7785         * tst-tls1.c: Likewise.
7786         * tst-tls2.c: Likewise.
7788         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7789         undefined behavior.
7791         * tst-join5.c (tf1, tf2): Add a cast.
7793         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7795         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7796         Don't test anything.
7797         * tst-cond4.c: Likewise.
7798         * tst-cond6.c: Likewise.
7799         * tst-flock2.c: Likewise.
7800         * tst-mutex4.c: Likewise.
7801         * tst-rwlock4.c: Likewise.
7802         * tst-signal1.c: Likewise.
7803         * tst-spin2.c: Likewise.
7804         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7806         * tst-mutex4.c: Use test-skeleton.c.
7807         * tst-spin2.c: Likewise.
7808         * tst-sysconf.c: Likewise.
7809         * tst-barrier2.c: Likewise.
7810         * tst-cond4.c: Likewise.
7811         * tst-cond6.c: Likewise.
7812         * tst-rwlock4.c: Likewise.
7813         * tst-unload.c: Likewise.
7814         * tst-flock2.c (do_test): Use return instead of exit.
7816 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7818         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7820 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7822         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7823         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7824         instead of __lll_compare_and_swap.
7825         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7826         Likewise.
7827         Removed definition if __lll_compare_and_swap.
7829         * cancellation.c: Adjust for new form of compare&exchange macros.
7830         * cleanup_defer.c: Likewise.
7831         * init.c: Likewise.
7832         * libc-cancellation.c: Likewise.
7833         * old_pthread_cond_broadcast.c: Likewise.
7834         * old_pthread_cond_signal.c: Likewise.
7835         * old_pthread_cond_timedwait.c: Likewise.
7836         * old_pthread_cond_wait.c: Likewise.
7837         * pthread_cancel.c: Likewise.
7838         * pthread_create.c: Likewise.
7839         * pthread_detach.c: Likewise.
7840         * pthread_join.c: Likewise.
7841         * pthread_key_delete.c: Likewise.
7842         * pthread_setcancelstate.c: Likewise.
7843         * pthread_setcanceltype.c: Likewise.
7844         * pthread_timedjoin.c: Likewise.
7845         * pthread_tryjoin.c: Likewise.
7846         * sysdeps/pthread/createthread.c: Likewise.
7848 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7850         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7851         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7852         definitions.  Replace uses with calls to atomic_* functions.
7853         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7854         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7855         __lll_test_and_set calls with atomic_exchange_and_add and
7856         atomic_exchange calls respectively.
7857         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7858         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7859         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7860         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7861         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7862         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7863         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7865         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7866         returns the old value.
7868 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7870         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7871         int for variable OLDVAL and correct inline assembler contraint.
7872         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7873         type int for variable OLD.
7875         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7876         only for s390-32.
7877         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7878         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7879         instead of multiple_threads field in the TCB.
7881 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7883         * sysdeps/i386/i686/bits/atomic.h: Removed.
7884         * sysdeps/i386/i586/bits/atomic.h: Removed.
7885         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7886         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7887         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7888         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7889         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7890         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7891         * atomic.h: Removed.  Moved to glibc.
7893         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7894         support for clock selection.
7896         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7897         signalling waiters.
7899 2003-03-18  Roland McGrath  <roland@redhat.com>
7901         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7902         Add __lll_rel_instr first.  Add memory clobber.
7903         (lll_mutex_unlock): Use __lll_test_and_set.
7904         From Paul Mackerras <paulus@samba.org>.
7906         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7907         unconditionally.
7908         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7909         (SINGLE_THREAD_P):  Add `header.' prefix.
7910         From Paul Mackerras <paulus@samba.org>.
7912         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7913         pthread_timedjoin_np to ...
7914         (libpthread: GLIBC_2.3.3): ... here.
7915         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7917         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7918         Avoid shadowing VAL variable.
7920         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7921         New macro.
7923 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7925         * Makefile (tests): Add tst-cond11.
7926         * tst-cond11.c: New file.
7928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7929         struct passed to cleanup handler to eliminate one more
7930         instruction.
7931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7933         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7934         (pthrad_cond_t): Replace __unused field with __clock.
7936         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7937         waken all waiters in cleanup handler.
7938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7939         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7941         * pthread_condattr_getclock.c: New file.
7942         * pthread_condattr_setclock.c: New file.
7943         * sysdeps/pthread/pthread.h: Declare these new functions.
7944         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7945         * Makefile (libpthread-routines): Add the new functions.
7946         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7947         Renamed field to value.  Document use of the bits.
7948         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7949         change.
7950         * pthread_condattr_setpshared.c: Likewise.
7951         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7952         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7953         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7954         Add __clock field.
7955         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7956         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7957         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7958         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7959         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7960         Implement clock selection.
7961         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7962         * pthread-errnos.sym: Add ENOSYS.
7963         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7964         _POSIX_CLOCK_SELECTION.
7965         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7967         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7968         invalid .size directive.
7970 2003-03-17  Roland McGrath  <roland@redhat.com>
7972         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7973         Formatting tweaks.
7975 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7977         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7978         Use __lll_add instead of spelling it out.  Use protected symbol names.
7979         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7980         Use __lll_add.
7981         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7982         Renamed from lll_compare_and_swap.  Use new name where necessary.
7983         (__lll_add): Defined.
7984         (__lll_dec_if_positive): Defined.
7985         (__lll_test_and_set): Defined.
7986         * sysdeps/ia64/pthread_spin_init.c: Removed.
7987         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7988         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7989         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7990         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7991         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7992         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7993         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7994         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7995         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7996         __sync_lock_release_si.
7997         Patch by Jakub Jelinek.
7999         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
8000         Fix timeout handling.
8001         (__lll_timedwait_tid): Likewise.
8002         (lll_unlock_wake_cb): Wake up other waiters if necessary.
8003         Patch by Jakub Jelinek.
8005         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
8007 2003-03-17  Roland McGrath  <roland@redhat.com>
8009         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
8010         * sysdeps/pthread/pthread_spin_init.c: New file.
8011         * sysdeps/pthread/pthread_spin_unlock.c: New file.
8012         * sysdeps/powerpc/Makefile: New file.
8013         * sysdeps/powerpc/pthread_spin_lock.c: New file.
8014         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
8015         * sysdeps/powerpc/pthreaddef.h: New file.
8016         * sysdeps/powerpc/tcb-offsets.sym: New file.
8017         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
8018         * sysdeps/powerpc/tls.h: New file.
8019         * sysdeps/powerpc/bits/atomic.h: New file.
8020         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
8021         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
8022         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
8024         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
8025         * sysdeps/unix/sysv/linux/sem_post.c: New file.
8026         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
8027         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
8028         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
8029         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
8030         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
8031         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
8032         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
8033         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
8034         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
8035         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
8036         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
8037         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
8038         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
8040         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
8041         not gettimeofday.
8042         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
8043         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8044         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
8045         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
8046         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8048 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8050         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8051         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8054         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8056 2003-03-16  Roland McGrath  <roland@redhat.com>
8058         * tst-fork4.c: Include <string.h>.
8059         * tst-signal2.c: Likewise.
8060         * tst-mutex5.c (do_test): exit -> return.
8061         * tst-mutex2.c: Include <stdlib.h>.
8063 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8065         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8066         (__lll_mutex_timedlock_wait): Correct expected value after
8067         spurious wakeup.  Otherwise we would never wait again.
8069         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8070         zone versus inline asm stupidity.  Use correct instructions.
8072         * tst-rwlock6.c: Add some more status output.
8074 2003-03-15  Roland McGrath  <roland@redhat.com>
8076         * sysdeps/pthread/configure.in: New file.
8077         * sysdeps/pthread/configure: New file (generated).
8079 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8081         * allocatestack.c (allocate_stack): Store the exact stack size of
8082         user allocated stacks.
8084 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8086         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8087         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8088         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8089         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8090         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8091         Use `header.' prefix.
8092         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8094 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8096         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8097         __builtin_frame_address, use stack pointer.
8099         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8100         instead of __builtin_frame_pointer.
8102 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8104         * tst-basic1.c (do_test): Add cast to avoid warning.
8105         * tst-basic2.c (do_test): Likewise.
8107         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8108         amount of stack correction.
8110         * tst-fork4.c: Use test-skeleton.c.
8112 2003-03-14  Roland McGrath  <roland@redhat.com>
8114         * init.c: Fix typo "#eli" for "#else".
8116 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8118         * allocatestack.c (__stack_user): Use hidden_data_def.
8119         * pthread_create.c (__pthread_keys): Likewise.
8121         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8123 2003-03-14  Roland McGrath  <roland@redhat.com>
8125         * tst-fork4.c: New file.
8126         * Makefile (tests): Add it.
8128         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8129         we always define the padding space.
8130         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8131         stopped supporting its own extensions fully.
8132         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8133         struct also called `header', so `header.multiple_threads' is the field
8134         name to use on all machines.
8135         * allocatestack.c (allocate_stack): Use `header.' prefix.
8136         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8137         * pthread_create.c (__pthread_create_2_1): Likewise.
8138         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8139         (THREAD_SELF): Likewise.
8140         * sysdeps/x86_64/tls.h: Likewise.
8141         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8142         (SINGLE_THREAD_P): Likewise.
8143         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8144         (SINGLE_THREAD_P): Likewise.
8145         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8146         (SINGLE_THREAD_P): Likewise.
8148         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8149         value directly.
8151 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8153         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8154         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8156         * pthread_create.c (start_thread): setjmp is expected to return 0.
8158         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8159         (THREAD_GETMEM_NC): Likewise.
8161 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8163         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8164         and the size of the stack which must be allocated is a multiple,
8165         allocate one more page.
8166         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8167         MULTI_PAGE_ALIASING.
8169 2003-03-13  Roland McGrath  <roland@redhat.com>
8171         * pthread_create.c (start_thread): Set EXITING_BIT after the
8172         event-reporting (and destructors), not before.
8174 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8176         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8177         lll_futex_wake): Declare register variables as long int instead of
8178         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8179         Make syscall arguments clobbered by the syscall.
8180         (lll_futex_wait): Define using lll_futex_timed_wait.
8182         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8183         to void *.
8185         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8186         PPID if [! NDEBUG].
8188         * allocatestack.c (nptl_ncreated): Only declare if
8189         COLORING_INCREMENT != 0.
8191         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8192         (__libc_enable_asynccancel_2): Remove prototype.
8194         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8195         ctid to match kernel.
8197 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8199         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8200         libc_multiple_threads.
8201         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8202         __libc_multiple_threads to...
8203         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8205         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8206         versioning.
8207         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8208         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8210         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8211         (__pthread_once_internal): Define.
8213         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8214         macros instead of .symver directly.
8215         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8216         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8218         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8219         * sysdeps/x86_64/tcb-offsets.sym: New file.
8220         * sysdeps/x86_64/Makefile: New file.
8222         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8223         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8224         to access own pthread_t in TCB.
8225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8226         Likewise.
8227         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8228         Likewise.
8229         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8231 2003-03-12  Roland McGrath  <roland@redhat.com>
8233         * pthread-errnos.sym: New file.
8234         * Makefile (gen-as-const-headers): New variable, list that file.
8235         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8236         header <pthread-errnos.h> instead of defining errno values here.
8237         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8238         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8239         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8240         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8241         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8242         Likewise.
8243         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8244         Likewise.
8245         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8246         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8247         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8248         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8249         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8250         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8251         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8252         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8254         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8255         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8256         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8257         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8258         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8259         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8260         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8261         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8262         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8263         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8264         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8265         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8266         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8267         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8268         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8269         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8270         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8271         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8273         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8274         CLONE_CHILD_SETTID worked.
8276 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8278         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8279         file.
8280         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8281         file.
8283         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8284         (pthread_cond_t): Add padding.
8286         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8287         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8288         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8290         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8291         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8292         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8293         (__pthread_rwlock_timedrdlock): Likewise.
8294         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8295         (__pthread_rwlock_wrlock): Likewise.
8296         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8297         (__pthread_rwlock_rdlock): Likewise.
8299         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8302         result of lock re-get if it fails.
8304 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8306         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8307         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8308         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8311         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8312         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8313         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8314         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8315         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8317         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8318         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8320         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8321         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8322         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8323         (create_thread): Likewise.
8324         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8325         * init.c (__pthread_initialize_minimal_internal): Initialize
8326         __libc_multiple_threads_ptr if necessary.
8327         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8328         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8329         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8330         __libc_multiple_threads.
8331         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8332         necessary.
8334         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8335         (THREAD_SETMEM_NC): Likewise.
8337         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8338         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8339         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8340         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8342         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8343         Eliminate one entire instruction.
8345         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8346         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8348         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8349         instead of __pthread_enable_asynccancel.
8350         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8351         (__pthread_cond_wait): Likewise.
8352         * sysdeps/pthread/pthread_cond_timedwait.c
8353         (__pthread_cond_timedwait): Likewise.
8354         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8356         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8357         (__condvar_cleanup): Wake up all waiters in case we got signaled
8358         after being woken up but before disabling asynchronous
8359         cancellation.
8360         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8361         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8362         (__condvar_cleanup): Likewise.
8364         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8365         Make it an error if architecture has no #if case.  Add x86-64.
8367         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8368         pt-initfini.s generation.
8370         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8371         (TLS_INIT_TP): Fix typo.
8373 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8375         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8376         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8378         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8379         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8380         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8381         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8382         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8383         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8384         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8385         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8387 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8389         * sysdeps/pthread/pthread_cond_timedwait.c
8390         (__pthread_cond_timedwait): Return the result of the final
8391         locking.  If it succeeds, the regular function return value.
8393         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8394         Return result of the final locking.
8395         * version.c (__nptl_main): Work around problems with the strange
8396         INTERNAL_SYSCALL macro on ppc32.
8397         * init.c (__pthread_initialize_minimal_internal): Unblock
8398         SIGCANCEL in case the parent blocked it.
8399         Reported by Paul Mackerras <paulus@samba.org>.
8401         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8403         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8405 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8407         * sysdeps/pthread/pthread_cond_timedwait.c
8408         (__pthread_cond_timedwait): Unlock and fail if
8409         __pthread_mutex_unlock_internal failed.
8411         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8412         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8413         Use ARCH_CLONE.
8414         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8415         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8416         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8417         ALLOCATE_STACK): New macros.
8418         (TLS_TPADJ): New macro.
8419         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8420         (allocate_stack): Handle TLS_DTV_AT_TP and
8421         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8422         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8423         Don't set PD->self.
8424         * init.c [__ia64__] (__NR_set_tid_address): Define.
8426         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8427         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8428         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8429         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8430         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8431         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8432         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8433         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8434         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8435         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8436         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8437         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8438         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8439         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8440         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8441         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8442         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8443         * sysdeps/ia64/bits/atomic.h: New file.
8444         * sysdeps/ia64/Makefile: New file.
8445         * sysdeps/ia64/pthread_spin_init.c: New file.
8446         * sysdeps/ia64/pthread_spin_lock.c: New file.
8447         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8448         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8449         * sysdeps/ia64/pthreaddef.h: New file.
8450         * sysdeps/ia64/tcb-offsets.sym: New file.
8451         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8452         * sysdeps/ia64/tls.h: New file.
8454         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8455         to syscall instead of no arguments.
8457 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8459         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8460         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8461         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8462         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8464         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8465         unused code.
8467         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8469         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8470         lowlevelbarrier.sym.
8471         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8472         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8473         Include lowlevelbarrier.h and don't define offsets locally.
8474         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8476         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8477         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8478         (__lll_mutex_timedlock_wait): Likewise.
8479         (lll_mutex_lock): Adjust asm for that.
8480         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8481         (lll_lock): Adjust asm for operand order change.
8482         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8483         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8485         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8486         Reverse order of parameters.
8487         (__lll_timedwait_tid): Remove regparms attribute.
8488         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8489         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8491         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8492         (__lll_timedwait_tid): Remove one unnecessary instruction.
8494         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8495         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8496         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8497         lowlevelmutex.S.
8499         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8500         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8501         for NOT_IN_libc.
8502         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8503         lowlevellock.S.
8505         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8506         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8507         for libc.so.
8508         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8509         define LOCK here (if UP is not defined).  The actual code is in
8510         lowlevelmutex.S.
8512         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8513         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8514         __lll_timedwait_tid for libc.so.
8515         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8516         define LOCK here (if UP is not defined).  The actual code is in
8517         lowlevellock.S.
8519         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8520         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8521         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8522         instead of lowlevelsem.h.
8523         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8524         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8525         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8527         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8528         lowlevelrwlock.sym.
8529         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8530         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8531         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8533         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8534         register loading.
8535         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8536         last changed.  D'oh.
8538         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8540         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8541         of __libc_locking_needed.
8542         (lll_trylock): Initialize %eax to zero.
8544         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8545         pthread_cond_t definition.
8547 2003-03-10  Roland McGrath  <roland@redhat.com>
8549         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8550         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8551         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8552         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8553         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8555         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8556         Instead of setting PD->multiple_threads, set globals
8557         __pthread_multiple_threads and __libc_multiple_threads.
8558         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8559         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8560         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8562         * descr.h (struct pthread): Conditionalize first member on
8563         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8564         containing an anonymous tcbhead_t.  Move `list' member out.
8565         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8566         * allocatestack.c: Remove use of `header.data.' prefix.
8567         * pthread_create.c: Likewise.
8568         * init.c (__pthread_initialize_minimal_internal): Likewise.
8569         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8570         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8571         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8572         * sysdeps/x86_64/tls.h: Likewise.
8573         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8574         (SINGLE_THREAD_P): Likewise.
8575         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8576         (SINGLE_THREAD_P): Likewise.
8577         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8578         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8580 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8582         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8584         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8585         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8587         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8588         leftovers from the ia32 code.
8590         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8591         memory load.
8592         (clear_once_control): Don't load %esi.
8594         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8595         handling.
8597         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8599         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8600         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8602         * Makefile (tests): Add tst-cond10.
8603         * tst-cond10.c: New file.
8605 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8607         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8608         * tst-signal3.c (do_test): Likewise.
8609         * tst-sem5.c (do_test): Likewise.
8610         * tst-kill6.c (do_test): Likewise.
8611         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8613         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8614         of inc/dec.
8615         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8616         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8617         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8618         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8619         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8622         Likewise.
8623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8624         Likewise.
8625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8626         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8627         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8628         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8629         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8630         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8631         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8632         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8634         * allocatestack.c (allocate_stack): If mprotect() fails free the
8635         TLS memory.
8637 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8639         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8641         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8642         lll_wake_tid.  This was used only to work around kernel limits in
8643         the early days.
8644         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8645         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8646         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8647         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8649         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8650         (__pthread_initialize_minimal_internal): Change initialization of
8651         __static_tls_align_m1 appropriately.
8652         * pthreadP.h (__static_tls_align_m1): Renamed from
8653         __static_tls_align.
8654         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8655         instead of __static_tls_align-1.
8657 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8659         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8661         * pthread_create.c: Define __pthread_keys using nocommon
8662         attribute, not by placing it explicitly in bss.
8663         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8665         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8666         Use it in mmap call to allocate stacks.
8668         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8670         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8671         result of the thread function.
8673 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8675         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8676         version is just fine.
8678         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8679         (__pthread_child_handler): Renamed from pthread_child_handler,
8680         exported, and marked hidden.  Change all users.
8681         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8682         free __pthread_child_handler from child list.
8684 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8686         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8688         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8689         Fix handling of cancellation and failing pthread_mutex_unlock call.
8690         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8691         (__pthread_cond_wait): Likewise.
8693         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8694         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8695         lll_futex_timed_wait call.
8696         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8697         (pthread_rwlock_timedwrlock): Likewise.
8699         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8700         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8701         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8703         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8704         check of lll_futex_wake return value.
8706 2003-03-03  Roland McGrath  <roland@redhat.com>
8708         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8710         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8711         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8712         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8714 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8716         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8717         error for CPU clocks.
8719         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8720         _POSIX_MONOTONIC_CLOCK.
8721         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8723         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8724         recent kernels.
8726 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8728         * descr.h (struct pthread): Move cleanup field to the front.
8730 2003-03-01  Roland McGrath  <roland@redhat.com>
8732         * sem_open.c (sem_open): Braino fix.
8734 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8736         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8737         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8738         __pthread_cleanup_pop functionality.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8741         * descr.h (struct pthread): Move tid field to the front now that
8742         it is often used.
8744         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8745         (__lll_mutex_timedlock_wait): Remove.
8746         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8747         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8748         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8749         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8750         (lll_unlock_wake_cb): Don't save and restore %esi.
8751         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8752         %esi.
8753         (__lll_timedwait_tid): Add alignment.
8754         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8755         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8756         %esi.
8757         (__lll_timedwait_tid): Removed.
8758         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8759         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8760         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8761         (pthread_barrier_wait): Don't save, load, and restore %esi for
8762         last thread.
8763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8764         (__pthread_cond_signal): Don't save, load, and restore %esi.
8765         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8766         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8767         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8768         Don't save, load, and restore %esi.
8770 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8773         Release lock before waking up the waiters.
8775         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8777         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8778         (reader_thread): Likewise.
8780         * sysdeps/pthread/pthread_rwlock_unlock.c
8781         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8782         to wake up readers if there are none.
8784         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8785         Release internal lock before wake threads.
8787 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8789         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8790         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8791         predefined.
8792         * tst-rwlock9.c: Likewise.
8793         * tst-rwlock10.c: New file.
8794         * tst-rwlock11.c: New file.
8796         * Makefile (tests): Add tst-dlsym1.
8797         * tst-dlsym1.c: New file.
8799         * init.c (__pthread_initialize_minimal_internal): Set
8800         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8801         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8803 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8805         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8807         * tst-cond2.c: Fix sychronization with child.
8809         * tst-rwlock8.c (reader_thread): Remove unused variable.
8811         * Makefile: Add rules to build and run tst-tls3.
8812         * tst-tls3.c: New file.
8813         * tst-tls3mod.c: New file.
8815         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8816         * tst-rwlock8.c: New file.
8817         * tst-rwlock9.c: New file.
8818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8819         complete broken rwlock implementation.
8820         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8821         Likewise.
8822         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8823         Likewise.
8824         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8825         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8826         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8827         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8828         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8829         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8830         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8832 2003-02-23  Roland McGrath  <roland@redhat.com>
8834         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8836 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8838         * Makefile (tests): Add tst-context1.
8839         * tst-context1.c: New file.
8841         * Makefile (tests): Add tst-tls1 and tst-tls2.
8842         * tst-tls1.c: New file.
8843         * tst-tls2.c: New file.
8845         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8846         for failed cmpxchg.
8848         * pthread_create.c (start_thread): Set EXITING_BIT early.
8850         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8851         (THREAD_GETMEM_NC): Likewise.
8853 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8855         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8856         off 3 more bytes by using offset-less instructions when possible.
8858         * Makefile: Add dependency for $(objpfx)version.d.
8860         * eintr.c (eintr_source): Add unnecessary return but the compiler
8861         insists.
8863         * tst-kill3.c: Include <unistd.h>.
8865 2003-02-21  Roland McGrath  <roland@redhat.com>
8867         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8869 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8871         * Makefile (tests): Add tst-eintr1.
8872         (distribute): Add eintr.c.
8873         * tst-eintr1.c: New file.
8874         * eintr.c: New file.
8876         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8878         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8879         Disallow sending SIGCANCEL.
8881         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8882         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8883         * tst-kill1.c: New file.
8884         * tst-kill2.c: New file.
8885         * tst-kill3.c: New file.
8886         * tst-kill5.c: New file.
8887         * tst-kill6.c: New file.
8888         * tst-basic7.c: Renamed to...
8889         * tst-kill4.c: ...this.
8891 2003-02-21  Roland McGrath  <roland@redhat.com>
8893         * Makefile (install-lib-ldscripts): New variable.
8895 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8897         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8898         * pthread_cancel.c: Use INVALID_TD_P.
8899         * pthread_detach.c: Likewise.
8900         * pthread_getschedparam.c: Likewise.
8901         * pthread_setschedparam.c: Likewise.
8902         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8903         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8904         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8905         * pthread_timedjoin.c: Likewise.
8907         * tst-basic7.c: Include <signal.h>.
8909         * pthread_join.c (pthread_join): Limited checking for invalid
8910         descriptors.
8911         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8913 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8915         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8916         beginning of the loop.  Clear the entire first block of TSD.
8917         * Makefile (tests): Add tst-key4.
8918         * tst-key4.c: New file.
8920 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8922         * Makefile (tests): Add tst-basic7.
8923         * tst-basic7.c: New file.
8925         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8926         Add some more __builtin_expect.
8928         * pthreadP.h: Define dummy version of DEBUGGING_P.
8930 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8932         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8933         _POSIX_THREAD_PRIORITY_SCHEDULING.
8934         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8935         _XOPEN_REALTIME_THREADS.
8936         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8938         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8939         kernel returns EINVAL for PID <= 0, work around it.
8941         * Makefile (tests): Add tst-signal5.
8942         * tst-signal5.c: New file.
8944         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8945         and LOGIN_NAME_MAX.
8947         * tst-cancel1.c (tf): Block all signals.
8949         * Makefile (tests): Add tst-basic6.
8950         * tst-basic6.c: New file.
8952         * tst-basic1.c: Add test for process ID.
8954         * Makefile (tests): Add tst-cancel10.
8955         * tst-cancel10.c: New file.
8957         * Makefile (tests): Add tst-signal4.
8958         * tst-signal4.c: New file.
8960         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8961         __sigismember instead of sigismember.  Add __builtin_expect.
8963 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8965         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8966         pthread_setcancelstate, and pthread_rwlock_setpshared.
8968         * tst-cancel7.c (do_test): Make sure the pid file exists before
8969         canceling the thread.
8971         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8972         pthread_rwlock_timedrdlock tests.
8973         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8974         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8975         Check for invalid tv_nsec field.
8976         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8977         Likewise.
8979         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8980         recursive mutex of overflow.
8982         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8984         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8985         going into an endless loop.
8986         * Makefile (tests): Add tst-cancel9.
8987         * tst-cancel9.c: New file.
8989         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8991 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8993         * tst-mutex5.c (do_test): Add more timedlock tests.
8995         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8996         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8998         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8999         use INLINE_SYSCALL.  Error number is returned, not -1.
9001         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
9002         and __deallocate_stack with internal_function.
9003         * pthread_create.c: Adjust definitions appropriately.
9004         * allocatestack.c: Likewise.
9006         * pthread_join.c: Add one more __builtin_expect.
9007         * pthread_timedjoin.c: Likewise.
9009         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
9010         not data of sequence number does not match.
9011         Add one __builtin_expect.
9013         * Makefile (tests): Add tst-clock1.
9014         * tst-clock1.c: New file.
9016         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
9017         negative arguments.
9018         * Makefile (tests): Add tst-basic5.
9019         * tst-basic5.c: New file.
9021 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
9023         * Makefile (tests): Add tst-basic4.
9024         * tst-basic4.c: New file.
9026         * pthreadP.h: Add declaraction for __nptl_nthreads.
9027         * pthread_create.c: Define __nptl_nthreads
9028         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
9029         after thread is done.  If then zero, call exit(0).
9030         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9031         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
9032         * init.c (pthread_functions): Initialize ptr_nthreads.
9033         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
9034         (__reclaim_stacks): Decrement __nptl_nthreads.
9035         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
9036         Define.
9037         * Makefile (tests): Add tst-basic3.
9038         * tst-basic3.c: New file.
9040         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
9041         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
9042         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
9043         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
9044         if asynchronous canceling is enabled.
9045         * pthread_join.c (pthread_join): When recognizing circular joins,
9046         take into account the other thread might be already canceled.
9047         * Makefile (tests): Add tst-join5.
9048         * tst-join5.c: New file.
9050         * Makefile (tests): Add tst-join4.
9051         * tst-join4.c: New file.
9053 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9055         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9057 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9059         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9060         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9061         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9062         warning.
9063         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9064         to avoid warning.
9065         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9066         error if lll_futex_wake failed.
9068 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9071         handling of cancellation and failung pthread_mutex_unlock call.
9072         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9073         * Makefile (tests): Add tst-cond8 and tst-cond9.
9074         * tst-cond8.c: New file.
9075         * tst-cond9.c: New file.
9077         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9079         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9080         non-standard initializers with __USE_GNU.
9082         * Makefile (tests): Add tst-cleanup3.
9083         * tst-cleanup3.c: New file.
9085 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9087         * Makefile (tests): Add tst-attr1 and tst-attr2.
9088         * tst-attr1.c: New file.
9089         * tst-attr2.c: New file.
9091         * Makefile: Add rules to build and run tst-atfork2 test.
9092         * tst-atfork2.c: New file.
9093         * tst-atfork2mod.c: New file.
9095         * sysdeps/unix/sysv/linux/unregister-atfork.c
9096         (__unregister_atfork): Free the memory allocated for the handlers
9097         after removing them from the lists.
9099         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9100         cleanup function.
9102         * tst-atfork1.c (do_test): Wait for the child we forked.
9103         Report error in child.
9105         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9107         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9109 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9111         * Makefile (tests): Add tst-cancel8.
9112         * tst-cancel8.c: New file.
9114         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9115         clearing of control variable.
9116         * Makefile (tests): Add tst-once3 and tst-once4.
9117         * tst-once3.c: New file.
9118         * tst-once4.c: New file.
9120 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9122         * sysdeps/sh/Makefile: New file.
9123         * sysdeps/sh/bits/atomic.h: New file.
9124         * sysdeps/sh/pthread_spin_init.c: New file.
9125         * sysdeps/sh/pthread_spin_lock.c: New file.
9126         * sysdeps/sh/pthread_spin_trylock.S: New file.
9127         * sysdeps/sh/pthread_spin_unlock.S: New file.
9128         * sysdeps/sh/pthreaddef.h: New file.
9129         * sysdeps/sh/tcb-offsets.sym: New file.
9130         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9131         * sysdeps/sh/tls.h: New file.
9132         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9133         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9134         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9135         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9136         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9137         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9138         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9139         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9140         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9141         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9142         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9143         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9144         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9145         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9146         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9147         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9148         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9149         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9150         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9151         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9152         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9153         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9154         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9155         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9156         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9157         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9158         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9159         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9160         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9161         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9163 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9165         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9166         according to POSIX.
9168         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9170 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9172         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9173         (TLS_GET_FS): New #define.
9174         (TLS_SET_FS): New #define.
9175         Correct value of __NR_set_thread_area.
9177         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9179 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9181         * Makefile (tests): Add tst-popen1.
9182         * tst-popen1.c: New file.
9184         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9185         but inactive generalization.
9186         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9187         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9188         Minor optimization, remove one instruction.
9189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9191 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9193         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9195 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9197         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9198         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9199         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9200         * sysdeps/pthread/pthread_cond_signal.c: New file.
9201         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9202         * sysdeps/pthread/pthread_cond_wait.c: New file.
9203         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9204         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9205         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9206         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9207         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9208         * sysdeps/s390/Makefile: New file.
9209         * sysdeps/s390/bits/atomic.h: New file.
9210         * sysdeps/s390/pthread_spin_init.c: New file.
9211         * sysdeps/s390/pthread_spin_lock.c: New file.
9212         * sysdeps/s390/pthread_spin_trylock.c: New file.
9213         * sysdeps/s390/pthread_spin_unlock.c: New file.
9214         * sysdeps/s390/pthreaddef.h: New file.
9215         * sysdeps/s390/tcb-offsets.sym: New file.
9216         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9217         * sysdeps/s390/tls.h: New file.
9218         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9219         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9220         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9221         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9222         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9223         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9224         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9225         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9226         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9227         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9228         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9229         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9230         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9231         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9232         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9233         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9234         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9235         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9236         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9237         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9238         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9239         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9240         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9242 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9244         * atomic.h: Add a couple more default implementations.
9245         (atomic_compare_and_exchange_acq): Use
9246         __arch_compare_and_exchange_32_acq in return value definition.  It
9247         always exists.
9248         (atomic_bit_set): Renamed from atomic_set_bit.
9249         Add missing atomic_ prefixes.
9251         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9252         thread library is available, use correct value to mark initialized
9253         once variable.
9255 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9257         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9258         __sysconf to determine pagesize.
9260         * pthread_create.c: Include <atomic.h>.
9261         * allocatestack.c (allocate_stack): Implement coloring of the
9262         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9263         size minus one.  Adjust users.
9264         * sysdeps/i386/i686/Makefile: New file.
9266 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9268         * allocatestack.c: Improve comment throughout the file.
9270         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9271         (__lll_lock_wait): Add branch prediction.
9272         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9273         (__lll_lock_wait): Likewise.
9274         (lll_unlock_wake_cb): Removed.
9276 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9278         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9279         _POSIX_THREAD_PRIORITY_SCHEDULING.
9281 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9283         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9284         Fix return type of ptr___pthread_getspecific.
9286 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9288         * Makefile (tests): Add tst-umask1.
9289         (tst-umask1-ARGS): Define.
9290         * tst-umask1.c: New file.
9292 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9294         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9295         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9296         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9297         pthread_rwlock_unlock.
9298         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9299         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9300         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9301         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9302         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9303         New file.
9304         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9305         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9306         New file.
9307         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9308         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9309         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9310         New file.
9311         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9312         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9313         New file.
9314         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9315         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9316         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9317         New file.
9318         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9319         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9320         New file.
9321         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9323         * Makefile (libpthread-routines): Remove lowlevelcond and
9324         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9325         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9326         and pthread_cond_broadcast.
9327         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9328         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9329         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9330         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9331         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9332         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9333         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9334         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9335         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9336         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9338         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9339         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9341         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9342         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9343         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9344         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9345         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9346         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9347         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9348         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9349         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9350         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9351         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9352         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9353         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9354         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9355         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9356         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9357         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9359         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9360         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9361         of the code is moved to ...
9362         * sysdeps/pthread/createthread.c: ...here.  New file.
9364 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9366         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9367         (__new_sem_post): Clear %eax before returning.
9368         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9370         * Makefile (tests): Add tst-cleanup2.
9371         * tst-cleanup2.c: New file.
9373         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9374         Interpret first parameter correctly.
9376 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9378         * Makefile (headers): Add bits/semaphore.h.
9380 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9382         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9383         if not SHARED.
9385 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9387         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9388         must be used and mapping failed.
9389         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9391         * Makefile (CFLAGS-pthread_self.os): Define this, not
9392         CFLAGS-pthread_self.c.
9394 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9396         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9397         lll_unlock_wake_cb.
9399         * Makefile (libpthread-routines): Add version.  Add rules to build
9400         version.os and banner.h.
9401         * version.c: New file.
9403 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9405         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9406         the alias unconditional.
9407         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9409 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9411         * Makefile (CFLAGS-pthread_self.c): New definition.
9413 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9415         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9416         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9417         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9418         * init.c (__pthread_initialize_minimal_internal): Likewise.
9420 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9422         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9424         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9425         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9426         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9427         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9428         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9429         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9431 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9433         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9434         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9435         * tst-cancel-wrappers.sh: Remove all exceptions.
9437 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9439         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9440         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9442         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9443         Use __libc_pthread_functions array if SHARED.
9445         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9446         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9448         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9449         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9450         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9451         __libc_ptf_call instead of __libc_maybe_call.
9452         (PTF): New #define.
9453         (__libc_cleanup_region_start): Wrap function name with PTF call.
9454         (__libc_cleanup_region_end): Likewise.
9455         (__libc_cleanup_end): Likewise.
9457         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9458         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9459         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9460         * pthreadP.h: Add prototypes.
9462         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9463         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9464         __pthread_rwlock_unlock aliases.
9465         * pthreadP.h: Add prototypes for new aliases.
9467         * pthreadP.h (struct pthead_functions): Moved to...
9468         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9469         * init.c (pthread_functions): Add initializers for new elements.
9471         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9472         __pthread_cleanup_pop_restore aliases.
9473         * pthreadP.h: Add prototypes.
9475         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9476         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9477         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9478         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9479         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9480         * pthreadP.h: Adjust prototypes and callers.
9482 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9484         * Makefile (tests): Add tst-cancel7.
9485         (tst-cancel7-ARGS): New variable.
9486         * tst-cancel7.c: New file.
9488         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9489         around gcc defficiencies.
9490         * old_pthread_cond_signal.c: Likewise.
9491         * old_pthread_cond_timedwait.c: Likewise.
9492         * old_pthread_cond_wait.c: Likewise.
9494         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9496 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9498         * Makefile (tests): Add tst-cond7.
9499         * tst-cond7.c: New file.
9501         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9502         (condvar_cleanup): Get condvar address from the right place.
9504         * atomic.h: Correct definitions of atomic_full_barrier,
9505         atomic_read_barrier, atomic_write_barrier.
9507         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9508         race-free.
9509         * old_pthread_cond_signal.c: Likewise.
9510         * old_pthread_cond_timedwait.c: Likewise.
9511         * old_pthread_cond_wait.c: Likewise.
9513 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9515         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9517 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9519         * pthreadP.h (pthread_cond_2_0_t): New type.
9520         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9521         Use new type for the 2.0 condvar function prototypes.
9522         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9523         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9524         parameter.
9525         * old_pthread_cond_destroy.c: Likewise.
9526         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9527         * old_pthread_cond_signal.c: Likewise.
9528         * old_pthread_cond_timedwait.c: Likewise.
9529         * old_pthread_cond_wait.c: Likewise.
9531         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9532         (__pthread_cond_wait): Don't save cancellation mode and seq value
9533         in same location.
9535         * herrno.c (__h_errno_location): Don't define as weak.
9537 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9539         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9540         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9541         and pthread_cond_wait.
9542         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9543         Renamed to...
9544         (__pthread_cond_broadcast_2_0): ... this.
9545         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9546         Renamed to...
9547         (__pthread_cond_destroy_2_0): ... this.
9548         * old_pthread_cond_init.c (__old_pthread_cond_init):
9549         Renamed to...
9550         (__pthread_cond_init_2_0): ... this.
9551         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9552         Renamed to...
9553         (__pthread_cond_signal_2_0): ... this.
9554         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9555         Renamed to...
9556         (__pthread_cond_wait_2_0): ... this.
9557         * pthread_cond_destroy.c: Include shlib-compat.h.
9558         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9559         * pthread_cond_init.c: Include shlib-compat.h.
9560         (pthread_cond_init): Change strong_alias into versioned_symbol.
9561         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9562         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9563         fields.
9564         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9565         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9566         __pthread_cond_wait_2_0): New prototypes.
9567         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9568         __old_pthread_cond_init, __old_pthread_cond_signal,
9569         __old_pthread_cond_wait): Removed.
9570         * init.c: Include shlib-compat.h.
9571         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9572         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9573         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9574         ptr___pthread_cond_*_2_0 fields.
9575         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9576         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9578         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9579         LIBC_SIGACTION was not yet defined.
9580         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9581         [!defined LIBC_SIGACTION] (__sigaction): New function and
9582         libc_hidden_weak.
9583         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9584         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9586 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9588         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9590 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9592         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9593         New, larger type definition.
9594         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9595         implementation.
9596         * Versions [libpthread]: Add definitions for new pthread_cond_*
9597         interfaces for version GLIBC_2.3.2.
9598         * pthread_cond_init.c: Update initialization for new type definition.
9599         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9600         pthread_cond_timedwait, pthread_cond_signal, and
9601         pthread_cond_broadcast.  Add old_pthread_cond_init,
9602         old_pthread_cond_destroy, old_pthread_cond_wait,
9603         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9604         old_pthread_cond_broadcast.
9605         * old_pthread_cond_broadcast.c: New file.
9606         * old_pthread_cond_destroy.c: New file.
9607         * old_pthread_cond_init.c: New file.
9608         * old_pthread_cond_signal.c: New file.
9609         * old_pthread_cond_timedwait.c: New file.
9610         * old_pthread_cond_wait.c: New file.
9611         * pthreadP.h: Add prototypes for the compatibility interfaces.
9613         * pthread_cond_destroy.c: Don't include <errno.h>.
9615 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9617         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9618         unnecessary zero offset when addressing MUTEX.
9620 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9622         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9623         __register_atfork.
9624         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9625         for __register_atfork.
9627 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9629         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9630         instead of ASSEMBLER test macro.
9632         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9633         __libc_current_sigrtmax): Add libc_hidden_def.
9635         * sysdeps/pthread/list.h: Remove assert.h include.
9637 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9639         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9640         __pthread_initialize_minimal_internal not
9641         __pthread_initialize_minimal.
9643 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9645         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9646         __pthread_initialize_minimal as hidden.
9648         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9649         constructor.
9651 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9653         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9654         $(common-objpfx)format.lds, include that into the output script.
9655         Fix comment.
9656         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9658 2002-12-28  Andreas Jaeger  <aj@suse.de>
9660         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9661         nsec resolution changes.
9662         (xstat64_conv): Likewise.
9663         (xstat32_conv): Likewise.
9664         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9665         struct kernel_stat.
9666         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9667         structs stat and stat64.
9668         * time/time.h (__timespec_defined): Define for __USE_MISC.
9669         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9671 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9673         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9674         argument.
9675         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9676         (pthread_exit): Use strong_alias to avoid warnings.
9677         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9678         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9679         ptr___pthread_attr_init_2_*.
9680         * init.c (pthread_functions): Adjust.
9682 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9684         * forward.c: Make all functions available by default again.  It
9685         caused too much trouble.
9687         * pt-siglongjmp.c: Removed.
9689 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9691         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9692         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9693         * sysdeps/i386/Makefile: New file.
9694         * sysdeps/i386/tcb-offsets.sym: New file.
9695         * sysdeps/pthread/tcb-offsets.h: New file.
9696         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9697         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9699         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9700         __register_atfork...
9701         (GLIBC_2.3.2): ...here.
9703 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9705         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9706         pthread_attr_setstackaddr with __attribute_deprecated__.
9708 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9710         * pt-system.c (system): Remove cancellation handling.
9711         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9712         cancellation routines.
9714 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9716         * descr.h: Include <dl-sysdep.h>.
9717         (struct pthread): Move header.data.list to the back of the struct.
9718         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9719         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9720         (SYSINFO_OFFSEET): Likewise.
9722 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9724         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9725         Define.
9726         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9727         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9728         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9729         (USE_DL_SYSINFO): Undef.
9731 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9733         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9734         $(common-objpfx)libc.so.
9735         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9736         it is bigger than pipe buffer size even on arches with bigger
9737         page size.
9738         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9740 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9742         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9743         correct errno access for case that USE___THREAD is not defined.
9745 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9747         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9748         Patch by Marijn Ros <marijn@mad.scientist.com>.
9750 2002-12-22  Roland McGrath  <roland@redhat.com>
9752         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9754 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9756         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9758 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9760         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9761         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9762         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9764         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9765         of int $0x80.
9766         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9767         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9768         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9769         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9770         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9771         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9772         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9773         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9775         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9776         sysenter.
9777         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9779         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9781         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9782         in new TCB.
9783         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9784         that sysinfo is properly initialized.
9785         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9786         to 1 only for ld.so.
9788         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9789         RTLD_CORRECT_DYNAMIC_WEAK.
9791 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9793         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9794         Use return 0 as 6th argument to FORWARD4.
9795         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9797 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9799         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9800         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9801         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9802         (INIT_SYSINFO): New #define.
9803         (TLS_TP_INIT): Use INIT_SYSINFO.
9804         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9805         At test to make sure SYSINFO_OFFSET value is correct.
9806         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9808 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9810         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9811         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9812         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9813         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9814         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9815         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9816         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9818 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9820         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9821         macro instead of using int $0x80 directly.
9823         * sysdeps/pthread/bits/stdio-lock.h: New file.
9824         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9825         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9826         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9827         * Makefile (routines): Add libc-lowlevelmutex.
9829         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9830         __i686.get_pc_thunk.dx.
9832 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9834         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9835         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9836         ($(objpfx)tst-cancel-wrappers.out): New rule.
9837         * tst-cancel-wrappers.sh: New test.
9838         * tst-locale1.c: Include signal.h.
9839         (uselocale): Test static linking of __libc_current_sigrt*.
9841 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9843         * Makefile (tests): Add tst-cancel6.
9844         * tst-cancel6.c: New file
9846 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9848         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9849         Define meaningfully for assembler as well.
9850         * pthreadP.h (struct pthread_functions): Remove
9851         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9852         and ptr_pthread_attr_init_2_1 fields.
9853         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9854         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9855         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9856         (FORWARD3): Define using FORWARD4.
9857         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9858         versions.
9859         * pt-system.c: Remove duplicate stdlib.h include.
9861 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9863         * sem_init.c: Define sem_init@GLIBC_2.0.
9864         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9865         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9867         * flockfile.c: Moved to...
9868         * sysdeps/pthread/flockfile.c: ...here.  New file.
9869         * funlockfile.c: Moved to...
9870         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9871         * ftrylockfile.c: Moved to...
9872         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9874 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9876         * libc-cancellation.c: Guard both function with
9877         #if !defined NOT_IN_libc.
9878         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9879         automatically provided pthread wrappers.
9880         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9881         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9882         nor in libpthread.
9883         * pt-open.c: Removed.
9884         * pt-fcntl.c: Removed.
9885         * pt-fsync.c: Removed.
9886         * pt-lseek.c: Removed.
9887         * pt-msgrcv.c: Removed.
9888         * pt-msgsnd.c: Removed.
9889         * pt-msync.c: Removed.
9890         * pt-nanosleep.c: Removed.
9891         * pt-open64.c: Removed.
9892         * pt-pause.c: Removed.
9893         * pt-pread.c: Removed.
9894         * pt-pread64.c: Removed.
9895         * pt-pwrite.c: Removed.
9896         * pt-pwrite64.c: Removed.
9897         * pt-read.c: Removed.
9898         * pt-recv.c: Removed.
9899         * pt-recvfrom.c: Removed.
9900         * pt-recvmsg.c: Removed.
9901         * pt-send.c: Removed.
9902         * pt-sendto.c: Removed.
9903         * pt-sigtimedwait.c: Removed.
9904         * pt-sigwait.c: Removed.
9905         * pt-wait.c: Removed.
9906         * pt-waitpid.c: Removed.
9907         * pt-write.c: Removed.
9908         * pt-accept.c: Removed.
9909         * pt-close.c: Removed.
9910         * pt-connect.c: Removed.
9911         * pt-lseek64.c: Removed.
9912         * pt-sendmsg.c: Removed.
9913         * pt-tcdrain.c: Removed.
9915 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9917         * init.c (__pthread_initialize_minimal_internal): Renamed from
9918         __pthread_initialize_minimal.  Make old name an alias.  This
9919         converts a normal relocation into a relative relocation.
9921         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9923         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9924         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9925         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9926         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9927         pt-sigwaitinfo, pt-waitid, and pt-writev.
9928         * pt-creat.c: Removed.
9929         * pt-poll.c: Removed.
9930         * pt-pselect.c: Removed.
9931         * pt-readv.c: Removed.
9932         * pt-select.c: Removed.
9933         * pt-sigpause.c: Removed.
9934         * pt-sigsuspend.c: Removed.
9935         * pt-sigwaitinfo.c: Removed.
9936         * pt-waitid.c: Removed.
9937         * pt-writev.c: Removed.
9939         * init.c (pthread_functions): New variable.
9940         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9941         (or NULL) to __libc_pthread_init.
9942         * forward.c: Rewrite to use __libc:pthread_functions array to get
9943         function addresses.
9944         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9945         prototype.
9946         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9947         Take new parameter.  Copy content of variable pointed to by it
9948         to __libc_pthread_init.
9950         * pthreadP.h (struct pthread_functions): New type.
9951         (__libc_pthread_init): Declare.
9953         * pthread_attr_destroy.c: Add namespace protected alias.
9954         * pthread_attr_getdetachstate.c: Likewise.
9955         * pthread_attr_getinheritsched.c: Likewise.
9956         * pthread_attr_getschedparam.c: Likewise.
9957         * pthread_attr_getschedpolicy.c: Likewise.
9958         * pthread_attr_getscope.c: Likewise.
9959         * pthread_attr_setdetachstate.c: Likewise.
9960         * pthread_attr_setinheritsched.c: Likewise.
9961         * pthread_attr_setschedparam.c: Likewise.
9962         * pthread_attr_setschedpolicy.c: Likewise.
9963         * pthread_attr_setscope.c: Likewise.
9964         * pthread_cond_broadcast.c: Likewise.
9965         * pthread_cond_destroy.c: Likewise.
9966         * pthread_cond_init.c: Likewise.
9967         * pthread_cond_signal.c: Likewise.
9968         * pthread_cond_wait.c: Likewise.
9969         * pthread_condattr_destroy.c: Likewise.
9970         * pthread_condattr_init.c: Likewise.
9971         * pthread_equal.c: Likewise.
9972         * pthread_exit.c: Likewise.
9973         * pthread_getschedparam.c: Likewise.
9974         * pthread_self.c: Likewise.
9975         * pthread_setcancelstate.c: Likewise.
9976         * pthread_setschedparam.c: Likewise.
9977         * pthread_mutex_destroy.c: Likewise.
9978         * pthread_mutex_init.c: Likewise.
9979         * pthreadP.h: Add prototypes for the aliases.
9981         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9982         multiple_threads member in correct TCB to 1.
9984         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9985         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9986         member of thread decriptor, otherwise return unconditionally 1.
9988 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9990         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9991         regular Linux version.  Remove file.
9992         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9993         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9994         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9995         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9996         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9997         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9998         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9999         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
10000         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
10001         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
10002         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
10003         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
10004         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
10005         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
10006         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
10007         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
10008         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
10009         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
10010         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
10011         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
10012         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
10013         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
10014         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
10015         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
10016         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
10017         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
10018         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
10019         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
10020         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
10021         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
10023 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10025         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
10026         * sysdeps/unix/sysv/linux/open.c: Removed.
10027         * sysdeps/unix/sysv/linux/fsync.c: Removed.
10028         * sysdeps/unix/sysv/linux/lseek.c: Removed.
10029         * sysdeps/unix/sysv/linux/msync.c: Removed.
10030         * sysdeps/unix/sysv/linux/read.c: Removed.
10031         * sysdeps/unix/sysv/linux/close.c: Removed.
10032         * sysdeps/unix/sysv/linux/creat.c: Removed.
10033         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
10034         * sysdeps/unix/sysv/linux/pause.c: Removed.
10035         * sysdeps/unix/sysv/linux/select.c: Removed.
10036         * sysdeps/unix/sysv/linux/write.c: Removed.
10038 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
10040         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
10041         element in TCB to see whether locking is needed.
10043         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
10044         MULTIPLE_THREADS_OFFSET value is correct.
10046         * sysdeps/unix/sysv/linux/close.c: New file.
10047         * sysdeps/unix/sysv/linux/connect.S: New file.
10048         * sysdeps/unix/sysv/linux/creat.c: New file.
10049         * sysdeps/unix/sysv/linux/fsync.c: New file.
10050         * sysdeps/unix/sysv/linux/llseek.c: New file.
10051         * sysdeps/unix/sysv/linux/lseek.c: New file.
10052         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10053         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10054         * sysdeps/unix/sysv/linux/msync.c: New file.
10055         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10056         * sysdeps/unix/sysv/linux/open.c: New file.
10057         * sysdeps/unix/sysv/linux/open64.c: New file.
10058         * sysdeps/unix/sysv/linux/pause.c: New file.
10059         * sysdeps/unix/sysv/linux/poll.c: New file.
10060         * sysdeps/unix/sysv/linux/pread.c: New file.
10061         * sysdeps/unix/sysv/linux/pread64.c: New file.
10062         * sysdeps/unix/sysv/linux/pselect.c: New file.
10063         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10064         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10065         * sysdeps/unix/sysv/linux/readv.c: New file.
10066         * sysdeps/unix/sysv/linux/recv.S: New file.
10067         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10068         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10069         * sysdeps/unix/sysv/linux/select.c: New file.
10070         * sysdeps/unix/sysv/linux/send.S: New file.
10071         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10072         * sysdeps/unix/sysv/linux/sendto.S: New file.
10073         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10074         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10075         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10076         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10077         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10078         * sysdeps/unix/sysv/linux/system.c: New file.
10079         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10080         * sysdeps/unix/sysv/linux/wait.c: New file.
10081         * sysdeps/unix/sysv/linux/waitid.c: New file.
10082         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10083         * sysdeps/unix/sysv/linux/writev.c: New file.
10084         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10086         * pt-readv.c: Fix comment.
10088 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10090         * tst-cleanup1.c: Include stdlib.h.
10092         * tst-cancel5.c: New test.
10093         * Makefile (tests): Add tst-cancel5.
10094         (tst-cancel5): Link against libc.so libpthread.so in that order.
10096 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10098         * forward.c (test_loaded): Prevent recursive calls.
10100         * Makefile (routines): Add libc-cancellation.
10101         * libc-cancellation.c: New file.
10102         * descr.h (struct pthread): Add multiple_threads field.
10103         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10104         new thread descriptor to 1.
10105         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10106         Initialize multiple_thread field after successful thread creation.
10107         * cancellation.c (__do_cancel): Move to pthreadP.h.
10108         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10109         (__pthread_disable_asynccancel): Add internal_function attribute.
10110         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10111         * pthread_setcancelstate.c: Likewise.
10112         * pthread_setcanceltype.c: Likewise.
10113         * pthread_exit.c: Likewise.
10114         * pthreadP.h (CANCELLATION_P): Likewise.
10115         (__do_cancel): Define as static inline.
10116         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10117         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10118         declarations.
10119         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10120         fields.  Define MULTIPLE_THREADS_OFFSET.
10121         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10122         declaration.
10123         * sysdeps/unix/sysv/linux/accept.S: New file.
10124         * sysdeps/unix/sysv/linux/read.c: New file.
10125         * sysdeps/unix/sysv/linux/write.c: New file.
10126         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10127         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10128         initialization of __libc_locking_needed.
10129         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10130         __libc_locking_needed, use multiple_threads field in TCB.
10131         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10133 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10135         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10136         version.
10137         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10139         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10140         access to __libc_locking_needed for PIC.
10142 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10144         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10145         declare for libc.so.
10146         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10147         expression.
10148         (__libc_lock_lock): Put into statement expression.
10149         (__libc_lock_unlock): Remove trailing semicolon.
10150         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10152 2002-12-12  Roland McGrath  <roland@redhat.com>
10154         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10155         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10157 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10159         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10160         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10161         Initialize __libc_locking_needed.
10162         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10163         instead of __register_pthread_fork_handler.
10164         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10165         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10166         fork-gen with libc_pthread_init.
10167         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10168         of __register_pthread_fork_handler.
10169         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10170         of __register_pthread_fork_handler.
10171         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10172         __libc_locking_needed to determine whether lock prefix can be avoided.
10173         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10175 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10177         * Makefile (tests): Add tst-cleanup1.
10178         * tst-cleanup1.c: New file.
10179         * cancellation.c (__cleanup_thread): Removed.
10180         (__do_cancel): Remove call to __cleanup_thread.
10181         * pthreadP.h: Remove __cleanup_thread prorotype.
10183         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10184         Remember function and argument even if cancellation handler
10185         function is not available.
10186         (__libc_cleanup_region_end): Execute registered function directly if
10187         pthread functions are not available.
10188         (__libc_cleanup_end): Likewise.
10190         * init.c (__pthread_initialize_minimal): Fix initialization in
10191         static lib by preventing gcc from being too clever.
10193 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10195         * init.c (__pthread_initialize_minimal): Remove unneccesary
10196         sigaddset call.
10198         * Makefile (tests): We can run tst-locale2 now.
10200 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10202         * Versions: Remove duplicated sigwait entry.
10204 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10206         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10207         inside libpthread.
10209         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10211         * pthreadP.h: Declare __pthread_enable_asynccancel and
10212         __pthread_disable_asynccancel.
10213         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10214         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10215         * cancellation.c (__pthread_enable_asynccancel): New function.
10216         (__pthread_disable_asynccancel): New function.
10217         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10218         * pt-close.c: Likewise.
10219         * pt-connect.c: Likewise.
10220         * pt-creat.c: Likewise.
10221         * pt-fcntl.c: Likewise.
10222         * pt-fsync.c: Likewise.
10223         * pt-lseek.c: Likewise.
10224         * pt-lseek64.c: Likewise.
10225         * pt-msgrcv.c: Likewise.
10226         * pt-msgsnd.c: Likewise.
10227         * pt-msync.c: Likewise.
10228         * pt-nanosleep.c: Likewise.
10229         * pt-open.c: Likewise.
10230         * pt-open64.c: Likewise.
10231         * pt-pause.c: Likewise.
10232         * pt-poll.c: Likewise.
10233         * pt-pread.c: Likewise.
10234         * pt-pread64.c: Likewise.
10235         * pt-pselect.c: Likewise.
10236         * pt-pwrite.c: Likewise.
10237         * pt-pwrite64.c: Likewise.
10238         * pt-read.c: Likewise.
10239         * pt-readv.c: Likewise.
10240         * pt-recv.c: Likewise.
10241         * pt-recvfrom.c: Likewise.
10242         * pt-recvmsg.c: Likewise.
10243         * pt-select.c: Likewise.
10244         * pt-send.c: Likewise.
10245         * pt-sendmsg.c: Likewise.
10246         * pt-sendto.c: Likewise.
10247         * pt-sigpause.c: Likewise.
10248         * pt-sigsuspend.c: Likewise.
10249         * pt-sigtimedwait.c: Likewise.
10250         * pt-sigwait.c: Likewise.
10251         * pt-sigwaitinfo.c: Likewise.
10252         * pt-system.c: Likewise.
10253         * pt-tcdrain.c: Likewise.
10254         * pt-wait.c: Likewise.
10255         * pt-waitid.c: Likewise.
10256         * pt-waitpid.c: Likewise.
10257         * pt-write.c: Likewise.
10258         * pt-writev.c: Likewise.
10259         * pthread_join.c: Likewise.
10260         * pthread_timedjoin.c: Likewise.
10262         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10263         (__xpg_sigpause): New function.
10264         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10266 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10268         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10270         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10271         _GI_pthread_cleanup_pop to pthreadP.h.
10273         * ftrylockfile.c: Use _IO_lock_trylock instead of
10274         pthread_mutex_trylock.
10276         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10277         (CANCEL_RESET): Likewise.
10278         (__pthread_setcanceltype_): Declare.
10279         (__pthread_mutex_lock_internal): Declare.
10280         (__pthread_mutex_unlock_internal): Declare.
10281         (__pthread_once_internal): Declare.
10282         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10283         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10285         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10286         and pthread_mutex_unlock.
10287         * pthread_cond_wait.c: Likewise.
10288         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10289         * pthread_mutex_unlock.c: Likewise.
10291         * pthread_setcanceltype.c: Add additional alias
10292         __pthread_setcanceltype.
10294         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10295         * sem_open.c (sem_open): Likewise.
10296         Use __libc_open, __libc_write, and __libc_close instead of
10297         open, write, and close respectively.
10299         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10300         Rewrite as statement expression since it must return a value.
10302         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10303         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10304         __pthread_kill.
10306         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10307         alias __pthread_once_internal.
10309         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10311 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10313         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10314         * tst-stdio1.c: New file.
10315         * tst-stdio2.c: New file.
10317         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10319         * Makefile (tests): Comment out tst-locale2 for now.
10320         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10322         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10323         -D_IO_MTSAFE_IO.
10324         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10325         Use _IO_lock_init instead of explicit assignment.
10327         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10328         Define __libc_lock_* and __libc_lock_recursive macros with
10329         lowlevellock macros, not pthread mutexes.
10331         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10332         of pthread_mutex_lock.
10333         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10334         instead of pthread_mutex_unlock.
10336 2002-12-06  Roland McGrath  <roland@redhat.com>
10338         * allocatestack.c (__stack_user): Use uninitialized defn.
10339         * init.c (__pthread_initialize_minimal): Initialize it here.
10341 2002-12-05  Roland McGrath  <roland@redhat.com>
10343         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10344         string.
10345         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10347         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10348         missing & here too.
10350 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10352         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10353         lowlevellock.
10354         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10355         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10356         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10357         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10358         for __libc_lock_* macros.
10359         * Makefile (routines): Add libc-lowlevellock.
10361 2002-10-09  Roland McGrath  <roland@redhat.com>
10363         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10364         Under [__PIC__], call the function via the pointer fetched for
10365         comparison rather than a call by name that uses the PLT.
10366         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10367         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10368         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10369         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10370         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10372 2002-12-04  Roland McGrath  <roland@redhat.com>
10374         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10376         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10377         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10379         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10381 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10383         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10384         a completely opaque, non-integer type.
10385         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10387 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10389         * sysdeps/i386/tls.h: Include stdlib.h.
10390         * sysdeps/x86_64/tls.h: Likewise.
10392 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10394         * Makefile (tests): Add tst-locale2.
10395         (tests-static): Likewise.
10396         * tst-locale2.c: New file.
10398         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10399         volatile and add memory clobbers to lock operations.
10401 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10403         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10404         * sysdeps/i386/i486/bits/atomic.h: New file.
10405         * sysdeps/i386/i586/bits/atomic.h: New file.
10406         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10407         include i486 version.
10408         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10409         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10410         Patch by Marijn Ros <marijn@mad.scientist.com>.
10412         * allocatestack.c (get_cached_stack): Don't crash if we first
10413         found a stack with a larger size then needed.
10414         Reported by Hui Huang <hui.huang@sun.com>.
10416         * Makefile (tests): Add tst-sysconf.
10417         * tst-sysconf.c: New file.
10419         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10420         PTHREAD_THREADS_MAX.
10422 2002-12-02  Roland McGrath  <roland@redhat.com>
10424         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10425         Declare using hidden_proto instead of attribute_hidden, so there are
10426         non-.hidden static symbols for gdb to find.
10427         (__pthread_keys): Likewise.
10428         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10429         * allocatestack.c (__stack_user): Likewise.
10430         * pthread_create.c (__pthread_keys): Likewise.
10431         (__nptl_threads_events, __nptl_last_event): Make these static instead
10432         of hidden.
10433         * pthread_key_create.c (__pthread_pthread_keys_max,
10434         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10436 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10438         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10439         statically.
10440         * tst-locale1.c: New file.
10442         * pthread_cond_timedwait.c: Include <stdlib.h>.
10444         * Makefile (tests): Add tst-fork2 and tst-fork3.
10445         * tst-fork2.c: New file.
10446         * tst-fork3.c: New file.
10448 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10450         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10452         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10453         require it to 200112L.
10455         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10456         instruction only if HAVE_CMOV is defined.
10457         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10459         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10461         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10463         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10465         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10467 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10469         * sysdeps/x86_64/bits/atomic.h: New file.
10471         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10472         16-bit operations.
10474         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10475         possible since gettid cannot fail.
10477         * sysdeps/x86_64/pthreaddef.h: New file.
10479         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10481         * sysdeps/x86_64/pthread_spin_init.c: New file.
10482         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10483         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10484         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10486         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10487         Add missing lock prefix.  Minute optimization.
10489         * tst-spin2.c (main): Also check successful trylock call.
10491         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10492         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10494         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10495         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10497         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10498         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10499         value in case of an error.  Add support for INTERNAL_SYSCALL.
10501         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10502         value in case of an error.
10504         * sysdeps/x86_64/tls.h: New file.
10506 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10508         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10509         takes the array member name and the index as parameters.
10510         (THREAD_SETMEM_NC): Likewise.
10511         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10512         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10513         interfaces.
10515         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10516         to decide which code to use.
10517         (THREAD_SETMEM_NC): Likewise.
10519         * allocatestack.c (queue_stack): Don't remove stack from list here.
10520         Do it in the caller.  Correct condition to prematurely terminate
10521         loop to free stacks.
10522         (__deallocate_stack): Remove stack from list here.
10524 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10526         * Makefile (tests): Add tst-stack1.
10527         * tst-stack1.c: New file.
10529         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10530         provided stack.
10532         * pthread_attr_getstack.c: Return bottom of the thread area.
10534 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10536         * Makefile (libpthread-routines): Add pt-allocrtsig and
10537         pthread_kill_other_threads.
10538         * pt-allocrtsig.c: New file.
10539         * pthread_kill_other_threads.c: New file.
10540         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10541         all three functions.
10542         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10543         allocrtsig.
10544         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10545         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10546         and __libc_allocate_rtsig_private.
10547         * Versions (libpthread): Export pthread_kill_other_threads_np,
10548         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10550 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10552         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10553         the end of the stack.  Adjust computations.
10554         When mprotect call fails dequeue stack and free it.
10555         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10556         attribute.
10557         * pthread_getattr_np.c: Likewise.
10559         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10560         surprises.
10562 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10564         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10565         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10567 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10569         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10570         * pthread_setspecific.c: Likewise.
10572 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10574         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10575         definitions.  Get them from the official place.
10576         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10578         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10579         Use new CLONE_ flags in clone() calls.
10581         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10582         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10584         * Versions: Add pthread_* functions for libc.
10585         * forward.c: New file.
10587         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10588         errno-loc.
10589         * herrno.c: New file.
10590         * res.c: New file.
10592         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10593         sem_trywait, and sem_timedwait.  Add herrno and res.
10594         * sem_init.c: Don't initialize lock and waiters members.
10595         * sem_open.c: Likewise.
10596         * sem_post.c: Removed.
10597         * sem_wait.c: Removed.
10598         * sem_trywait.c: Removed.
10599         * sem_timedwait.c: Removed.
10600         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10601         Includes full implementations of sem_post, sem_wait, sem_trywait,
10602         and sem_timedwait.
10603         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10604         for new implementation.
10605         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10606         and waiters fields.
10608         * tst-sem3.c: Improve error message.
10609         * tst-signal3.c: Likewise.
10611         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10612         to tell the kernel about the termination futex and to initialize tid
10613         member.  Don't initialize main_thread.
10614         * descr.h (struct pthread): Remove main_thread member.
10615         * cancelllation.c (__do_cancel): Remove code handling main thread.
10616         The main thread is not special anymore.
10618         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10619         size of the stacks to stack_cache_actsize.
10621         * pt-readv.c: Add missing "defined".
10622         * pt-sigwait.c: Likewise.
10623         * pt-writev.c: Likewise.
10625 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10627         * Versions: Export __connect from libpthread.
10628         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10630         * Makefile (libpthread-routines): Add pt-raise.
10631         * sysdeps/unix/sysv/linux/raise.c: New file.
10632         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10633         * sysdeps/generic/pt-raise.c: New file.
10635         * pthread_cond_init.c: Initialize all data elements of the condvar
10636         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10638         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10639         * pthread_create.c: Likewise.
10641         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10642         * tst-key1.c: New file.
10643         * tst-key2.c: New file.
10644         * tst-key3.c: New file.
10646         * Versions: Export pthread_detach for version GLIBC_2.0.
10647         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10649 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10651         * pthread_key_create.c: Terminate search after an unused key was found.
10652         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10654         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10655         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10657 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10659         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10660         dynamic lookup for errno in PIC.
10662         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10663         release the stack lock as soon as possible.
10664         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10665         the static TLS block.
10666         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10668         * cancellation.c: Renamed from cancelation.c.
10669         * Makefile: Adjust accordingly.
10670         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10671         * cleanup_defer.c: Use CANCELLATION_P.
10672         * pthread_testcancel.c: Likewise.
10673         * descr.h: Fix spelling in comments.
10674         * init.c: Likewise.
10675         * pthread_getattr_np.c: Likewise.
10676         * pthread_getschedparam.c: Likewise.
10677         * pthread_setschedparam.c: Likewise.
10678         * Versions: Likewise.
10680         * pt-pselect.c: New file.
10681         * Makefile (libpthread-routines): Add pt-pselect.
10682         * Versions: Add pselect.
10684         * tst-cancel4.c: New file.
10685         * Makefile (tests): Add tst-cancel4.
10687 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10689         * pthread_mutex_lock.c: Always record lock ownership.
10690         * pthread_mutex_timedlock.c: Likewise.
10691         * pthread_mutex_trylock.c: Likewise.
10693         * pt-readv.c: New file.
10694         * pt-writev.c: New file.
10695         * pt-creat.c: New file.
10696         * pt-msgrcv.c: New file.
10697         * pt-msgsnd.c: New file.
10698         * pt-poll.c: New file.
10699         * pt-select.c: New file.
10700         * pt-sigpause.c: New file.
10701         * pt-sigsuspend.c: New file.
10702         * pt-sigwait.c: New file.
10703         * pt-sigwaitinfo.c: New file.
10704         * pt-waitid.c: New file.
10705         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10706         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10707         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10708         * Versions: Add all the new functions.
10710         * tst-exit1.c: New file.
10711         * Makefile (tests): Add tst-exit1.
10713         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10715 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10717         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10719         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10720         call.  pthread_join is an official cancellation point.
10721         * pthread_timedjoin.c: Likewise.
10723         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10724         and the condvar's mutex are retrieved.
10725         * pthread_cond_timedwait.c: Likewise.
10726         Reported by dice@saros.East.Sun.COM.
10728 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10730         * pthreadP.h: Cut out all type definitions and move them...
10731         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10732         * pthreadP.h: Include <internaltypes.h>.
10734         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10735         performance tweaks.
10737         * sem_trywait.c: Shuffle #includes around to get right order.
10738         * sem_timedwait.c: Likewise.
10739         * sem_post.c: Likewise.
10740         * sem_wait.c: Likewise.
10742         * nptl 0.3 released.
10744         * Makefile (tests): Add tst-signal3.
10745         * tst-signal3.c: New file.
10747 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10749         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10750         the asms modify the sem object.
10751         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10753         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10754         the actual members.
10755         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10756         * semaphoreP.h: Include pthreadP.h.
10757         * sem_getvalue.c: Adjust to sem_t change.
10758         * sem_init.c: Likewise.
10759         * sem_open.c: Likewise.
10760         * sem_post.c: Likewise.
10761         * sem_timedwait.c: Likewise.
10762         * sem_trywait.c: Likewise.
10763         * sem_wait.c: Likewise.
10765 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10767         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10768         * tst-basic2.c: New file.
10769         * tst-exec1.c: New file.
10770         * tst-exec2.c: New file.
10771         * tst-exec3.c: New file.
10773         * tst-fork1.c: Remove extra */.
10775         * nptl 0.2 released.  The API for IA-32 is complete.