* sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
[glibc.git] / nptl / ChangeLog
blob5091c8393f763c45d10d8c9d538748a969a28d49
1 2009-04-26  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
4         Avoid warning by using may_alias attribute on ptrhack.
6 2009-04-22  Ulrich Drepper  <drepper@redhat.com>
8         [BZ #10090]
9         * pthread_attr_setschedparam.c (__pthread_attr_setschedparam):
10         Check policy and priority for validity.
11         Patch mostly by Zhang Xiliang <zhangxiliang@cn.fujitsu.com>.
13 2009-03-15  Ulrich Drepper  <drepper@redhat.com>
15         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
16         (__pthread_cond_timedwait): Change to use cfi directives instead of
17         hand-coded unwind sections.
19 2009-03-10  Ulrich Drepper  <drepper@redhat.com>
21         * init.c (nptl_freeres): Compile only for SHARED.
23 2009-03-09  Jakub Jelinek  <jakub@redhat.com>
25         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Define
26         FUTEX_WAIT_BITSET, FUTEX_WAKE_BITSET, FUTEX_CLOCK_REALTIME and
27         FUTEX_BITSET_MATCH_ANY.
29 2009-02-27  Roland McGrath  <roland@redhat.com>
31         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
32         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
34 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
36         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
37         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
38         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
39         200112L to 200809L.
41 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
43         * sysdeps/pthread/pthread.h: The robust mutex functions are in
44         POSIX 2008.
46 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
48         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
49         Unify name of include protector macro.
51 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
53         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
54         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
56 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
58         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
59         pointer variables.
61         * allocatestack.c (__free_stacks): Renamed from free_stacks.
62         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
63         * init.c (nptl_freeres): New function.
64         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
65         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
66         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
67         variable.
68         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
69         load DSO.  Assign last.
70         (__unwind_freeres): New function.
72         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
73         for better debugging.  No need to use stack_list_add here.
75 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
77         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
78         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
79         instead of computing relative timeout.
80         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
81         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
83 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
85         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
87 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
89         * sysdeps/pthread/list.h (list_add): Initialize new element first.
90         (list_add_tail): Removed.
92 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
94         * init.c (__pthread_initialize_minimal_internal): Optimize test
95         FUTEX_CLOCK_REALTIME a bit.
97 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
99         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
100         only passing five parameters to FUTEX_WAIT_BITSET call.
102         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
103         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
104         instead of computing relative timeout.
106 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
108         * init.c (__pthread_initialize_minimal_internal): Check for
109         FUTEX_CLOCK_REALTIME flag.
110         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
111         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
112         relative timeout.
114         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
115         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
116         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
117         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
118         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
119         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
121 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
123         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
124         loop body instead of ; to avoid gcc warnings.
125         (pthread_cleanup_pop_restore_np): Likewise.
126         Patch by Caolán McNamara <caolanm@redhat.com>.
128 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
130         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
131         fast path here, for robust/PI/PP mutexes call
132         __pthread_mutex_lock_full.  Don't use switch, instead use a series
133         of ifs according to their probability.
134         (__pthread_mutex_lock_full): New function.
135         * pthread_mutex_unlock.c: Include assert.h.
136         (__pthread_mutex_unlock_usercnt): Handle only the
137         fast path here, for robust/PI/PP mutexes call
138         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
139         of ifs according to their probability.
140         (__pthread_mutex_unlock_full): New function.
141         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
142         (__pthread_mutex_lock_full): Define.
144 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
146         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
147         implementation.  Add necessary padding and.
148         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
149         words.
151 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
153         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
154         and FUTEX_WAKE_BITSET.
156 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
158         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
159         and FUTEX_WAKE_BITSET.
160         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
161         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
162         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
165 2008-11-25  Roland McGrath  <roland@redhat.com>
167         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
168         Subdirectories moved to ports repository as
169         sysdeps/.../nptl subdirectories.
171 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
173         [BZ #7008]
174         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
175         of old value.
176         * pthread_cond_init.c (__pthread_cond_init): Fix
177         cond->__data.__nwaiters initialization.
178         * Makefile (tests): Add tst-cond23.
179         * tst-cond23.c: New test.
181 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
183         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
184         arguments.
185         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
186         arguments.
188 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
190         [BZ #6955]
191         * pthread_mutex_lock.c: Add support for private PI mutexes.
192         * pthread_mutex_timedlock.c: Likewise.
193         * pthread_mutex_trylock.c: Likewise.
194         * pthread_mutex_unlock.c: Likewise.
195         Patch mostly by Ben Jackson <ben@ben.com>.
197 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
199         [BZ #6843]
200         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
201         Increase stack size for helper thread.
203 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
205         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
206         assembly with a clobber list for access registers a0 and a1.
208 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
210         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
211         to force runp->refcntr to be read from memory.
213 2008-09-08  Richard Guenther  <rguenther@suse.de>
215         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
216         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
217         lll_timedlock, lll_robust_timedlock, lll_unlock,
218         lll_robust_unlock): Promote private to int.
220 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
222         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
223         ARCH_RETRY_MMAP definitions.
224         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
225         Define MAP_STACK when not defined.
226         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
227         handling of ARCH_RETRY_MMAP.
229 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
231         * tst-align2.c (f): Print message that f is reached.
233 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
235         [BZ #6740]
236         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
237         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
239 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
241         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
242         SOCK_CLOEXEC if possible.
244 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
246         * Makefile (tests): Add tst-rwlock2a.
247         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
248         * tst-rwlock2a.c: New file.
250 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
252         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
254 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
256         * sysdeps/pthread/pthread.h: Fix typo in comment.
258 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
260         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
261         of CPU set to the kernel.
263 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
265         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
266         cfi directives.
267         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
268         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
270         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
271         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
272         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
274 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
276         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
277         cfi directives.
278         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
279         Likewise.
280         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
281         Likewise.
282         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
283         Likewise.
285 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
287         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
289 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
291         David S. Miller  <davem@davemloft.net>
293         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
295 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
297         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
298         __pshared correctly.
299         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
300         Likewise.
301         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
302         Likewise.
303         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
304         Likewise.
305         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
306         Likewise.
307         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
309 2008-04-14  David S. Miller  <davem@davemloft.net>
311         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
312         (__old_sem_wait): Fix argument to lll_futex_wait().
314 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
316         * pthread_create.c: Require pthread_mutex_trylock and
317         pthread_key_delete for libgcc.
319 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
321         [BZ #6020]
322         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
323         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
324         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
326 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
328         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
329         <linux/limits.h> has defined it.
330         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
331         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
332         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
333         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
335 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
337         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
338         of ASSEMBLER.
339         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
340         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
342 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
344         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
345         HAVE_DL_DISCOVER_OSVERSION.
346         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
347         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
349 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
351         [BZ #5778]
352         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
353         _POSIX_CHOWN_RESTRICTED value to zero.
355 2008-01-31  Roland McGrath  <roland@redhat.com>
357         * Makefile (omit-deps): Variable removed.
359 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
361         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
362         unnecessary addr32 prefix.
364 2008-01-29  Roland McGrath  <roland@redhat.com>
366         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
368 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
370         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
372 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
374         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
375         a scratch register.
376         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
377         (__lll_lock_wait_private): Fix typo.
378         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
379         (pthread_barrier_wait): Likewise.  Adjust XADD use.
380         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
381         Adjust XADD use.
382         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
383         (pthread_rwlock_timedrdlock): Return correct return value.
384         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
385         (pthread_rwlock_timedwrlock): Likewise.
387 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
389         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
390         thread returns the program exits with an error code.
392 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
394         * pthread-errnos.sym: Add EOVERFLOW.
395         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
396         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
397         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
398         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
400 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
402         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
403         parameter.  Passed it as permission to mmap.
404         * allocatestack.c (allocate_stack): Pass prot as second parameter
405         to ARCH_RETRY_MMAP.
407 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
409         * tst-basic7.c: Allocate memory for the stack.
411         [BZ #5465]
412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
413         (__pthread_cond_timedwait): Don't use VDSO.
414         Patch by Michal Januszewski.
416 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
418         [BZ #5455]
419         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
420         Allow label before pthread_cleanup_pop.
421         (pthread_cleanup_pop_restore_np): Likewise.
423 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
425         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
426         Store 2 before returning ETIMEDOUT.
428 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
430         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
431         Store 2 before returning ETIMEDOUT.
432         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
433         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
434         (__lll_lock_wait_private): Optimize.
435         (__lll_lock_wait): Likewise.
437 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
439         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
440         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
441         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
443 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
445         [BZ #5240]
446         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
447         If we time out, try one last time to lock the futex to avoid
448         losing a wakeup signal.
449         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
450         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
452         [BZ #5245]
453         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
454         if necessary.
456 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
458         [BZ #5245]
459         * allocatestack.c (allocate_stack): Change ENOMEM error in case
460         mmap failed to EAGAIN.
461         * Makefile (tests): Add tst-basic7.
462         * tst-basic7.c: New file.
464 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
466         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
467         Use __linkin_atfork.
469 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
471         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
472         missing line continuations.
473         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
474         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
476 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
478         [BZ #5220]
479         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
480         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
481         (struct timer): Add next element.
482         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
483         enqueue timer structure into __active_timer_sigev_thread list.
484         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
485         remove timer struct from __active_timer_sigev_thread.
486         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
487         Before using timer structure make sure it is still on the
488         __active_timer_sigev_thread list.  Keep lock until done.
489         Define __active_timer_sigev_thread and
490         __active_timer_sigev_thread_lock.
492 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
494         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
495         Redefine thread_atfork for use of ATFORK_MEM.
496         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
497         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
498         function.
499         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
500         Use atomic operation when removing first element of list.
502 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
504         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
505         routine instead of an alias to __new_sem_post.
507 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
509         * init.c (__pthread_initialize_minimal): Initialize word to appease
510         valgrind.
512 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
514         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
515         libc.so just clear NAME.
516         (__libc_rwlock_fini): Nop inside of libc.so.
517         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
518         all zeros.
520 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
523         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
524         unlocking failed.
525         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
527 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
529         [BZ #4938]
530         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
531         reclaimed stack if necessary.
532         * Makefile (tests): Add tst-tsd6.
533         * tst-tsd6.c: New file.
535 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
537         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
538         Add private argument.
540 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
542         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
543         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
545 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
547         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
548         (__lll_robust_timedlock): Pass private as last argument to
549         __lll_robust_timedlock_wait.
550         (__lll_unlock): Fix a pasto.
552 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
554         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
555         sparc_old_sem): New structs.
556         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
557         (__sem_wait_cleanup): New function.
558         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
559         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
560         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
561         lll_futex_wait.
562         (__old_sem_wait): New function.
563         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
564         nptl/sysdeps/unix/sysv/linux/sparc version.
565         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
566         Likewise.
567         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
568         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
569         (__new_sem_trywait): Use sparc_old_sem structure.
570         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
571         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
572         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
573         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
574         lll_futex_timed_wait.
575         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
576         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
577         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
578         lll_futex_wake.
579         (__old_sem_post): New function.
580         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
581         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
582         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
583         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
584         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
585         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
587 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
589         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
590         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
591         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
592         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
593         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
594         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
595         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
596         Use FUTEX_WAKE_OP.
597         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
598         kernel-features.h and tcb-offsets.h.
599         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
600         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
601         process private.
602         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
603         tcb-offsets.h.
604         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
605         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
606         process private.
607         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
608         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
610         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
612         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
615 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
617         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
618         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
619         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
620         lll_futex_timed_wait.
622         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
623         __lll_robust_unlock): Rewrite as macros instead of inline functions.
624         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
625         __lll_robust_unlock, __lll_wait_tid): Likewise.
627 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
629         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
630         Fix a pasto.
631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
632         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
633         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
634         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
636         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
637         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
639         kernel-features.h.
640         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
641         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
642         process private.  Switch DW_CFA_advance_loc1 and some
643         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
644         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
645         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
646         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
647         process private.  Switch DW_CFA_advance_loc{1,2} and some
648         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
649         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
650         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
651         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
652         Likewise.
653         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
654         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
656         Likewise.
657         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
658         (__pthread_cond_broadcast): Compare %r8 instead of
659         dep_mutex-cond_*(%rdi) with $-1.
660         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
661         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
662         of oring.
664 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
666         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
668 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
670         * allocatestack.c: Include kernel-features.h.
671         * pthread_create.c: Likewise.
672         * pthread_mutex_init.c: Likewise.
673         * init.c: Likewise.
674         * pthread_cond_timedwait.c: Likewise.
675         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
676         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
677         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
678         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
679         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
681         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
682         Likewise.
683         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
684         Likewise.
685         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
686         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
687         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
688         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
690 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
692         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
693         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
694         byte elements.  One of them is the new __shared element.
695         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
696         adjust names of other padding elements.
697         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
698         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
699         byte elements.  One of them is the new __shared element.
700         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
701         adjust names of other padding elements.
702         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
703         Renamed __pad1 element to __shared, adjust names of other padding
704         elements.
705         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
706         (pthread_rwlock_t): Likewise.
707         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
708         typo.
710 2007-08-09  Anton Blanchard  <anton@samba.org>
712         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
714 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
717         <kernel-features.h>.
718         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
720 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
722         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
723         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
724         dealing with robust mutexes.
725         * pthread_mutex_timedlock.c: Likewise.
726         * pthread_mutex_trylock.c: Likewise.
727         * pthread_mutex_unlock.c: Likewise.
728         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
730 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
732         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
733         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
734         (PTHREAD_MUTEX_PSHARED): Define.
735         * pthread_mutex_init.c (__pthread_mutex_init): Set
736         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
737         mutexes.
738         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
739         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
740         as second argument to lll_lock.
741         (LLL_MUTEX_TRYLOCK): Take mutex as argument
742         instead of its __data.__lock field.
743         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
744         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
745         to lll_robust_lock.
746         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
747         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
748         instead of mutex->__data.__kind directly, pass
749         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
750         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
751         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
752         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
753         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
754         to lll_timedlock, lll_robust_timedlock, lll_unlock and
755         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
756         of mutex->__data.__kind directly.
757         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
758         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
759         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
760         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
761         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
762         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
763         and lll_futex_wake.
764         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
765         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
766         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
767         directly.
768         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
769         Take mutex as argument instead of its __data.__lock field, pass
770         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
771         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
772         __data.__lock field.
773         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
774         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
775         to lll_robust_cond_lock.
776         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
777         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
778         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
779         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
780         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
781         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
782         lll_futex_wait.
783         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
784         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
785         lll_futex_wake.
786         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
787         pshared variable, pass it to lll_lock, lll_unlock,
788         lll_futex_timedwait and lll_futex_wake.
789         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
790         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
791         and lll_futex_wake.
792         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
793         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
794         macro.
795         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
796         lll_futex_wake_unlock): Likewise.
797         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
798         Likewise.
799         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
800         lll_futex_wake_unlock): Likewise.
801         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
802         Likewise.
803         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
804         lll_futex_wake_unlock): Likewise.
805         (lll_futex_wake): Fix a typo.
806         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
807         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
808         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
809         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
810         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
811         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
812         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
813         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
814         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
815         (__pthread_cond_timedwait): Likewise.
816         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
817         (__condvar_cleanup, __pthread_cond_wait): Likewise.
819 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
821         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
822         Don't use CGOTSETUP and CGOTRESTORE macros.
823         (CGOTSETUP, CGOTRESTORE): Remove.
824         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
825         @local symbol.
827 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
829         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
830         definitions for private futexes.
831         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
832         kernel-features.h and lowlevellock.h.  Use private futexes if
833         they are available.
834         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
835         (__lll_mutex_lock_wait): Rename to
836         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
837         (__lll_mutex_timedlock_wait): Rename to ...
838         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
839         Don't compile in for libc.so.
840         (__lll_mutex_unlock_wake): Rename to ...
841         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
842         (__lll_timedwait_tid): Use __NR_gettimeofday.
843         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
844         the header from assembler.  Renamed all lll_mutex_* resp.
845         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
846         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
847         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
848         Define.
849         (__lll_lock_wait_private): Add prototype.
850         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
851         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
852         __lll_unlock_wake): Likewise.
853         (lll_lock): Add private argument.  Call __lll_lock_wait_private
854         if private is constant LLL_PRIVATE.
855         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
856         lll_timedlock, lll_robust_timedlock): Add private argument.
857         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
858         if private is constant LLL_PRIVATE.
859         (lll_robust_unlock, lll_robust_dead): Add private argument.
860         (lll_lock_t): Remove.
861         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
862         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
863         lll_cond_wake, lll_cond_broadcast): Remove.
864         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
865         kernel-features.h and lowlevellock.h.
866         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
867         (LOAD_FUTEX_WAIT): Define.
868         (__lll_robust_mutex_lock_wait): Rename to ...
869         (__lll_robust_lock_wait): ... this.  Add private argument.
870         Use LOAD_FUTEX_WAIT macro.
871         (__lll_robust_mutex_timedlock_wait): Rename to ...
872         (__lll_robust_timedlock_wait): ... this.    Add private argument.
873         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
874         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
875         lowlevellock.h.
876         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
877         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
878         __lll_mutex_{lock,unlock}_*.
879         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
880         lowlevellock.h and pthread-errnos.h.
881         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
882         FUTEX_CMP_REQUEUE, EINVAL): Remove.
883         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
884         __lll_mutex_{lock,unlock}_*.
885         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
886         lowlevellock.h and pthread-errnos.h.
887         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
888         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
889         __lll_mutex_{lock,unlock}_*.
890         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
891         lowlevellock.h.
892         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
893         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
894         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
895         (__condvar_tw_cleanup): Likewise.
896         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
897         lowlevellock.h.
898         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
899         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
900         __lll_mutex_{lock,unlock}_*.
901         ( __condvar_w_cleanup): Likewise.
902         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
903         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
904         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
905         lowlevellock.h.
906         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
907         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
908         __lll_mutex_{lock,unlock}_*.
909         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
910         lowlevellock.h.
911         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
912         FUTEX_PRIVATE_FLAG): Remove.
913         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
914         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
915         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
916         lowlevellock.h.
917         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
918         FUTEX_PRIVATE_FLAG): Remove.
919         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
920         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
921         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
922         lowlevellock.h.
923         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
924         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
925         __lll_mutex_{lock,unlock}_*.
926         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
927         lowlevellock.h.
928         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
929         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
930         __lll_mutex_{lock,unlock}_*.
931         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
932         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
933         (__new_sem_post): Use standard initial exec code sequences.
934         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
935         lowlevellock.h.
936         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
937         FUTEX_PRIVATE_FLAG): Remove.
938         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
939         exec code sequences.
940         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
941         (__new_sem_trywait): Use standard initial exec code sequences.
942         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
943         (__new_sem_wait): Use standard initial exec code sequences.
945 2007-07-31  Anton Blanchard  <anton@samba.org>
947         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
948         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
949         atomic_full_barrier.
951 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
953         * allocatestack.c (stack_cache_lock): Change type to int.
954         (get_cached_stack, allocate_stack, __deallocate_stack,
955         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
956         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
957         as second argument to lll_lock and lll_unlock macros on
958         stack_cache_lock.
959         * pthread_create.c (__find_in_stack_list): Likewise.
960         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
961         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
962         as second argument.
963         * descr.h (struct pthread): Change lock and setxid_futex field
964         type to int.
965         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
966         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
967         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
968         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
969         Likewise.
970         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
971         * pthread_cond_init.c (__pthread_cond_init): Likewise.
972         * pthreadP.h (__attr_list_lock): Change type to int.
973         * pthread_attr_init.c (__attr_list_lock): Likewise.
974         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
975         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
976         lll_{,un}lock.
977         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
978         also for lll_futex_{wake,wait}.
979         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
980         a pointer to const.
981         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
982         LLL_SHARED as second argument to lll_{,un}lock.
983         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
984         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
985         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
986         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
987         Likewise.
988         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
989         as second argument to lll_{,un}lock macros on pd->lock.
990         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
991         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
992         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
993         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
994         Likewise.
995         * sysdeps/pthread/createthread.c (do_clone, create_thread):
996         Likewise.
997         * pthread_once.c (once_lock): Change type to int.
998         (__pthread_once): Pass LLL_PRIVATE as second argument to
999         lll_{,un}lock macros on once_lock.
1000         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
1001         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
1002         rwlock->__data.__shared as second argument to them and similarly
1003         for lll_futex_w*.
1004         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
1005         Likewise.
1006         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
1007         Likewise.
1008         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
1009         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
1010         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
1011         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1012         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
1013         to lll_{,un}lock macros on __sem_mappings_lock.
1014         * sem_open.c (check_add_mapping): Likewise.
1015         (__sem_mappings_lock): Change type to int.
1016         * semaphoreP.h (__sem_mappings_lock): Likewise.
1017         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
1018         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
1019         instead of lll_*mutex_*, pass LLL_SHARED as last
1020         argument.
1021         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
1022         pass LLL_SHARED as last argument.
1023         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
1024         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
1025         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
1026         pass LLL_SHARED as last argument.
1027         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1028         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1029         LLL_SHARED as last argument.
1030         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1031         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1032         Similarly.
1033         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1034         __libc_lock_lock_recursive, __libc_lock_unlock,
1035         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1036         argument to lll_{,un}lock.
1037         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1038         _IO_lock_unlock): Likewise.
1039         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1040         compound literal.
1041         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1042         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1043         __fork_lock.
1044         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1045         free_mem): Likewise.
1046         (__fork_lock): Change type to int.
1047         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1048         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1049         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1050         lll_futex_wake.
1051         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1052         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1053         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1054         New function.
1055         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1056         pass it through to lll_futex_*wait, only compile in when
1057         IS_IN_libpthread.
1058         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1059         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1060         argument and pass it through to lll_futex_*wait.
1061         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1062         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1063         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1064         inline functions to __lll_* resp. __lll_robust_*.
1065         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1066         (lll_mutex_dead): Add private argument.
1067         (__lll_lock_wait_private): New prototype.
1068         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1069         __lll_robust_lock_timedwait): Add private argument to prototypes.
1070         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1071         call __lll_lock_wait_private, otherwise pass private to
1072         __lll_lock_wait.
1073         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1074         __lll_robust_timedlock): Add private argument, pass it to
1075         __lll_*wait functions.
1076         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1077         call __lll_unlock_wake_private, otherwise pass private to
1078         __lll_unlock_wake.
1079         (__lll_robust_unlock): Add private argument, pass it to
1080         __lll_robust_unlock_wake.
1081         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1082         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1083         argument, pass it through to __lll_* inline function.
1084         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1085         (lll_lock_t): Remove.
1086         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1087         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1088         lll_cond_wake, lll_cond_broadcast): Remove.
1089         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1090         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1091         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1092         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1093         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1094         the header from assembler.  Renamed all lll_mutex_* resp.
1095         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1096         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1097         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1098         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1099         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1100         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1101         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1102         Remove prototype.
1103         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1104         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1105         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1106         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1107         MULTIPLE_THREADS_OFFSET as another asm operand.
1108         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1109         MULTIPLE_THREADS_OFFSET as last asm operand, call
1110         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1111         otherwise pass private as another argument to __lll_lock_wait.
1112         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1113         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1114         private as another argument to __lll_*lock_wait call.
1115         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1116         MULTIPLE_THREADS_OFFSET as another asm operand, call
1117         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1118         otherwise pass private as another argument to __lll_unlock_wake.
1119         (lll_robust_unlock): Add private argument, pass private as another
1120         argument to __lll_unlock_wake.
1121         (lll_robust_dead): Add private argument, use __lll_private_flag
1122         macro.
1123         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1124         LLL_MUTEX_LOCK_INITIALIZER.
1125         (lll_lock_t): Remove.
1126         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1127         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1128         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1129         lll_cond_wake, lll_cond_broadcast): Remove.
1130         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1131         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1132         2007-05-2{3,9} changes.
1133         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1134         kernel-features.h and lowlevellock.h.
1135         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1136         (LOAD_FUTEX_WAIT): Rewritten.
1137         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1138         define.
1139         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1140         (__lll_mutex_lock_wait): Rename to ...
1141         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1142         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1143         (__lll_mutex_timedlock_wait): Rename to ...
1144         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1145         contains private argument.  Don't compile in for libc.so.
1146         (__lll_mutex_unlock_wake): Rename to ...
1147         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1148         Don't compile in for libc.so.
1149         (__lll_timedwait_tid): Use __NR_gettimeofday.
1150         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1151         kernel-features.h and lowlevellock.h.
1152         (LOAD_FUTEX_WAIT): Define.
1153         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1154         define.
1155         (__lll_robust_mutex_lock_wait): Rename to ...
1156         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1157         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1158         macro.
1159         (__lll_robust_mutex_timedlock_wait): Rename to ...
1160         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1161         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1162         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1163         lowlevellock.h.
1164         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1165         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1166         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1167         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1168         to __lll_lock_wait in %edx.
1169         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1170         Include lowlevellock.h and pthread-errnos.h.
1171         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1172         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1173         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1174         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1175         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1176         __lll_unlock_wake.
1177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1178         Include lowlevellock.h and pthread-errnos.h.
1179         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1180         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1181         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1182         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1183         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1184         __lll_unlock_wake.
1185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1186         Include lowlevellock.h.
1187         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1188         Don't define.
1189         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1190         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1191         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1192         __lll_unlock_wake.  Use __NR_gettimeofday.
1193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1194         Include lowlevellock.h.
1195         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1196         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1197         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1198         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1199         and __lll_unlock_wake.
1200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1201         Include lowlevellock.h.
1202         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1203         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1204         MUTEX(%ebx) address in %edx rather than %ecx to
1205         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1206         and __lll_unlock_wake.  Move return value from %ecx to %edx
1207         register.
1208         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1209         Include lowlevellock.h.
1210         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1211         Don't define.
1212         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1213         MUTEX(%ebp) address in %edx rather than %ecx to
1214         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1215         and __lll_unlock_wake.  Move return value from %ecx to %edx
1216         register.  Use __NR_gettimeofday.
1217         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1218         Include lowlevellock.h.
1219         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1220         Don't define.
1221         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1222         MUTEX(%ebp) address in %edx rather than %ecx to
1223         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1224         and __lll_unlock_wake.  Move return value from %ecx to %edx
1225         register.  Use __NR_gettimeofday.
1226         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1227         Include lowlevellock.h.
1228         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1229         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1230         MUTEX(%edi) address in %edx rather than %ecx to
1231         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1232         and __lll_unlock_wake.
1233         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1234         Include lowlevellock.h.
1235         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1236         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1237         MUTEX(%ebx) address in %edx rather than %ecx to
1238         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1239         and __lll_unlock_wake.  Move return value from %ecx to %edx
1240         register.
1241         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1242         lowlevellock.h.
1243         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1244         define.
1245         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1246         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1247         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1248         lowlevellock.h.
1249         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1250         (sem_timedwait): Use __NR_gettimeofday.
1251         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1252         lowlevellock.h.
1253         (LOCK): Don't define.
1254         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1255         lowlevellock.h.
1256         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1257         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1258         are waiters.
1259         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1260         2007-05-2{3,9} changes.
1261         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1262         kernel-features.h and lowlevellock.h.
1263         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1264         (LOAD_FUTEX_WAIT): Rewritten.
1265         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1266         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1267         (__lll_mutex_lock_wait): Rename to ...
1268         (__lll_lock_wait): ... this.  %esi is now private argument.
1269         Don't compile in for libc.so.
1270         (__lll_mutex_timedlock_wait): Rename to ...
1271         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1272         Don't compile in for libc.so.
1273         (__lll_mutex_unlock_wake): Rename to ...
1274         (__lll_unlock_wake): ... this.  %esi contains private argument.
1275         Don't compile in for libc.so.
1276         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1277         kernel-features.h and lowlevellock.h.
1278         (LOAD_FUTEX_WAIT): Define.
1279         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1280         (__lll_robust_mutex_lock_wait): Rename to ...
1281         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1282         Use LOAD_FUTEX_WAIT macro.
1283         (__lll_robust_mutex_timedlock_wait): Rename to ...
1284         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1285         private, use LOAD_FUTEX_WAIT macro.
1286         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1287         lowlevellock.h.
1288         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1289         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1290         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1291         __lll_lock_wait and __lll_unlock_wake.
1292         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1293         Include lowlevellock.h and pthread-errnos.h.
1294         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1295         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1296         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1297         pass LLL_SHARED in %esi to both __lll_lock_wait and
1298         __lll_unlock_wake.
1299         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1300         Include lowlevellock.h and pthread-errnos.h.
1301         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1302         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1303         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1304         pass LLL_SHARED in %esi to both __lll_lock_wait and
1305         __lll_unlock_wake.
1306         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1307         Include lowlevellock.h.
1308         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1309         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1310         pass LLL_SHARED in %esi to both __lll_lock_wait and
1311         __lll_unlock_wake.
1312         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1313         Include lowlevellock.h.
1314         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1315         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1316         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1317         and __lll_unlock_wake.
1318         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1319         Include lowlevellock.h.
1320         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1321         Don't define.
1322         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1323         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1324         and __lll_unlock_wake.
1325         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1326         Include lowlevellock.h.
1327         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1328         Don't define.
1329         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1330         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1331         and __lll_unlock_wake.
1332         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1333         Include lowlevellock.h.
1334         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1335         Don't define.
1336         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1337         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1338         and __lll_unlock_wake.
1339         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1340         Include lowlevellock.h.
1341         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1342         Don't define.
1343         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1344         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1345         and __lll_unlock_wake.
1346         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1347         Include lowlevellock.h.
1348         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1349         Don't define.
1350         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1351         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1352         and __lll_unlock_wake.
1353         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1354         lowlevellock.h.
1355         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1356         define.
1357         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1358         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1359         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1360         lowlevellock.h.
1361         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1362         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1363         lowlevellock.h.
1364         (LOCK): Don't define.
1365         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1366         lowlevellock.h.
1367         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1368         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1369         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1370         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1371         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1372         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1373         (__lll_lock_wait_private): New function.
1374         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1375         it to lll_futex_*wait.  Don't compile in for libc.so.
1376         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1377         Remove.
1378         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1379         (struct sparc_pthread_barrier): Remove.
1380         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1381         struct sparc_pthread_barrier.  Pass
1382         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1383         and lll_futex_wait macros.
1384         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1385         Remove.
1386         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1387         Include sparc pthread_barrier_wait.c instead of generic one.
1389 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1391         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1393         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1394         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1395         %ecx.
1396         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1397         (pthread_rwlock_timedwrlock): Likewise.
1398         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1399         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1401 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1403         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1405 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1407         * tst-locale2.c (useless): Add return statement.
1409 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1411         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1412         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1413         * pthread_create.c (start_thread): Likewise.
1414         * init.c (sighandler_setxid): Likewise.
1415         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1416         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1417         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1418         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1419         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1420         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1421         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1422         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1423         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1424         Likewise.
1425         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1426         Likewise.
1427         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1428         Likewise.
1429         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1430         __rtld_notify): Likewise.
1431         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1432         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1433         __pthread_once): Likewise.
1434         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1435         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1436         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1437         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1438         (lll_futex_wait): Add private argument, define as wrapper around
1439         lll_futex_timed_wait.
1440         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1441         use __lll_private_flag macro.
1442         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1443         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1444         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1445         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1446         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1447         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1448         (lll_futex_wait): Add private argument, define as wrapper around
1449         lll_futex_timed_wait.
1450         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1451         use __lll_private_flag macro.
1452         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1453         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1454         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1455         Define.
1456         (lll_futex_timed_wait, lll_futex_wake): Use it.
1457         (lll_private_futex_wait, lll_private_futex_timed_wait,
1458         lll_private_futex_wake): Removed.
1459         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1460         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1461         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1462         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1463         (lll_futex_wait): Add private argument, define as wrapper around
1464         lll_futex_timed_wait.
1465         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1466         use __lll_private_flag macro.
1467         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1468         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1469         to lll_futex_*.
1470         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1471         (lll_private_futex_wait, lll_private_futex_timed_wait,
1472         lll_private_futex_wake): Removed.
1473         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1474         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1475         (lll_private_futex_wait, lll_private_futex_timed_wait,
1476         lll_private_futex_wake): Removed.
1477         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1478         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1479         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1480         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1481         (lll_futex_wait): Add private argument, define as wrapper around
1482         lll_futex_timed_wait.
1483         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1484         use __lll_private_flag macro.
1485         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1486         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1487         to lll_futex_*.
1488         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1489         Define.
1490         (lll_futex_timed_wait, lll_futex_wake): Use it.
1491         (lll_private_futex_wait, lll_private_futex_timed_wait,
1492         lll_private_futex_wake): Removed.
1494 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1496         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1497         of the structure for sparc32.
1499 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1501         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1503 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1505         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1506         code used when private futexes are assumed.
1507         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1508         Likewise.
1510 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1512         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1513         (__lll_private_flag): Define.
1514         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1515         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1516         __lll_private_flag.
1517         (lll_private_futex_wait, lll_private_futex_timedwait,
1518         lll_private_futex_wake): Define as wrapper around non-_private
1519         macros.
1520         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1521         (__lll_private_flag): Define.
1522         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1523         (lll_private_futex_wait, lll_private_futex_timedwait,
1524         lll_private_futex_wake): Define as wrapper around non-_private
1525         macros.
1527 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1529         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1530         parameter to lll_futex_wait call.
1531         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1533         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1534         Replace lll_futex_wait with lll_private_futex_wait.
1535         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1536         Add LLL_SHARED parameter to lll_futex_wake().
1538         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1539         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1540         lll_private_futex_wake.
1541         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1542         bit from private parm before syscall.
1543         (lll_futex_timed_wait): Likewise.
1544         (lll_futex_wake): Likewise.
1545         (lll_futex_wake_unlock): Likewise.
1546         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1547         (lll_robust_mutex_unlock): Likewise.
1548         (lll_mutex_unlock_force): Likewise.
1549         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1551 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1553         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1554         compilation when unconditionally using private futexes.
1555         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1556         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1557         Likewise.
1558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1559         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1561 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1563         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1564         Define.
1566 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1568         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1569         kernel-features.h.
1571 2007-05-16  Roland McGrath  <roland@redhat.com>
1573         * init.c (__nptl_initial_report_events): New variable.
1574         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1575         to that.
1577 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1579         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1580         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1582 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1584         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1585         implementation.
1587 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1589         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1590         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1591         * pthread_mutex_timedlock.c: Likewise.
1592         * pthread_mutex_trylock.c: Likewise.
1593         * pthread_mutex_unlock.c: Likewise.
1595 2007-06-17  Andreas Schwab  <schwab@suse.de>
1597         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1598         sections.
1600 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1602         * allocatestack.c (allocate_stack): Make code compile if
1603         __ASSUME_PRIVATE_FUTEX is set.
1605 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1608         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1610         (__pthread_rwlock_wrlock): Likewise.
1611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1612         (pthread_rwlock_timedrdlock): Likewise.
1613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1614         (pthread_rwlock_timedwrlock): Likewise.
1615         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1616         (__pthread_rwlock_unlock): Likewise.
1618 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1620         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1621         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1622         Split __flags into __flags, __shared, __pad1 and __pad2.
1623         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1624         futexes if they are available.
1625         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1626         in libc-lowlevellock.S allow using private futexes.
1627         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1628         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1629         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1630         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1631         lll_private_futex_timed_wait and lll_private_futex_wake.
1632         (lll_robust_mutex_unlock): Fix typo.
1633         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1634         field in futex command setup.
1635         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1636         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1637         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1638         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1639         if they are available.  Remove clear_once_control.
1640         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1641         futexes if they are available.
1642         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1643         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1644         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1645         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1646         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1647         Wake only when there are waiters.
1648         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1649         support.  Indicate that there are waiters.  Remove unnecessary
1650         extra cancellation test.
1651         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1652         left-over duplication of __sem_wait_cleanup.
1654 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1656         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1657         parameter to lll_futex_wait, lll_futex_timed_wait, and
1658         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1659         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1660         lll_private_futex_wake.
1661         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1662         * allocatestack.c: Adjust use of lll_futex_* macros.
1663         * init.c: Likewise.
1664         * lowlevellock.h: Likewise.
1665         * pthread_barrier_wait.c: Likewise.
1666         * pthread_cond_broadcast.c: Likewise.
1667         * pthread_cond_destroy.c: Likewise.
1668         * pthread_cond_signal.c: Likewise.
1669         * pthread_cond_timedwait.c: Likewise.
1670         * pthread_cond_wait.c: Likewise.
1671         * pthread_create.c: Likewise.
1672         * pthread_mutex_lock.c: Likewise.
1673         * pthread_mutex_setprioceiling.c: Likewise.
1674         * pthread_mutex_timedlock.c: Likewise.
1675         * pthread_mutex_unlock.c: Likewise.
1676         * pthread_rwlock_timedrdlock.c: Likewise.
1677         * pthread_rwlock_timedwrlock.c: Likewise.
1678         * pthread_rwlock_unlock.c: Likewise.
1679         * sysdeps/alpha/tls.h: Likewise.
1680         * sysdeps/i386/tls.h: Likewise.
1681         * sysdeps/ia64/tls.h: Likewise.
1682         * sysdeps/powerpc/tls.h: Likewise.
1683         * sysdeps/pthread/aio_misc.h: Likewise.
1684         * sysdeps/pthread/gai_misc.h: Likewise.
1685         * sysdeps/s390/tls.h: Likewise.
1686         * sysdeps/sh/tls.h: Likewise.
1687         * sysdeps/sparc/tls.h: Likewise.
1688         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1689         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1690         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1691         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1692         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1693         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1694         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1695         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1696         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1697         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1698         Likewise.
1699         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1700         * sysdeps/x86_64/tls.h: Likewise.
1702 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1704         * pthread_getattr_np.c: No need to install a cancellation handler,
1705         this is no cancellation point.
1706         * pthread_getschedparam.c: Likewise.
1707         * pthread_setschedparam.c: Likewise.
1708         * pthread_setschedprio.c: Likewise.
1709         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1710         lll_unlock_wake_cb.
1711         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1712         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1713         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1714         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1715         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1716         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1717         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1718         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1719         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1720         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1721         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1722         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1724         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1725         whether there are more than one thread makes no sense here since
1726         we only call the slow path if the locks are taken.
1727         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1729         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1730         COND_NWAITERS_SHIFT.
1731         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1732         COND_CLOCK_BITS.
1733         * pthread_cond_init.c: Likewise.
1734         * pthread_cond_timedwait.c: Likewise.
1735         * pthread_cond_wait.c: Likewise.
1736         * pthread_condattr_getclock.c: Likewise.
1737         * pthread_condattr_setclock.c: Likewise.
1738         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1739         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1741         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1742         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1744 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1746         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1747         unistd.h.
1749         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1750         insn suffix.
1751         (THREAD_GSCOPE_GET_FLAG): Remove.
1752         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1753         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1754         changes.
1755         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1756         (THREAD_GSCOPE_GET_FLAG): Remove.
1757         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1758         instead of THREAD_GSCOPE_GET_FLAG.
1759         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1760         it.
1761         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1762         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1763         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1764         THREAD_GSCOPE_WAIT): Define.
1765         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1766         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1767         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1768         THREAD_GSCOPE_WAIT): Define.
1769         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1770         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1771         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1772         THREAD_GSCOPE_WAIT): Define.
1773         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1774         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1775         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1776         THREAD_GSCOPE_WAIT): Define.
1778 2007-05-24  Richard Henderson  <rth@redhat.com>
1780         * descr.h (struct pthread): Add header.gscope_flag.
1781         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1782         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1783         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1784         THREAD_GSCOPE_WAIT): Define.
1786 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1788         * init.c: Make it compile with older kernel headers.
1790         * tst-initializers1.c: Show through exit code which test failed.
1792         * pthread_rwlock_init.c: Also initialize __shared field.
1793         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1794         element in rwlock structure into four byte elements.  One of them is
1795         the new __shared element.
1796         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1797         Likewise.
1798         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1799         __shared, adjust names of other padding elements.
1800         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1801         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1802         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1803         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1804         FUTEX_PRIVATE_FLAG.
1805         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1806         futex to use private operations if possible.
1807         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1808         Likewise.
1809         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1810         Likewise.
1811         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1812         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1813         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1814         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1815         Likewise.
1816         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1817         Likewise.
1818         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1819         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1821 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1823         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1824         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1825         * pthread_rwlock_timedrdlock.c: Likewise.
1826         * pthread_rwlock_tryrdlock.c: Likewise.
1828         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1829         optimization.
1831         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1832         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1833         duplication of __sem_wait_cleanup.
1835         * allocatestack.c: Revert last change.
1836         * init.c: Likewise.
1837         * sysdeps/i386/tls.h: Likewise.
1838         * sysdeps/x86_64/tls.h: Likewise.
1839         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1840         header structure.
1841         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1843         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1844         Add private field.
1845         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1846         * pthread_barrier_init.c: Set private flag if pshared and private
1847         futexes are supported.
1848         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1849         private field in futex command setup.
1850         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1852 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1854         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1855         support.
1856         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1857         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1858         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1859         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1860         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1862         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1863         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1864         fields in the structure.
1865         (__old_sem_init): New function.
1866         * sem_open.c: Initialize all fields of the structure.
1867         * sem_getvalue.c: Adjust for renamed element.
1868         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1869         (gen-as-const-headers): Add structsem.sym.
1870         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1871         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1872         struct new_sem.  Add struct old_sem.
1873         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1874         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1875         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1876         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1877         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1878         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1879         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1880         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1881         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1882         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1883         * tst-sem10.c: New file.
1884         * tst-sem11.c: New file.
1885         * tst-sem12.c: New file.
1886         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1887         of struct sem.
1889 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1890             Jakub Jelinek  <jakub@redhat.com>
1892         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1893         Move __pthread_enable_asynccancel right before futex syscall.
1894         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1895         Likewise.
1897 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1899         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1900         THREAD_COPY_PRIVATE_FUTEX): Define.
1901         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1902         THREAD_COPY_PRIVATE_FUTEX): Define.
1903         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1904         * init.c (__pthread_initialize_minimal_internal): Use
1905         THREAD_SET_PRIVATE_FUTEX.
1907         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1908         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1909         THREAD_GSCOPE_FLAG_WAIT): Define.
1910         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1911         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1912         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1913         PTR_DEMANGLE.
1914         (THREAD_GSCOPE_GET_FLAG): Define.
1915         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1916         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1917         instead of ->header.gscope_flag directly.
1919 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1921         * init.c (__pthread_initialize_minimal_internal): Check whether
1922         private futexes are available.
1923         * allocatestack.c (allocate_stack): Copy private_futex field from
1924         current thread into the new stack.
1925         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1926         futexes if they are available.
1927         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1928         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1929         in libc-lowlevellock.S allow using private futexes.
1930         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1932         FUTEX_PRIVATE_FLAG.
1933         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1934         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1935         if they are available.
1936         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1937         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1938         * sysdeps/i386/tcb-offsets.sym: Likewise.
1939         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1940         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1942 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1944         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1945         Remove ptr_wait_lookup_done again.
1946         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1947         (__pthread_initialize_minimal_internal): Initialize
1948         _dl_wait_lookup_done pointer in _rtld_global directly.
1949         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1950         Remove code to code _dl_wait_lookup_done.
1951         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1952         encrypted for now.
1954 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1956         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1957         pthread_mutex_init failed with ENOTSUP.
1959 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1961         * allocatestack.c (__wait_lookup_done): New function.
1962         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1963         Add ptr_wait_lookup_done.
1964         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1965         * pthreadP.h: Declare __wait_lookup_done.
1966         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1967         Define macros to implement reference handling of global scope.
1968         * sysdeps/x86_64/tls.h: Likewise.
1969         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1970         Initialize GL(dl_wait_lookup_done).
1972 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1974         [BZ #4512]
1975         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1976         is detected.
1977         * pthread_mutex_timedlock.c: Likewise.
1978         * pthread_mutex_trylock.c: Likewise.
1979         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1981         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1982         * tst-robust9.c: New file.
1983         * tst-robustpi9.c: New file.
1985         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1986         unnecessary extra cancellation test.
1988 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1990         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1991         extra cancellation test.
1992         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1994 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1996         * descr.h (struct pthread): Rearrange members to fill hole in
1997         64-bit layout.
1999         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2000         (__pthread_setaffinity_new): If syscall was successful and
2001         RESET_VGETCPU_CACHE is defined, use it before returning.
2002         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
2004 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
2006         [BZ #4455]
2007         * tst-align2.c: Include stackinfo.h.
2008         * tst-getpid1.c: Likewise.
2010 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
2012         [BZ #4455]
2013         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
2014         * tst-getpid1.c (do_test): Likewise.
2016         [BZ #4456]
2017         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
2018         (allocate_stack): Likewise.
2020 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
2022         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2023         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
2024         (__lll_robust_timedlock_wait): Likewise.
2025         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
2027 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2029         [BZ #4465]
2030         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2031         * tst-cancel4.c (tf_fdatasync): New test.
2033 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2035         [BZ #4392]
2036         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2037         check mutexes like normal mutexes.
2039         [BZ #4306]
2040         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2041         Initialize the whole sigevent structure to appease valgrind.
2043 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2045         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2046         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2048 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2050         * tst-locale1.c: Avoid warnings.
2051         * tst-locale2.c: Likewise.
2053 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2055         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2056         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2058 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2060         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2061         __extern_always_inline where appropriate.
2062         * sysdeps/pthread/pthread.h: Likewise.
2064 2007-03-13  Richard Henderson  <rth@redhat.com>
2066         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2067         separate cfi regions for the two subsections.
2069 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2071         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2072         new thread, don't just decrement it.
2073         Patch by Suzuki K P <suzuki@in.ibm.com>.
2075 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2077         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2078         PTHFCT_CALL definition.
2080 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2082         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2083         available, don't use it.
2085 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2087         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2088         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2089         call into the kernel to delay.
2091 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2093         * tst-initializers1.c: We want to test the initializers as seen
2094         outside of libc, so undefined _LIBC.
2096         * pthread_join.c (cleanup): Avoid warning.
2098 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2100         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2101         (__lll_timedwait_tid): Add unwind info.
2103         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2104         function table, mangle the pointers.
2105         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2106         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2107         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2108         demangle pointers before use.
2109         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2110         demangle pointer.
2111         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2112         * sysdeps/pthread/setxid.h: Likewise.
2114 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2116         * tst-rwlock7.c: Show some more information in case of correct
2117         behavior.
2119 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2121         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2122         (lll_futex_timed_wait): Undo part of last change, don't negate
2123         return value.
2125 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2127         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2128         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2130 2006-12-28  David S. Miller  <davem@davemloft.net>
2132         * shlib-versions: Fix sparc64 linux target specification.
2134 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2136         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2137         Adjust include path for pthread_barrier_wait.c move.
2139 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2141         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2142         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2144 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2146         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2147         6 argument cancellable syscalls.
2148         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2149         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2150         6 argument cancellable syscalls.
2151         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2153 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2155         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2156         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2158 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2160         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2161         __sync_lock_release instead of __sync_lock_release_si.
2163 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2165         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2166         Define.
2167         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2168         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2169         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2170         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2171         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2172         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2173         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2174         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2175         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2176         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2177         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2179 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2181         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2182         * pthread_barrier_wait.c: ...here.
2183         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2184         * pthread_cond_broadcast.c: ...here.
2185         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2186         * pthread_cond_signal.c: ...here.
2187         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2188         * pthread_cond_timedwait.c: ...here.
2189         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2190         * pthread_cond_wait.c: ...here.
2191         * sysdeps/pthread/pthread_once.c: Move to...
2192         * pthread_once.c: ...here.
2193         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2194         * pthread_rwlock_rdlock.c: ...here.
2195         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2196         * pthread_rwlock_timedrdlock.c: ...here.
2197         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2198         * pthread_rwlock_timedwrlock.c: ...here.
2199         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2200         * pthread_rwlock_unlock.c: ...here.
2201         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2202         * pthread_rwlock_wrlock.c: ...here.
2203         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2204         * pthread_spin_destroy.c: ...here.
2205         * sysdeps/pthread/pthread_spin_init.c: Move to...
2206         * pthread_spin_init.c: ...here.
2207         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2208         * pthread_spin_unlock.c: ...here.
2209         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2210         * pthread_getcpuclockid.c: ...here.
2212         * init.c: USE_TLS support is now always enabled.
2213         * tst-tls5.h: Likewise.
2214         * sysdeps/alpha/tls.h: Likewise.
2215         * sysdeps/i386/tls.h: Likewise.
2216         * sysdeps/ia64/tls.h: Likewise.
2217         * sysdeps/powerpc/tls.h: Likewise.
2218         * sysdeps/s390/tls.h: Likewise.
2219         * sysdeps/sh/tls.h: Likewise.
2220         * sysdeps/sparc/tls.h: Likewise.
2221         * sysdeps/x86_64/tls.h: Likewise.
2223 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2225         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2226         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2227         failed.
2229         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2230         Define to THREAD_SELF->header.multiple_threads.
2231         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2232         Likewise.
2233         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2234         Likewise.
2235         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2236         (SINGLE_THREAD_P): Likewise.
2237         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2238         (SINGLE_THREAD_P): Likewise.
2239         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2240         (SINGLE_THREAD_P): Likewise.
2241         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2242         (SINGLE_THREAD_P): Likewise.
2243         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2244         Likewise.
2245         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2246         (SINGLE_THREAD_P): Likewise.
2247         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2248         (SINGLE_THREAD_P): Likewise.
2249         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2250         Likewise.
2252 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2254         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2255         by default rather than 2_3_3.
2257 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2259         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2260         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2261         atomic_* instead of catomic_* macros.
2263 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2265         [BZ #3285]
2266         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2267         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2268         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2269         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2270         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2271         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2272         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2273         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2274         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2275         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2276         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2277         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2278         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2280 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2282         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2283         cancelable syscalls with six parameters.
2285         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2286         operations instead of atomic_*.
2288 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2290         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2292 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2294         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2295         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2296         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2297         New file.
2298         * pthread_attr_setstack.c: Allow overwriting the version number of the
2299         new symbol.
2300         * pthread_attr_setstacksize.c: Likewise.
2301         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2302         it.
2303         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2304         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2306 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2308         [BZ #3251]
2309         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2310         Patch by Petr Baudis.
2312 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2314         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2316         * tst-cancel2.c (tf): Loop as long as something was written.
2318 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2320         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2321         mutexes wake all mutexes.
2322         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2323         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2324         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2326 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2328         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2329         to guarantee the thread is always canceled.
2331 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2333         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2334         Include stdlib.h.
2335         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2336         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2338         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2339         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2341 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2343         [BZ #3123]
2344         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2345         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2349         * Makefile (tests): Add tst-cond22.
2350         * tst-cond22.c: New file.
2352 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2354         [BZ #3124]
2355         * descr.h (struct pthread): Add parent_cancelhandling.
2356         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2357         cancelhandling value to child.
2358         * pthread_create.c (start_thread): If parent thread was canceled
2359         reset the SIGCANCEL mask.
2360         * Makefile (tests): Add tst-cancel25.
2361         * tst-cancel25.c: New file.
2363 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2364             Ulrich Drepper  <drepper@redhat.com>
2366         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2367         counterp if it is already zero.
2368         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2370 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2371             Roland McGrath  <roland@redhat.com>
2373         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2374         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2375         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2376         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2377         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2378         lll_robust_mutex_timedlock, lll_mutex_unlock,
2379         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2380         Add _L_*_ symbols around the subsection.
2381         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2382         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2384 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2385             Roland McGrath  <roland@redhat.com>
2387         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2388         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2389         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2390         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2391         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2392         lll_robust_mutex_timedlock, lll_mutex_unlock,
2393         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2394         Add _L_*_ symbols around the subsection.
2395         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2396         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2398 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2400         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2401         change because it can disturb too much existing code.  If real hard
2402         reader preference is needed we'll introduce another type.
2403         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2404         (pthread_rwlock_timedwrlock): Likewise.
2405         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2406         Likewise.
2408 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2410         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2411         reader preference.
2412         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2413         (pthread_rwlock_timedwrlock): Likewise.
2414         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2415         Likewise.
2417 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2419         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2420         Only define ifdef SHARED.
2422 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2424         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2425         (free_stacks): ...here.
2426         (__free_stack_cache): New function.
2427         * pthreadP.h: Declare __free_stack_cache.
2428         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2429         ptr_freeres.
2430         * init.c (pthread_functions): Initialize ptr_freeres.
2431         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2432         New freeres function.
2434 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2436         [BZ #3018]
2437         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2439 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2441         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2442         _XOPEN_REALTIME_THREADS.
2444 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2446         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2447         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2448         HAVE_CLOCK_GETTIME_VSYSCALL.
2449         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2451 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2453         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2454         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2455         * descr.h (struct priority_protection_data): New type.
2456         (struct pthread): Add tpp field.
2457         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2458         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2459         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2460         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2461         TPP mutexes.
2462         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2463         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2464         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2465         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2466         * tpp.c: New file.
2467         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2468         boosted by TPP.
2469         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2470         * pthread_mutexattr_getprioceiling.c
2471         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2472         in the SCHED_FIFO priority range.
2473         * pthread_mutexattr_setprioceiling.c
2474         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2475         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2476         if mutex is not TPP.  Ceiling is now in __data.__lock.
2477         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2478         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2479         is now in __data.__lock.  Add locking.
2480         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2481         * Makefile (libpthread-routines): Add tpp.
2482         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2483         * tst-tpp.h: New file.
2484         * tst-mutexpp1.c: New file.
2485         * tst-mutexpp6.c: New file.
2486         * tst-mutexpp10.c: New file.
2487         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2488         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2490 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2492         [BZ #2843]
2493         * pthread_join.c (pthread_join): Account for self being canceled
2494         when checking for deadlocks.
2495         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2496         (tf1): Don't print anything after pthread_join returns, this would be
2497         another cancellation point.
2498         (tf2): Likewise.
2499         * tst-join6.c: New file.
2500         * Makefile (tests): Add tst-join6.
2502 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2504         [BZ #2892]
2505         * pthread_setspecific.c (__pthread_setspecific): Check
2506         out-of-range index before checking for unused key.
2508         * sysdeps/pthread/gai_misc.h: New file.
2510 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2512         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2513         file.  Don't use sysctl.
2514         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2515         overwrite the file if this is likely not true.
2517 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2519         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2520         * Makefile (tests): Add tst-getpid3.
2521         * tst-getpid3.c: New file.
2523 2006-07-30  Roland McGrath  <roland@redhat.com>
2525         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2527         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2528         (pause_not_cancel): New macro.
2529         (nanosleep_not_cancel): New macro.
2530         (sigsuspend_not_cancel): New macro.
2531         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2532         nanosleep_not_cancel macro from <not-cancel.h>.
2533         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2534         macro from <not-cancel.h>.
2536 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2537             Jakub Jelinek  <jakub@redhat.com>
2539         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2540         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2541         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2542         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2543         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2544         * pthread_mutex_lock.c: Likewise.
2545         * pthread_mutex_timedlock.c: Likewise.
2546         * pthread_mutex_trylock.c: Likewise.
2547         * pthread_mutex_unlock.c: Likewise.
2548         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2549         all mutexes.
2550         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2551         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2552         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2553         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2554         pthread-pi-defines.sym.
2555         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2556         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2557         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2558         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2559         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2560         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2561         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2562         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2563         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2564         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2565         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2566         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2567         * tst-mutex2.c: Likewise.
2568         * tst-mutex3.c: Likewise.
2569         * tst-mutex4.c: Likewise.
2570         * tst-mutex5.c: Likewise.
2571         * tst-mutex6.c: Likewise.
2572         * tst-mutex7.c: Likewise.
2573         * tst-mutex7a.c: Likewise.
2574         * tst-mutex8.c: Likewise.
2575         * tst-mutex9.c: Likewise.
2576         * tst-robust1.c: Likewise.
2577         * tst-robust7.c: Likewise.
2578         * tst-robust8.c: Likewise.
2579         * tst-mutexpi1.c: New file.
2580         * tst-mutexpi2.c: New file.
2581         * tst-mutexpi3.c: New file.
2582         * tst-mutexpi4.c: New file.
2583         * tst-mutexpi5.c: New file.
2584         * tst-mutexpi6.c: New file.
2585         * tst-mutexpi7.c: New file.
2586         * tst-mutexpi7a.c: New file.
2587         * tst-mutexpi8.c: New file.
2588         * tst-mutexpi9.c: New file.
2589         * tst-robust1.c: New file.
2590         * tst-robust2.c: New file.
2591         * tst-robust3.c: New file.
2592         * tst-robust4.c: New file.
2593         * tst-robust5.c: New file.
2594         * tst-robust6.c: New file.
2595         * tst-robust7.c: New file.
2596         * tst-robust8.c: New file.
2597         * Makefile (tests): Add the new tests.
2599         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2600         * pthread_mutex_destroy.c: Remove unneeded label.
2602 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2604         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2605         computations to compile time.
2607 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2609         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2611 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2613         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2615 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2617         * pthread_key_create.c (__pthread_key_create): Do away with
2618         __pthread_keys_lock.
2620         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2621         (__kernel_cpumask_size): Mark as hidden.
2622         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2624         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2625         * semaphoreP.h (__sem_mappings_lock): Likewise.
2627 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2629         * pthread_atfork.c: Mark __dso_handle as hidden.
2631 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2633         [BZ #2644]
2634         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2635         the reload problem.  Change the one path in pthread_cancel_init
2636         which causes the problem.  Force gcc to reload.  Simplify callers.
2637         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2638         (_Unwind_GetBSP): Undo last patch.
2640 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2642         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2643         function pointer is reloaded after pthread_cancel_init calls.
2645         [BZ #2644]
2646         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2647         pointers are reloaded after pthread_cancel_init calls.
2649 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2651         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2652         __always_inline.
2654 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2656         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2657         Allocate new object which is passed to timer_sigev_thread so that
2658         the timer can be deleted before the new thread is scheduled.
2660 2006-04-26  Roland McGrath  <roland@redhat.com>
2662         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2664 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2666         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2667         suffix for conditional jumps.
2668         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2669         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2670         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2671         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2672         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2673         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2675         * init.c (sigcancel_handler): Compare with correct PID even if the
2676         thread is in the middle of a fork call.
2677         (sighandler_setxid): Likewise.
2678         Reported by Suzuki K P <suzuki@in.ibm.com> .
2680 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2682         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2684 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2686         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2687         fails [Coverity CID 105].
2689 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2691         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2693 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2695         [BZ #2505]
2696         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2697         Define __lll_rel_instr using lwsync.
2699 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2701         * allocatestack.c (allocate_stack): Always initialize robust_head.
2702         * descr.h: Define struct robust_list_head.
2703         (struct pthread): Use robust_list_head in robust mutex list definition.
2704         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2705         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2706         (__pthread_initialize_minimal_internal): Register robust_list with
2707         the kernel.
2708         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2709         Declare __set_robust_list_avail.
2710         * pthread_create.c (start_thread): Register robust_list of new thread.
2711         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2712         waiters.
2713         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2714         number of users, it's unreliable.
2715         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2716         set_robust_list syscall is available.
2717         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2718         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2719         Set robust_head.list_op_pending before trying to lock a robust mutex.
2720         * pthread_mutex_timedlock.c: Likewise.
2721         * pthread_mutex_trylock.c: Likewise.
2722         * pthread_mutex_unlock.c: Likewise for unlocking.
2723         * Makefile (tests): Add tst-robust8.
2724         * tst-robust8.c: New file.
2726 2006-03-08  Andreas Schwab  <schwab@suse.de>
2728         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2729         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2731 2006-03-05  Roland McGrath  <roland@redhat.com>
2733         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2734         and $config_os doesn't match *linux*.
2736 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2738         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2739         Use __syscall_error.
2740         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2741         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2742         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2743         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2744         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2745         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2747 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2749         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2751 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2753         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2754         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2755         mutex.
2756         (__lll_robust_timedlock_wait): Likewise.
2757         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2758         (__lll_robust_lock_wait): Likewise.
2759         (__lll_robust_timedlock_wait): Likewise.
2760         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2761         (__lll_robust_lock_wait): Likewise.
2762         (__lll_robust_timedlock_wait): Likewise.
2764 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2766         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2767         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2768         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2769         lll_robust_mutex_unlock): Define.
2770         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2772 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2774         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2775         instead of <clone.S>.
2777 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2779         * Makefile (libpthread-routines): Add
2780         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2781         and pthread_mutex_[sg]etprioceiling.
2782         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2783         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2784         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2785         pthread_mutex_setprioceiling.
2786         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2787         PTHREAD_PRIO_PROTECT): New enum values.
2788         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2789         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2790         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2791         prototypes.
2792         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2793         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2794         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2795         Define.
2796         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2797         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2798         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2799         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2800         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2801         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2802         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2803         protocol mutexes.
2804         * pthread_mutex_getprioceiling.c: New file.
2805         * pthread_mutex_setprioceiling.c: New file.
2806         * pthread_mutexattr_getprioceiling.c: New file.
2807         * pthread_mutexattr_setprioceiling.c: New file.
2808         * pthread_mutexattr_getprotocol.c: New file.
2809         * pthread_mutexattr_setprotocol.c: New file.
2811 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2813         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2815 2006-02-27  Roland McGrath  <roland@redhat.com>
2817         * sysdeps/pthread/Subdirs: List nptl here too.
2818         * configure (libc_add_on_canonical): New variable.
2820         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2822         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2823         self to get main source tree's file.
2824         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2825         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2826         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2827         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2828         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2829         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2830         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2831         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2832         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2833         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2834         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2835         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2836         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2838         * Makefile: Use $(sysdirs) in vpath directive.
2840         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2841         (CPPFLAGS-timer_routines.c): Likewise.
2843         * Makeconfig (includes): Variable removed.
2845 2006-02-26  Roland McGrath  <roland@redhat.com>
2847         * sysdeps/generic/pt-raise.c: Moved to ...
2848         * pt-raise.c: ... here.
2849         * sysdeps/generic/lowlevellock.h: Moved to ...
2850         * lowlevellock.h: ... here.
2852 2006-02-23  Roland McGrath  <roland@redhat.com>
2854         * descr.h (struct pthread): Add final member `end_padding'.
2855         (PTHREAD_STRUCT_END_PADDING): Use it.
2857 2006-02-20  Roland McGrath  <roland@redhat.com>
2859         * sysdeps/mips: Directory removed, saved in ports repository.
2860         * sysdeps/unix/sysv/linux/mips: Likewise.
2862 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2864         * tst-robust1.c: Add second mutex to check that the mutex list is
2865         handled correctly.
2867 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2869         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2870         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2871         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2872         lll_robust_mutex_unlock): New macros.
2873         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2874         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2875         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2876         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2877         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2879 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2881         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2882         definitions.
2883         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2885 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2887         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2888         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2889         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2890         (lll_robust_mutex_unlock): Likewise.
2892 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2894         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2895         Set robust_list.__next rather than robust_list.
2896         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2897         (__pthread_list_t): New typedef.
2898         (pthread_mutex_t): Replace __next and __prev fields with __list.
2899         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2900         (__pthread_list_t): New typedef.
2901         (pthread_mutex_t): Replace __next and __prev fields with __list.
2902         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2903         (__pthread_list_t, __pthread_slist_t): New typedefs.
2904         (pthread_mutex_t): Replace __next and __prev fields with __list.
2905         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2906         (__pthread_list_t, __pthread_slist_t): New typedefs.
2907         (pthread_mutex_t): Replace __next and __prev fields with __list.
2908         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2909         (__pthread_list_t, __pthread_slist_t): New typedefs.
2910         (pthread_mutex_t): Replace __next and __prev fields with __list.
2911         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2912         (__pthread_slist_t): New typedef.
2913         (pthread_mutex_t): Replace __next field with __list.
2915 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2917         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2918         PTHREAD_MUTEX_OWNERDEAD.
2919         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2920         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2921         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2922         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2923         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2924         to PTHREAD_MUTEX_INCONSISTENT.
2925         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2926         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2927         * pthread_mutex_trylock.c: Likewise.
2928         * pthread_mutex_timedlock.c: Likewise.
2929         * pthread_mutex_unlock.c: Likewise.
2930         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2931         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2932         lowlevelrobustlock.sym.
2933         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2934         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2935         definitions.
2936         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2937         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2938         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2939         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2940         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2942 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2944         * allocatestack.c (allocate_stack): Initialize robust_list.
2945         * init.c (__pthread_initialize_minimal_internal): Likewise.
2946         * descr.h (struct xid_command): Pretty printing.
2947         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2948         robust_list.  Adjust macros.
2949         * pthread_create.c (start_thread): Adjust robust_list handling.
2950         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2951         but the owner for all robust mutex types.
2952         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2953         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2954         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2955         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2957         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2958         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2960 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2962         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2963         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2965 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2967         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2968         Return status.
2969         (lll_futex_timed_wait): Define.
2971 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2973         * tst-cancel4.c: Test ppoll.
2975 2006-01-18  Andreas Jaeger  <aj@suse.de>
2977         [BZ #2167]
2978         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2979         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2980         by Jim Gifford <patches@jg555.com>.
2982 2006-01-13  Richard Henderson  <rth@redhat.com>
2984         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2986 2006-01-10  Roland McGrath  <roland@redhat.com>
2988         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2989         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2990         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2991         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2992         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2993         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2994         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2995         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2996         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2997         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2999 2006-01-09  Roland McGrath  <roland@redhat.com>
3001         * tst-initializers1-c89.c: New file.
3002         * tst-initializers1-c99.c: New file.
3003         * tst-initializers1-gnu89.c: New file.
3004         * tst-initializers1-gnu99.c: New file.
3005         * Makefile (tests): Add them.
3006         (CFLAGS-tst-initializers1-c89.c): New variable.
3007         (CFLAGS-tst-initializers1-c99.c): New variable.
3008         (CFLAGS-tst-initializers1-gnu89.c): New variable.
3009         (CFLAGS-tst-initializers1-gnu99.c): New variable.
3011         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3012         Use __extension__ on anonymous union definition.
3013         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3014         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3015         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3016         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3017         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3019 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
3021         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
3022         Don't give the union a name because it changes the mangled name.
3023         Instead name the struct for __data.
3024         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
3025         Likewise.
3026         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
3027         Likewise.
3029 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3031         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3032         stack bias to mc_ftp field.
3034 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3036         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3037         being too clever and reloading the futex value where it shouldn't.
3039 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3041         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3042         correct type.
3044 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3046         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3047         Add cfi directives.
3049 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3051         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3052         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3053         rename in tcbhead_t.
3055         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3056         Don't give the union a name because it changes the mangled name.
3057         Instead name the struct for __data.
3058         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3059         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3060         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3061         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3062         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3063         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3065 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3067         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3068         Return status.
3069         (lll_futex_timed_wait): Define.
3070         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3071         * sysdeps/pthread/aio_misc.h: New file.
3073 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3075         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3077 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3079         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3080         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3081         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3083 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3085         * tst-cancel24.cc: Use C headers instead of C++ headers.
3087 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3089         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3090         sparc-linux configured glibc.
3091         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3092         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3093         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3094         atomic_compare_and_exchange_val_24_acq instead of
3095         atomic_compare_and_exchange_val_acq.
3096         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3097         instead of atomic_exchange_rel.
3098         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3099         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3100         file.
3101         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3102         file.
3103         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3104         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3105         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3106         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3107         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3108         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3109         New file.
3110         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3111         New file.
3112         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3113         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3114         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3115         file.
3116         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3117         file.
3118         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3120 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3122         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3123         mutex initializers.
3125 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3127         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3128         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3129         THREAD_COPY_POINTER_GUARD): Define.
3130         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3131         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3133 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3135         * version.c: Update copyright year.
3137 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3139         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3140         .eh_frame section, use cfi_* directives.
3141         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3143 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3145         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3146         now.
3148 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3150         * sysdeps/pthread/sigaction.c: Removed.
3151         * sigaction.c: New file.
3152         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3154 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3156         * Makefile (tests): Add tst-signal7.
3157         * tst-signal7.c: New file.
3159 2005-12-27  Roland McGrath  <roland@redhat.com>
3161         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3162         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3163         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3164         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3165         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3166         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3167         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3168         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3169         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3170         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3171         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3173 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3175         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3176         and __prev field to pthread_mutex_t.
3177         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3178         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3179         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3180         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3181         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3182         to pthread_mutex_t.
3184 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3186         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3187         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3188         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3189         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3190         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3191         and PTHREAD_MUTEXATTR_FLAG_BITS.
3192         * descr.h (struct pthread): Add robust_list field and define
3193         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3194         * pthread_mutexattr_getrobust.c: New file.
3195         * pthread_mutexattr_setrobust.c: New file.
3196         * pthread_mutex_consistent.c: New file.
3197         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3198         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3199         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3200         Adjust pthread_mutex_t initializers.
3201         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3202         field to pthread_mutex_t.
3203         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3204         and __prev field to pthread_mutex_t.
3205         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3206         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3207         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3208         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3209         * pthread_mutexattr_gettype.c: Likewise.
3210         * pthread_mutexattr_setpshared.c: Likewise.
3211         * pthread_mutexattr_settype.c: Likewise.
3212         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3213         Initialize mutex kind according to robust flag.
3214         * pthread_mutex_lock.c: Implement local robust mutex.
3215         * pthread_mutex_timedlock.c: Likewise.
3216         * pthread_mutex_trylock.c: Likewise.
3217         * pthread_mutex_unlock.c: Likewise.
3218         * pthread_create.c (start_thread): Mark robust mutexes which remained
3219         locked as dead.
3220         * tst-robust1.c: New file.
3221         * tst-robust2.c: New file.
3222         * tst-robust3.c: New file.
3223         * tst-robust4.c: New file.
3224         * tst-robust5.c: New file.
3225         * tst-robust6.c: New file.
3226         * tst-robust7.c: New file.
3227         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3228         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3229         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3230         tst-robust5, tst-robust6, and tst-robust7.
3232         * tst-typesizes.c: New file.
3233         * Makefile (tests): Add tst-typesizes.
3235         * tst-once3.c: More debug output.
3237 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3239         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3240         missing after last change.
3242         * version.c: Update copyright year.
3244 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3246         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3247         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3248         * pthread_mutex_trylock.c: Likewise.
3249         * pthread_mutex_timedlock.c: Likewise.
3250         * pthread_mutex_unlock.c: Likewise.
3252 2005-12-22  Roland McGrath  <roland@redhat.com>
3254         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3255         so that #include_next's search location is not reset to the -I..
3256         directory where <nptl/...> can be found.
3258 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3260         [BZ #1913]
3261         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3262         Fix unwind info.  Remove useless branch prediction prefix.
3263         * tst-cancel24.cc: New file.
3264         * Makefile: Add rules to build and run tst-cancel24.
3266 2005-12-21  Roland McGrath  <roland@redhat.com>
3268         * libc-cancellation.c: Use <> rather than "" #includes.
3269         * pt-cleanup.c: Likewise.
3270         * pthread_create.c: Likewise.
3271         * pthread_join.c: Likewise.
3272         * pthread_timedjoin.c: Likewise.
3273         * pthread_tryjoin.c: Likewise.
3274         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3275         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3276         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3277         * unwind.c: Likewise.
3279 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3281         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3282         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3283         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3284         THREAD_COPY_POINTER_GUARD): Define.
3286 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3288         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3289         rather than one.
3290         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3291         THREAD_COPY_POINTER_GUARD): Define.
3292         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3293         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3294         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3295         THREAD_COPY_POINTER_GUARD): Define.
3296         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3297         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3298         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3299         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3300         Use PTR_DEMANGLE for B0 if defined.
3302 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3304         * pthread_create.c (__pthread_create_2_1): Use
3305         THREAD_COPY_POINTER_GUARD if available.
3306         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3307         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3308         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3309         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3310         * sysdeps/x86_64/tls.h: Likewise.
3312 2005-12-15  Roland McGrath  <roland@redhat.com>
3314         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3316 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3318         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3319         sysdeps/generic.
3320         * errno-loc.c: New file.
3322 2005-12-12  Roland McGrath  <roland@redhat.com>
3324         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3325         adjustments before choosing stack size.  Update minimum stack size
3326         calculation to match allocate_stack change.
3328 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3330         * allocatestack.c (allocate_stack): Don't demand that there is an
3331         additional full page available on the stack beside guard, TLS, the
3332         minimum stack.
3334 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3336         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3337         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3339         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3340         compiling 32-bit code we must define __cleanup_fct_attribute.
3342 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3344         [BZ #1920]
3345         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3346         __attribute__ instead of __attribute.
3347         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3348         (__cleanup_fct_attribute): Likewise.
3350 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3352         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3353         a write barrier before writing libgcc_s_getcfa.
3355 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3357         * sysdeps/unix/sysv/linux/configure: Removed.
3359 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3361         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3362         optional init_array/fini_array support.
3364 2005-10-24  Roland McGrath  <roland@redhat.com>
3366         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3367         versioned_symbol use.
3369 2005-10-16  Roland McGrath  <roland@redhat.com>
3371         * init.c (__pthread_initialize_minimal_internal): Even when using a
3372         compile-time default stack size, apply the minimum that allocate_stack
3373         will require, and round up to page size.
3375 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3377         * Makefile ($(test-modules)): Remove static pattern rule.
3379 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3380             Ulrich Drepper  <drepper@redhat.com>
3382         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3383         alignment in callback function.
3384         * Makefile: Add rules to build and run tst-align3.
3385         * tst-align3.c: New file.
3387 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3389         * allocatestack.c (setxid_signal_thread): Add
3390         INTERNAL_SYSCALL_DECL (err).
3392 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3394         * allocatestack.c (setxid_signal_thread): Need to use
3395         atomic_compare_and_exchange_bool_acq.
3397 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3398             Jakub Jelinek  <jakub@redhat.com>
3400         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3401         CANCEL_RESTMASK.
3402         (struct pthread): Move specific_used field to avoid padding.
3403         Add setxid_futex field.
3404         * init.c (sighandler_setxid): Reset setxid flag and release the
3405         setxid futex.
3406         * allocatestack.c (setxid_signal_thread): New function.  Broken
3407         out of the bodies of the two loops in __nptl_setxid.  For undetached
3408         threads check whether they are exiting and if yes, don't send a signal.
3409         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3410         * pthread_create.c (start_thread): For undetached threads, check
3411         whether setxid bit is set.  If yes, wait until signal has been
3412         processed.
3414         * allocatestack.c (STACK_VARIABLES): Initialize them.
3415         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3417 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3419         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3420         waiters, awake all waiters on the associated mutex.
3422 2005-09-22  Roland McGrath  <roland@redhat.com>
3424         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3425         ../sysdeps/x86_64/hp-timing.h).
3427 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3429         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3430         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3431         (lll_futex_wake_unlock): Define.
3432         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3433         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3434         (lll_futex_wake_unlock): Define.
3435         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3436         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3437         (lll_futex_wake_unlock): Define.
3438         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3439         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3440         (lll_futex_wake_unlock): Define.
3441         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3442         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3443         (lll_futex_wake_unlock): Define.
3444         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3445         lll_futex_wake_unlock.
3446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3447         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3448         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3449         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3450         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3451         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3453 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3455         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3456         Fix typo in register name.
3458 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3460         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3461         Use __sigfillset.  Document that sigfillset does the right thing wrt
3462         to SIGSETXID.
3464 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3466         [BZ #1102]
3467         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3468         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3469         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3470         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3471         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3472         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3473         in the structure.
3474         * Makefile (tests): Add tst-initializers1.
3475         (CFLAGS-tst-initializers1.c): Set.
3476         * tst-initializers1.c: New test.
3478 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3480         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3481         Make sure __flags are located at offset 48 from the start of the
3482         structure.
3484 2005-07-02  Roland McGrath  <roland@redhat.com>
3486         * Makeconfig: Comment fix.
3488 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3490         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3491         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3492         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3493         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3494         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3495         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3496         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3497         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3498         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3499         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3501 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3503         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3504         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3505         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3506         fields.
3507         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3508         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3509         field.  Put in sysinfo field unconditionally.
3510         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3511         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3512         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3513         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3514         fields.
3515         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3516         * pthread_create.c (__pthread_create_2_1): Use
3517         THREAD_COPY_STACK_GUARD macro.
3518         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3519         tests.
3520         * tst-stackguard1.c: New file.
3521         * tst-stackguard1-static.c: New file.
3523 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3525         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3526         Invoke CGOTSETUP and CGOTRESTORE.
3527         (CGOTSETUP, CGOTRESTORE): Define.
3529 2005-05-29  Richard Henderson  <rth@redhat.com>
3531         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3532         (tf_write, tf_writev): Use it.
3533         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3534         the system minimum.
3536 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3538         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3539         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3540         __librt_*_asynccancel@local.
3542 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3544         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3545         all occurrences of JUMPTARGET.  Instead append @local to labels.
3547 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3549         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3550         size/alignment of struct pthread rather than tcbhead_t.
3551         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3552         Likewise.
3553         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3554         Likewise.
3555         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3556         Likewise.
3558 2005-05-19  Richard Henderson  <rth@redhat.com>
3560         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3561         __sync_val_compare_and_swap, not explicit _si variant.
3562         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3564 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3566         [BZ #915]
3567         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3569 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3571         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3572         .eh_frame section, use cfi_* directives.
3574 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3576         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3577         of "" includes.
3579 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3581         [BZ #1075]
3582         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3583         aio_write blocks.
3585 2005-04-27  Roland McGrath  <roland@redhat.com>
3587         * Makefile (tests): Remove tst-clock2.
3589         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3590         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3591         translating to the kernel clockid_t for our own process/thread clock.
3593         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3595 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3597         * old_pthread_cond_init.c: Include <errno.h>.
3598         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3599         process shared or uses clock other than CLOCK_REALTIME.
3600         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3602 2005-04-13  David S. Miller  <davem@davemloft.net>
3604         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3605         * sysdeps/sparc/sparc64/clone.S: New file.
3607 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3609         [BZ #1102]
3610         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3611         __inline instead of inline.
3612         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3614 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3617         functionally equivalent, but shorter instructions.
3618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3619         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3620         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3621         Likewise.
3622         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3623         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3624         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3625         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3626         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3627         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3628         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3629         Likewise.
3630         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3633         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3634         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3636 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3638         * sysdeps/mips/Makefile: New file.
3639         * sysdeps/mips/nptl-sysdep.S: New file.
3640         * sysdeps/mips/tcb-offsets.sym: New file.
3641         * sysdeps/mips/pthread_spin_lock.S: New file.
3642         * sysdeps/mips/pthread_spin_trylock.S: New file.
3643         * sysdeps/mips/pthreaddef.h: New file.
3644         * sysdeps/mips/tls.h: New file.
3645         * sysdeps/mips/jmpbuf-unwind.h: New file.
3646         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3647         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3648         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3649         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3650         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3651         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3652         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3653         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3654         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3655         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3657 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3659         [BZ #1112]
3660         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3661         variable to scerr.
3663 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3665         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3667 2005-02-25  Roland McGrath  <roland@redhat.com>
3669         * alloca_cutoff.c: Correct license text.
3670         * tst-unload.c: Likewise.
3671         * sysdeps/pthread/allocalim.h: Likewise.
3672         * sysdeps/pthread/pt-initfini.c: Likewise.
3673         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3674         * sysdeps/pthread/bits/sigthread.h: Likewise.
3675         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3676         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3678 2005-02-16  Roland McGrath  <roland@redhat.com>
3680         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3681         Use unsigned int * for ptr_nthreads.
3683 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3685         [BZ #721]
3686         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3687         gcc4.
3689 2005-02-07  Richard Henderson  <rth@redhat.com>
3691         [BZ #787]
3692         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3693         argument.
3695 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3697         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3698         order of arguments in invocation of atomic_add_zero.
3700 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3702         [BZ #737]
3703         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3704         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3705         at least gotntpoff relocation and addition.
3706         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3707         Likewise.
3708         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3709         Likewise.
3710         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3711         Likewise.
3713 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3715         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3716         entry for static tls deallocation fix.
3717         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3718         also contains information whether the memory pointed to is static
3719         TLS or not.
3720         * sysdeps/i386/tls.h: Likewise.
3721         * sysdeps/ia64/tls.h: Likewise.
3722         * sysdeps/powerpc/tls.h: Likewise.
3723         * sysdeps/s390/tls.h: Likewise.
3724         * sysdeps/sh/tls.h: Likewise.
3725         * sysdeps/sparc/tls.h: Likewise.
3726         * sysdeps/x86_64/tls.h: Likewise.
3728 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3730         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3732 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3734         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3735         %esp.
3736         * Makefile (tests): Add tst-align2.
3737         * tst-align2.c: New test.
3738         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3739         -mpreferred-stack-boundary=4.
3741 2004-12-18  Roland McGrath  <roland@redhat.com>
3743         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3744         New file removed withdrawn for the moment.
3746 2004-12-17  Richard Henderson  <rth@redhat.com>
3748         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3749         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3751 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3753         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3754         Increased PTHREAD_STACK_MIN.
3756         * tst-context1.c (stacks): Use bigger stack size.
3758 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3760         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3761         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3763 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3765         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3766         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3767         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3769 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3771         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3773 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3775         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3776         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3778         * tst-getpid1.c: If child crashes, report this first.  Print which
3779         signal.
3781 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3783         * init.c (__pthread_initialize_minimal_internal): Also unblock
3784         SIGSETXID.
3786 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3788         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3789         _POSIX_THREAD_CPUTIME): Define to 0.
3790         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3791         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3792         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3793         __timer_signal_thread_tclk): Remove.
3794         (init_module): Remove their initialization.
3795         (thread_cleanup): Remove their cleanup assertions.
3796         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3797         __timer_signal_thread_tclk): Remove.
3798         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3799         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3800         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3802 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3804         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3805         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3807         * Makefile (tests): Add tst-getpid2.
3808         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3809         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3810         * tst-getpid2.c: New test.
3812 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3814         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3816 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3818         * Makefile (tests): Add tst-getpid1.
3819         * tst-getpid1.c: New file.
3820         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3821         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3823 2004-12-02  Roland McGrath  <roland@redhat.com>
3825         * Makefile (libpthread-nonshared): Variable removed.
3826         ($(objpfx)libpthread_nonshared.a): Target removed.
3827         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3828         These are now handled by generic magic from
3829         libpthread-static-only-routines being set.
3831 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3833         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3834         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3835         _POSIX_THREAD_PRIO_PROTECT): Define.
3836         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3837         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3838         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3840 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3842         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3843         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3844         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3845         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3846         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3847         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3848         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3850 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3852         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3854         * Makefile (libpthread-routines): Add pthread_setschedprio.
3855         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3856         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3857         * pthread_setschedprio.c: New file.
3859 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3861         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3862         * pthread_cancel.c (pthread_create): Likewise.
3864         * Makefile (libpthread-routines): Add vars.
3865         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3866         * init.c (__default_stacksize, __is_smp): Remove.
3867         * vars.c: New file.
3868         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3869         and define a wrapper macro.
3870         (PTHREAD_STATIC_FN_REQUIRE): Define.
3871         * allocatestack.c (__find_thread_by_id): Undefine.
3872         * pthread_create (__pthread_keys): Remove.
3873         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3874         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3875         PTHREAD_STATIC_FN_REQUIRE.
3877 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3879         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3880         parameter to REGISTER macro.
3882 2004-11-17  Roland McGrath  <roland@redhat.com>
3884         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3885         Make sure SIGCANCEL is blocked as well.
3887 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3889         * sysdeps/pthread/setxid.h: New file.
3890         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3891         (struct xid_command): Add forward decl.
3892         (struct pthread_functions): Change return type of __nptl_setxid hook
3893         to int.
3894         * pthreadP.h (__nptl_setxid): Change return type to int.
3895         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3896         calling thread, return its return value and set errno on failure.
3897         * descr.h (struct xid_command): Change id type to long array.
3899         * Makefile: Add rules to build and test tst-setuid1 and
3900         tst-setuid1-static.
3901         * tst-setuid1.c: New test.
3902         * tst-setuid1-static.c: New test.
3904 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3906         * Makefile (tests): Add tst-exit3.
3907         * tst-exit3.c: New test.
3909 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3911         * Makefile (tests): Add tst-exit2.
3912         * tst-exit2.c: New file.
3914 2004-11-09  Roland McGrath  <roland@redhat.com>
3916         [BZ #530]
3917         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3918         here, before calling clone.
3919         * pthread_create.c (start_thread): Don't do it here.
3921 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3923         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3925 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3927         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3928         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3929         assembler warning.
3931 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3933         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3934         if sched_priority is not between minprio and maxprio.
3936 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3938         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3939         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3941         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3942         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3944 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3946         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3947         not-cancelable I/O functions.
3949 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3951         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3952         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3953         make sure 2 is stored in the futex and we looked at the old value.
3954         Fix a few other problems to return the correct value.
3956 2004-10-14  Richard Henderson  <rth@redhat.com>
3958         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3959         make gcc4 happy.
3961 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3963         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3964         of pthread-functions.h and pthreaddef.h.
3965         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3967         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3968         Change __data.__nwaiters from int to unsigned int.
3970         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3971         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3973         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3974         before return type.
3976         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3977         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3979 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3981         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3982         test fails, remove message queue.
3983         (tf_msgsnd): Likewise.
3985 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3987         * tst-clock1.c: Change #ifdef to #if defined.
3988         * tst-clock2.c: Likewise.
3989         * tst-cond11.c: Likewise.
3991         * sysdeps/pthread/timer_create.c (timer_create): Use
3992         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3993         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3994         THREAD_CPUTIME.
3996 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3998         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3999         _POSIX_THREAD_CPUTIME): Define to 0.
4001 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
4003         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
4004         and _POSIX_THREAD_CPUTIME to zero.
4005         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
4006         * tst-barrier2.c: Fix testing for POSIX feature.
4007         * tst-clock1.c: Likewise.
4008         * tst-clock2.c: Likewise.
4009         * tst-cond11.c: Likewise.
4010         * tst-cond4.c: Likewise.
4011         * tst-cond6.c: Likewise.
4012         * tst-flock2.c: Likewise.
4013         * tst-mutex4.c: Likewise.
4014         * tst-mutex9.c: Likewise.
4015         * tst-rwlock12.c: Likewise.
4016         * tst-rwlock4.c: Likewise.
4017         * tst-signal1.c: Likewise.
4018         * tst-spin2.c: Likewise.
4019         * sysdeps/pthread/posix-timer.h: Likewise.
4020         * sysdeps/pthread/timer_create.c: Likewise.
4021         * sysdeps/pthread/timer_routines.c: Likewise.
4023 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
4025         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4026         (__lll_mutex_timedlock_wait): Address futex correctly.
4028         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4029         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4030         make sure 2 is stored in the futex and we looked at the old value.
4031         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4032         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4033         which might very well made the code not working at all before.
4034         [BZ #417]
4036 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4038         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4039         allow SIGSETXID to be sent.
4040         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4041         for SIGSETXID to be defined.
4042         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4043         SIGSETXID cannot be blocked.
4045         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4046         Add __extension__ to long long types.
4047         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4048         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4049         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4050         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4051         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4052         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4053         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4055 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4057         * descr.h (struct pthread): Add stopped_start field.
4058         * sysdeps/pthread/createthread.c (create_thread): Set
4059         start_stopped flag in descriptor for new thread appropriately.
4060         * pthread_create.c (start_thread): Only take lock to be stopped on
4061         startup if stopped_start flag says so.
4063 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4065         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4066         is created detached and if yes, do not try to free the stack in case
4067         the thread creation failed.
4068         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4069         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4070         case there has been no error.  [BZ #405]
4072         * pthread_create.c (start_thread): Don't wait for scheduler data
4073         etc to be set at the beginning of the function.  The cancellation
4074         infrastructure must have been set up.  And enable async
4075         cancellation before potentially going to sleep.  [BZ #401]
4077 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4079         * Versions: Remove exports for pthread_set*id_np functions.
4080         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4081         for now.
4082         * Makefile: Don't build pthread_set*id code for now.
4084 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4086         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4087         internal use.
4088         * allocatestack.c (__nptl_setxid): New function.
4089         * descr.h (struct xid_command): Define type.
4090         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4091         (sighandler_setxid): New function.
4092         (__pthread_initialize_minimal): Register sighandler_setxid for
4093         SIGCANCEL.
4094         * pt-allocrtsig.c: Update comment.
4095         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4096         Declare __nptl_setxid.
4097         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4098         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4099         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4100         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4101         and pthread_setresuid_np.
4102         * pthread_setgid_np.c: New file.
4103         * pthread_setuid_np.c: New file.
4104         * pthread_setegid_np.c: New file.
4105         * pthread_seteuid_np.c: New file.
4106         * pthread_setregid_np.c: New file.
4107         * pthread_setreuid_np.c: New file.
4108         * pthread_setresgid_np.c: New file.
4109         * pthread_setresuid_np.c: New file.
4110         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4111         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4112         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4113         and pthread_setresuid_np.
4114         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4115         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4116         pthread_setregid, and pthread_setresgid.
4118 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4120         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4121         ENOMEM when out of memory.
4123 2004-09-10  Roland McGrath  <roland@redhat.com>
4125         [BZ #379]
4126         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4127         code, since we don't try to use the broken CLONE_STOPPED any more.
4128         * pthread_create.c (start_thread): Likewise.
4130 2004-09-15  Richard Henderson  <rth@redhat.com>
4132         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4134 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4136         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4137         (__libc_unwind_longjmp): Delete macro and declare as function.
4138         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4139         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4140         nptl directory.
4141         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4142         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4143         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4145 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4147         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4148         for __USE_XOPEN2K.
4149         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4150         types also for __USE_XOPEN2K.
4151         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4152         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4153         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4154         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4155         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4156         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4157         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4158         [BZ #320]
4160 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4162         * sysdeps/pthread/pthread.h
4163         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4164         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4165         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4166         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4167         [BZ #375]
4169 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4171         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4172         PSEUDO to be used with . prefix.
4174         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4175         Use atomic_increment instead of atomic_exchange_and_add.
4176         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4177         Likewise.
4178         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4179         Likewise.
4180         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4181         Likewise.
4183         * allocatestack.c (allocate_stack): Use atomic_increment_val
4184         instead of atomic_exchange_and_add.
4185         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4186         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4187         Likewise.
4188         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4189         Likewise.
4191         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4192         the initialization function might throw.
4194 2005-09-05  Richard Henderson  <rth@redhat.com>
4196         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4197         Move definition inside libpthread, libc, librt check.  Provide
4198         definition for rtld.
4200 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4202         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4203         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4204         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4205         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4206         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4207         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4208         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4209         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4210         * unwind.c: Use it.
4212         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4213         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4214         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4215         Likewise.
4216         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4217         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4218         this is the last waiter, signal pthread_cond_destroy caller and
4219         avoid using the pthread_cond_t structure after unlock.
4220         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4221         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4222         Read clock type from the least significant bits of __nwaiters instead
4223         of __clock.
4224         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4225         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4227 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4229         [BZ #342]
4230         * Makefile (tests): Add tst-cond20 and tst-cond21.
4231         * tst-cond20.c: New test.
4232         * tst-cond21.c: New test.
4233         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4234         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4235         it unsigned int.
4236         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4237         Likewise.
4238         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4239         (pthread_cond_t): Likewise.
4240         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4241         Likewise.
4242         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4243         Likewise.
4244         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4245         Likewise.
4246         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4247         (cond_nwaiters): New.
4248         (clock_bits): New.
4249         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4250         if there are waiters not signalled yet.
4251         Wait until all already signalled waiters wake up.
4252         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4253         __nwaiters.  If pthread_cond_destroy has been called and this is the
4254         last waiter, signal pthread_cond_destroy caller and avoid using
4255         the pthread_cond_t structure after unlock.
4256         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4257         decrement it when leaving.  If pthread_cond_destroy has been called
4258         and this is the last waiter, signal pthread_cond_destroy caller.
4259         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4260         Likewise.  Read clock type from the least significant bits of
4261         __nwaiters instead of __clock.
4262         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4263         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4264         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4265         clock type just from the last COND_CLOCK_BITS bits of value.
4266         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4267         instead of __clock, just from second bit of condattr's value.
4269 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4271         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4272         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4273         != 64.
4274         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4276 2004-08-15  Roland McGrath  <roland@frob.com>
4278         * pthread_atfork.c: Update copyright terms including special exception
4279         for these trivial files, which are statically linked into executables
4280         that use dynamic linking for the significant library code.
4282 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4284         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4285         pthread_rwlock_rdlock.
4286         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4287         Decrease __nr_readers_queued after reacquiring lock.
4288         * sysdeps/pthread/pthread_rwlock_timedrdlock
4289         (pthread_rwlock_timedrdlock): Likewise.
4290         Reported by Bob Cook <bobcook47@hotmail.com>.
4292 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4294         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4295         before pthread_barrier_wait.
4297 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4300         Remove unnecessary exception handling data.
4302 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4304         [BZ #284]
4305         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4306         instead of clockid_t.
4308 2004-07-21  Roland McGrath  <roland@redhat.com>
4310         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4312 2004-07-19  Roland McGrath  <roland@redhat.com>
4314         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4316 2004-07-02  Roland McGrath  <roland@redhat.com>
4318         * configure: Don't exit.
4320 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4322         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4323         (__pthread_cond_timedwait): Check for invalid nanosecond in
4324         timeout value.
4326 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4328         * Makefile: Add rules to build and run tst-fini1.
4329         * tst-fini1.c: New file.
4330         * tst-fini1mod.c: New file.
4332 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4334         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4335         if no cancellation support is needed.
4336         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4337         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4338         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4339         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4340         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4341         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4342         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4343         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4344         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4346         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4347         only if not already defined.
4349 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4351         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4352         constraint "m" instead of "0" for futex.
4354         * shlib-versions: Add powerpc64-.*-linux.*.
4356 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4358         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4359         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4360         for valid tv_nsec.
4361         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4362         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4363         bits.
4365 2004-06-29  Roland McGrath  <roland@redhat.com>
4367         * Banner: NPTL no longer has its own version number.
4368         * Makefile (nptl-version): Variable removed.
4369         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4370         using $(version), the glibc version number.
4372 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4374         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4375         Fix branch offset for a PLT entry.
4376         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4377         Likewise.
4378         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4379         Likewise.
4380         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4381         Likewise.
4382         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4383         Likewise.
4385 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4387         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4388         unconditionally.
4390 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4392         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4393         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4394         instead of tv_sec.
4395         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4396         (pthread_rwlock_timedrdlock): Likewise.
4398 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4400         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4401         Set __r7 to val, not mutex.
4403 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4405         * Makefile: Add rules to build tst-rwlock14.
4406         * tst-rwlock14.c: New file.
4408 2004-06-24  Boris Hu  <boris.hu@intel.com>
4410         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4411         check.
4412         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4414 2004-06-19  Andreas Jaeger  <aj@suse.de>
4416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4417         assembler in last patch.
4419 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4421         * sysdeps/pthread/pthread_cond_timedwait.c
4422         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4423         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4424         (__pthread_cond_timedwait): Check for invalid nanosecond in
4425         timeout value.
4426         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4427         * tst-cond19.c: New file.
4428         * Makefile: Add rules to build and run tst-cond19.
4430 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4432         * tst-context1.c (GUARD_PATTERN): Defined.
4433         (tst_context_t): Define struct containing ucontext_t & guard words.
4434         (ctx): Declare as an array of tst_context_t.
4435         (fct): Verify uc_link & guard words are still valid.
4436         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4438 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4440         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4441         Add __data.__futex field, reshuffle __data.__clock.
4442         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4443         (__pthread_cond_signal): Increment __futex at the same time as
4444         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4445         address of low 32-bits of __wakeup_seq to futex syscall.
4446         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4447         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4448         releasing internal lock to FUTEX_WAIT.
4449         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4450         (__pthread_cond_timedwait): Likewise.
4451         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4452         (FUTEX_CMP_REQUEUE): Define.
4453         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4454         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4455         Pass __futex value from before the unlock and __futex address instead
4456         of address of low 32-bits of __wakeup_seq to futex syscall.
4457         Fallback to FUTEX_WAKE all on any errors.
4459 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4461         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4462         comment typo.
4463         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4464         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4465         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4466         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4467         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4469 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4471         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4472         Add memory clobber to inline assembly.
4473         (__lll_mutex_trylock): Likewise.
4474         (__lll_mutex_cond_trylock): Likewise.
4476 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4478         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4479         Pass val argument as 6th system call argument in %r7.
4481 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4483         * Makefile (tests): Add tst-cond16.
4484         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4485         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4486         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4487         Add __data.__futex field, reshuffle __data.__clock.
4488         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4489         (__pthread_cond_signal): Increment __futex at the same time as
4490         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4491         address of low 32-bits of __wakeup_seq to futex syscall.
4492         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4493         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4494         releasing internal lock to FUTEX_WAIT.
4495         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4496         (__pthread_cond_timedwait): Likewise.
4497         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4498         (FUTEX_CMP_REQUEUE): Define.
4499         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4500         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4501         Pass __futex value from before the unlock and __futex address instead
4502         of address of low 32-bits of __wakeup_seq to futex syscall.
4503         Fallback to FUTEX_WAKE all on any errors.
4504         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4505         Define.
4506         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4507         internally.  Return non-zero if error, zero if success.
4508         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4509         Add __data.__futex field, reshuffle __data.__clock.
4510         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4511         Define.
4512         (lll_futex_requeue): Add val argument, return 1 unconditionally
4513         for the time being.
4514         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4515         Add __data.__futex field, reshuffle __data.__clock.
4516         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4517         Define.
4518         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4519         internally.  Return non-zero if error, zero if success.
4520         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4521         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4522         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4523         Define.
4524         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4525         internally.  Return non-zero if error, zero if success.
4526         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4527         Add __data.__futex field, reshuffle __data.__clock.
4528         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4529         Define.
4530         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4531         internally.  Return non-zero if error, zero if success.
4532         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4533         Add __data.__futex field, reshuffle __data.__clock.
4534         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4535         Add __data.__futex field, reshuffle __data.__clock.
4536         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4537         Increment __futex at the same time as __wakeup_seq or __total_seq.
4538         Pass address of __futex instead of address of low 32-bits of
4539         __wakeup_seq to futex syscall.
4540         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4541         Pass __futex value from before releasing internal lock
4542         to FUTEX_WAIT.
4543         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4544         Likewise.  Avoid unnecessary shadowing of variables.
4545         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4546         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4547         unlock and __futex address instead of address of low 32-bits of
4548         __wakeup_seq to futex_requeue macro, adjust for new return value
4549         meaning.
4550         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4551         (__pthread_cond_signal): Increment __futex at the same time as
4552         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4553         address of low 32-bits of __wakeup_seq to futex syscall.
4554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4555         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4556         releasing internal lock to FUTEX_WAIT.
4557         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4558         (__pthread_cond_timedwait): Likewise.
4559         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4560         (FUTEX_CMP_REQUEUE): Define.
4561         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4562         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4563         Pass __futex value from before the unlock and __futex address instead
4564         of address of low 32-bits of __wakeup_seq to futex syscall.
4565         Fallback to FUTEX_WAKE all on any errors.
4567 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4569         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4570         Add nop to align the end of critical section.
4571         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4573 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4575         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4576         Add __broadcast_seq field.
4577         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4578         all waiters as woken with woken_seq and bump broadcast counter.
4579         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4580         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4581         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4582         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4584 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4586         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4587         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4588         Reported by Kaz Kojima.
4590 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4592         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4594 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4596         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4597         __broadcast_seq with bc_seq after acquiring internal lock instead of
4598         before it.
4600 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4602         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4603         compilation.
4604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4605         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4606         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4607         (pthread_cond_t): Add __data.__broadcast_seq field.
4608         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4609         (FRAME_SIZE): Define.
4610         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4611         Comment typo fixes.
4612         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4613         Define.
4614         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4615         typo fixes.
4616         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4617         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4618         fixes.
4620 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4622         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4623         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4624         Add __broadcast_seq field.
4625         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4626         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4627         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4628         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4629         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4630         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4631         all waiters as woken with woken_seq and bump broadcast counter.
4632         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4634         __broadcast_seq field.
4635         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4636         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4637         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4638         * pthread_cond_init.c: Initialize __broadcast_seq field.
4639         * Makefile (tests): Add tst-cond17 and tst-cond18.
4640         Add .NOTPARALLEL goal.
4641         * tst-cond16.c: New file.  From Jakub.
4642         * tst-cond17.c: New file.  From Jakub.
4643         * tst-cond18.c: New file.  From Jakub.
4645 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4647         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4648         unwind info.
4650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4651         Parametrize frame size.  Correct some unwind info.
4652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4654 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4656         * tst-stack3.c: Note testing functionality beyond POSIX.
4658 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4660         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4661         Change conditional from ifdef to if.
4663 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4665         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4666         SYSDEP_CANCEL_ERROR): Define.
4667         (PSEUDO): Use it.
4669 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4671         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4673 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4675         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4677 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4679         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4680         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4681         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4682         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4684 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4686         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4687         thread has all signals blocked.
4689 2004-04-18  Andreas Jaeger  <aj@suse.de>
4691         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4692         (SEM_VALUE_MAX): Add missing brace.
4694 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4696         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4697         in rt subdir.
4698         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4699         * sysdeps/pthread/tst-mqueue8x.c: New test.
4700         * tst-cancel4.c: Update comment about message queues.
4702         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4703         return it_value { 0, 0 }.
4704         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4705         like SIGEV_SIGNAL.
4706         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4707         assertion for SIGEV_NONE.
4708         (thread_attr_compare): Compare all attributes, not just a partial
4709         subset.
4711 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4713         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4715 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4717         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4718         Just use a plain number.
4719         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4720         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4721         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4722         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4723         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4724         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4725         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4727 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4729         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4730         frame info.
4731         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4733 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4735         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4736         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4737         of calling sigwaitinfo.
4739 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4741         * allocatestack.c (allocate_stack): Set reported_guardsize
4742         unconditionally.
4743         * pthread_getattr_np.c (pthread_getattr_np): Use
4744         reported_guardsize instead of guardsize.
4745         * descr.h (struct pthread): Add reported_guardsize field.
4747 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4749         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4751 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4753         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4755 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4757         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4758         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4759         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4760         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4761         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4762         Define.
4763         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4764         (_POSIX_MESSAGE_PASSING): Define.
4765         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4766         (_POSIX_MESSAGE_PASSING): Define.
4767         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4768         (_POSIX_MESSAGE_PASSING): Define.
4770 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4772         * tst-context1.c (fct): Check whether correct stack is used.
4774 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4776         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4777         matching constraints for asm mem parameters.
4779         * tst-clock2.c (tf): Don't define unless needed.
4781 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4783         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4784         $(gnulib).
4786 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4788         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4789         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4790         * pthreadP.h: Declare __nptl_deallocate_tsd.
4791         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4792         Adjust caller.
4794         * Makefile (tests): Add tst-tsd5.
4795         * tst-tsd5.c: New file.
4797 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4799         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4800         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4801         is SHLIB_COMPAT check.
4802         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4803         (__pthread_attr_getaffinity_old): Likewise.
4804         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4805         (__pthread_getaffinity_old): Likewise.
4806         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4807         (__pthread_setaffinity_old): Likewise.
4809 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4811         * allocatestack.c (_make_stacks_executable): Call
4812         _dl_make_stack_executable first.
4814 2004-03-24  Roland McGrath  <roland@redhat.com>
4816         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4817         constraint instead of "0".
4819 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4821         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4822         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4824         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4825         code to avoid warning.
4827 2004-03-24  Andreas Jaeger  <aj@suse.de>
4829         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4830         (__pthread_attr_setaffinity_old): Remove const.
4832 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4834         * sysdeps/unix/sysv/linux/smp.h: New file.
4835         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4836         * init.c: Define __is_smp.
4837         (__pthread_initialize_minimal_internal): Call is_smp_system to
4838         initialize __is_smp.
4839         * pthreadP.h: Declare __is_smp.
4840         Define MAX_ADAPTIVE_COUNT is necessary.
4841         * pthread_mutex_init.c: Add comment regarding __spins field.
4842         * pthread_mutex_lock.c: Implement adaptive mutex type.
4843         * pthread_mutex_timedlock.c: Likewise.
4844         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4845         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4846         Add __spins field.
4847         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4848         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4849         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4850         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4851         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4852         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4853         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4854         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4855         lll_mutex_cond_trylock.
4856         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4857         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4858         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4859         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4860         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4861         Define BUSY_WAIT_NOP.
4862         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4863         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4865         * tst-mutex5.c: Add support for testing adaptive mutexes.
4866         * tst-mutex7.c: Likewise.
4867         * tst-mutex5a.c: New file.
4868         * tst-mutex7a.c: New file.
4869         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4871         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4872         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4873         vgettimeofday call might destroy the content.
4875         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4876         @pause in the loop.
4878         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4879         No need to restrict type of ret.  Make it int.  Add comment.
4881         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4882         Remove unnecessary setne instruction.
4884 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4886         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4887         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4888         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4889         If realloc fails, break out of the loop.
4891 2004-03-20  Andreas Jaeger  <aj@suse.de>
4893         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4894         (__pthread_setaffinity_old): Fix interface.
4895         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4896         (__pthread_getaffinity_old): Likewise.
4898         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4899         (__pthread_setaffinity_new): Remove duplicate declaration.
4901 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4903         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4904         the return value to a safe register.
4905         (CDISABLE): Set the function argument correctly.
4907 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4909         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4910         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4911         Rewrite so that only one locked memory operation per round is needed.
4912         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4913         (pthread_barrier_wait): After wakeup, release lock only when the
4914         last thread stopped using the barrier object.
4915         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4916         (__pthread_cond_wait): Don't store mutex address if the current
4917         value is ~0l.  Add correct cleanup support and unwind info.
4918         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4919         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4920         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4921         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4922         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4923         Add correct cleanup support and unwind info.
4924         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4925         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4926         information for syscall wrappers.
4928 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4930         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4931         cpusetsize field, remove next.
4932         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4933         parameter for size of the CPU set.
4934         (pthread_setaffinity_np): Likewise.
4935         (pthread_attr_getaffinity_np): Likewise.
4936         (pthread_attr_setaffinity_np): Likewise.
4937         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4938         interface change, keep compatibility code.
4939         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4940         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4941         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4942         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4943         __pthread_getaffinity_np.
4944         * Versions: Add version for changed interfaces.
4945         * tst-attr3.c: Adjust test for interface change.
4946         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4947         increasing buffer sizes.
4948         * pthread_attr_destroy.c: Remove unused list handling.
4949         * pthread_attr_init.c: Likewise.
4951 2004-03-17  Roland McGrath  <roland@redhat.com>
4953         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4954         first argument to clock_getres so we ever enable kernel timers.
4956 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4958         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4960 2004-03-12  Richard Henderson  <rth@redhat.com>
4962         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4963         oldvalue from CENABLE to CDISABLE.
4965 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4967         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4968         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4969         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4970         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4972 2004-03-11  Richard Henderson  <rth@redhat.com>
4974         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4975         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4976         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4978 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4980         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4981         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4982         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4984 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4986         * forward.c (__pthread_cond_broadcast_2_0,
4987         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4988         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4989         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4991 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4993         * sysdeps/sh/tcb-offsets.sym: Add PID.
4994         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4995         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4997 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4999         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
5000         include <sysdep-cancel.h>, vfork is no cancellation point.
5001         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
5002         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
5003         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
5005 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
5007         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
5008         libc_hidden_def.
5009         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
5010         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
5011         Likewise.
5012         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
5013         Likewise.
5014         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
5015         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
5016         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
5017         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
5018         of DO_CALL_VIA_BREAK.  Work around a gas problem.
5020         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
5021         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
5022         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
5023         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
5024         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
5025         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
5027         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5028         a local register for saving old PID.  Negate PID in parent upon exit.
5030         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5031         tcb-offsets.h.
5032         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5033         before syscall, set to the old value in the parent afterwards.
5034         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5035         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5036         tcb-offsets.h.
5037         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5038         before syscall, set to the old value in the parent afterwards.
5039         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5040         * sysdeps/s390/tcb-offsets.sym: Add PID.
5042         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5043         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5044         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5045         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5046         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5047         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5049 2004-03-10  Andreas Schwab  <schwab@suse.de>
5051         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5052         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5053         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5055 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5057         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5058         * tst-cancel21.c (do_one_test): Likewise.
5059         Reported by Gordon Jin <gordon.jin@intel.com>.
5061 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5063         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5064         if non-zero and set to INT_MIN if zero.
5065         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5066         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5067         (SAVE_PID, RESTORE_PID): Define.
5068         (__vfork): Use it.
5069         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5070         Use relative path to avoid including NPTL i386/vfork.S.
5071         (SAVE_PID, RESTORE_PID): Define.
5072         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5073         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5074         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5075         tst-vfork2x.
5076         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5077         * tst-vfork1.c: New test.
5078         * tst-vfork2.c: New test.
5079         * tst-vfork1x.c: New test.
5080         * tst-vfork2x.c: New test.
5082 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5084         * sysdeps/i386/tcb-offsets.sym: Add PID.
5085         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5086         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5087         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5089 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5091         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5093 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5095         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5096         _rtld_global_ro.
5098 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5100         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5101         _rtld_global_ro.
5103         * tst-once4.c: Remove unnecessary macro definition.
5105         * tst-mutex7.c (do_test): Limit thread stack size.
5106         * tst-once2.c (do_test): Likewise.
5107         * tst-tls3.c (do_test): Likewise.
5108         * tst-tls1.c (do_test): Likewise.
5109         * tst-signal3.c (do_test): Likewise.
5110         * tst-kill6.c (do_test): Likewise.
5111         * tst-key4.c (do_test): Likewise.
5112         * tst-join4.c (do_test): Likewise.
5113         * tst-fork1.c (do_test): Likewise.
5114         * tst-context1.c (do_test): Likewise.
5115         * tst-cond2.c (do_test): Likewise.
5116         * tst-cond10.c (do_test): Likewise.
5117         * tst-clock2.c (do_test): Likewise.
5118         * tst-cancel10.c (do_test): Likewise.
5119         * tst-basic2.c (do_test): Likewise.
5120         * tst-barrier4.c (do_test): Likewise.
5122 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5124         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5126 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5129         (__pthread_cond_timedwait): Optimize wakeup test.
5130         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5131         (__pthread_cond_wait): Likewise.
5132         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5133         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5134         Likewise.
5136 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5138         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5139         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5140         the atomic instruction needed.
5141         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5142         (__lll_mutex_lock_wait): Likewise.
5144 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5146         * Makefile (tests): Add tst-cond14 and tst-cond15.
5147         * tst-cond14.c: New file.
5148         * tst-cond15.c: New file.
5150 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5152         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5153         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5154         needs to be implemented differently to be useful.
5156 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5158         * pthread_attr_setschedparam.c: Don't test priority against limits
5159         here.  Set ATTR_FLAG_SCHED_SET flag.
5160         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5161         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5162         from parent thread to child.  If attribute is used and scheduling
5163         parameters are not inherited, copy parameters from attribute or
5164         compute them.  Check priority value.
5165         * pthread_getschedparam.c: If the parameters aren't known yet get
5166         them from the kernel.
5167         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5168         ATTR_FLAG_POLICY_SET flag for thread.
5169         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5170         and ATTR_FLAG_POLICY_SET.
5172         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5174         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5175         fail if stack address hasn't been set.  Just return 0.
5177 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5179         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5180         libpthread for the files in this list.
5181         (CFLAGS-tst-unload): Removed.
5182         * tst-unload.c (do_test): Don't use complete path for
5183         LIBPHREAD_SO.
5185         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5186         tst-_res1mod2.
5188 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5190         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5191         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5192         operation per round is needed.
5193         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5194         (__lll_mutex_lock_wait): Likewise.
5196 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5198         * tst-cancel9.c (cleanup): Don't print to stderr.
5200 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5202         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5204 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5206         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5207         (__syscall_error_handler2): Call CDISABLE.
5208         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5209         (__syscall_error_handler2): Call CDISABLE.
5211         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5212         Release lock before the loop, don't reacquire it.
5214         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5216 2004-02-19  Andreas Schwab  <schwab@suse.de>
5218         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5219         Fix last change.
5221 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5223         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5224         (pthread_barrier_wait): After wakeup, release lock only when the
5225         last thread stopped using the barrier object.
5226         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5227         (pthread_barrier_wait): Likewise.
5228         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5229         Likewise.
5230         * Makefile (tests): Add tst-barrier4.
5231         * tst-barrier4.c: New file.
5233         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5234         (__pthread_cond_timedwait): Perform timeout test while holding
5235         internal lock to prevent wakeup race.
5236         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5237         * sysdeps/pthread/pthread_cond_timedwait.c
5238         (__pthread_cond_timedwait): Likewise.
5239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5240         (__pthread_cond_timedwait): Likewise.
5242 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5244         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5245         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5246         * Makefile (tests): Add tst-rwlock13.
5247         * tst-rwlock13.c: New test.
5249 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5251         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5252         (__condvar_tw_cleanup): Little optimization.
5253         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5255 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5257         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5258         libpthread as "lib" parameter to SHLIB_COMPAT.
5259         (__novmx_siglongjmp): Fix typo in function name.
5260         (__novmx_longjmp): Fix typo in function name.
5262 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5264         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5265         __builtin_expect.
5267         * sysdeps/generic/pt-longjmp.c: Moved to...
5268         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5270 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5272         * Makefile (libpthread-routines): Add pt-cleanup.
5273         * pt-longjmp.c: Removed.
5274         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5275         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5276         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5277         Version longjmp, siglongjmp for GLIBC_2.3.4.
5278         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5280 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5282         * sysdeps/pthread/pthread_cond_timedwait.c
5283         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5284         Reuse code.  Add __builtin_expects.
5286         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5287         (__pthread_cond_timedwait): Get internal lock in case timeout has
5288         passed before the futex syscall.
5289         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5291 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5293         * allocatestack.c: Pretty printing.
5295         * sysdeps/pthread/createthread.c (create_thread): Don't add
5296         CLONE_DETACHED bit if it is not necessary.
5298 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5300         * pthread_getattr_np.c: Include ldsodefs.h.
5302 2004-01-16  Richard Henderson  <rth@redhat.com>
5304         * allocatestack.c: Don't declare __libc_stack_end.
5305         * init.c (__pthread_initialize_minimal_internal): Likewise.
5306         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5308 2004-01-15  Richard Henderson  <rth@redhat.com>
5310         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5311         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5312         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5313         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5314         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5315         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5316         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5317         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5319 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5321         * init.c (pthread_functions): Make array const.
5323 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5325         * allocatestack.c (__make_stacks_executable): Change interface.
5326         Check parameters.  Pass parameter on to libc counterpart.
5327         * pthreadP.h: Change declaration.
5329 2004-01-13  Richard Henderson  <rth@redhat.com>
5331         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5332         prototype form.
5333         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5334         Likewise.
5336         * sysdeps/alpha/Makefile: New file.
5337         * sysdeps/alpha/tcb-offsets.sym: New file.
5338         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5339         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5341         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5342         on powerpc version.
5344 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5346         * Makefile (tests): Add tst-backtrace1.
5347         * tst-backtrace1.c: New test.
5349 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5351         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5352         register as second parameter to the REGISTER macro.
5353         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5354         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5355         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5356         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5357         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5358         of thread register as second parameter to REGISTER macro in 64 case.
5360 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5362         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5363         (CFLAGS-getpid.o): Defined.
5364         (CFLAGS-getpid.os): Defined.
5366 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5368         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5369         returned for main thread does not overlap with any other VMA.
5370         Patch by Jakub Jelinek.
5372 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5374         * tst-raise1.c: Include stdio.h.
5376 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5378         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5379         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5380         If pid is 0, set it to selftid.
5381         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5382         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5383         != 0, return self->tid without doing a syscall.
5384         * descr.h (struct pthread): Move pid field after tid.
5386         * Makefile (tests): Add tst-raise1.
5387         * tst-raise1.c: New file.
5389 2003-12-23  Roland McGrath  <roland@redhat.com>
5391         * tst-oddstacklimit.c: New file.
5392         * Makefile (tests): Add it.
5393         (tst-oddstacklimit-ENV): New variable.
5395         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5396         value up to page size for __default_stacksize.
5398 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5400         * Makefile (tests): Add tst-eintr5.
5401         * tst-eintr5.c: New file.
5403         * eintr.c (eintr_source): Prevent sending signal to self.
5405         * tst-eintr2.c (tf1): Improve error message.
5407 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5409         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5410         * sysdeps/unix/sysv/linux/getpid.c: New file.
5411         * pthread_cancel.c: Add comment explaining use of PID field.
5412         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5413         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5414         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5415         temporarily to signal the field must not be relied on and updated
5416         by getpid().
5417         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5418         temporarily negative.
5419         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5421 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5423         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5424         (eintr_source): If ARG != NULL, use pthread_kill.
5425         * tst-eintr1.c: Adjust for this change.
5426         * tst-eintr2.c: Likewise.
5427         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5428         * tst-eintr3.c: New file.
5429         * tst-eintr4.c: New file.
5431 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5433         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5434         if CANCELSTATE_BITMASK is set.
5435         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5436         Likewise.
5438         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5439         (tests-reverse): Add tst-cancel23.
5440         * tst-cancel22.c: New test.
5441         * tst-cancel23.c: New test.
5443 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5445         * tst-eintr1.c: Better error messages.
5447         * Makefile (tests): Add tst-eintr2.
5448         * tst-eintr2.c: New file.
5450 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5452         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5453         (CFLAGS-tst-cancelx21.c): Set.
5454         * tst-cancel21.c: New test.
5455         * tst-cancelx21.c: New test.
5457         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5458         comparison operand.
5459         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5460         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5461         * pt-longjmp.c: Include jmpbuf-unwind.h.
5462         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5463         _JMPBUF_UNWINDS.  Adjust compared pointers.
5464         * init.c (__pthread_initialize_minimal_internal): Initialize
5465         pd->stackblock_size.
5466         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5467         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5468         * sysdeps/i386/jmpbuf-unwind.h: New file.
5469         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5470         * sysdeps/s390/jmpbuf-unwind.h: New file.
5471         * sysdeps/sh/jmpbuf-unwind.h: New file.
5472         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5473         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5474         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5475         (_JMPBUF_CFA_UNWINDS): Remove.
5476         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5478 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5480         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5481         (CFLAGS-tst-cancelx20.c): Set.
5482         * tst-cancel20.c: New test.
5483         * tst-cancelx20.c: New test.
5485 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5487         * init.c (__pthread_initialize_minimal_internal): Don't treat
5488         architectures with separate register stack special here when
5489         computing default stack size.
5491 2003-12-17  Roland McGrath  <roland@redhat.com>
5493         * Makefile (tst-cancelx7-ARGS): New variable.
5494         Reportd by Greg Schafer <gschafer@zip.com.au>.
5496 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5498         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5499         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5500         (tst-stack3-ENV): Set.
5501         ($(objpfx)tst-stack3-mem): New.
5502         * tst-stack3.c: New test.
5504 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5506         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5507         Add unwind directives.  Drop unused .regstk directive.
5508         (_fini_EPILOG_BEGINS): Add unwind directives.
5510 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5512         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5513         Assume parameter is a pointer.
5514         (lll_futex_wake): Likewise.
5515         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5516         Likewise.
5517         (lll_futex_wake): Likewise.
5518         Reported by Boris Hu.
5519         * sysdeps/unix/sysv/linux/unregister-atfork.c
5520         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5522         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5524 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5526         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5527         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5528         __rtld_lock_initialize for ld.so lock.
5529         Patch in part by Adam Li <adam.li@intel.com>.
5531 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5533         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5534         in $(gnulib).  Also, remove stale comment.
5536 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5538         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5539         advantage of new syscall stub and optimize accordingly.
5541         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5542         from SYS_futex, to match expectations of
5543         sysdep.h:DO_INLINE_SYSCALL.
5544         (lll_futex_clobbers): Remove.
5545         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5546         (lll_futex_wake): Likewise.
5547         (lll_futex_requeue): Likewise.
5548         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5549         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5550         Jelinek).
5551         (__lll_mutex_lock): Likewise.
5552         (__lll_mutex_cond_lock): Likewise.
5553         (__lll_mutex_timed_lock): Likewise.
5554         (__lll_mutex_unlock): Likewise.
5555         (__lll_mutex_unlock_force): Likewise.
5557         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5558         comes before the include of <sysdep.h>.
5559         (THREAD_SELF_SYSINFO): New macro.
5560         (THREAD_SYSINFO): Likewise.
5561         (INIT_SYSINFO): New macro.
5562         (TLS_INIT_TP): Call INIT_SYSINFO.
5564         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5566         * sysdeps/pthread/createthread.c (create_thread): Use
5567         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5568         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5569         THREAD_SELF_SYSINFO instead of open code.
5570         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5571         (THREAD_SYSINFO): Likewise.
5573         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5575         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5577 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5579         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5580         instead of .init.  Patch by David Mosberger.
5582 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5584         * sysdeps/pthread/configure.in: Remove broken declaration in C
5585         cleanup handling check.
5587 2003-11-30  Andreas Jaeger  <aj@suse.de>
5589         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5590         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5591         Likewise.
5593 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5595         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5596         * pthread_attr_destroy.c: Include shlib-compat.h.
5597         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5598         is set in iattr->flags.
5599         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5601 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5603         * Makefile (distribute): Add tst-cleanup4aux.c.
5605         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5606         include.
5608 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5610         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5611         pthread_cond_signal.
5613         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5614         store mutex address if the current value is ~0l.
5615         * sysdeps/pthread/pthread_cond_timedwait.c
5616         (__pthread_cond_timedwait): Likewise.
5617         * sysdeps/pthread/pthread_cond_broadcast.c
5618         (__pthread_cond_broadcast): Don't use requeue for pshared
5619         condvars.
5621         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5622         (__pthread_cond_wait): Don't store mutex address if the current
5623         value is ~0l.
5624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5625         (__pthread_cond_timedwait): Likewise.
5626         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5627         (__pthread_cond_broadcast): Don't use requeue for pshared
5628         condvars.
5630         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5631         element with ~0l for pshared condvars, with NULL otherwise.
5633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5634         (__pthread_cond_wait): Don't store mutex address if the current
5635         value is ~0l.
5636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5637         (__pthread_cond_timedwait): Likewise.
5638         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5639         (__pthread_cond_broadcast): Don't use requeue for pshared
5640         condvars.
5642         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5643         * tst-cond12.c: New file.
5644         * tst-cond13.c: New file.
5646 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5648         * sysdeps/pthread/configure.in: Make missing forced unwind support
5649         fatal.
5651 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5653         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5655 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5657         * Makefile: Add magic to clean up correctly.
5659 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5661         * unwind.c (FRAME_LEFT): Define.
5662         (unwind_stop): Handle old style cleanups here.
5663         (__pthread_unwind): Handle old style cleanups only if
5664         !HAVE_FORCED_UNWIND.
5665         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5666         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5667         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5668         ($(objpfx)tst-cleanupx4): Likewise.
5669         * tst-cleanup4.c: New test.
5670         * tst-cleanup4aux.c: New.
5671         * tst-cleanupx4.c: New test.
5673 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5675         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5676         lll_mutex_*lock macros to skip atomic operations on some archs.
5678 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5680         * sysdeps/pthread/tst-timer.c (main): Initialize
5681         sigev2.sigev_value as well.
5683 2003-10-15  Roland McGrath  <roland@redhat.com>
5685         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5686         is missing.
5687         * sysdeps/pthread/configure: Regenerated.
5689 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5691         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5692         locking macros.  No distinction between normal and mutex locking
5693         anymore.
5694         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5695         Merge bits from lowlevelmutex.S we still need.
5696         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5697         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5698         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5699         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5700         new mutex implementation.
5701         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5702         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5703         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5704         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5705         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5706         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5707         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5709         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5710         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5711         symbol for entry point to avoid cancellation.
5713 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5715         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5716         changes.
5717         (SAVE_OLDTYPE_0): Fix a typo.
5719 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5721         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5722         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5724 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5726         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5727         correct offset.
5729 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5731         * Makefile (tests): Add tst-cancel19.
5732         * tst-cancel19.c: New test.
5734 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5736         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5737         restoring of the old cancellation type.
5739 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5741         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5743 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5745         * sysdeps/pthread/malloc-machine.h: New file
5747 2003-09-24  Roland McGrath  <roland@redhat.com>
5749         * allocatestack.c (__make_stacks_executable): Don't ignore return
5750         value from _dl_make_stack_executable.
5752 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5754         * allocatestack.c (__make_stacks_executable): Also change
5755         permission of the currently unused stacks.
5757         * allocatestack.c (change_stack_perm): Split out from
5758         __make_stacks_executable.
5759         (allocate_stack): If the required permission changed between the time
5760         we started preparing the stack and queueing it, change the permission.
5761         (__make_stacks_executable): Call change_stack_perm.
5763         * Makefile: Build tst-execstack-mod locally.
5764         * tst-execstack-mod.c: New file.
5766 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5768         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5770 2003-09-23  Roland McGrath  <roland@redhat.com>
5772         * tst-execstack.c: New file.
5773         * Makefile (tests): Add it.
5774         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5775         (LDFLAGS-tst-execstack): New variable.
5777         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5778         whether to use PROT_EXEC for stack mmap.
5779         (__make_stacks_executable): New function.
5780         * pthreadP.h: Declare it.
5781         * init.c (__pthread_initialize_minimal_internal): Set
5782         GL(dl_make_stack_executable_hook) to that.
5784 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5786         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5787         recommendation from AMD re avoidance of lock prefix.
5789 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5791         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5792         lll_futex_timed_wait instead of lll_futex_wait.
5793         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5794         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5795         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5796         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5797         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5798         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5799         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5800         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5801         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5802         Completely revamp the locking macros.  No distinction between
5803         normal and mutex locking anymore.
5804         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5805         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5806         __lll_lock_timedwait): Fix prototypes.
5807         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5808         __lll_lock_timedwait): Likewise.
5809         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5810         macros, add __builtin_expect.
5811         (lll_mutex_timedlock): Likewise.  Fix return value.
5812         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5813         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5814         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5815         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5816         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5817         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5818         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5819         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5821 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5823         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5824         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5825         operation if possible.
5827         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5828         like jumping over the lock prefix.
5830 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5832         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5833         locking macros.  No distinction between normal and mutex locking
5834         anymore.
5835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5836         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5837         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5838         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5839         locking.  Merge bits from lowlevelmutex.S we still need.
5840         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5841         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5842         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5843         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5844         * Makefile (routines): Remove libc-lowlevelmutex.
5845         (libpthread-rountines): Remove lowlevelmutex.
5846         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5847         for new mutex implementation.
5848         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5849         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5850         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5851         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5852         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5853         Likewise.
5854         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5855         Likewise.
5856         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5857         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5858         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5859         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5860         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5861         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5862         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5863         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5864         Likewise.
5865         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5866         Likewise.
5867         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5868         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5869         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5870         Don't use requeue.
5871         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5872         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5874 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5876         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5877         in parameters of asm with output parameters.
5879         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5880         type of DECR parameter to int.
5881         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5883 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5885         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5886         guardsize for each thread.
5888 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5890         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5891         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5892         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5894         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5895         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5896         NULL.
5897         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5898         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5899         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5900         (pthread_getaffinity_np): Add hidden_def.
5902         * Makefile (tests): Add tst-attr3.
5903         * tst-attr3.c: New test.
5905         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5907 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5909         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5910         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5912 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5914         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5915         * tst-align.c: Include tst-stack-align.h.
5916         (tf, do_test): Use TEST_STACK_ALIGN macro.
5918 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5920         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5921         variable.
5923 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5925         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5926         stack-related values for the initial thread.
5928 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5930         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5932 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5934         * pthread_mutex_lock.c: Minor code rearrangements.
5936 2003-09-05  Roland McGrath  <roland@redhat.com>
5938         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5939         Instead, include ../nptl_db/db_info.c to do its magic.
5940         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5941         (__pthread_pthread_key_2ndlevel_size): Likewise.
5942         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5943         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5944         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5945         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5946         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5947         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5948         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5949         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5950         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5951         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5952         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5953         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5954         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5955         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5956         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5957         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5958         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5960 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5962         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5963         of pthread_t to be compatible with LT.
5964         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5965         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5966         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5967         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5968         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5969         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5970         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5972 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5974         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5976 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5978         * unwind-forcedunwind.c: Move to...
5979         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5980         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5981         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5982         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5983         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5984         * unwind.c: Include jmpbuf-unwind.h.
5985         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5987 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5989         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5990         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5991         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5992         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5993         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5994         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5995         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5996         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5997         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5998         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5999         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
6000         function.
6001         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
6002         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
6003         * Makefile (tests): Add tst-stack2.
6004         * tst-stack2.c: New test.
6005         * tst-stack1.c: Include limits.h and sys/param.h.
6006         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
6008         * pthread_condattr_setpshared.c: Include errno.h.
6009         (pthread_condattr_setpshared): Return EINVAL if pshared
6010         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
6012         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
6013         defined symbol for entry point to avoid cancellation.
6014         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6015         Likewise.
6016         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
6017         Likewise.
6018         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6019         Likewise.
6020         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
6021         Likewise.
6022         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
6023         Likewise.
6024         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
6025         __close_nocancel, __read_nocancel, __write_nocancel,
6026         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
6027         libpthread.so or librt.so, define to corresponding function
6028         without _nocancel suffix.
6029         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6030         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6031         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6033         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6035 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6037         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6038         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6040         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6041         in subsections has a symbol associated with it.
6043         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6044         defined symbol for entry point to avoid cancellation.
6045         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6047 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6049         * Makefile (tests): Add tst-tls5.
6050         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6051         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6052         ($(objpfx)tst-tls5): New.
6053         ($(objpfx)tst-tls6.out): Likewise.
6054         (tests): Depend on $(objpfx)tst-tls6.out.
6055         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6056         (do_test): Check pthread_self () return value alignment.
6057         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6058         (tf): Check pthread_self () return value alignment.
6059         * tst-tls5.c: New test.
6060         * tst-tls5.h: New.
6061         * tst-tls5mod.c: New.
6062         * tst-tls5moda.c: New.
6063         * tst-tls5modb.c: New.
6064         * tst-tls5modc.c: New.
6065         * tst-tls5modd.c: New.
6066         * tst-tls5mode.c: New.
6067         * tst-tls5modf.c: New.
6068         * tst-tls6.sh: New test.
6070         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6071         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6072         * init.c (pthread_functions): Initialize them.
6073         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6074         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6075         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6076         pthread_cond_timedwait@@GLIBC_2.3.2.
6078 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6080         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6081         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6082         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6083         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6084         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6085         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6087         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6089         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6090         _POSIX_THREAD_PRIORITY_SCHEDULING.
6091         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6093 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6095         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6096         nested function, use static inline function from libio.h.
6097         Code by Richard Henderson.
6099         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6100         weak.
6102 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6104         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6105         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6106         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6107         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6108         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6109         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6110         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6111         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6112         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6113         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6114         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6115         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6116         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6117         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6118         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6119         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6120         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6121         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6122         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6123         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6124         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6125         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6126         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6127         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6128         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6129         * sysdeps/sparc/tls.h: New file.
6130         * sysdeps/sparc/tcb-offsets.sym: New file.
6131         * sysdeps/sparc/Makefile: New file.
6132         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6133         * init.c [__sparc__] (__NR_set_tid_address): Define.
6135 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6137         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6138         _IO_release_lock): Define.
6140 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6142         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6143         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6145 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6147         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6148         (__pthread_cleanup_class): Add missing return types of member
6149         functions.
6151 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6153         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6154         (lll_mutex_unlock_force): Add memory barrier between store and futex
6155         syscall.
6157 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6159         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6160         tempmsg in first loop.
6162 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6164         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6165         _POSIX_THREAD_PRIORITY_SCHEDULING.
6166         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6168 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6170         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6171         (__rtld_lock_default_lock_recursive,
6172         __rtld_lock_default_unlock_recursive): Define.
6173         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6174         __rtld_lock_unlock_recursive): Define using
6175         GL(_dl_rtld_*lock_recursive).
6176         * init.c (__pthread_initialize_minimal_internal): Initialize
6177         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6178         Lock GL(_dl_load_lock) the same number of times as
6179         GL(_dl_load_lock) using non-mt implementation was nested.
6181         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6182         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6184 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6186         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6187         PIPE_BUF.
6189 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6191         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6193 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6195         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6196         to first syscall error check.  Move syscall error check for tkill
6197         into __ASSUME_CLONE_STOPPED #ifdef.
6199 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6201         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6202         is not defined, do explicit synchronization.
6203         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6204         is not defined also unlock pd->lock for non-debugging case in case
6205         it is necessary.
6206         * pthread_create.c (start_thread): Always get and release pd->lock
6207         if __ASSUME_CLONE_STOPPED is not defined.
6208         (start_thread_debug): Removed.  Adjust users.
6209         * allocatestack.c (allocate_stack): Always initialize lock if
6210         __ASSUME_CLONE_STOPPED is not defined.
6211         * Makefile (tests): Add tst-sched1.
6212         * tst-sched1.c: New file.
6214         * sysdeps/pthread/createthread.c (do_clone): Only use
6215         sched_setschduler and pass correct parameters.
6217 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6219         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6220         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6221         PTHREAD_STACK_MIN in comments.
6223 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6225         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6226         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6227         argument.
6228         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6229         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6230         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6231         (__pthread_cleanup_upto): Fix prototype.
6232         (_longjmp_unwind): Adjust caller.
6233         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6234         Change second argument to const struct pointer.
6235         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6236         * tst-sem9.c (main): Likewise.
6237         * unwind.c: Include string.h for strlen prototype.
6239 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6241         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6242         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6243         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6244         Define HAVE_CMOV.
6245         Patch by Nicholas Miell <nmiell@attbi.com>.
6247 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6249         * init.c (__pthread_initialize_minimal_internal): Initialize
6250         GL(dl_init_static_tls).
6251         * pthreadP.h (__pthread_init_static_tls): New prototype.
6252         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6253         New functions.
6254         * Makefile (tests): Add tst-tls4.
6255         (modules-names): Add tst-tls4moda and tst-tls4modb.
6256         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6257         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6258         tst-tls4modb.so.
6259         * tst-tls4.c: New file.
6260         * tst-tls4moda.c: New file.
6261         * tst-tls4modb.c: New file.
6263 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6265         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6266         before __timer_dealloc.
6267         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6268         Don't call list_unlink.
6270 2003-07-29  Roland McGrath  <roland@redhat.com>
6272         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6274 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6276         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6277         Don't reuse struct aiocb A if it failed.
6278         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6279         not just one byte, as that does not block.
6281 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6283         * sysdeps/pthread/unwind-resume.c: New file.
6284         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6285         unwind-resume in csu subdir.
6286         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6287         exceptions.
6288         (librt-sysdep_routines, librt-shared-only-routines): Add
6289         rt-unwind-resume.
6290         * sysdeps/pthread/rt-unwind-resume.c: New file.
6291         * unwind-forcedunwind.c: New file.
6292         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6293         (libpthread-shared-only-routines): Likewise.
6294         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6295         * pthreadP.h (pthread_cancel_init): New prototype.
6296         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6298         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6299         attr argument const struct pthread_attr *.
6301         * res.c (__res_state): Return __resp.
6302         * descr.h: Include resolv.h.
6303         (struct pthread): Add res field.
6304         * pthread_create.c: Include resolv.h.
6305         (start_thread): Initialize __resp.
6306         * Makefile (tests): Add tst-_res1.
6307         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6308         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6309         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6310         libpthread.
6311         * tst-_res1.c: New file.
6312         * tst-_res1mod1.c: New file.
6313         * tst-_res1mod2.c: New file.
6315 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6317         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6319         * Makefile: Define various *-no-z-defs variables for test DSOs
6320         which has undefined symbols.
6322 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6324         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6325         Retry if the stwcx fails to store once_control.
6327 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6329         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6330         pthread_attr_setaffinity.
6331         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6332         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6333         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6334         * pthread_attr_destroy.c: Free cpuset element if allocated.
6335         * pthread_create.c: Pass iattr as additional parameter to
6336         create_thread.
6337         * sysdeps/pthread/createthread.c: If attribute is provided and
6338         a new thread is created with affinity set or scheduling parameters,
6339         start thread with CLONE_STOPPED.
6340         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6341         pthread_attr_setaffinity.
6342         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6343         cpuset element.
6345 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6347         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6349 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6351         * sysdeps/pthread/configure.in: Require CFI directives also for
6352         ppc and s390.
6354 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6356         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6357         Add cfi directives.
6359 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6361         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6362         CLEANUP_JMP_BUF.
6363         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6364         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6365         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6366         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6367         not self pointer in __writer.  Compare with TID to determine
6368         deadlocks.
6369         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6370         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6371         Likewise.
6372         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6373         Likewise.
6374         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6375         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6376         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6377         macros also when compiling librt.
6379 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6381         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6382         -fasynchronous-unwind-tables.
6383         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6384         (PSEUDO): Add cfi directives.
6385         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6386         Likewise.
6387         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6388         Likewise.
6390 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6392         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6393         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6394         * unwind.c (__pthread_unwind_next): Add hidden_def.
6395         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6396         Likewise.
6397         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6398         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6399         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6400         Likewise.
6401         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6402         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6403         Likewise.
6404         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6405         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6406         __pthread_unregister_cancel and __pthread_unwind_next.
6408 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6410         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6411         different symbol for the cancellation syscall wrapper and
6412         non-cancellation syscall wrapper.
6413         (PSEUDO_END): Define.
6415 2003-07-05  Richard Henderson  <rth@redhat.com>
6417         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6418         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6419         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6420         return actual return value from the syscall, not 0.
6422 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6424         * descr.h (struct pthread): Add pid field.
6425         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6426         (__reclaim_stacks): Likewise.
6427         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6428         also check for PID of the signal source.
6429         (__pthread_initialize_minimal_internal): Also initialize pid field
6430         of initial thread's descriptor.
6431         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6432         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6433         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6434         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6435         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6437 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6439         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6440         Fix use of parameter.
6441         (__libc_cleanup_pop): Likewise.
6443 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6445         * init.c (sigcancel_handler): Change parameters to match handler
6446         for SA_SIGACTION.  Check signal number and code to recognize
6447         invalid invocations.
6449 2003-07-03  Roland McGrath  <roland@redhat.com>
6451         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6452         Apply sizeof (struct pthread) bias to r13 value.
6454 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6456         * sysdeps/pthread/configure.in: Require CFI directives.
6458         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6459         definition.
6460         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6461         libpthread compilation.
6462         * unwind.c (__pthread_unwind): Add hidden_def.
6463         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6465 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6467         * libc-cancellation.c (__libc_cleanup_routine): Define.
6468         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6469         (__pthread_cleanup_pop): Define.
6471 2003-07-01  Richard Henderson  <rth@redhat.com>
6473         * sysdeps/alpha/elf/pt-initfini.c: New file.
6474         * sysdeps/alpha/pthread_spin_lock.S: New file.
6475         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6476         * sysdeps/alpha/pthreaddef.h: New file.
6477         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6478         * sysdeps/alpha/tls.h: New file.
6479         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6480         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6481         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6482         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6483         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6484         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6485         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6486         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6487         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6488         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6490 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6492         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6493         cleanup support and unwind info.
6495 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6497         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6498         Use correct cleanup handler registration.  Add unwind info.
6499         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6500         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6501         * tst-once3.c: Add cleanup handler and check it is called.
6502         * tst-once4.c: Likewise.
6503         * tst-oncex3.c: New file.
6504         * tst-oncex4.c: New file.
6505         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6507 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6509         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6511 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6513         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6514         (tf_msgsnd): Likewise.
6516         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6517         premature returns a bit more.
6519 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6521         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6522         definition to the front.
6524         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6525         the cleanup functions to make the names unique.  Fix dwarf opcode
6526         un unwind table.
6527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6528         functions to make the names unique.  Fix CFA offset for two blocks.
6530 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6532         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6533         missing closing braces.
6534         Patch by Christophe Saout <christophe@saout.de>.
6536 2003-06-24  Roland McGrath  <roland@redhat.com>
6538         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6540 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6542         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6543         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6545         * pthreadP.h: Declare __find_thread_by_id.
6546         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6547         * pthread_clock_gettime.c: Allow using other thread's clock.
6548         * pthread_clock_settime.c: Likewise.
6549         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6550         * Makefile: Add rules to build and run tst-clock2.
6551         * tst-clock2.c: New file.
6553 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6556         to use exception-based cleanup handler.
6557         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6559         * tst-cond8.c (ch): Announce that we are done.
6561         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6563         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6564         Also test aio_suspend with timeout value.
6566 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6568         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6569         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6570         attribute_hidden.
6572         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6573         (__pthread_mutex_lock_internal): Likewise.
6574         (__pthread_mutex_unlock_internal): Likewise.
6575         (__pthread_mutex_unlock_usercnt): Declare.
6576         * pthread_mutex_destroy.c: Always fail if used in any way.
6577         * pthread_mutex_init.c: Update comment.
6578         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6579         * pthread_mutex_timedlock.c: Adjust __nusers.
6580         * pthread_mutex_trylock.c: Adjust __nusers.
6581         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6582         and public interfaces are wrapper with pass additional parameter.
6583         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6584         parameter zero.
6585         * tst-mutex8.c: New file.
6586         * Makefile (tests): Add tst-mutex8.
6587         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6588         __pthread_mutex_unlock_usercnt.
6589         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6590         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6592         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6594         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6595         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6596         Add __nusers.
6597         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6598         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6599         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6600         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6601         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6603         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6604         * pthread_mutex_timedlock.c: Likewise.
6605         * pthread_mutex_trylock.c: Adjust __nusers.
6606         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6607         * tst-mutex9.c: New file.
6608         * Makefile (tests): Add tst-mutex9.
6609         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6610         * sysdeps/ia64/tls.h: Likewise.
6611         * sysdeps/powerpc/tls.h: Likewise.
6612         * sysdeps/s390/tls.h: Likewise.
6613         * sysdeps/sh/tls.h: Likewise.
6614         * sysdeps/x86_64/tls.h: Likewise.
6615         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6616         Change type of __owner.
6617         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6618         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6619         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6620         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6621         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6623 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6625         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6626         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6628         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6629         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6630         instead of nr to lll_futex_wake.  Only set errno and return -1
6631         if err < 0.
6633         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6634         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6635         return actual return value from the syscall, not 0.
6637 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6639         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6640         find a random value.
6641         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6642         errno==EIDRM.
6644         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6645         compat_timer_settime.
6646         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6647         compat_timer_gettime.
6648         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6649         compat_timer_getoverrun.
6650         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6651         compat_timer_delete.
6653         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6654         error-checking mutex detect busy mutexes.
6656 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6658         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6659         Add ax to clobber list.
6660         (lll_mutex_cond_lock): Likewise.
6661         (lll_mutex_unlock): Likewise.
6662         (lll_lock): Likewise.
6663         (lll_unlock): Likewise.
6665         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6666         * tst-cancel18.c: New file.
6667         * tst-cancelx18.c: New file.
6669         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6670         and tcdrain.
6672         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6673         * tst-cancel17.c: New file.
6674         * tst-cancelx17.c: New file.
6676         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6677         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6678         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6680         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6682 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6684         * sysdeps/pthread/createthread.c (create_thread): Set
6685         header.multiple_threads unconditionally.
6686         * allocatestack.c (allocate_stack): Likewise.
6687         * descr.h (struct pthread): Add header.multiple_threads
6688         unconditionally.
6689         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6690         Define for librt.  #error if neither libpthread, libc nor librt.
6691         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6692         Likewise.
6693         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6694         CDISABLE): Likewise.
6695         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6696         CDISABLE): Likewise.
6697         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6698         CDISABLE): Likewise.
6699         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6700         CDISABLE): Likewise.  Access header.multiple_threads outside of
6701         libc and libpthread.
6702         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6703         Likewise.
6704         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6705         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6707 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6709         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6710         Also test early cancellation before the thread reaches the cancellation
6711         point.
6713         * Makefile: Compile forward.c with exceptions.
6715         * sysdeps/unix/sysv/linux/sleep.c: New file.
6717 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6719         * Makefile: Add CFLAGS definition to compile function wrappers
6720         duplicated from libc with exceptions.
6721         * tst-cancel4.c: Also check cancellation handlers.
6723         * Makefile: Add rules to build and run tst-cancel16 and
6724         tst-cancelx16.  Add missing CFLAGS definitions.
6725         * tst-cancel16.c: New file.
6726         * tst-cancelx16.c: New file.
6728 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6730         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6731         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6732         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6733         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6735         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6736         (LIBC_CANCEL_RESET): Likewise.
6737         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6738         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6739         librt-cancellation.
6740         (CFLAGS-libcrt-cancellation.c): Define.
6741         * sysdeps/pthread/librt-cancellation.c: New file.
6742         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6743         macros also when compiling librt.
6744         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6745         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6746         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6747         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6748         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6749         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6750         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6752         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6753         compat_timer_create.
6755 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6757         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6759         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6760         __register_atfork.
6761         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6762         Add libc_hidden_def.
6764 2003-06-13  Roland McGrath  <roland@redhat.com>
6766         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6767         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6769 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6771         * allocatestack.c (queue_stack): Always inline.
6772         * ptreadhP.h (__do_cancel): Likewise.
6774 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6776         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6777         a typo.
6779 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6781         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6782         (__pthread_cond_signal): Remove incorrect second addition for
6783         cond_lock!=0.
6785 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6787         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6788         (__pthread_cond_signal): Use correct futex pointer in
6789         __lll_mutex_lock_wait call.
6791         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6792         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6794 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6796         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6797         cancelable.
6798         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6799         Likewise.
6801         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6802         hand-written CFI generation code.  Since ENTRY/END also initiated
6803         CFI frames this caused two CFI sets to be generated.
6805 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6807         * cleanup_routine.c: New file.
6808         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6809         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6810         cleanup handling.
6811         * Makefile (libpthread-routines): Add cleanup_routine.
6812         Add more CFLAGS variables to compile with exceptions.  Add comments
6813         why which file needs unwind tables.
6814         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6815         tests.
6816         * tst-cancelx1.c: New file.
6817         * tst-cancelx2.c: New file.
6818         * tst-cancelx3.c: New file.
6819         * tst-cancelx4.c: New file.
6820         * tst-cancelx5.c: New file.
6821         * tst-cancelx6.c: New file.
6822         * tst-cancelx7.c: New file.
6823         * tst-cancelx8.c: New file.
6824         * tst-cancelx9.c: New file.
6825         * tst-cancelx10.c: New file.
6826         * tst-cancelx11.c: New file.
6827         * tst-cancelx12.c: New file.
6828         * tst-cancelx13.c: New file.
6829         * tst-cancelx14.c: New file.
6830         * tst-cancelx15.c: New file.
6831         * tst-cleanupx0.c: New file.
6832         * tst-cleanupx0.expect: New file.
6833         * tst-cleanupx1.c: New file.
6834         * tst-cleanupx2.c: New file.
6835         * tst-cleanupx3.c: New file.
6837         * tst-cleanup0.c: Make standard compliant.
6838         * tst-cleanup1.c: Likewise.
6840         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6841         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6842         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6843         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6844         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6845         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6846         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6847         CLEANUP_JMP_BUF.
6848         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6849         * tst-cancel12.c: New file.
6850         * tst-cancel13.c: New file.
6851         * tst-cancel14.c: New file.
6852         * tst-cancel15.c: New file.
6853         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6854         and tst-cancel15.
6856         * tst-cancel1.c: Add some comments.
6858         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6859         timeout correctly.
6861 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6863         * Makefile (CFLAGS-pthread_cancel.c): Define.
6865 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6867         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6868         Change type of __writer element to int.
6869         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6870         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6871         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6872         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6873         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6874         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6875         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6876         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6877         Compare with TID to determine deadlocks.
6878         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6879         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6880         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6881         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6882         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6883         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6884         Likewise.
6885         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6886         Likewise.
6887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6888         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6889         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6890         Likewise.
6891         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6892         Likewise.
6893         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6894         * Makefile (tests): Add tst-rwlock12.
6895         * tst-rwlock12.c: New file.
6897 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6899         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6900         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6901         Remove bogus hidden_proto.
6902         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6903         Likewise.
6904         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6905         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6906         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6907         ___lll_mutex_timedlock): Likewise.
6909 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6912         (__pthread_cond_signal): Add some code to eventually handle
6913         cond_lock!=0.
6915 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6917         * Makefile (tests): Add tst-exec4.
6918         (tst-exec4-ARGS): Define.
6919         * tst-exec4.c: New file.
6921 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6923         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6924         Also fail if tv_nsec < 0.
6925         (__lll_timedwait_tid): Likewise.
6926         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6927         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6928         Likewise.
6929         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6930         Likewise.
6931         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6932         Likewise.
6933         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6934         Likewise.
6935         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6936         Likewise.
6937         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6938         Likewise.
6940         * Makefile (tests): Add tst-sem8 and tst-sem9.
6941         * tst-sem8.c: New file.
6942         * tst-sem9.c: New file.
6943         * sem_open.c: Fix creation of in_use record if the file exists but
6944         no internal record.
6946         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6947         definitions.
6949         * sysdeps/pthread/timer_create.c (timer_create): In case
6950         evp==NULL, assign timer ID to sival_ptr.
6952         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6953         struct pthread_unwind_buf *.
6954         (struct pthread): Likewise for cleanup_jmp_buf element.
6956         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6957         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6958         * unwind.c (__pthread_unwind_next): Likewise.
6960 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6962         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6963         (lll_futex_timed_wait): Use int for futex value parameter.
6964         (lll_futex_wake): Likewise.
6965         (lll_futex_requeue): Likewise.
6967         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6968         Replace one memory operation with one register operation.
6970         * tst-join4.c (do_test): Fix error message.
6972         * tst-rwlock6.c (do_test): Use correct format specifier.
6974         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6975         (__lll_mutex_lock_wait): Replace one memory operation with one
6976         register operation.
6977         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6978         (__lll_mutex_lock_wait): Likewise.
6980         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6981         (__lll_mutex_cond_lock): Add one to value parameter of
6982         __lll_lock_wait to reflect reality in the futex syscall.
6983         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6984         (lll_mutex_cond_lock): Likewise.
6986 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6988         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6989         New function.
6990         (lll_mutex_cond_lock): Define.
6992 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6994         * Makefile (tests): Add tst-signal6.
6995         * tst-signal6.c: New file.
6997         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6998         (__lll_mutex_unlock_force): New function
6999         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7001         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7002         (__lll_mutex_unlock_force): New function.
7003         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
7005         * tst-rwlock7.c (do_test): Use correct format specifier.
7007         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
7008         Find break parameter in correct asm argument.
7010 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
7012         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
7013         Remove out4.
7014         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
7015         error occured.
7016         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7017         Add __mutex.
7018         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
7019         lll_futex_requeue, lll_mutex_unlock_force): Define.
7021 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
7023         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7024         (pthread_cond_t): Add __mutex.
7025         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
7026         lll_futex_requeue, lll_mutex_unlock_force): Define.
7028 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7030         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7031         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7032         Add __mutex field.
7033         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7034         Define.
7035         (lll_futex_wait, lll_futex_wake): Define.
7036         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7037         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7038         FUTEX_REQUEUE instead of FUTEX_WAIT.
7039         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7040         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7041         mutex which was used in condvar structure.  Call
7042         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7043         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7045         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7046         include tcb-offsets.h.  Read wakeup value in locked region.
7047         Use the value of gbr register as THREAD_ID.
7048         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7049         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7050         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7052         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7053         macros.
7055 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7057         * sysdeps/pthread/pthread_cond_broadcast.c
7058         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7060 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7062         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7063         typo in register name.
7064         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7065         correctly.  Actually use requeue.  Little optimization.
7066         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7067         mutex address early.  Handle cancellation state as 32-bit value.
7068         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7069         Remove unnecessary label.
7071 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7073         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7074         instead of FUTEX_WAIT.
7075         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7077         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7078         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7079         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7080         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7081         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7082         of __pthread_mutex_lock_internal.
7083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7085         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7086         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7087         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7088         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7089         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7090         Add pthread_mutex_cond_lock.
7091         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7092         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7093         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7094         lll_mutex_cond_lock.
7095         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7096         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7097         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7098         Add __mutex field.
7099         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7100         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7102         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7103         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7105         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7106         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7107         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7108         macro don't define aliases.
7110         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7111         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7112         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7113         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7114         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7115         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7116         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7117         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7118         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7120 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7122         * sem_open.c: Fix one endless loop.  Implement correct semantics
7123         wrt opening the same semaphore more then once.
7124         * sem_close.c: Adjust for sem_open change.
7125         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7126         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7127         * Makefile (tests): Add tst-sem7.
7128         * tst-sem7.c: New file.
7130 2003-05-16  Roland McGrath  <roland@redhat.com>
7132         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7133         uninitialized variable braino.
7135 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7137         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7138         test for syscall availability.
7140         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7141         __no_posix_timers to -1 if the syscalls don't exist.
7143         * pthread_join.c (pthread_join): Set tid field of the joined
7144         thread to -1.  This isn't necessary but helps to recognize some
7145         error conditions with almost no cost.
7147         * allocatestack.c (FREE_P): Also negative values indicate an
7148         unused stack.
7150         * unwind.c: Include <unistd.h>.
7152 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7154         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7156 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7158         * Makefile (crti-objs, crtn-objs): New variables.
7159         (omit-deps, extra-objs): Add crtn.
7160         ($(objpfx)libpthread.so): Depend on both crti and crtn
7161         and links to them in multidir.
7162         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7164 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7166         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7167         (lll_mutex_unlock): Use atomic_exchange_rel.
7169 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7171         * cond-perf.c (cons): Add missing locking around setting of alldone.
7173 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7175         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7176         related macros.
7177         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7179 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7181         * tst-sem6.c: New file.
7182         * Makefile (tests): Add tst-sem6.
7184         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7185         Use atomic_exchange_rel instead of atomic_exchange.
7186         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7187         Likewise.
7189         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7190         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7191         vsyscall is possible.
7193         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7194         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7195         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7196         pthread_setaffinity_np.
7197         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7198         and pthread_setaffinity_np.
7199         * Makefile (libpthread-routines): Add pthread_getaffinity and
7200         pthread_setaffinity.
7202         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7203         use it in case mmap to allocate the stack fails.
7204         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7205         ARCH_MAP_FLAGS here.
7206         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7207         ARCH_RETRY_MMAP.
7209 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7211         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7212         handler implementation.  It is now lockless in fork().
7213         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7214         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7215         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7216         declare the __fork_*_lists.
7217         (struct fork_handler): Include pointers to all three functions.
7218         Add next, refcntr and need_signal elements.
7219         (__fork_handlers): New declaration.
7220         (__register_atfork_malloc): Remove declaration.
7221         (HAVE_register_atfork_malloc): Remove definition.
7222         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7223         __pthread_child_handler variable.
7224         (__libc_pthread_init): Use __register_atfork instead of explicitly
7225         adding to the list.
7226         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7227         and lll_futex_wake.
7228         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7230         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7231         function must never be reached.
7233         * cond-perf.c: New file.
7235 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7237         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7239 2003-05-04  Roland McGrath  <roland@redhat.com>
7241         * Makefile ($(objpfx)../libc.so): New target.
7243 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7245         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7246         (pthread_condattr_t): Size is only an int, don't use long for
7247         alignment.
7248         (pthread_mutexattr_t): Likewise.
7249         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7250         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7251         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7253 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7255         * sysdeps/i386/tls.h: Define THREAD_ID.
7256         * sysdeps/ia64/tls.h: Likewise.
7257         * sysdeps/powerpc/tls.h: Likewise.
7258         * sysdeps/s390/tls.h: Likewise.
7259         * sysdeps/sh/tls.h: Likewise.
7260         * sysdeps/x86_64/tls.h: Likewise.
7261         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7262         record ownership.
7263         * pthread_mutex_timedlock.c: Likewise.
7264         * pthread_mutex_trylock.c: Likewise.
7265         * pthread_mutex_unlock.c: Likewise.
7266         * pthread_rwlock_trywrlock.c: Likewise.
7267         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7268         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7269         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7270         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7272         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7273         flag.
7275 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7277         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7278         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7279         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7280         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7281         Make __align long long instead of long.
7282         (pthread_rwlock_t): Formatting.
7283         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7284         (pthread_rwlock_t): Formatting.
7285         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7286         (pthread_cond_t): Make __align long long instead of long.
7287         (pthread_rwlock_t): Move __flags field to the same position as in
7288         linuxthreads.
7290 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7292         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7293         * tst-rwlock7.c (do_test): Likewise.
7295 2003-04-26  Roland McGrath  <roland@redhat.com>
7297         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7299 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7301         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7302         sizeof (struct pthread).
7303         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7304         1 struct pthread.
7305         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7306         to 0.
7307         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7308         struct pthread.
7309         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7310         to 32-bit bytes.
7311         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7312         tcbp.
7313         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7314         unneccessarily.
7315         (NO_TLS_OFFSET): Define.
7316         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7317         add TLS_TCB_SIZE unnecessarily.
7319 2003-04-22  Roland McGrath  <roland@redhat.com>
7321         * Makeconfig (shared-thread-library): Reverse link order to work
7322         around linker bug.
7324 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7326         * semaphore.h: Fix typo in comment.
7328 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7330         * sysdeps/pthread/sigfillset.c: New file.
7332         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7333         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7334         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7335         * sysdeps/pthread/sigaction.c: Likewise.
7336         * sysdeps/pthread/sigprocmask.c: New file.
7337         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7338         __SIGRTMIN+1.
7339         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7340         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7341         in this case.
7343 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7345         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7346         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7348         * sysdeps/unix/sysv/linux/unregister-atfork.c
7349         (__unregister_atfork): Don't free memory not allocated dynamically.
7351         * semaphore.h: Remove __THROW marker from cancellation points.
7352         * nptl/sysdeps/pthread/pthread.h: Likewise.
7354 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7356         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7357         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7358         __THROW.
7360 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7362         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7364 2003-04-15  Roland McGrath  <roland@redhat.com>
7366         * forward.c (__pthread_unwind): Tweak to avoid warning.
7368 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7370         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7372 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7374         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7375         overflow CFA advance instructions.
7376         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7378 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7380         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7381         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7382         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7383         defined.
7385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7386         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7388         DW_CFA_advance_loc for .Laddl-.Lsubl.
7390 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7392         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7393         position-independent unwind data for static libraries.
7394         Add missing unwind info.  Add comments.
7396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7397         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7401 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7403         * Makefile: Make sure all cancellation points are compiled with
7404         exception and asynchronous unwind tables.
7406         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7407         which mishandles loading of global object addresses in PIC.
7408         (THREAD_SETMEM_NC): Likewise.
7410 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7412         * pthread.h: Define new data structure for cleanup buffer.  Declare
7413         new cleanup handler interfaces.
7414         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7415         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7416         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7417         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7418         it.  Declare old cleanup handler installation functions.
7419         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7420         handling.
7421         * cleanup_defer.c: Likewise.
7422         * cleanup_compat.c: New file.  Old cleanup code.
7423         * cleanup_def_compat.c: New file.  Old cleanup code.
7424         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7425         if own thread descriptor.
7426         * unwind.c: New file.
7427         * forward.c: Add __pthread_unwind.
7428         * init.c (pthread_functions): Add __pthread_unwind.
7429         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7430         Add ptr___pthread_unwind.
7431         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7432         and unwind function.
7433         * Makefile (libpthread-routines): Add cleanup_compat,
7434         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7435         table generation if necessary.
7436         * version.c: Record whether unwind support is compiled in.
7437         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7438         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7439         handler interfaces.
7440         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7441         complication to generate unwind information for syscall wrappers.
7442         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7443         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7444         __cleanup_fct_attribute.
7446         * Makefile: Add rules to build and run tst-cleanup0.
7447         * tst-cleanup0.c: New file.
7448         * tst-cleanup0.expect: New file.
7450         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7451         caller.  Optimize to avoid often unecessary local variable.
7453 2003-04-11  Roland McGrath  <roland@redhat.com>
7455         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7456         sets variable `multidir'; include that.
7457         (generated): Add it.
7458         ($(objpfx)$(multidir)/crti.o): New target.
7459         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7461 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7463         * tst-attr2.c (do_test): Add cast to avoid warning.
7464         * tst-mutex4.c (do_test): Likewise.
7466 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7468         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7469         in child.
7471 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7473         * Makefile (tests): Add tst-detach1.
7474         * tst-detach1.c: New file.
7476 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7478         * sysdeps/pthread/pthread.h: Remove duplicate
7479         pthread_cleanup_{push,pop} definitions.
7481         * tst-barrier2.c: Eliminate warnings.
7482         * tst-cancel4.c: Likewise.
7483         * tst-cond4.c: Likewise.
7484         * tst-cond6.c: Likewise.
7485         * tst-detach1.c: Likewise.
7486         * tst-rwlock4.c: Likewise.
7487         * tst-rwlock6.c: Likewise.
7488         * tst-rwlock7.c: Likewise.
7489         * tst-sem3.c: Likewise.
7490         * tst-spin2.c: Likewise.
7491         * tst-umask1.c: Likewise.
7493 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7495         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7497 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7499         * descr.h (struct pthread): Move cancelhandling member to the front.
7501 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7503         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7504         malloc_parent, and malloc_child statically.
7505         (__register_atfork_malloc): New function.
7506         (free_mem): Don't free any of the malloc_* variables on the list.
7507         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7508         Define HAVE_register_atfork_malloc.
7510 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7512         * sysdeps/pthread/createthread.c (create_thread): Add some more
7513         comments explaining when to set multiple_threads and when not.
7515         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7516         THREAD_ATOMIC_BIT_SET if not already defined.
7517         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7518         THREAD_ATOMIC_BIT_SET:
7519         * sysdeps/x86_64/tls.h: Likewise.
7520         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7521         THREAD_ATOMIC_CMPXCHG_VAL.
7522         (_pthread_cleanup_pop_restore): Likewise.
7523         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7524         (__pthread_enable_asynccancel_2): Likewise.
7525         (__pthread_disable_asynccancel): Likewise.
7526         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7527         (__libc_disable_asynccancel): Likewise.
7528         * init.c (sigcancel_handler): Likewise.
7529         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7530         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7532 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7534         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7535         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7536         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7537         * Makefile (tests): Add tst-cancel11.
7538         * tst-cancel11.c: New file.
7540 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7542         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7543         round, not the first.  Use specific_used flag instead of local
7544         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7545         (__free_tcb): Don't call deallocate_tsd here.
7546         (start_thread): Call deallocate_tsd here.
7547         * pthread_setspecific.c: Set specific_used flag really only when
7548         needed.
7549         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7550         * tst-tsd3.c: New file.
7551         * tst-tsd4.c: New file.
7553 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7555         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7556         Use atomic_exchange_and_add instead of __lll_add.
7557         (__lll_mutex_timedlock): Likewise.
7558         Patch by Ian Wienand.
7560 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7562         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7563         (SINGLE_THREAD_P): Fix typo.
7564         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7566 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7568         * Makefile (tests): Add tst-align.
7569         * tst-align.c: New file.
7570         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7572         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7573         function correctly.
7575         * tst-tsd2.c: Add casts to avoid warnings.
7577 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7579         * descr.h (struct pthread): Move most often used elements to the front.
7581 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7583         * Makefile (libpthread-routines): Add pthread_atfork.
7584         (libpthread-static-only-routines): Add pthread_atfork.
7586 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7588         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7589         of TLS_DTV_AT_TP.
7590         (INSTALL_DTV): Add parens.
7591         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7592         Use passed descr instead of THREAD_SELF.
7593         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7594         (__lll_mutex_timedlock_wait): Correct expected value after
7595         spurious wakeup.
7596         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7597         Release lock before waking up the waiters.
7598         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7599         criteria.  Reorderstruct passed to cleanup handler.  Fix
7600         handling of cancellation and failung pthread_mutex_unlock call.
7601         Use __pthread_enable_asynccancel_2 instead of
7602         __pthread_enable_asynccancel.
7603         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7604         Return result of lock re-get if it fails.
7605         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7606         for __pthread_cleanup_push.
7607         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7608         completely broken rwlock implementation.
7609         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7610         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7611         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7612         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7613         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7614         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7615         versioned_symbol macro.
7616         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7617         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7619 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7621         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7622         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7623         and __helper_tid.
7624         (struct timer): Remove th and bar field.
7625         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7626         debugging code.  Create only one helper thread.
7627         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7628         helper thread.
7629         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7630         Renamed.  Define statically.  Use thread info from siginfo.
7631         (__helper_once): New variable.
7632         (__helper_tid): New variable.
7633         (__reset_helper_control): New function.
7634         (__start_helper_thread): New function.
7636         * pthread_create.c (start_thread): Don't use setjmp inside
7637         __builtin_expect to work around gcc bug.
7639         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7640         timer_delete syscall fails, but not with ENOSYS, set
7641         __no_posix_timers.
7643         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7644         (timer_settime): Fix typo.
7645         * sysdeps/unix/sysv/linux/timer_getoverr.c
7646         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7648 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7651         offset of cleanupbuf.__prev.
7653 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7655         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7656         of included file.
7658 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7660         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7661         NULL provide default definition to syscall.
7663 2003-03-25  Roland McGrath  <roland@redhat.com>
7665         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7666         (timer_id2ptr): Fix typo.
7668 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7670         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7671         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7672         * sysdeps/ia64/pthreaddef.h: Likewise.
7673         * sysdeps/powerpc/pthreaddef.h: Likewise.
7674         * sysdeps/s390/pthreaddef.h: Likewise.
7675         * sysdeps/sh/pthreaddef.h: Likewise.
7676         * sysdeps/x86_64/pthreaddef.h: Likewise.
7677         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7678         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7679         being changed.
7680         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7681         SIGTIMER is not unblocked.
7682         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7683         RT signal taken.
7684         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7685         be send.
7686         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7687         pass pointer through as ID.
7688         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7689         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7690         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7691         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7692         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7693         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7694         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7695         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7696         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7697         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7698         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7699         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7700         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7701         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7702         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7703         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7704         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7705         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7706         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7707         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7708         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7709         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7710         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7711         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7712         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7713         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7714         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7715         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7716         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7717         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7718         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7719         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7720         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7722         * pthreadP.h: Remove FRAME_LEFT definition.
7723         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7724         already left frame.  Programs which have this problem are not POSIX
7725         compliant.
7726         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7728 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7730         * sysdeps/pthread/tst-timer.c: Check return values of the
7731         functions we test.
7733 2003-03-23  Roland McGrath  <roland@redhat.com>
7735         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7736         * tst-tls3mod.c: Likewise.
7737         * tst-tls1.c: Likewise.
7738         * tst-tls2.c: Likewise.
7740         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7741         undefined behavior.
7743         * tst-join5.c (tf1, tf2): Add a cast.
7745         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7747         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7748         Don't test anything.
7749         * tst-cond4.c: Likewise.
7750         * tst-cond6.c: Likewise.
7751         * tst-flock2.c: Likewise.
7752         * tst-mutex4.c: Likewise.
7753         * tst-rwlock4.c: Likewise.
7754         * tst-signal1.c: Likewise.
7755         * tst-spin2.c: Likewise.
7756         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7758         * tst-mutex4.c: Use test-skeleton.c.
7759         * tst-spin2.c: Likewise.
7760         * tst-sysconf.c: Likewise.
7761         * tst-barrier2.c: Likewise.
7762         * tst-cond4.c: Likewise.
7763         * tst-cond6.c: Likewise.
7764         * tst-rwlock4.c: Likewise.
7765         * tst-unload.c: Likewise.
7766         * tst-flock2.c (do_test): Use return instead of exit.
7768 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7770         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7772 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7774         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7775         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7776         instead of __lll_compare_and_swap.
7777         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7778         Likewise.
7779         Removed definition if __lll_compare_and_swap.
7781         * cancellation.c: Adjust for new form of compare&exchange macros.
7782         * cleanup_defer.c: Likewise.
7783         * init.c: Likewise.
7784         * libc-cancellation.c: Likewise.
7785         * old_pthread_cond_broadcast.c: Likewise.
7786         * old_pthread_cond_signal.c: Likewise.
7787         * old_pthread_cond_timedwait.c: Likewise.
7788         * old_pthread_cond_wait.c: Likewise.
7789         * pthread_cancel.c: Likewise.
7790         * pthread_create.c: Likewise.
7791         * pthread_detach.c: Likewise.
7792         * pthread_join.c: Likewise.
7793         * pthread_key_delete.c: Likewise.
7794         * pthread_setcancelstate.c: Likewise.
7795         * pthread_setcanceltype.c: Likewise.
7796         * pthread_timedjoin.c: Likewise.
7797         * pthread_tryjoin.c: Likewise.
7798         * sysdeps/pthread/createthread.c: Likewise.
7800 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7802         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7803         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7804         definitions.  Replace uses with calls to atomic_* functions.
7805         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7806         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7807         __lll_test_and_set calls with atomic_exchange_and_add and
7808         atomic_exchange calls respectively.
7809         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7810         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7811         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7812         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7813         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7814         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7815         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7817         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7818         returns the old value.
7820 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7822         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7823         int for variable OLDVAL and correct inline assembler contraint.
7824         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7825         type int for variable OLD.
7827         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7828         only for s390-32.
7829         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7830         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7831         instead of multiple_threads field in the TCB.
7833 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7835         * sysdeps/i386/i686/bits/atomic.h: Removed.
7836         * sysdeps/i386/i586/bits/atomic.h: Removed.
7837         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7838         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7839         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7840         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7841         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7842         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7843         * atomic.h: Removed.  Moved to glibc.
7845         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7846         support for clock selection.
7848         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7849         signalling waiters.
7851 2003-03-18  Roland McGrath  <roland@redhat.com>
7853         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7854         Add __lll_rel_instr first.  Add memory clobber.
7855         (lll_mutex_unlock): Use __lll_test_and_set.
7856         From Paul Mackerras <paulus@samba.org>.
7858         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7859         unconditionally.
7860         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7861         (SINGLE_THREAD_P):  Add `header.' prefix.
7862         From Paul Mackerras <paulus@samba.org>.
7864         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7865         pthread_timedjoin_np to ...
7866         (libpthread: GLIBC_2.3.3): ... here.
7867         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7869         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7870         Avoid shadowing VAL variable.
7872         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7873         New macro.
7875 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7877         * Makefile (tests): Add tst-cond11.
7878         * tst-cond11.c: New file.
7880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7881         struct passed to cleanup handler to eliminate one more
7882         instruction.
7883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7885         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7886         (pthrad_cond_t): Replace __unused field with __clock.
7888         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7889         waken all waiters in cleanup handler.
7890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7893         * pthread_condattr_getclock.c: New file.
7894         * pthread_condattr_setclock.c: New file.
7895         * sysdeps/pthread/pthread.h: Declare these new functions.
7896         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7897         * Makefile (libpthread-routines): Add the new functions.
7898         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7899         Renamed field to value.  Document use of the bits.
7900         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7901         change.
7902         * pthread_condattr_setpshared.c: Likewise.
7903         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7904         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7905         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7906         Add __clock field.
7907         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7908         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7909         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7910         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7911         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7912         Implement clock selection.
7913         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7914         * pthread-errnos.sym: Add ENOSYS.
7915         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7916         _POSIX_CLOCK_SELECTION.
7917         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7920         invalid .size directive.
7922 2003-03-17  Roland McGrath  <roland@redhat.com>
7924         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7925         Formatting tweaks.
7927 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7929         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7930         Use __lll_add instead of spelling it out.  Use protected symbol names.
7931         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7932         Use __lll_add.
7933         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7934         Renamed from lll_compare_and_swap.  Use new name where necessary.
7935         (__lll_add): Defined.
7936         (__lll_dec_if_positive): Defined.
7937         (__lll_test_and_set): Defined.
7938         * sysdeps/ia64/pthread_spin_init.c: Removed.
7939         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7940         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7941         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7942         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7943         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7944         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7945         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7946         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7947         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7948         __sync_lock_release_si.
7949         Patch by Jakub Jelinek.
7951         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7952         Fix timeout handling.
7953         (__lll_timedwait_tid): Likewise.
7954         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7955         Patch by Jakub Jelinek.
7957         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7959 2003-03-17  Roland McGrath  <roland@redhat.com>
7961         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7962         * sysdeps/pthread/pthread_spin_init.c: New file.
7963         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7964         * sysdeps/powerpc/Makefile: New file.
7965         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7966         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7967         * sysdeps/powerpc/pthreaddef.h: New file.
7968         * sysdeps/powerpc/tcb-offsets.sym: New file.
7969         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7970         * sysdeps/powerpc/tls.h: New file.
7971         * sysdeps/powerpc/bits/atomic.h: New file.
7972         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7973         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7974         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7976         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7977         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7978         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7979         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7980         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7981         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7982         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7983         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7984         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7985         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7986         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7987         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7988         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7989         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7990         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7992         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7993         not gettimeofday.
7994         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7995         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7996         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7997         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7998         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8000 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
8002         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
8003         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
8004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8005         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8006         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
8008 2003-03-16  Roland McGrath  <roland@redhat.com>
8010         * tst-fork4.c: Include <string.h>.
8011         * tst-signal2.c: Likewise.
8012         * tst-mutex5.c (do_test): exit -> return.
8013         * tst-mutex2.c: Include <stdlib.h>.
8015 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
8017         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8018         (__lll_mutex_timedlock_wait): Correct expected value after
8019         spurious wakeup.  Otherwise we would never wait again.
8021         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
8022         zone versus inline asm stupidity.  Use correct instructions.
8024         * tst-rwlock6.c: Add some more status output.
8026 2003-03-15  Roland McGrath  <roland@redhat.com>
8028         * sysdeps/pthread/configure.in: New file.
8029         * sysdeps/pthread/configure: New file (generated).
8031 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8033         * allocatestack.c (allocate_stack): Store the exact stack size of
8034         user allocated stacks.
8036 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8038         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8039         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8040         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8041         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8042         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8043         Use `header.' prefix.
8044         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8046 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8048         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8049         __builtin_frame_address, use stack pointer.
8051         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8052         instead of __builtin_frame_pointer.
8054 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8056         * tst-basic1.c (do_test): Add cast to avoid warning.
8057         * tst-basic2.c (do_test): Likewise.
8059         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8060         amount of stack correction.
8062         * tst-fork4.c: Use test-skeleton.c.
8064 2003-03-14  Roland McGrath  <roland@redhat.com>
8066         * init.c: Fix typo "#eli" for "#else".
8068 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8070         * allocatestack.c (__stack_user): Use hidden_data_def.
8071         * pthread_create.c (__pthread_keys): Likewise.
8073         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8075 2003-03-14  Roland McGrath  <roland@redhat.com>
8077         * tst-fork4.c: New file.
8078         * Makefile (tests): Add it.
8080         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8081         we always define the padding space.
8082         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8083         stopped supporting its own extensions fully.
8084         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8085         struct also called `header', so `header.multiple_threads' is the field
8086         name to use on all machines.
8087         * allocatestack.c (allocate_stack): Use `header.' prefix.
8088         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8089         * pthread_create.c (__pthread_create_2_1): Likewise.
8090         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8091         (THREAD_SELF): Likewise.
8092         * sysdeps/x86_64/tls.h: Likewise.
8093         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8094         (SINGLE_THREAD_P): Likewise.
8095         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8096         (SINGLE_THREAD_P): Likewise.
8097         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8098         (SINGLE_THREAD_P): Likewise.
8100         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8101         value directly.
8103 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8105         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8106         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8108         * pthread_create.c (start_thread): setjmp is expected to return 0.
8110         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8111         (THREAD_GETMEM_NC): Likewise.
8113 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8115         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8116         and the size of the stack which must be allocated is a multiple,
8117         allocate one more page.
8118         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8119         MULTI_PAGE_ALIASING.
8121 2003-03-13  Roland McGrath  <roland@redhat.com>
8123         * pthread_create.c (start_thread): Set EXITING_BIT after the
8124         event-reporting (and destructors), not before.
8126 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8128         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8129         lll_futex_wake): Declare register variables as long int instead of
8130         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8131         Make syscall arguments clobbered by the syscall.
8132         (lll_futex_wait): Define using lll_futex_timed_wait.
8134         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8135         to void *.
8137         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8138         PPID if [! NDEBUG].
8140         * allocatestack.c (nptl_ncreated): Only declare if
8141         COLORING_INCREMENT != 0.
8143         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8144         (__libc_enable_asynccancel_2): Remove prototype.
8146         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8147         ctid to match kernel.
8149 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8151         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8152         libc_multiple_threads.
8153         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8154         __libc_multiple_threads to...
8155         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8157         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8158         versioning.
8159         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8160         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8162         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8163         (__pthread_once_internal): Define.
8165         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8166         macros instead of .symver directly.
8167         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8168         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8170         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8171         * sysdeps/x86_64/tcb-offsets.sym: New file.
8172         * sysdeps/x86_64/Makefile: New file.
8174         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8175         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8176         to access own pthread_t in TCB.
8177         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8178         Likewise.
8179         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8180         Likewise.
8181         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8183 2003-03-12  Roland McGrath  <roland@redhat.com>
8185         * pthread-errnos.sym: New file.
8186         * Makefile (gen-as-const-headers): New variable, list that file.
8187         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8188         header <pthread-errnos.h> instead of defining errno values here.
8189         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8190         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8191         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8192         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8193         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8194         Likewise.
8195         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8196         Likewise.
8197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8199         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8200         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8201         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8202         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8203         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8204         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8205         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8206         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8207         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8208         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8209         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8210         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8211         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8213         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8215         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8217         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8218         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8219         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8220         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8221         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8222         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8223         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8225         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8226         CLONE_CHILD_SETTID worked.
8228 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8230         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8231         file.
8232         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8233         file.
8235         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8236         (pthread_cond_t): Add padding.
8238         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8239         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8240         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8243         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8244         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8245         (__pthread_rwlock_timedrdlock): Likewise.
8246         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8247         (__pthread_rwlock_wrlock): Likewise.
8248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8249         (__pthread_rwlock_rdlock): Likewise.
8251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8254         result of lock re-get if it fails.
8256 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8259         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8260         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8263         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8264         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8265         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8266         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8267         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8269         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8270         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8272         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8273         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8274         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8275         (create_thread): Likewise.
8276         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8277         * init.c (__pthread_initialize_minimal_internal): Initialize
8278         __libc_multiple_threads_ptr if necessary.
8279         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8280         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8281         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8282         __libc_multiple_threads.
8283         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8284         necessary.
8286         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8287         (THREAD_SETMEM_NC): Likewise.
8289         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8290         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8291         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8292         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8294         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8295         Eliminate one entire instruction.
8297         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8298         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8299         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8300         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8301         instead of __pthread_enable_asynccancel.
8302         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8303         (__pthread_cond_wait): Likewise.
8304         * sysdeps/pthread/pthread_cond_timedwait.c
8305         (__pthread_cond_timedwait): Likewise.
8306         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8308         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8309         (__condvar_cleanup): Wake up all waiters in case we got signaled
8310         after being woken up but before disabling asynchronous
8311         cancellation.
8312         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8313         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8314         (__condvar_cleanup): Likewise.
8316         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8317         Make it an error if architecture has no #if case.  Add x86-64.
8319         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8320         pt-initfini.s generation.
8322         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8323         (TLS_INIT_TP): Fix typo.
8325 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8327         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8328         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8330         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8331         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8332         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8333         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8334         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8335         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8336         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8337         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8339 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8341         * sysdeps/pthread/pthread_cond_timedwait.c
8342         (__pthread_cond_timedwait): Return the result of the final
8343         locking.  If it succeeds, the regular function return value.
8345         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8346         Return result of the final locking.
8347         * version.c (__nptl_main): Work around problems with the strange
8348         INTERNAL_SYSCALL macro on ppc32.
8349         * init.c (__pthread_initialize_minimal_internal): Unblock
8350         SIGCANCEL in case the parent blocked it.
8351         Reported by Paul Mackerras <paulus@samba.org>.
8353         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8357 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8359         * sysdeps/pthread/pthread_cond_timedwait.c
8360         (__pthread_cond_timedwait): Unlock and fail if
8361         __pthread_mutex_unlock_internal failed.
8363         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8364         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8365         Use ARCH_CLONE.
8366         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8367         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8368         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8369         ALLOCATE_STACK): New macros.
8370         (TLS_TPADJ): New macro.
8371         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8372         (allocate_stack): Handle TLS_DTV_AT_TP and
8373         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8374         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8375         Don't set PD->self.
8376         * init.c [__ia64__] (__NR_set_tid_address): Define.
8378         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8379         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8380         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8381         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8382         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8383         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8384         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8385         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8386         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8387         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8388         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8389         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8390         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8391         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8392         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8393         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8394         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8395         * sysdeps/ia64/bits/atomic.h: New file.
8396         * sysdeps/ia64/Makefile: New file.
8397         * sysdeps/ia64/pthread_spin_init.c: New file.
8398         * sysdeps/ia64/pthread_spin_lock.c: New file.
8399         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8400         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8401         * sysdeps/ia64/pthreaddef.h: New file.
8402         * sysdeps/ia64/tcb-offsets.sym: New file.
8403         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8404         * sysdeps/ia64/tls.h: New file.
8406         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8407         to syscall instead of no arguments.
8409 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8411         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8412         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8413         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8414         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8416         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8417         unused code.
8419         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8421         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8422         lowlevelbarrier.sym.
8423         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8424         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8425         Include lowlevelbarrier.h and don't define offsets locally.
8426         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8428         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8429         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8430         (__lll_mutex_timedlock_wait): Likewise.
8431         (lll_mutex_lock): Adjust asm for that.
8432         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8433         (lll_lock): Adjust asm for operand order change.
8434         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8435         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8437         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8438         Reverse order of parameters.
8439         (__lll_timedwait_tid): Remove regparms attribute.
8440         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8441         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8443         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8444         (__lll_timedwait_tid): Remove one unnecessary instruction.
8446         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8447         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8448         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8449         lowlevelmutex.S.
8451         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8452         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8453         for NOT_IN_libc.
8454         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8455         lowlevellock.S.
8457         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8458         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8459         for libc.so.
8460         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8461         define LOCK here (if UP is not defined).  The actual code is in
8462         lowlevelmutex.S.
8464         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8465         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8466         __lll_timedwait_tid for libc.so.
8467         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8468         define LOCK here (if UP is not defined).  The actual code is in
8469         lowlevellock.S.
8471         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8472         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8473         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8474         instead of lowlevelsem.h.
8475         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8476         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8477         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8479         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8480         lowlevelrwlock.sym.
8481         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8482         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8483         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8485         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8486         register loading.
8487         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8488         last changed.  D'oh.
8490         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8492         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8493         of __libc_locking_needed.
8494         (lll_trylock): Initialize %eax to zero.
8496         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8497         pthread_cond_t definition.
8499 2003-03-10  Roland McGrath  <roland@redhat.com>
8501         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8502         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8503         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8504         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8505         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8507         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8508         Instead of setting PD->multiple_threads, set globals
8509         __pthread_multiple_threads and __libc_multiple_threads.
8510         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8511         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8512         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8514         * descr.h (struct pthread): Conditionalize first member on
8515         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8516         containing an anonymous tcbhead_t.  Move `list' member out.
8517         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8518         * allocatestack.c: Remove use of `header.data.' prefix.
8519         * pthread_create.c: Likewise.
8520         * init.c (__pthread_initialize_minimal_internal): Likewise.
8521         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8522         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8523         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8524         * sysdeps/x86_64/tls.h: Likewise.
8525         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8526         (SINGLE_THREAD_P): Likewise.
8527         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8528         (SINGLE_THREAD_P): Likewise.
8529         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8530         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8532 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8534         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8536         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8537         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8539         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8540         leftovers from the ia32 code.
8542         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8543         memory load.
8544         (clear_once_control): Don't load %esi.
8546         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8547         handling.
8549         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8551         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8552         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8554         * Makefile (tests): Add tst-cond10.
8555         * tst-cond10.c: New file.
8557 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8559         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8560         * tst-signal3.c (do_test): Likewise.
8561         * tst-sem5.c (do_test): Likewise.
8562         * tst-kill6.c (do_test): Likewise.
8563         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8565         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8566         of inc/dec.
8567         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8568         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8569         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8570         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8571         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8573         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8574         Likewise.
8575         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8576         Likewise.
8577         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8578         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8580         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8581         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8582         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8583         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8584         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8586         * allocatestack.c (allocate_stack): If mprotect() fails free the
8587         TLS memory.
8589 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8591         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8593         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8594         lll_wake_tid.  This was used only to work around kernel limits in
8595         the early days.
8596         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8597         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8598         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8599         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8601         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8602         (__pthread_initialize_minimal_internal): Change initialization of
8603         __static_tls_align_m1 appropriately.
8604         * pthreadP.h (__static_tls_align_m1): Renamed from
8605         __static_tls_align.
8606         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8607         instead of __static_tls_align-1.
8609 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8611         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8613         * pthread_create.c: Define __pthread_keys using nocommon
8614         attribute, not by placing it explicitly in bss.
8615         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8617         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8618         Use it in mmap call to allocate stacks.
8620         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8622         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8623         result of the thread function.
8625 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8627         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8628         version is just fine.
8630         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8631         (__pthread_child_handler): Renamed from pthread_child_handler,
8632         exported, and marked hidden.  Change all users.
8633         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8634         free __pthread_child_handler from child list.
8636 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8638         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8640         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8641         Fix handling of cancellation and failing pthread_mutex_unlock call.
8642         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8643         (__pthread_cond_wait): Likewise.
8645         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8646         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8647         lll_futex_timed_wait call.
8648         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8649         (pthread_rwlock_timedwrlock): Likewise.
8651         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8652         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8653         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8655         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8656         check of lll_futex_wake return value.
8658 2003-03-03  Roland McGrath  <roland@redhat.com>
8660         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8662         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8663         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8664         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8666 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8668         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8669         error for CPU clocks.
8671         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8672         _POSIX_MONOTONIC_CLOCK.
8673         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8675         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8676         recent kernels.
8678 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8680         * descr.h (struct pthread): Move cleanup field to the front.
8682 2003-03-01  Roland McGrath  <roland@redhat.com>
8684         * sem_open.c (sem_open): Braino fix.
8686 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8688         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8689         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8690         __pthread_cleanup_pop functionality.
8691         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8693         * descr.h (struct pthread): Move tid field to the front now that
8694         it is often used.
8696         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8697         (__lll_mutex_timedlock_wait): Remove.
8698         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8699         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8700         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8701         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8702         (lll_unlock_wake_cb): Don't save and restore %esi.
8703         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8704         %esi.
8705         (__lll_timedwait_tid): Add alignment.
8706         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8707         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8708         %esi.
8709         (__lll_timedwait_tid): Removed.
8710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8711         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8712         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8713         (pthread_barrier_wait): Don't save, load, and restore %esi for
8714         last thread.
8715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8716         (__pthread_cond_signal): Don't save, load, and restore %esi.
8717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8718         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8719         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8720         Don't save, load, and restore %esi.
8722 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8725         Release lock before waking up the waiters.
8727         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8729         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8730         (reader_thread): Likewise.
8732         * sysdeps/pthread/pthread_rwlock_unlock.c
8733         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8734         to wake up readers if there are none.
8736         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8737         Release internal lock before wake threads.
8739 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8741         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8742         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8743         predefined.
8744         * tst-rwlock9.c: Likewise.
8745         * tst-rwlock10.c: New file.
8746         * tst-rwlock11.c: New file.
8748         * Makefile (tests): Add tst-dlsym1.
8749         * tst-dlsym1.c: New file.
8751         * init.c (__pthread_initialize_minimal_internal): Set
8752         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8753         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8755 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8757         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8759         * tst-cond2.c: Fix sychronization with child.
8761         * tst-rwlock8.c (reader_thread): Remove unused variable.
8763         * Makefile: Add rules to build and run tst-tls3.
8764         * tst-tls3.c: New file.
8765         * tst-tls3mod.c: New file.
8767         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8768         * tst-rwlock8.c: New file.
8769         * tst-rwlock9.c: New file.
8770         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8771         complete broken rwlock implementation.
8772         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8773         Likewise.
8774         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8775         Likewise.
8776         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8777         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8778         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8779         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8780         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8781         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8782         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8784 2003-02-23  Roland McGrath  <roland@redhat.com>
8786         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8788 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8790         * Makefile (tests): Add tst-context1.
8791         * tst-context1.c: New file.
8793         * Makefile (tests): Add tst-tls1 and tst-tls2.
8794         * tst-tls1.c: New file.
8795         * tst-tls2.c: New file.
8797         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8798         for failed cmpxchg.
8800         * pthread_create.c (start_thread): Set EXITING_BIT early.
8802         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8803         (THREAD_GETMEM_NC): Likewise.
8805 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8807         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8808         off 3 more bytes by using offset-less instructions when possible.
8810         * Makefile: Add dependency for $(objpfx)version.d.
8812         * eintr.c (eintr_source): Add unnecessary return but the compiler
8813         insists.
8815         * tst-kill3.c: Include <unistd.h>.
8817 2003-02-21  Roland McGrath  <roland@redhat.com>
8819         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8821 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8823         * Makefile (tests): Add tst-eintr1.
8824         (distribute): Add eintr.c.
8825         * tst-eintr1.c: New file.
8826         * eintr.c: New file.
8828         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8830         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8831         Disallow sending SIGCANCEL.
8833         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8834         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8835         * tst-kill1.c: New file.
8836         * tst-kill2.c: New file.
8837         * tst-kill3.c: New file.
8838         * tst-kill5.c: New file.
8839         * tst-kill6.c: New file.
8840         * tst-basic7.c: Renamed to...
8841         * tst-kill4.c: ...this.
8843 2003-02-21  Roland McGrath  <roland@redhat.com>
8845         * Makefile (install-lib-ldscripts): New variable.
8847 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8849         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8850         * pthread_cancel.c: Use INVALID_TD_P.
8851         * pthread_detach.c: Likewise.
8852         * pthread_getschedparam.c: Likewise.
8853         * pthread_setschedparam.c: Likewise.
8854         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8855         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8856         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8857         * pthread_timedjoin.c: Likewise.
8859         * tst-basic7.c: Include <signal.h>.
8861         * pthread_join.c (pthread_join): Limited checking for invalid
8862         descriptors.
8863         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8865 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8867         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8868         beginning of the loop.  Clear the entire first block of TSD.
8869         * Makefile (tests): Add tst-key4.
8870         * tst-key4.c: New file.
8872 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8874         * Makefile (tests): Add tst-basic7.
8875         * tst-basic7.c: New file.
8877         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8878         Add some more __builtin_expect.
8880         * pthreadP.h: Define dummy version of DEBUGGING_P.
8882 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8884         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8885         _POSIX_THREAD_PRIORITY_SCHEDULING.
8886         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8887         _XOPEN_REALTIME_THREADS.
8888         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8890         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8891         kernel returns EINVAL for PID <= 0, work around it.
8893         * Makefile (tests): Add tst-signal5.
8894         * tst-signal5.c: New file.
8896         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8897         and LOGIN_NAME_MAX.
8899         * tst-cancel1.c (tf): Block all signals.
8901         * Makefile (tests): Add tst-basic6.
8902         * tst-basic6.c: New file.
8904         * tst-basic1.c: Add test for process ID.
8906         * Makefile (tests): Add tst-cancel10.
8907         * tst-cancel10.c: New file.
8909         * Makefile (tests): Add tst-signal4.
8910         * tst-signal4.c: New file.
8912         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8913         __sigismember instead of sigismember.  Add __builtin_expect.
8915 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8917         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8918         pthread_setcancelstate, and pthread_rwlock_setpshared.
8920         * tst-cancel7.c (do_test): Make sure the pid file exists before
8921         canceling the thread.
8923         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8924         pthread_rwlock_timedrdlock tests.
8925         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8926         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8927         Check for invalid tv_nsec field.
8928         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8929         Likewise.
8931         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8932         recursive mutex of overflow.
8934         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8936         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8937         going into an endless loop.
8938         * Makefile (tests): Add tst-cancel9.
8939         * tst-cancel9.c: New file.
8941         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8943 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8945         * tst-mutex5.c (do_test): Add more timedlock tests.
8947         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8948         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8950         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8951         use INLINE_SYSCALL.  Error number is returned, not -1.
8953         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8954         and __deallocate_stack with internal_function.
8955         * pthread_create.c: Adjust definitions appropriately.
8956         * allocatestack.c: Likewise.
8958         * pthread_join.c: Add one more __builtin_expect.
8959         * pthread_timedjoin.c: Likewise.
8961         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8962         not data of sequence number does not match.
8963         Add one __builtin_expect.
8965         * Makefile (tests): Add tst-clock1.
8966         * tst-clock1.c: New file.
8968         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8969         negative arguments.
8970         * Makefile (tests): Add tst-basic5.
8971         * tst-basic5.c: New file.
8973 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8975         * Makefile (tests): Add tst-basic4.
8976         * tst-basic4.c: New file.
8978         * pthreadP.h: Add declaraction for __nptl_nthreads.
8979         * pthread_create.c: Define __nptl_nthreads
8980         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8981         after thread is done.  If then zero, call exit(0).
8982         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8983         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8984         * init.c (pthread_functions): Initialize ptr_nthreads.
8985         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8986         (__reclaim_stacks): Decrement __nptl_nthreads.
8987         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8988         Define.
8989         * Makefile (tests): Add tst-basic3.
8990         * tst-basic3.c: New file.
8992         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8993         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8994         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8995         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8996         if asynchronous canceling is enabled.
8997         * pthread_join.c (pthread_join): When recognizing circular joins,
8998         take into account the other thread might be already canceled.
8999         * Makefile (tests): Add tst-join5.
9000         * tst-join5.c: New file.
9002         * Makefile (tests): Add tst-join4.
9003         * tst-join4.c: New file.
9005 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9007         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
9009 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9011         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
9012         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
9013         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
9014         warning.
9015         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
9016         to avoid warning.
9017         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
9018         error if lll_futex_wake failed.
9020 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
9022         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
9023         handling of cancellation and failung pthread_mutex_unlock call.
9024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9025         * Makefile (tests): Add tst-cond8 and tst-cond9.
9026         * tst-cond8.c: New file.
9027         * tst-cond9.c: New file.
9029         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9031         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9032         non-standard initializers with __USE_GNU.
9034         * Makefile (tests): Add tst-cleanup3.
9035         * tst-cleanup3.c: New file.
9037 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9039         * Makefile (tests): Add tst-attr1 and tst-attr2.
9040         * tst-attr1.c: New file.
9041         * tst-attr2.c: New file.
9043         * Makefile: Add rules to build and run tst-atfork2 test.
9044         * tst-atfork2.c: New file.
9045         * tst-atfork2mod.c: New file.
9047         * sysdeps/unix/sysv/linux/unregister-atfork.c
9048         (__unregister_atfork): Free the memory allocated for the handlers
9049         after removing them from the lists.
9051         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9052         cleanup function.
9054         * tst-atfork1.c (do_test): Wait for the child we forked.
9055         Report error in child.
9057         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9059         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9061 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9063         * Makefile (tests): Add tst-cancel8.
9064         * tst-cancel8.c: New file.
9066         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9067         clearing of control variable.
9068         * Makefile (tests): Add tst-once3 and tst-once4.
9069         * tst-once3.c: New file.
9070         * tst-once4.c: New file.
9072 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9074         * sysdeps/sh/Makefile: New file.
9075         * sysdeps/sh/bits/atomic.h: New file.
9076         * sysdeps/sh/pthread_spin_init.c: New file.
9077         * sysdeps/sh/pthread_spin_lock.c: New file.
9078         * sysdeps/sh/pthread_spin_trylock.S: New file.
9079         * sysdeps/sh/pthread_spin_unlock.S: New file.
9080         * sysdeps/sh/pthreaddef.h: New file.
9081         * sysdeps/sh/tcb-offsets.sym: New file.
9082         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9083         * sysdeps/sh/tls.h: New file.
9084         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9085         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9086         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9087         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9088         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9089         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9090         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9091         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9092         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9093         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9094         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9095         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9096         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9097         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9098         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9099         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9100         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9101         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9102         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9103         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9104         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9105         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9106         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9107         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9108         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9109         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9110         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9111         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9112         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9113         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9115 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9117         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9118         according to POSIX.
9120         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9122 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9124         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9125         (TLS_GET_FS): New #define.
9126         (TLS_SET_FS): New #define.
9127         Correct value of __NR_set_thread_area.
9129         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9131 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9133         * Makefile (tests): Add tst-popen1.
9134         * tst-popen1.c: New file.
9136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9137         but inactive generalization.
9138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9139         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9140         Minor optimization, remove one instruction.
9141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9143 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9145         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9147 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9149         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9150         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9151         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9152         * sysdeps/pthread/pthread_cond_signal.c: New file.
9153         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9154         * sysdeps/pthread/pthread_cond_wait.c: New file.
9155         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9156         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9157         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9158         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9159         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9160         * sysdeps/s390/Makefile: New file.
9161         * sysdeps/s390/bits/atomic.h: New file.
9162         * sysdeps/s390/pthread_spin_init.c: New file.
9163         * sysdeps/s390/pthread_spin_lock.c: New file.
9164         * sysdeps/s390/pthread_spin_trylock.c: New file.
9165         * sysdeps/s390/pthread_spin_unlock.c: New file.
9166         * sysdeps/s390/pthreaddef.h: New file.
9167         * sysdeps/s390/tcb-offsets.sym: New file.
9168         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9169         * sysdeps/s390/tls.h: New file.
9170         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9171         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9172         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9173         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9174         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9175         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9176         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9177         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9178         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9179         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9180         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9181         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9182         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9183         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9184         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9185         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9186         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9187         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9188         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9189         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9190         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9191         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9192         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9194 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9196         * atomic.h: Add a couple more default implementations.
9197         (atomic_compare_and_exchange_acq): Use
9198         __arch_compare_and_exchange_32_acq in return value definition.  It
9199         always exists.
9200         (atomic_bit_set): Renamed from atomic_set_bit.
9201         Add missing atomic_ prefixes.
9203         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9204         thread library is available, use correct value to mark initialized
9205         once variable.
9207 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9209         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9210         __sysconf to determine pagesize.
9212         * pthread_create.c: Include <atomic.h>.
9213         * allocatestack.c (allocate_stack): Implement coloring of the
9214         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9215         size minus one.  Adjust users.
9216         * sysdeps/i386/i686/Makefile: New file.
9218 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9220         * allocatestack.c: Improve comment throughout the file.
9222         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9223         (__lll_lock_wait): Add branch prediction.
9224         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9225         (__lll_lock_wait): Likewise.
9226         (lll_unlock_wake_cb): Removed.
9228 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9230         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9231         _POSIX_THREAD_PRIORITY_SCHEDULING.
9233 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9235         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9236         Fix return type of ptr___pthread_getspecific.
9238 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9240         * Makefile (tests): Add tst-umask1.
9241         (tst-umask1-ARGS): Define.
9242         * tst-umask1.c: New file.
9244 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9246         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9247         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9248         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9249         pthread_rwlock_unlock.
9250         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9251         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9252         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9254         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9255         New file.
9256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9257         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9258         New file.
9259         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9260         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9261         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9262         New file.
9263         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9264         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9265         New file.
9266         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9267         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9268         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9269         New file.
9270         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9271         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9272         New file.
9273         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9275         * Makefile (libpthread-routines): Remove lowlevelcond and
9276         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9277         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9278         and pthread_cond_broadcast.
9279         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9280         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9281         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9282         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9283         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9284         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9285         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9286         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9287         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9288         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9290         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9291         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9293         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9294         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9295         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9296         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9297         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9298         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9299         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9300         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9301         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9302         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9303         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9304         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9305         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9306         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9307         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9308         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9309         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9311         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9312         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9313         of the code is moved to ...
9314         * sysdeps/pthread/createthread.c: ...here.  New file.
9316 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9318         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9319         (__new_sem_post): Clear %eax before returning.
9320         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9322         * Makefile (tests): Add tst-cleanup2.
9323         * tst-cleanup2.c: New file.
9325         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9326         Interpret first parameter correctly.
9328 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9330         * Makefile (headers): Add bits/semaphore.h.
9332 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9334         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9335         if not SHARED.
9337 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9339         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9340         must be used and mapping failed.
9341         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9343         * Makefile (CFLAGS-pthread_self.os): Define this, not
9344         CFLAGS-pthread_self.c.
9346 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9348         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9349         lll_unlock_wake_cb.
9351         * Makefile (libpthread-routines): Add version.  Add rules to build
9352         version.os and banner.h.
9353         * version.c: New file.
9355 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9357         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9358         the alias unconditional.
9359         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9361 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9363         * Makefile (CFLAGS-pthread_self.c): New definition.
9365 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9367         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9368         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9369         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9370         * init.c (__pthread_initialize_minimal_internal): Likewise.
9372 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9374         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9376         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9377         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9378         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9379         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9380         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9381         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9383 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9385         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9386         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9387         * tst-cancel-wrappers.sh: Remove all exceptions.
9389 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9391         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9392         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9394         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9395         Use __libc_pthread_functions array if SHARED.
9397         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9398         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9400         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9401         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9402         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9403         __libc_ptf_call instead of __libc_maybe_call.
9404         (PTF): New #define.
9405         (__libc_cleanup_region_start): Wrap function name with PTF call.
9406         (__libc_cleanup_region_end): Likewise.
9407         (__libc_cleanup_end): Likewise.
9409         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9410         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9411         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9412         * pthreadP.h: Add prototypes.
9414         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9415         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9416         __pthread_rwlock_unlock aliases.
9417         * pthreadP.h: Add prototypes for new aliases.
9419         * pthreadP.h (struct pthead_functions): Moved to...
9420         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9421         * init.c (pthread_functions): Add initializers for new elements.
9423         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9424         __pthread_cleanup_pop_restore aliases.
9425         * pthreadP.h: Add prototypes.
9427         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9428         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9429         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9430         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9431         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9432         * pthreadP.h: Adjust prototypes and callers.
9434 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9436         * Makefile (tests): Add tst-cancel7.
9437         (tst-cancel7-ARGS): New variable.
9438         * tst-cancel7.c: New file.
9440         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9441         around gcc defficiencies.
9442         * old_pthread_cond_signal.c: Likewise.
9443         * old_pthread_cond_timedwait.c: Likewise.
9444         * old_pthread_cond_wait.c: Likewise.
9446         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9448 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9450         * Makefile (tests): Add tst-cond7.
9451         * tst-cond7.c: New file.
9453         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9454         (condvar_cleanup): Get condvar address from the right place.
9456         * atomic.h: Correct definitions of atomic_full_barrier,
9457         atomic_read_barrier, atomic_write_barrier.
9459         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9460         race-free.
9461         * old_pthread_cond_signal.c: Likewise.
9462         * old_pthread_cond_timedwait.c: Likewise.
9463         * old_pthread_cond_wait.c: Likewise.
9465 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9467         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9469 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9471         * pthreadP.h (pthread_cond_2_0_t): New type.
9472         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9473         Use new type for the 2.0 condvar function prototypes.
9474         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9475         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9476         parameter.
9477         * old_pthread_cond_destroy.c: Likewise.
9478         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9479         * old_pthread_cond_signal.c: Likewise.
9480         * old_pthread_cond_timedwait.c: Likewise.
9481         * old_pthread_cond_wait.c: Likewise.
9483         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9484         (__pthread_cond_wait): Don't save cancellation mode and seq value
9485         in same location.
9487         * herrno.c (__h_errno_location): Don't define as weak.
9489 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9491         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9492         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9493         and pthread_cond_wait.
9494         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9495         Renamed to...
9496         (__pthread_cond_broadcast_2_0): ... this.
9497         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9498         Renamed to...
9499         (__pthread_cond_destroy_2_0): ... this.
9500         * old_pthread_cond_init.c (__old_pthread_cond_init):
9501         Renamed to...
9502         (__pthread_cond_init_2_0): ... this.
9503         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9504         Renamed to...
9505         (__pthread_cond_signal_2_0): ... this.
9506         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9507         Renamed to...
9508         (__pthread_cond_wait_2_0): ... this.
9509         * pthread_cond_destroy.c: Include shlib-compat.h.
9510         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9511         * pthread_cond_init.c: Include shlib-compat.h.
9512         (pthread_cond_init): Change strong_alias into versioned_symbol.
9513         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9514         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9515         fields.
9516         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9517         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9518         __pthread_cond_wait_2_0): New prototypes.
9519         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9520         __old_pthread_cond_init, __old_pthread_cond_signal,
9521         __old_pthread_cond_wait): Removed.
9522         * init.c: Include shlib-compat.h.
9523         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9524         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9525         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9526         ptr___pthread_cond_*_2_0 fields.
9527         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9528         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9530         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9531         LIBC_SIGACTION was not yet defined.
9532         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9533         [!defined LIBC_SIGACTION] (__sigaction): New function and
9534         libc_hidden_weak.
9535         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9536         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9538 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9540         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9542 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9544         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9545         New, larger type definition.
9546         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9547         implementation.
9548         * Versions [libpthread]: Add definitions for new pthread_cond_*
9549         interfaces for version GLIBC_2.3.2.
9550         * pthread_cond_init.c: Update initialization for new type definition.
9551         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9552         pthread_cond_timedwait, pthread_cond_signal, and
9553         pthread_cond_broadcast.  Add old_pthread_cond_init,
9554         old_pthread_cond_destroy, old_pthread_cond_wait,
9555         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9556         old_pthread_cond_broadcast.
9557         * old_pthread_cond_broadcast.c: New file.
9558         * old_pthread_cond_destroy.c: New file.
9559         * old_pthread_cond_init.c: New file.
9560         * old_pthread_cond_signal.c: New file.
9561         * old_pthread_cond_timedwait.c: New file.
9562         * old_pthread_cond_wait.c: New file.
9563         * pthreadP.h: Add prototypes for the compatibility interfaces.
9565         * pthread_cond_destroy.c: Don't include <errno.h>.
9567 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9569         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9570         unnecessary zero offset when addressing MUTEX.
9572 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9574         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9575         __register_atfork.
9576         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9577         for __register_atfork.
9579 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9581         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9582         instead of ASSEMBLER test macro.
9584         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9585         __libc_current_sigrtmax): Add libc_hidden_def.
9587         * sysdeps/pthread/list.h: Remove assert.h include.
9589 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9591         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9592         __pthread_initialize_minimal_internal not
9593         __pthread_initialize_minimal.
9595 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9597         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9598         __pthread_initialize_minimal as hidden.
9600         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9601         constructor.
9603 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9605         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9606         $(common-objpfx)format.lds, include that into the output script.
9607         Fix comment.
9608         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9610 2002-12-28  Andreas Jaeger  <aj@suse.de>
9612         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9613         nsec resolution changes.
9614         (xstat64_conv): Likewise.
9615         (xstat32_conv): Likewise.
9616         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9617         struct kernel_stat.
9618         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9619         structs stat and stat64.
9620         * time/time.h (__timespec_defined): Define for __USE_MISC.
9621         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9623 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9625         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9626         argument.
9627         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9628         (pthread_exit): Use strong_alias to avoid warnings.
9629         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9630         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9631         ptr___pthread_attr_init_2_*.
9632         * init.c (pthread_functions): Adjust.
9634 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9636         * forward.c: Make all functions available by default again.  It
9637         caused too much trouble.
9639         * pt-siglongjmp.c: Removed.
9641 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9643         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9644         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9645         * sysdeps/i386/Makefile: New file.
9646         * sysdeps/i386/tcb-offsets.sym: New file.
9647         * sysdeps/pthread/tcb-offsets.h: New file.
9648         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9649         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9651         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9652         __register_atfork...
9653         (GLIBC_2.3.2): ...here.
9655 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9657         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9658         pthread_attr_setstackaddr with __attribute_deprecated__.
9660 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9662         * pt-system.c (system): Remove cancellation handling.
9663         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9664         cancellation routines.
9666 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9668         * descr.h: Include <dl-sysdep.h>.
9669         (struct pthread): Move header.data.list to the back of the struct.
9670         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9671         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9672         (SYSINFO_OFFSEET): Likewise.
9674 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9676         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9677         Define.
9678         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9679         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9680         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9681         (USE_DL_SYSINFO): Undef.
9683 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9685         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9686         $(common-objpfx)libc.so.
9687         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9688         it is bigger than pipe buffer size even on arches with bigger
9689         page size.
9690         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9692 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9694         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9695         correct errno access for case that USE___THREAD is not defined.
9697 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9699         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9700         Patch by Marijn Ros <marijn@mad.scientist.com>.
9702 2002-12-22  Roland McGrath  <roland@redhat.com>
9704         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9706 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9708         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9710 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9712         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9713         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9714         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9716         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9717         of int $0x80.
9718         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9719         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9720         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9721         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9722         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9723         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9724         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9725         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9727         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9728         sysenter.
9729         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9731         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9733         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9734         in new TCB.
9735         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9736         that sysinfo is properly initialized.
9737         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9738         to 1 only for ld.so.
9740         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9741         RTLD_CORRECT_DYNAMIC_WEAK.
9743 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9745         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9746         Use return 0 as 6th argument to FORWARD4.
9747         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9749 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9751         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9752         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9753         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9754         (INIT_SYSINFO): New #define.
9755         (TLS_TP_INIT): Use INIT_SYSINFO.
9756         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9757         At test to make sure SYSINFO_OFFSET value is correct.
9758         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9760 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9762         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9763         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9764         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9765         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9766         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9767         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9768         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9770 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9772         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9773         macro instead of using int $0x80 directly.
9775         * sysdeps/pthread/bits/stdio-lock.h: New file.
9776         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9777         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9778         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9779         * Makefile (routines): Add libc-lowlevelmutex.
9781         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9782         __i686.get_pc_thunk.dx.
9784 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9786         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9787         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9788         ($(objpfx)tst-cancel-wrappers.out): New rule.
9789         * tst-cancel-wrappers.sh: New test.
9790         * tst-locale1.c: Include signal.h.
9791         (uselocale): Test static linking of __libc_current_sigrt*.
9793 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9795         * Makefile (tests): Add tst-cancel6.
9796         * tst-cancel6.c: New file
9798 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9800         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9801         Define meaningfully for assembler as well.
9802         * pthreadP.h (struct pthread_functions): Remove
9803         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9804         and ptr_pthread_attr_init_2_1 fields.
9805         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9806         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9807         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9808         (FORWARD3): Define using FORWARD4.
9809         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9810         versions.
9811         * pt-system.c: Remove duplicate stdlib.h include.
9813 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9815         * sem_init.c: Define sem_init@GLIBC_2.0.
9816         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9817         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9819         * flockfile.c: Moved to...
9820         * sysdeps/pthread/flockfile.c: ...here.  New file.
9821         * funlockfile.c: Moved to...
9822         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9823         * ftrylockfile.c: Moved to...
9824         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9826 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9828         * libc-cancellation.c: Guard both function with
9829         #if !defined NOT_IN_libc.
9830         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9831         automatically provided pthread wrappers.
9832         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9833         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9834         nor in libpthread.
9835         * pt-open.c: Removed.
9836         * pt-fcntl.c: Removed.
9837         * pt-fsync.c: Removed.
9838         * pt-lseek.c: Removed.
9839         * pt-msgrcv.c: Removed.
9840         * pt-msgsnd.c: Removed.
9841         * pt-msync.c: Removed.
9842         * pt-nanosleep.c: Removed.
9843         * pt-open64.c: Removed.
9844         * pt-pause.c: Removed.
9845         * pt-pread.c: Removed.
9846         * pt-pread64.c: Removed.
9847         * pt-pwrite.c: Removed.
9848         * pt-pwrite64.c: Removed.
9849         * pt-read.c: Removed.
9850         * pt-recv.c: Removed.
9851         * pt-recvfrom.c: Removed.
9852         * pt-recvmsg.c: Removed.
9853         * pt-send.c: Removed.
9854         * pt-sendto.c: Removed.
9855         * pt-sigtimedwait.c: Removed.
9856         * pt-sigwait.c: Removed.
9857         * pt-wait.c: Removed.
9858         * pt-waitpid.c: Removed.
9859         * pt-write.c: Removed.
9860         * pt-accept.c: Removed.
9861         * pt-close.c: Removed.
9862         * pt-connect.c: Removed.
9863         * pt-lseek64.c: Removed.
9864         * pt-sendmsg.c: Removed.
9865         * pt-tcdrain.c: Removed.
9867 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9869         * init.c (__pthread_initialize_minimal_internal): Renamed from
9870         __pthread_initialize_minimal.  Make old name an alias.  This
9871         converts a normal relocation into a relative relocation.
9873         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9875         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9876         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9877         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9878         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9879         pt-sigwaitinfo, pt-waitid, and pt-writev.
9880         * pt-creat.c: Removed.
9881         * pt-poll.c: Removed.
9882         * pt-pselect.c: Removed.
9883         * pt-readv.c: Removed.
9884         * pt-select.c: Removed.
9885         * pt-sigpause.c: Removed.
9886         * pt-sigsuspend.c: Removed.
9887         * pt-sigwaitinfo.c: Removed.
9888         * pt-waitid.c: Removed.
9889         * pt-writev.c: Removed.
9891         * init.c (pthread_functions): New variable.
9892         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9893         (or NULL) to __libc_pthread_init.
9894         * forward.c: Rewrite to use __libc:pthread_functions array to get
9895         function addresses.
9896         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9897         prototype.
9898         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9899         Take new parameter.  Copy content of variable pointed to by it
9900         to __libc_pthread_init.
9902         * pthreadP.h (struct pthread_functions): New type.
9903         (__libc_pthread_init): Declare.
9905         * pthread_attr_destroy.c: Add namespace protected alias.
9906         * pthread_attr_getdetachstate.c: Likewise.
9907         * pthread_attr_getinheritsched.c: Likewise.
9908         * pthread_attr_getschedparam.c: Likewise.
9909         * pthread_attr_getschedpolicy.c: Likewise.
9910         * pthread_attr_getscope.c: Likewise.
9911         * pthread_attr_setdetachstate.c: Likewise.
9912         * pthread_attr_setinheritsched.c: Likewise.
9913         * pthread_attr_setschedparam.c: Likewise.
9914         * pthread_attr_setschedpolicy.c: Likewise.
9915         * pthread_attr_setscope.c: Likewise.
9916         * pthread_cond_broadcast.c: Likewise.
9917         * pthread_cond_destroy.c: Likewise.
9918         * pthread_cond_init.c: Likewise.
9919         * pthread_cond_signal.c: Likewise.
9920         * pthread_cond_wait.c: Likewise.
9921         * pthread_condattr_destroy.c: Likewise.
9922         * pthread_condattr_init.c: Likewise.
9923         * pthread_equal.c: Likewise.
9924         * pthread_exit.c: Likewise.
9925         * pthread_getschedparam.c: Likewise.
9926         * pthread_self.c: Likewise.
9927         * pthread_setcancelstate.c: Likewise.
9928         * pthread_setschedparam.c: Likewise.
9929         * pthread_mutex_destroy.c: Likewise.
9930         * pthread_mutex_init.c: Likewise.
9931         * pthreadP.h: Add prototypes for the aliases.
9933         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9934         multiple_threads member in correct TCB to 1.
9936         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9937         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9938         member of thread decriptor, otherwise return unconditionally 1.
9940 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9942         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9943         regular Linux version.  Remove file.
9944         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9945         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9946         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9947         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9948         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9949         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9950         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9951         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9952         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9953         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9954         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9955         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9956         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9957         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9958         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9959         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9960         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9961         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9962         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9963         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9964         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9965         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9966         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9967         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9968         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9969         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9970         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9971         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9972         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9973         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9975 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9977         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9978         * sysdeps/unix/sysv/linux/open.c: Removed.
9979         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9980         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9981         * sysdeps/unix/sysv/linux/msync.c: Removed.
9982         * sysdeps/unix/sysv/linux/read.c: Removed.
9983         * sysdeps/unix/sysv/linux/close.c: Removed.
9984         * sysdeps/unix/sysv/linux/creat.c: Removed.
9985         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9986         * sysdeps/unix/sysv/linux/pause.c: Removed.
9987         * sysdeps/unix/sysv/linux/select.c: Removed.
9988         * sysdeps/unix/sysv/linux/write.c: Removed.
9990 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9992         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9993         element in TCB to see whether locking is needed.
9995         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9996         MULTIPLE_THREADS_OFFSET value is correct.
9998         * sysdeps/unix/sysv/linux/close.c: New file.
9999         * sysdeps/unix/sysv/linux/connect.S: New file.
10000         * sysdeps/unix/sysv/linux/creat.c: New file.
10001         * sysdeps/unix/sysv/linux/fsync.c: New file.
10002         * sysdeps/unix/sysv/linux/llseek.c: New file.
10003         * sysdeps/unix/sysv/linux/lseek.c: New file.
10004         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
10005         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
10006         * sysdeps/unix/sysv/linux/msync.c: New file.
10007         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
10008         * sysdeps/unix/sysv/linux/open.c: New file.
10009         * sysdeps/unix/sysv/linux/open64.c: New file.
10010         * sysdeps/unix/sysv/linux/pause.c: New file.
10011         * sysdeps/unix/sysv/linux/poll.c: New file.
10012         * sysdeps/unix/sysv/linux/pread.c: New file.
10013         * sysdeps/unix/sysv/linux/pread64.c: New file.
10014         * sysdeps/unix/sysv/linux/pselect.c: New file.
10015         * sysdeps/unix/sysv/linux/pwrite.c: New file.
10016         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
10017         * sysdeps/unix/sysv/linux/readv.c: New file.
10018         * sysdeps/unix/sysv/linux/recv.S: New file.
10019         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
10020         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
10021         * sysdeps/unix/sysv/linux/select.c: New file.
10022         * sysdeps/unix/sysv/linux/send.S: New file.
10023         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
10024         * sysdeps/unix/sysv/linux/sendto.S: New file.
10025         * sysdeps/unix/sysv/linux/sigpause.c: New file.
10026         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
10027         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10028         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10029         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10030         * sysdeps/unix/sysv/linux/system.c: New file.
10031         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10032         * sysdeps/unix/sysv/linux/wait.c: New file.
10033         * sysdeps/unix/sysv/linux/waitid.c: New file.
10034         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10035         * sysdeps/unix/sysv/linux/writev.c: New file.
10036         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10038         * pt-readv.c: Fix comment.
10040 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10042         * tst-cleanup1.c: Include stdlib.h.
10044         * tst-cancel5.c: New test.
10045         * Makefile (tests): Add tst-cancel5.
10046         (tst-cancel5): Link against libc.so libpthread.so in that order.
10048 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10050         * forward.c (test_loaded): Prevent recursive calls.
10052         * Makefile (routines): Add libc-cancellation.
10053         * libc-cancellation.c: New file.
10054         * descr.h (struct pthread): Add multiple_threads field.
10055         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10056         new thread descriptor to 1.
10057         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10058         Initialize multiple_thread field after successful thread creation.
10059         * cancellation.c (__do_cancel): Move to pthreadP.h.
10060         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10061         (__pthread_disable_asynccancel): Add internal_function attribute.
10062         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10063         * pthread_setcancelstate.c: Likewise.
10064         * pthread_setcanceltype.c: Likewise.
10065         * pthread_exit.c: Likewise.
10066         * pthreadP.h (CANCELLATION_P): Likewise.
10067         (__do_cancel): Define as static inline.
10068         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10069         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10070         declarations.
10071         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10072         fields.  Define MULTIPLE_THREADS_OFFSET.
10073         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10074         declaration.
10075         * sysdeps/unix/sysv/linux/accept.S: New file.
10076         * sysdeps/unix/sysv/linux/read.c: New file.
10077         * sysdeps/unix/sysv/linux/write.c: New file.
10078         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10079         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10080         initialization of __libc_locking_needed.
10081         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10082         __libc_locking_needed, use multiple_threads field in TCB.
10083         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10085 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10087         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10088         version.
10089         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10091         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10092         access to __libc_locking_needed for PIC.
10094 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10096         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10097         declare for libc.so.
10098         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10099         expression.
10100         (__libc_lock_lock): Put into statement expression.
10101         (__libc_lock_unlock): Remove trailing semicolon.
10102         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10104 2002-12-12  Roland McGrath  <roland@redhat.com>
10106         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10107         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10109 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10111         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10112         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10113         Initialize __libc_locking_needed.
10114         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10115         instead of __register_pthread_fork_handler.
10116         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10117         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10118         fork-gen with libc_pthread_init.
10119         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10120         of __register_pthread_fork_handler.
10121         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10122         of __register_pthread_fork_handler.
10123         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10124         __libc_locking_needed to determine whether lock prefix can be avoided.
10125         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10127 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10129         * Makefile (tests): Add tst-cleanup1.
10130         * tst-cleanup1.c: New file.
10131         * cancellation.c (__cleanup_thread): Removed.
10132         (__do_cancel): Remove call to __cleanup_thread.
10133         * pthreadP.h: Remove __cleanup_thread prorotype.
10135         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10136         Remember function and argument even if cancellation handler
10137         function is not available.
10138         (__libc_cleanup_region_end): Execute registered function directly if
10139         pthread functions are not available.
10140         (__libc_cleanup_end): Likewise.
10142         * init.c (__pthread_initialize_minimal): Fix initialization in
10143         static lib by preventing gcc from being too clever.
10145 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10147         * init.c (__pthread_initialize_minimal): Remove unneccesary
10148         sigaddset call.
10150         * Makefile (tests): We can run tst-locale2 now.
10152 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10154         * Versions: Remove duplicated sigwait entry.
10156 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10158         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10159         inside libpthread.
10161         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10163         * pthreadP.h: Declare __pthread_enable_asynccancel and
10164         __pthread_disable_asynccancel.
10165         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10166         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10167         * cancellation.c (__pthread_enable_asynccancel): New function.
10168         (__pthread_disable_asynccancel): New function.
10169         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10170         * pt-close.c: Likewise.
10171         * pt-connect.c: Likewise.
10172         * pt-creat.c: Likewise.
10173         * pt-fcntl.c: Likewise.
10174         * pt-fsync.c: Likewise.
10175         * pt-lseek.c: Likewise.
10176         * pt-lseek64.c: Likewise.
10177         * pt-msgrcv.c: Likewise.
10178         * pt-msgsnd.c: Likewise.
10179         * pt-msync.c: Likewise.
10180         * pt-nanosleep.c: Likewise.
10181         * pt-open.c: Likewise.
10182         * pt-open64.c: Likewise.
10183         * pt-pause.c: Likewise.
10184         * pt-poll.c: Likewise.
10185         * pt-pread.c: Likewise.
10186         * pt-pread64.c: Likewise.
10187         * pt-pselect.c: Likewise.
10188         * pt-pwrite.c: Likewise.
10189         * pt-pwrite64.c: Likewise.
10190         * pt-read.c: Likewise.
10191         * pt-readv.c: Likewise.
10192         * pt-recv.c: Likewise.
10193         * pt-recvfrom.c: Likewise.
10194         * pt-recvmsg.c: Likewise.
10195         * pt-select.c: Likewise.
10196         * pt-send.c: Likewise.
10197         * pt-sendmsg.c: Likewise.
10198         * pt-sendto.c: Likewise.
10199         * pt-sigpause.c: Likewise.
10200         * pt-sigsuspend.c: Likewise.
10201         * pt-sigtimedwait.c: Likewise.
10202         * pt-sigwait.c: Likewise.
10203         * pt-sigwaitinfo.c: Likewise.
10204         * pt-system.c: Likewise.
10205         * pt-tcdrain.c: Likewise.
10206         * pt-wait.c: Likewise.
10207         * pt-waitid.c: Likewise.
10208         * pt-waitpid.c: Likewise.
10209         * pt-write.c: Likewise.
10210         * pt-writev.c: Likewise.
10211         * pthread_join.c: Likewise.
10212         * pthread_timedjoin.c: Likewise.
10214         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10215         (__xpg_sigpause): New function.
10216         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10218 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10220         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10222         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10223         _GI_pthread_cleanup_pop to pthreadP.h.
10225         * ftrylockfile.c: Use _IO_lock_trylock instead of
10226         pthread_mutex_trylock.
10228         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10229         (CANCEL_RESET): Likewise.
10230         (__pthread_setcanceltype_): Declare.
10231         (__pthread_mutex_lock_internal): Declare.
10232         (__pthread_mutex_unlock_internal): Declare.
10233         (__pthread_once_internal): Declare.
10234         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10235         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10237         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10238         and pthread_mutex_unlock.
10239         * pthread_cond_wait.c: Likewise.
10240         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10241         * pthread_mutex_unlock.c: Likewise.
10243         * pthread_setcanceltype.c: Add additional alias
10244         __pthread_setcanceltype.
10246         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10247         * sem_open.c (sem_open): Likewise.
10248         Use __libc_open, __libc_write, and __libc_close instead of
10249         open, write, and close respectively.
10251         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10252         Rewrite as statement expression since it must return a value.
10254         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10255         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10256         __pthread_kill.
10258         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10259         alias __pthread_once_internal.
10261         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10263 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10265         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10266         * tst-stdio1.c: New file.
10267         * tst-stdio2.c: New file.
10269         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10271         * Makefile (tests): Comment out tst-locale2 for now.
10272         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10274         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10275         -D_IO_MTSAFE_IO.
10276         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10277         Use _IO_lock_init instead of explicit assignment.
10279         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10280         Define __libc_lock_* and __libc_lock_recursive macros with
10281         lowlevellock macros, not pthread mutexes.
10283         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10284         of pthread_mutex_lock.
10285         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10286         instead of pthread_mutex_unlock.
10288 2002-12-06  Roland McGrath  <roland@redhat.com>
10290         * allocatestack.c (__stack_user): Use uninitialized defn.
10291         * init.c (__pthread_initialize_minimal): Initialize it here.
10293 2002-12-05  Roland McGrath  <roland@redhat.com>
10295         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10296         string.
10297         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10299         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10300         missing & here too.
10302 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10304         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10305         lowlevellock.
10306         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10307         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10308         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10309         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10310         for __libc_lock_* macros.
10311         * Makefile (routines): Add libc-lowlevellock.
10313 2002-10-09  Roland McGrath  <roland@redhat.com>
10315         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10316         Under [__PIC__], call the function via the pointer fetched for
10317         comparison rather than a call by name that uses the PLT.
10318         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10319         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10320         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10321         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10322         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10324 2002-12-04  Roland McGrath  <roland@redhat.com>
10326         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10328         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10329         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10331         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10333 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10335         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10336         a completely opaque, non-integer type.
10337         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10339 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10341         * sysdeps/i386/tls.h: Include stdlib.h.
10342         * sysdeps/x86_64/tls.h: Likewise.
10344 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10346         * Makefile (tests): Add tst-locale2.
10347         (tests-static): Likewise.
10348         * tst-locale2.c: New file.
10350         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10351         volatile and add memory clobbers to lock operations.
10353 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10355         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10356         * sysdeps/i386/i486/bits/atomic.h: New file.
10357         * sysdeps/i386/i586/bits/atomic.h: New file.
10358         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10359         include i486 version.
10360         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10361         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10362         Patch by Marijn Ros <marijn@mad.scientist.com>.
10364         * allocatestack.c (get_cached_stack): Don't crash if we first
10365         found a stack with a larger size then needed.
10366         Reported by Hui Huang <hui.huang@sun.com>.
10368         * Makefile (tests): Add tst-sysconf.
10369         * tst-sysconf.c: New file.
10371         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10372         PTHREAD_THREADS_MAX.
10374 2002-12-02  Roland McGrath  <roland@redhat.com>
10376         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10377         Declare using hidden_proto instead of attribute_hidden, so there are
10378         non-.hidden static symbols for gdb to find.
10379         (__pthread_keys): Likewise.
10380         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10381         * allocatestack.c (__stack_user): Likewise.
10382         * pthread_create.c (__pthread_keys): Likewise.
10383         (__nptl_threads_events, __nptl_last_event): Make these static instead
10384         of hidden.
10385         * pthread_key_create.c (__pthread_pthread_keys_max,
10386         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10388 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10390         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10391         statically.
10392         * tst-locale1.c: New file.
10394         * pthread_cond_timedwait.c: Include <stdlib.h>.
10396         * Makefile (tests): Add tst-fork2 and tst-fork3.
10397         * tst-fork2.c: New file.
10398         * tst-fork3.c: New file.
10400 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10402         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10404         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10405         require it to 200112L.
10407         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10408         instruction only if HAVE_CMOV is defined.
10409         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10411         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10413         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10415         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10417         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10419 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10421         * sysdeps/x86_64/bits/atomic.h: New file.
10423         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10424         16-bit operations.
10426         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10427         possible since gettid cannot fail.
10429         * sysdeps/x86_64/pthreaddef.h: New file.
10431         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10433         * sysdeps/x86_64/pthread_spin_init.c: New file.
10434         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10435         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10436         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10438         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10439         Add missing lock prefix.  Minute optimization.
10441         * tst-spin2.c (main): Also check successful trylock call.
10443         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10444         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10446         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10447         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10449         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10450         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10451         value in case of an error.  Add support for INTERNAL_SYSCALL.
10453         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10454         value in case of an error.
10456         * sysdeps/x86_64/tls.h: New file.
10458 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10460         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10461         takes the array member name and the index as parameters.
10462         (THREAD_SETMEM_NC): Likewise.
10463         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10464         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10465         interfaces.
10467         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10468         to decide which code to use.
10469         (THREAD_SETMEM_NC): Likewise.
10471         * allocatestack.c (queue_stack): Don't remove stack from list here.
10472         Do it in the caller.  Correct condition to prematurely terminate
10473         loop to free stacks.
10474         (__deallocate_stack): Remove stack from list here.
10476 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10478         * Makefile (tests): Add tst-stack1.
10479         * tst-stack1.c: New file.
10481         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10482         provided stack.
10484         * pthread_attr_getstack.c: Return bottom of the thread area.
10486 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10488         * Makefile (libpthread-routines): Add pt-allocrtsig and
10489         pthread_kill_other_threads.
10490         * pt-allocrtsig.c: New file.
10491         * pthread_kill_other_threads.c: New file.
10492         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10493         all three functions.
10494         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10495         allocrtsig.
10496         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10497         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10498         and __libc_allocate_rtsig_private.
10499         * Versions (libpthread): Export pthread_kill_other_threads_np,
10500         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10502 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10504         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10505         the end of the stack.  Adjust computations.
10506         When mprotect call fails dequeue stack and free it.
10507         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10508         attribute.
10509         * pthread_getattr_np.c: Likewise.
10511         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10512         surprises.
10514 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10516         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10517         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10519 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10521         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10522         * pthread_setspecific.c: Likewise.
10524 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10526         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10527         definitions.  Get them from the official place.
10528         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10530         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10531         Use new CLONE_ flags in clone() calls.
10533         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10534         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10536         * Versions: Add pthread_* functions for libc.
10537         * forward.c: New file.
10539         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10540         errno-loc.
10541         * herrno.c: New file.
10542         * res.c: New file.
10544         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10545         sem_trywait, and sem_timedwait.  Add herrno and res.
10546         * sem_init.c: Don't initialize lock and waiters members.
10547         * sem_open.c: Likewise.
10548         * sem_post.c: Removed.
10549         * sem_wait.c: Removed.
10550         * sem_trywait.c: Removed.
10551         * sem_timedwait.c: Removed.
10552         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10553         Includes full implementations of sem_post, sem_wait, sem_trywait,
10554         and sem_timedwait.
10555         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10556         for new implementation.
10557         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10558         and waiters fields.
10560         * tst-sem3.c: Improve error message.
10561         * tst-signal3.c: Likewise.
10563         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10564         to tell the kernel about the termination futex and to initialize tid
10565         member.  Don't initialize main_thread.
10566         * descr.h (struct pthread): Remove main_thread member.
10567         * cancelllation.c (__do_cancel): Remove code handling main thread.
10568         The main thread is not special anymore.
10570         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10571         size of the stacks to stack_cache_actsize.
10573         * pt-readv.c: Add missing "defined".
10574         * pt-sigwait.c: Likewise.
10575         * pt-writev.c: Likewise.
10577 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10579         * Versions: Export __connect from libpthread.
10580         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10582         * Makefile (libpthread-routines): Add pt-raise.
10583         * sysdeps/unix/sysv/linux/raise.c: New file.
10584         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10585         * sysdeps/generic/pt-raise.c: New file.
10587         * pthread_cond_init.c: Initialize all data elements of the condvar
10588         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10590         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10591         * pthread_create.c: Likewise.
10593         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10594         * tst-key1.c: New file.
10595         * tst-key2.c: New file.
10596         * tst-key3.c: New file.
10598         * Versions: Export pthread_detach for version GLIBC_2.0.
10599         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10601 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10603         * pthread_key_create.c: Terminate search after an unused key was found.
10604         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10606         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10607         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10609 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10611         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10612         dynamic lookup for errno in PIC.
10614         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10615         release the stack lock as soon as possible.
10616         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10617         the static TLS block.
10618         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10620         * cancellation.c: Renamed from cancelation.c.
10621         * Makefile: Adjust accordingly.
10622         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10623         * cleanup_defer.c: Use CANCELLATION_P.
10624         * pthread_testcancel.c: Likewise.
10625         * descr.h: Fix spelling in comments.
10626         * init.c: Likewise.
10627         * pthread_getattr_np.c: Likewise.
10628         * pthread_getschedparam.c: Likewise.
10629         * pthread_setschedparam.c: Likewise.
10630         * Versions: Likewise.
10632         * pt-pselect.c: New file.
10633         * Makefile (libpthread-routines): Add pt-pselect.
10634         * Versions: Add pselect.
10636         * tst-cancel4.c: New file.
10637         * Makefile (tests): Add tst-cancel4.
10639 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10641         * pthread_mutex_lock.c: Always record lock ownership.
10642         * pthread_mutex_timedlock.c: Likewise.
10643         * pthread_mutex_trylock.c: Likewise.
10645         * pt-readv.c: New file.
10646         * pt-writev.c: New file.
10647         * pt-creat.c: New file.
10648         * pt-msgrcv.c: New file.
10649         * pt-msgsnd.c: New file.
10650         * pt-poll.c: New file.
10651         * pt-select.c: New file.
10652         * pt-sigpause.c: New file.
10653         * pt-sigsuspend.c: New file.
10654         * pt-sigwait.c: New file.
10655         * pt-sigwaitinfo.c: New file.
10656         * pt-waitid.c: New file.
10657         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10658         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10659         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10660         * Versions: Add all the new functions.
10662         * tst-exit1.c: New file.
10663         * Makefile (tests): Add tst-exit1.
10665         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10667 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10669         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10671         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10672         call.  pthread_join is an official cancellation point.
10673         * pthread_timedjoin.c: Likewise.
10675         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10676         and the condvar's mutex are retrieved.
10677         * pthread_cond_timedwait.c: Likewise.
10678         Reported by dice@saros.East.Sun.COM.
10680 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10682         * pthreadP.h: Cut out all type definitions and move them...
10683         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10684         * pthreadP.h: Include <internaltypes.h>.
10686         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10687         performance tweaks.
10689         * sem_trywait.c: Shuffle #includes around to get right order.
10690         * sem_timedwait.c: Likewise.
10691         * sem_post.c: Likewise.
10692         * sem_wait.c: Likewise.
10694         * nptl 0.3 released.
10696         * Makefile (tests): Add tst-signal3.
10697         * tst-signal3.c: New file.
10699 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10701         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10702         the asms modify the sem object.
10703         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10705         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10706         the actual members.
10707         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10708         * semaphoreP.h: Include pthreadP.h.
10709         * sem_getvalue.c: Adjust to sem_t change.
10710         * sem_init.c: Likewise.
10711         * sem_open.c: Likewise.
10712         * sem_post.c: Likewise.
10713         * sem_timedwait.c: Likewise.
10714         * sem_trywait.c: Likewise.
10715         * sem_wait.c: Likewise.
10717 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10719         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10720         * tst-basic2.c: New file.
10721         * tst-exec1.c: New file.
10722         * tst-exec2.c: New file.
10723         * tst-exec3.c: New file.
10725         * tst-fork1.c: Remove extra */.
10727         * nptl 0.2 released.  The API for IA-32 is complete.