po/bg.po
[glibc/pb-stable.git] / nptl / ChangeLog
blobc906c66b796f60904fcf0e09c84cb15488b31794
1 2009-02-27  Roland McGrath  <roland@redhat.com>
3         * init.c (__nptl_initial_report_events): Mark __attribute_used__.
4         * pthread_create.c (__nptl_threads_events, __nptl_last_event): Likewise.
6 2009-02-26  Ulrich Drepper  <drepper@redhat.com>
8         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
9         _POSIX_THREAD_ROBUST_PRIO_INHERIT and
10         _POSIX_THREAD_ROBUST_PRIO_PROTECT.  Reset value of macros from
11         200112L to 200809L.
13 2009-02-25  Ulrich Drepper  <drepper@redhat.com>
15         * sysdeps/pthread/pthread.h: The robust mutex functions are in
16         POSIX 2008.
18 2009-02-24  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_BITS_POSIX_OPT_H):
21         Unify name of include protector macro.
23 2009-02-14  SUGIOKA Toshinobu  <sugioka@itonet.co.jp>
25         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
26         LOAD_FUTEX_WAIT_ABS even if (FUTEX_WAIT == 0).
28 2009-01-29  Ulrich Drepper  <drepper@redhat.com>
30         * sysdeps/pthread/unwind-forcedunwind.c: Encrypt all function
31         pointer variables.
33         * allocatestack.c (__free_stacks): Renamed from free_stacks.
34         (__free_stack_cache): Removed.  Change callers to call __free_stacks.
35         * init.c (nptl_freeres): New function.
36         (pthread_functions): Initialize ptr_freeres to nptl_freeres.
37         * pthreadP.h: Don't declare __free_stack_cache.  Declare __free_stacks.
38         * sysdeps/pthread/unwind-forcedunwind.c (libgcc_s_handle): New
39         variable.
40         (pthread_cancel_init): Depend in libgcc_s_handle for decision to
41         load DSO.  Assign last.
42         (__unwind_freeres): New function.
44         * allocatestack.c (__reclaim_stacks): Reset in_flight_stack later
45         for better debugging.  No need to use stack_list_add here.
47 2009-01-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
49         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
50         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
51         instead of computing relative timeout.
52         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
53         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
55 2009-01-25  Ulrich Drepper  <drepper@redhat.com>
57         * pthread_mutex_lock.c (__pthread_mutex_lock): Remove unused label out.
59 2009-01-08  Ulrich Drepper  <drepper@redhat.com>
61         * sysdeps/pthread/list.h (list_add): Initialize new element first.
62         (list_add_tail): Removed.
64 2009-01-04  Ulrich Drepper  <drepper@redhat.com>
66         * init.c (__pthread_initialize_minimal_internal): Optimize test
67         FUTEX_CLOCK_REALTIME a bit.
69 2009-01-03  Ulrich Drepper  <drepper@redhat.com>
71         * init.c (__pthread_initialize_minimal_internal): Cheat a bit by
72         only passing five parameters to FUTEX_WAIT_BITSET call.
74         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
75         (__lll_timedlock_wait): Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME
76         instead of computing relative timeout.
78 2009-01-02  Ulrich Drepper  <drepper@redhat.com>
80         * init.c (__pthread_initialize_minimal_internal): Check for
81         FUTEX_CLOCK_REALTIME flag.
82         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
83         Use FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME instead of computing
84         relative timeout.
86         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
87         FUTEX_CLOCK_REALTIME and FUTEX_BITSET_MATCH_ANY.
88         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
89         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
90         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
91         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
93 2008-12-09  Ulrich Drepper  <drepper@redhat.com>
95         * sysdeps/pthread/pthread.h (pthread_cleanup_pop): Use { } as empty
96         loop body instead of ; to avoid gcc warnings.
97         (pthread_cleanup_pop_restore_np): Likewise.
98         Patch by Caolán McNamara <caolanm@redhat.com>.
100 2008-12-09  Jakub Jelinek  <jakub@redhat.com>
102         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle only the
103         fast path here, for robust/PI/PP mutexes call
104         __pthread_mutex_lock_full.  Don't use switch, instead use a series
105         of ifs according to their probability.
106         (__pthread_mutex_lock_full): New function.
107         * pthread_mutex_unlock.c: Include assert.h.
108         (__pthread_mutex_unlock_usercnt): Handle only the
109         fast path here, for robust/PI/PP mutexes call
110         __pthread_mutex_unlock_full.  Don't use switch, instead use a series
111         of ifs according to their probability.
112         (__pthread_mutex_unlock_full): New function.
113         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c
114         (__pthread_mutex_lock_full): Define.
116 2008-12-08  Ulrich Drepper  <drepper@redhat.com>
118         * sysdeps/x86_64/tls.h (tcbhead_t): Add fields reserved for TM
119         implementation.  Add necessary padding and.
120         * descr.h (struct pthread): Increase padding for tcbhead_t to 24
121         words.
123 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
125         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
126         and FUTEX_WAKE_BITSET.
128 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
130         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
131         and FUTEX_WAKE_BITSET.
132         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
133         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
134         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
135         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
137 2008-11-25  Roland McGrath  <roland@redhat.com>
139         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
140         Subdirectories moved to ports repository as
141         sysdeps/.../nptl subdirectories.
143 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
145         [BZ #7008]
146         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
147         of old value.
148         * pthread_cond_init.c (__pthread_cond_init): Fix
149         cond->__data.__nwaiters initialization.
150         * Makefile (tests): Add tst-cond23.
151         * tst-cond23.c: New test.
153 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
155         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
156         arguments.
157         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
158         arguments.
160 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
162         [BZ #6955]
163         * pthread_mutex_lock.c: Add support for private PI mutexes.
164         * pthread_mutex_timedlock.c: Likewise.
165         * pthread_mutex_trylock.c: Likewise.
166         * pthread_mutex_unlock.c: Likewise.
167         Patch mostly by Ben Jackson <ben@ben.com>.
169 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
171         [BZ #6843]
172         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
173         Increase stack size for helper thread.
175 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
177         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
178         assembly with a clobber list for access registers a0 and a1.
180 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
182         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
183         to force runp->refcntr to be read from memory.
185 2008-09-08  Richard Guenther  <rguenther@suse.de>
187         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
188         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
189         lll_timedlock, lll_robust_timedlock, lll_unlock,
190         lll_robust_unlock): Promote private to int.
192 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
194         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
195         ARCH_RETRY_MMAP definitions.
196         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
197         Define MAP_STACK when not defined.
198         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
199         handling of ARCH_RETRY_MMAP.
201 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
203         * tst-align2.c (f): Print message that f is reached.
205 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
207         [BZ #6740]
208         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
209         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
211 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
213         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
214         SOCK_CLOEXEC if possible.
216 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
218         * Makefile (tests): Add tst-rwlock2a.
219         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
220         * tst-rwlock2a.c: New file.
222 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
224         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
226 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
228         * sysdeps/pthread/pthread.h: Fix typo in comment.
230 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
232         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
233         of CPU set to the kernel.
235 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
237         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
238         cfi directives.
239         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
241         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
242         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
243         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
244         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
246 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
249         cfi directives.
250         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
251         Likewise.
252         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
253         Likewise.
254         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
255         Likewise.
257 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
259         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
261 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
263         David S. Miller  <davem@davemloft.net>
265         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
267 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
269         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
270         __pshared correctly.
271         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
272         Likewise.
273         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
274         Likewise.
275         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
276         Likewise.
277         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
278         Likewise.
279         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
281 2008-04-14  David S. Miller  <davem@davemloft.net>
283         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
284         (__old_sem_wait): Fix argument to lll_futex_wait().
286 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
288         * pthread_create.c: Require pthread_mutex_trylock and
289         pthread_key_delete for libgcc.
291 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
293         [BZ #6020]
294         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
295         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
296         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
298 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
300         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
301         <linux/limits.h> has defined it.
302         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
303         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
304         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
305         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
307 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
309         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
310         of ASSEMBLER.
311         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
312         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
314 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
316         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
317         HAVE_DL_DISCOVER_OSVERSION.
318         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
319         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
321 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
323         [BZ #5778]
324         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
325         _POSIX_CHOWN_RESTRICTED value to zero.
327 2008-01-31  Roland McGrath  <roland@redhat.com>
329         * Makefile (omit-deps): Variable removed.
331 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
333         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
334         unnecessary addr32 prefix.
336 2008-01-29  Roland McGrath  <roland@redhat.com>
338         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
340 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
342         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
344 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
346         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
347         a scratch register.
348         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
349         (__lll_lock_wait_private): Fix typo.
350         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
351         (pthread_barrier_wait): Likewise.  Adjust XADD use.
352         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
353         Adjust XADD use.
354         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
355         (pthread_rwlock_timedrdlock): Return correct return value.
356         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
357         (pthread_rwlock_timedwrlock): Likewise.
359 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
361         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
362         thread returns the program exits with an error code.
364 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
366         * pthread-errnos.sym: Add EOVERFLOW.
367         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
368         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
369         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
370         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
372 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
374         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
375         parameter.  Passed it as permission to mmap.
376         * allocatestack.c (allocate_stack): Pass prot as second parameter
377         to ARCH_RETRY_MMAP.
379 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
381         * tst-basic7.c: Allocate memory for the stack.
383         [BZ #5465]
384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
385         (__pthread_cond_timedwait): Don't use VDSO.
386         Patch by Michal Januszewski.
388 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
390         [BZ #5455]
391         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
392         Allow label before pthread_cleanup_pop.
393         (pthread_cleanup_pop_restore_np): Likewise.
395 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
397         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
398         Store 2 before returning ETIMEDOUT.
400 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
402         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
403         Store 2 before returning ETIMEDOUT.
404         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
405         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
406         (__lll_lock_wait_private): Optimize.
407         (__lll_lock_wait): Likewise.
409 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
411         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
412         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
413         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
415 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
417         [BZ #5240]
418         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
419         If we time out, try one last time to lock the futex to avoid
420         losing a wakeup signal.
421         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
422         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
424         [BZ #5245]
425         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
426         if necessary.
428 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
430         [BZ #5245]
431         * allocatestack.c (allocate_stack): Change ENOMEM error in case
432         mmap failed to EAGAIN.
433         * Makefile (tests): Add tst-basic7.
434         * tst-basic7.c: New file.
436 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
438         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
439         Use __linkin_atfork.
441 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
443         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
444         missing line continuations.
445         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
446         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
448 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
450         [BZ #5220]
451         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
452         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
453         (struct timer): Add next element.
454         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
455         enqueue timer structure into __active_timer_sigev_thread list.
456         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
457         remove timer struct from __active_timer_sigev_thread.
458         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
459         Before using timer structure make sure it is still on the
460         __active_timer_sigev_thread list.  Keep lock until done.
461         Define __active_timer_sigev_thread and
462         __active_timer_sigev_thread_lock.
464 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
466         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
467         Redefine thread_atfork for use of ATFORK_MEM.
468         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
469         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
470         function.
471         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
472         Use atomic operation when removing first element of list.
474 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
476         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
477         routine instead of an alias to __new_sem_post.
479 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
481         * init.c (__pthread_initialize_minimal): Initialize word to appease
482         valgrind.
484 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
486         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
487         libc.so just clear NAME.
488         (__libc_rwlock_fini): Nop inside of libc.so.
489         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
490         all zeros.
492 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
495         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
496         unlocking failed.
497         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
499 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
501         [BZ #4938]
502         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
503         reclaimed stack if necessary.
504         * Makefile (tests): Add tst-tsd6.
505         * tst-tsd6.c: New file.
507 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
509         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
510         Add private argument.
512 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
514         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
515         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
517 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
519         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
520         (__lll_robust_timedlock): Pass private as last argument to
521         __lll_robust_timedlock_wait.
522         (__lll_unlock): Fix a pasto.
524 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
526         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
527         sparc_old_sem): New structs.
528         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
529         (__sem_wait_cleanup): New function.
530         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
531         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
532         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
533         lll_futex_wait.
534         (__old_sem_wait): New function.
535         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
536         nptl/sysdeps/unix/sysv/linux/sparc version.
537         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
538         Likewise.
539         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
540         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
541         (__new_sem_trywait): Use sparc_old_sem structure.
542         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
543         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
544         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
545         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
546         lll_futex_timed_wait.
547         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
548         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
549         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
550         lll_futex_wake.
551         (__old_sem_post): New function.
552         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
553         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
554         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
555         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
556         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
557         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
559 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
561         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
562         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
563         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
564         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
565         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
566         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
567         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
568         Use FUTEX_WAKE_OP.
569         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
570         kernel-features.h and tcb-offsets.h.
571         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
572         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
573         process private.
574         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
575         tcb-offsets.h.
576         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
577         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
578         process private.
579         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
580         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
581         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
582         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
583         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
584         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
585         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
587 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
589         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
590         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
591         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
592         lll_futex_timed_wait.
594         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
595         __lll_robust_unlock): Rewrite as macros instead of inline functions.
596         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
597         __lll_robust_unlock, __lll_wait_tid): Likewise.
599 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
601         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
602         Fix a pasto.
603         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
604         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
605         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
606         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
608         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
609         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
611         kernel-features.h.
612         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
613         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
614         process private.  Switch DW_CFA_advance_loc1 and some
615         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
616         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
617         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
618         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
619         process private.  Switch DW_CFA_advance_loc{1,2} and some
620         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
621         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
622         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
624         Likewise.
625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
626         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
628         Likewise.
629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
630         (__pthread_cond_broadcast): Compare %r8 instead of
631         dep_mutex-cond_*(%rdi) with $-1.
632         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
633         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
634         of oring.
636 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
638         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
640 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
642         * allocatestack.c: Include kernel-features.h.
643         * pthread_create.c: Likewise.
644         * pthread_mutex_init.c: Likewise.
645         * init.c: Likewise.
646         * pthread_cond_timedwait.c: Likewise.
647         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
648         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
649         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
650         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
651         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
653         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
654         Likewise.
655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
656         Likewise.
657         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
658         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
659         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
660         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
662 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
664         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
665         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
666         byte elements.  One of them is the new __shared element.
667         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
668         adjust names of other padding elements.
669         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
670         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
671         byte elements.  One of them is the new __shared element.
672         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
673         adjust names of other padding elements.
674         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
675         Renamed __pad1 element to __shared, adjust names of other padding
676         elements.
677         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
678         (pthread_rwlock_t): Likewise.
679         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
680         typo.
682 2007-08-09  Anton Blanchard  <anton@samba.org>
684         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
686 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
688         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
689         <kernel-features.h>.
690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
692 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
694         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
695         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
696         dealing with robust mutexes.
697         * pthread_mutex_timedlock.c: Likewise.
698         * pthread_mutex_trylock.c: Likewise.
699         * pthread_mutex_unlock.c: Likewise.
700         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
702 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
704         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
705         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
706         (PTHREAD_MUTEX_PSHARED): Define.
707         * pthread_mutex_init.c (__pthread_mutex_init): Set
708         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
709         mutexes.
710         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
711         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
712         as second argument to lll_lock.
713         (LLL_MUTEX_TRYLOCK): Take mutex as argument
714         instead of its __data.__lock field.
715         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
716         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
717         to lll_robust_lock.
718         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
719         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
720         instead of mutex->__data.__kind directly, pass
721         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
722         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
723         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
724         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
725         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
726         to lll_timedlock, lll_robust_timedlock, lll_unlock and
727         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
728         of mutex->__data.__kind directly.
729         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
730         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
731         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
732         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
733         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
734         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
735         and lll_futex_wake.
736         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
737         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
738         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
739         directly.
740         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
741         Take mutex as argument instead of its __data.__lock field, pass
742         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
743         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
744         __data.__lock field.
745         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
746         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
747         to lll_robust_cond_lock.
748         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
749         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
750         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
751         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
752         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
753         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
754         lll_futex_wait.
755         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
756         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
757         lll_futex_wake.
758         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
759         pshared variable, pass it to lll_lock, lll_unlock,
760         lll_futex_timedwait and lll_futex_wake.
761         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
762         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
763         and lll_futex_wake.
764         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
765         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
766         macro.
767         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
768         lll_futex_wake_unlock): Likewise.
769         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
770         Likewise.
771         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
772         lll_futex_wake_unlock): Likewise.
773         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
774         Likewise.
775         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
776         lll_futex_wake_unlock): Likewise.
777         (lll_futex_wake): Fix a typo.
778         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
779         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
780         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
781         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
782         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
783         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
784         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
785         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
786         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
787         (__pthread_cond_timedwait): Likewise.
788         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
789         (__condvar_cleanup, __pthread_cond_wait): Likewise.
791 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
793         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
794         Don't use CGOTSETUP and CGOTRESTORE macros.
795         (CGOTSETUP, CGOTRESTORE): Remove.
796         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
797         @local symbol.
799 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
801         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
802         definitions for private futexes.
803         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
804         kernel-features.h and lowlevellock.h.  Use private futexes if
805         they are available.
806         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
807         (__lll_mutex_lock_wait): Rename to
808         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
809         (__lll_mutex_timedlock_wait): Rename to ...
810         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
811         Don't compile in for libc.so.
812         (__lll_mutex_unlock_wake): Rename to ...
813         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
814         (__lll_timedwait_tid): Use __NR_gettimeofday.
815         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
816         the header from assembler.  Renamed all lll_mutex_* resp.
817         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
818         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
819         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
820         Define.
821         (__lll_lock_wait_private): Add prototype.
822         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
823         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
824         __lll_unlock_wake): Likewise.
825         (lll_lock): Add private argument.  Call __lll_lock_wait_private
826         if private is constant LLL_PRIVATE.
827         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
828         lll_timedlock, lll_robust_timedlock): Add private argument.
829         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
830         if private is constant LLL_PRIVATE.
831         (lll_robust_unlock, lll_robust_dead): Add private argument.
832         (lll_lock_t): Remove.
833         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
834         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
835         lll_cond_wake, lll_cond_broadcast): Remove.
836         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
837         kernel-features.h and lowlevellock.h.
838         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
839         (LOAD_FUTEX_WAIT): Define.
840         (__lll_robust_mutex_lock_wait): Rename to ...
841         (__lll_robust_lock_wait): ... this.  Add private argument.
842         Use LOAD_FUTEX_WAIT macro.
843         (__lll_robust_mutex_timedlock_wait): Rename to ...
844         (__lll_robust_timedlock_wait): ... this.    Add private argument.
845         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
846         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
847         lowlevellock.h.
848         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
849         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
850         __lll_mutex_{lock,unlock}_*.
851         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
852         lowlevellock.h and pthread-errnos.h.
853         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
854         FUTEX_CMP_REQUEUE, EINVAL): Remove.
855         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
856         __lll_mutex_{lock,unlock}_*.
857         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
858         lowlevellock.h and pthread-errnos.h.
859         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
860         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
861         __lll_mutex_{lock,unlock}_*.
862         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
863         lowlevellock.h.
864         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
865         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
866         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
867         (__condvar_tw_cleanup): Likewise.
868         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
869         lowlevellock.h.
870         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
871         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
872         __lll_mutex_{lock,unlock}_*.
873         ( __condvar_w_cleanup): Likewise.
874         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
875         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
876         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
877         lowlevellock.h.
878         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
879         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
880         __lll_mutex_{lock,unlock}_*.
881         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
882         lowlevellock.h.
883         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
884         FUTEX_PRIVATE_FLAG): Remove.
885         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
886         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
887         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
888         lowlevellock.h.
889         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
890         FUTEX_PRIVATE_FLAG): Remove.
891         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
892         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
893         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
894         lowlevellock.h.
895         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
896         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
897         __lll_mutex_{lock,unlock}_*.
898         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
899         lowlevellock.h.
900         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
901         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
902         __lll_mutex_{lock,unlock}_*.
903         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
904         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
905         (__new_sem_post): Use standard initial exec code sequences.
906         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
907         lowlevellock.h.
908         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
909         FUTEX_PRIVATE_FLAG): Remove.
910         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
911         exec code sequences.
912         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
913         (__new_sem_trywait): Use standard initial exec code sequences.
914         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
915         (__new_sem_wait): Use standard initial exec code sequences.
917 2007-07-31  Anton Blanchard  <anton@samba.org>
919         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
920         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
921         atomic_full_barrier.
923 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
925         * allocatestack.c (stack_cache_lock): Change type to int.
926         (get_cached_stack, allocate_stack, __deallocate_stack,
927         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
928         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
929         as second argument to lll_lock and lll_unlock macros on
930         stack_cache_lock.
931         * pthread_create.c (__find_in_stack_list): Likewise.
932         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
933         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
934         as second argument.
935         * descr.h (struct pthread): Change lock and setxid_futex field
936         type to int.
937         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
938         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
939         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
940         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
941         Likewise.
942         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
943         * pthread_cond_init.c (__pthread_cond_init): Likewise.
944         * pthreadP.h (__attr_list_lock): Change type to int.
945         * pthread_attr_init.c (__attr_list_lock): Likewise.
946         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
947         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
948         lll_{,un}lock.
949         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
950         also for lll_futex_{wake,wait}.
951         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
952         a pointer to const.
953         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
954         LLL_SHARED as second argument to lll_{,un}lock.
955         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
956         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
957         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
958         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
959         Likewise.
960         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
961         as second argument to lll_{,un}lock macros on pd->lock.
962         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
963         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
964         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
965         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
966         Likewise.
967         * sysdeps/pthread/createthread.c (do_clone, create_thread):
968         Likewise.
969         * pthread_once.c (once_lock): Change type to int.
970         (__pthread_once): Pass LLL_PRIVATE as second argument to
971         lll_{,un}lock macros on once_lock.
972         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
973         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
974         rwlock->__data.__shared as second argument to them and similarly
975         for lll_futex_w*.
976         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
977         Likewise.
978         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
979         Likewise.
980         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
981         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
982         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
983         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
984         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
985         to lll_{,un}lock macros on __sem_mappings_lock.
986         * sem_open.c (check_add_mapping): Likewise.
987         (__sem_mappings_lock): Change type to int.
988         * semaphoreP.h (__sem_mappings_lock): Likewise.
989         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
990         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
991         instead of lll_*mutex_*, pass LLL_SHARED as last
992         argument.
993         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
994         pass LLL_SHARED as last argument.
995         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
996         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
997         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
998         pass LLL_SHARED as last argument.
999         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
1000         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
1001         LLL_SHARED as last argument.
1002         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
1003         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
1004         Similarly.
1005         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
1006         __libc_lock_lock_recursive, __libc_lock_unlock,
1007         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
1008         argument to lll_{,un}lock.
1009         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
1010         _IO_lock_unlock): Likewise.
1011         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
1012         compound literal.
1013         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1014         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
1015         __fork_lock.
1016         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
1017         free_mem): Likewise.
1018         (__fork_lock): Change type to int.
1019         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
1020         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
1021         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
1022         lll_futex_wake.
1023         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
1024         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
1025         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
1026         New function.
1027         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
1028         pass it through to lll_futex_*wait, only compile in when
1029         IS_IN_libpthread.
1030         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1031         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
1032         argument and pass it through to lll_futex_*wait.
1033         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
1034         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
1035         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
1036         inline functions to __lll_* resp. __lll_robust_*.
1037         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
1038         (lll_mutex_dead): Add private argument.
1039         (__lll_lock_wait_private): New prototype.
1040         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
1041         __lll_robust_lock_timedwait): Add private argument to prototypes.
1042         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
1043         call __lll_lock_wait_private, otherwise pass private to
1044         __lll_lock_wait.
1045         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
1046         __lll_robust_timedlock): Add private argument, pass it to
1047         __lll_*wait functions.
1048         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
1049         call __lll_unlock_wake_private, otherwise pass private to
1050         __lll_unlock_wake.
1051         (__lll_robust_unlock): Add private argument, pass it to
1052         __lll_robust_unlock_wake.
1053         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
1054         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
1055         argument, pass it through to __lll_* inline function.
1056         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
1057         (lll_lock_t): Remove.
1058         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1059         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1060         lll_cond_wake, lll_cond_broadcast): Remove.
1061         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1062         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1063         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1064         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1065         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
1066         the header from assembler.  Renamed all lll_mutex_* resp.
1067         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
1068         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
1069         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
1070         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
1071         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
1072         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
1073         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
1074         Remove prototype.
1075         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
1076         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
1077         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
1078         (lll_trylock): Likewise, use __lll_trylock_asm, pass
1079         MULTIPLE_THREADS_OFFSET as another asm operand.
1080         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
1081         MULTIPLE_THREADS_OFFSET as last asm operand, call
1082         __lll_lock_wait_private if private is constant LLL_PRIVATE,
1083         otherwise pass private as another argument to __lll_lock_wait.
1084         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
1085         lll_timedlock, lll_robust_timedlock): Add private argument, pass
1086         private as another argument to __lll_*lock_wait call.
1087         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
1088         MULTIPLE_THREADS_OFFSET as another asm operand, call
1089         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
1090         otherwise pass private as another argument to __lll_unlock_wake.
1091         (lll_robust_unlock): Add private argument, pass private as another
1092         argument to __lll_unlock_wake.
1093         (lll_robust_dead): Add private argument, use __lll_private_flag
1094         macro.
1095         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
1096         LLL_MUTEX_LOCK_INITIALIZER.
1097         (lll_lock_t): Remove.
1098         (LLL_LOCK_INITIALIZER_WAITERS): Define.
1099         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
1100         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
1101         lll_cond_wake, lll_cond_broadcast): Remove.
1102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1103         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
1104         2007-05-2{3,9} changes.
1105         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
1106         kernel-features.h and lowlevellock.h.
1107         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1108         (LOAD_FUTEX_WAIT): Rewritten.
1109         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1110         define.
1111         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1112         (__lll_mutex_lock_wait): Rename to ...
1113         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1114         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1115         (__lll_mutex_timedlock_wait): Rename to ...
1116         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1117         contains private argument.  Don't compile in for libc.so.
1118         (__lll_mutex_unlock_wake): Rename to ...
1119         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1120         Don't compile in for libc.so.
1121         (__lll_timedwait_tid): Use __NR_gettimeofday.
1122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1123         kernel-features.h and lowlevellock.h.
1124         (LOAD_FUTEX_WAIT): Define.
1125         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1126         define.
1127         (__lll_robust_mutex_lock_wait): Rename to ...
1128         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1129         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1130         macro.
1131         (__lll_robust_mutex_timedlock_wait): Rename to ...
1132         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1133         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1134         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1135         lowlevellock.h.
1136         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1137         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1138         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1139         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1140         to __lll_lock_wait in %edx.
1141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1142         Include lowlevellock.h and pthread-errnos.h.
1143         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1144         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1145         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1146         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1147         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1148         __lll_unlock_wake.
1149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1150         Include lowlevellock.h and pthread-errnos.h.
1151         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1152         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1153         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1154         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1155         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1156         __lll_unlock_wake.
1157         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1158         Include lowlevellock.h.
1159         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1160         Don't define.
1161         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1162         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1163         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1164         __lll_unlock_wake.  Use __NR_gettimeofday.
1165         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1166         Include lowlevellock.h.
1167         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1168         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1169         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1170         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1171         and __lll_unlock_wake.
1172         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1173         Include lowlevellock.h.
1174         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1175         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1176         MUTEX(%ebx) address in %edx rather than %ecx to
1177         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1178         and __lll_unlock_wake.  Move return value from %ecx to %edx
1179         register.
1180         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1181         Include lowlevellock.h.
1182         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1183         Don't define.
1184         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1185         MUTEX(%ebp) address in %edx rather than %ecx to
1186         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1187         and __lll_unlock_wake.  Move return value from %ecx to %edx
1188         register.  Use __NR_gettimeofday.
1189         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1190         Include lowlevellock.h.
1191         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1192         Don't define.
1193         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1194         MUTEX(%ebp) address in %edx rather than %ecx to
1195         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1196         and __lll_unlock_wake.  Move return value from %ecx to %edx
1197         register.  Use __NR_gettimeofday.
1198         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1199         Include lowlevellock.h.
1200         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1201         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1202         MUTEX(%edi) address in %edx rather than %ecx to
1203         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1204         and __lll_unlock_wake.
1205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1206         Include lowlevellock.h.
1207         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1208         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1209         MUTEX(%ebx) address in %edx rather than %ecx to
1210         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1211         and __lll_unlock_wake.  Move return value from %ecx to %edx
1212         register.
1213         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1214         lowlevellock.h.
1215         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1216         define.
1217         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1218         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1219         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1220         lowlevellock.h.
1221         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1222         (sem_timedwait): Use __NR_gettimeofday.
1223         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1224         lowlevellock.h.
1225         (LOCK): Don't define.
1226         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1227         lowlevellock.h.
1228         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1229         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1230         are waiters.
1231         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1232         2007-05-2{3,9} changes.
1233         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1234         kernel-features.h and lowlevellock.h.
1235         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1236         (LOAD_FUTEX_WAIT): Rewritten.
1237         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1238         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1239         (__lll_mutex_lock_wait): Rename to ...
1240         (__lll_lock_wait): ... this.  %esi is now private argument.
1241         Don't compile in for libc.so.
1242         (__lll_mutex_timedlock_wait): Rename to ...
1243         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1244         Don't compile in for libc.so.
1245         (__lll_mutex_unlock_wake): Rename to ...
1246         (__lll_unlock_wake): ... this.  %esi contains private argument.
1247         Don't compile in for libc.so.
1248         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1249         kernel-features.h and lowlevellock.h.
1250         (LOAD_FUTEX_WAIT): Define.
1251         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1252         (__lll_robust_mutex_lock_wait): Rename to ...
1253         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1254         Use LOAD_FUTEX_WAIT macro.
1255         (__lll_robust_mutex_timedlock_wait): Rename to ...
1256         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1257         private, use LOAD_FUTEX_WAIT macro.
1258         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1259         lowlevellock.h.
1260         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1261         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1262         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1263         __lll_lock_wait and __lll_unlock_wake.
1264         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1265         Include lowlevellock.h and pthread-errnos.h.
1266         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1267         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1268         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1269         pass LLL_SHARED in %esi to both __lll_lock_wait and
1270         __lll_unlock_wake.
1271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1272         Include lowlevellock.h and pthread-errnos.h.
1273         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1274         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1275         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1276         pass LLL_SHARED in %esi to both __lll_lock_wait and
1277         __lll_unlock_wake.
1278         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1279         Include lowlevellock.h.
1280         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1281         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1282         pass LLL_SHARED in %esi to both __lll_lock_wait and
1283         __lll_unlock_wake.
1284         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1285         Include lowlevellock.h.
1286         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1287         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1288         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1289         and __lll_unlock_wake.
1290         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1291         Include lowlevellock.h.
1292         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1293         Don't define.
1294         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1295         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1296         and __lll_unlock_wake.
1297         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1298         Include lowlevellock.h.
1299         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1300         Don't define.
1301         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1302         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1303         and __lll_unlock_wake.
1304         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1305         Include lowlevellock.h.
1306         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1307         Don't define.
1308         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1309         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1310         and __lll_unlock_wake.
1311         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1312         Include lowlevellock.h.
1313         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1314         Don't define.
1315         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1316         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1317         and __lll_unlock_wake.
1318         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1319         Include lowlevellock.h.
1320         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1321         Don't define.
1322         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1323         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1324         and __lll_unlock_wake.
1325         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1326         lowlevellock.h.
1327         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1328         define.
1329         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1330         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1331         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1332         lowlevellock.h.
1333         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1334         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1335         lowlevellock.h.
1336         (LOCK): Don't define.
1337         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1338         lowlevellock.h.
1339         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1340         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1341         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1342         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1343         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1344         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1345         (__lll_lock_wait_private): New function.
1346         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1347         it to lll_futex_*wait.  Don't compile in for libc.so.
1348         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1349         Remove.
1350         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1351         (struct sparc_pthread_barrier): Remove.
1352         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1353         struct sparc_pthread_barrier.  Pass
1354         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1355         and lll_futex_wait macros.
1356         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1357         Remove.
1358         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1359         Include sparc pthread_barrier_wait.c instead of generic one.
1361 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1363         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1365         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1366         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1367         %ecx.
1368         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1369         (pthread_rwlock_timedwrlock): Likewise.
1370         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1371         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1373 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1375         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1377 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1379         * tst-locale2.c (useless): Add return statement.
1381 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1383         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1384         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1385         * pthread_create.c (start_thread): Likewise.
1386         * init.c (sighandler_setxid): Likewise.
1387         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1388         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1389         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1390         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1391         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1392         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1393         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1394         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1395         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1396         Likewise.
1397         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1398         Likewise.
1399         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1400         Likewise.
1401         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1402         __rtld_notify): Likewise.
1403         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1404         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1405         __pthread_once): Likewise.
1406         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1407         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1408         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1409         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1410         (lll_futex_wait): Add private argument, define as wrapper around
1411         lll_futex_timed_wait.
1412         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1413         use __lll_private_flag macro.
1414         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1415         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1416         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1417         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1418         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1419         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1420         (lll_futex_wait): Add private argument, define as wrapper around
1421         lll_futex_timed_wait.
1422         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1423         use __lll_private_flag macro.
1424         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1425         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1426         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1427         Define.
1428         (lll_futex_timed_wait, lll_futex_wake): Use it.
1429         (lll_private_futex_wait, lll_private_futex_timed_wait,
1430         lll_private_futex_wake): Removed.
1431         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1432         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1433         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1434         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1435         (lll_futex_wait): Add private argument, define as wrapper around
1436         lll_futex_timed_wait.
1437         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1438         use __lll_private_flag macro.
1439         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1440         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1441         to lll_futex_*.
1442         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1443         (lll_private_futex_wait, lll_private_futex_timed_wait,
1444         lll_private_futex_wake): Removed.
1445         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1446         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1447         (lll_private_futex_wait, lll_private_futex_timed_wait,
1448         lll_private_futex_wake): Removed.
1449         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1450         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1451         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1452         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1453         (lll_futex_wait): Add private argument, define as wrapper around
1454         lll_futex_timed_wait.
1455         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1456         use __lll_private_flag macro.
1457         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1458         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1459         to lll_futex_*.
1460         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1461         Define.
1462         (lll_futex_timed_wait, lll_futex_wake): Use it.
1463         (lll_private_futex_wait, lll_private_futex_timed_wait,
1464         lll_private_futex_wake): Removed.
1466 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1468         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1469         of the structure for sparc32.
1471 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1473         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1475 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1477         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1478         code used when private futexes are assumed.
1479         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1480         Likewise.
1482 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1484         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1485         (__lll_private_flag): Define.
1486         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1487         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1488         __lll_private_flag.
1489         (lll_private_futex_wait, lll_private_futex_timedwait,
1490         lll_private_futex_wake): Define as wrapper around non-_private
1491         macros.
1492         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1493         (__lll_private_flag): Define.
1494         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1495         (lll_private_futex_wait, lll_private_futex_timedwait,
1496         lll_private_futex_wake): Define as wrapper around non-_private
1497         macros.
1499 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1501         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1502         parameter to lll_futex_wait call.
1503         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1505         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1506         Replace lll_futex_wait with lll_private_futex_wait.
1507         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1508         Add LLL_SHARED parameter to lll_futex_wake().
1510         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1511         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1512         lll_private_futex_wake.
1513         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1514         bit from private parm before syscall.
1515         (lll_futex_timed_wait): Likewise.
1516         (lll_futex_wake): Likewise.
1517         (lll_futex_wake_unlock): Likewise.
1518         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1519         (lll_robust_mutex_unlock): Likewise.
1520         (lll_mutex_unlock_force): Likewise.
1521         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1523 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1525         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1526         compilation when unconditionally using private futexes.
1527         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1528         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1529         Likewise.
1530         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1531         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1533 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1535         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1536         Define.
1538 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1540         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1541         kernel-features.h.
1543 2007-05-16  Roland McGrath  <roland@redhat.com>
1545         * init.c (__nptl_initial_report_events): New variable.
1546         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1547         to that.
1549 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1551         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1552         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1554 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1556         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1557         implementation.
1559 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1561         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1562         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1563         * pthread_mutex_timedlock.c: Likewise.
1564         * pthread_mutex_trylock.c: Likewise.
1565         * pthread_mutex_unlock.c: Likewise.
1567 2007-06-17  Andreas Schwab  <schwab@suse.de>
1569         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1570         sections.
1572 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1574         * allocatestack.c (allocate_stack): Make code compile if
1575         __ASSUME_PRIVATE_FUTEX is set.
1577 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1579         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1580         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1581         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1582         (__pthread_rwlock_wrlock): Likewise.
1583         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1584         (pthread_rwlock_timedrdlock): Likewise.
1585         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1586         (pthread_rwlock_timedwrlock): Likewise.
1587         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1588         (__pthread_rwlock_unlock): Likewise.
1590 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1592         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1593         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1594         Split __flags into __flags, __shared, __pad1 and __pad2.
1595         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1596         futexes if they are available.
1597         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1598         in libc-lowlevellock.S allow using private futexes.
1599         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1600         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1601         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1602         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1603         lll_private_futex_timed_wait and lll_private_futex_wake.
1604         (lll_robust_mutex_unlock): Fix typo.
1605         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1606         field in futex command setup.
1607         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1608         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1609         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1610         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1611         if they are available.  Remove clear_once_control.
1612         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1613         futexes if they are available.
1614         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1615         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1616         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1617         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1618         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1619         Wake only when there are waiters.
1620         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1621         support.  Indicate that there are waiters.  Remove unnecessary
1622         extra cancellation test.
1623         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1624         left-over duplication of __sem_wait_cleanup.
1626 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1628         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1629         parameter to lll_futex_wait, lll_futex_timed_wait, and
1630         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1631         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1632         lll_private_futex_wake.
1633         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1634         * allocatestack.c: Adjust use of lll_futex_* macros.
1635         * init.c: Likewise.
1636         * lowlevellock.h: Likewise.
1637         * pthread_barrier_wait.c: Likewise.
1638         * pthread_cond_broadcast.c: Likewise.
1639         * pthread_cond_destroy.c: Likewise.
1640         * pthread_cond_signal.c: Likewise.
1641         * pthread_cond_timedwait.c: Likewise.
1642         * pthread_cond_wait.c: Likewise.
1643         * pthread_create.c: Likewise.
1644         * pthread_mutex_lock.c: Likewise.
1645         * pthread_mutex_setprioceiling.c: Likewise.
1646         * pthread_mutex_timedlock.c: Likewise.
1647         * pthread_mutex_unlock.c: Likewise.
1648         * pthread_rwlock_timedrdlock.c: Likewise.
1649         * pthread_rwlock_timedwrlock.c: Likewise.
1650         * pthread_rwlock_unlock.c: Likewise.
1651         * sysdeps/alpha/tls.h: Likewise.
1652         * sysdeps/i386/tls.h: Likewise.
1653         * sysdeps/ia64/tls.h: Likewise.
1654         * sysdeps/powerpc/tls.h: Likewise.
1655         * sysdeps/pthread/aio_misc.h: Likewise.
1656         * sysdeps/pthread/gai_misc.h: Likewise.
1657         * sysdeps/s390/tls.h: Likewise.
1658         * sysdeps/sh/tls.h: Likewise.
1659         * sysdeps/sparc/tls.h: Likewise.
1660         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1661         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1662         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1663         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1664         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1665         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1666         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1667         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1668         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1669         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1670         Likewise.
1671         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1672         * sysdeps/x86_64/tls.h: Likewise.
1674 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1676         * pthread_getattr_np.c: No need to install a cancellation handler,
1677         this is no cancellation point.
1678         * pthread_getschedparam.c: Likewise.
1679         * pthread_setschedparam.c: Likewise.
1680         * pthread_setschedprio.c: Likewise.
1681         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1682         lll_unlock_wake_cb.
1683         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1685         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1686         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1687         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1688         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1689         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1690         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1691         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1692         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1693         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1694         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1696         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1697         whether there are more than one thread makes no sense here since
1698         we only call the slow path if the locks are taken.
1699         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1701         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1702         COND_NWAITERS_SHIFT.
1703         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1704         COND_CLOCK_BITS.
1705         * pthread_cond_init.c: Likewise.
1706         * pthread_cond_timedwait.c: Likewise.
1707         * pthread_cond_wait.c: Likewise.
1708         * pthread_condattr_getclock.c: Likewise.
1709         * pthread_condattr_setclock.c: Likewise.
1710         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1711         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1712         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1713         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1716 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1718         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1719         unistd.h.
1721         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1722         insn suffix.
1723         (THREAD_GSCOPE_GET_FLAG): Remove.
1724         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1725         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1726         changes.
1727         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1728         (THREAD_GSCOPE_GET_FLAG): Remove.
1729         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1730         instead of THREAD_GSCOPE_GET_FLAG.
1731         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1732         it.
1733         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1734         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1735         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1736         THREAD_GSCOPE_WAIT): Define.
1737         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1738         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1739         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1740         THREAD_GSCOPE_WAIT): Define.
1741         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1742         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1743         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1744         THREAD_GSCOPE_WAIT): Define.
1745         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1746         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1747         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1748         THREAD_GSCOPE_WAIT): Define.
1750 2007-05-24  Richard Henderson  <rth@redhat.com>
1752         * descr.h (struct pthread): Add header.gscope_flag.
1753         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1754         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1755         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1756         THREAD_GSCOPE_WAIT): Define.
1758 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1760         * init.c: Make it compile with older kernel headers.
1762         * tst-initializers1.c: Show through exit code which test failed.
1764         * pthread_rwlock_init.c: Also initialize __shared field.
1765         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1766         element in rwlock structure into four byte elements.  One of them is
1767         the new __shared element.
1768         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1769         Likewise.
1770         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1771         __shared, adjust names of other padding elements.
1772         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1773         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1774         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1775         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1776         FUTEX_PRIVATE_FLAG.
1777         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1778         futex to use private operations if possible.
1779         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1780         Likewise.
1781         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1782         Likewise.
1783         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1784         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1785         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1786         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1787         Likewise.
1788         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1789         Likewise.
1790         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1791         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1793 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1795         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1796         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1797         * pthread_rwlock_timedrdlock.c: Likewise.
1798         * pthread_rwlock_tryrdlock.c: Likewise.
1800         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1801         optimization.
1803         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1804         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1805         duplication of __sem_wait_cleanup.
1807         * allocatestack.c: Revert last change.
1808         * init.c: Likewise.
1809         * sysdeps/i386/tls.h: Likewise.
1810         * sysdeps/x86_64/tls.h: Likewise.
1811         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1812         header structure.
1813         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1815         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1816         Add private field.
1817         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1818         * pthread_barrier_init.c: Set private flag if pshared and private
1819         futexes are supported.
1820         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1821         private field in futex command setup.
1822         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1824 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1826         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1827         support.
1828         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1829         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1830         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1831         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1832         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1834         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1835         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1836         fields in the structure.
1837         (__old_sem_init): New function.
1838         * sem_open.c: Initialize all fields of the structure.
1839         * sem_getvalue.c: Adjust for renamed element.
1840         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1841         (gen-as-const-headers): Add structsem.sym.
1842         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1843         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1844         struct new_sem.  Add struct old_sem.
1845         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1846         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1847         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1848         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1849         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1850         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1851         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1852         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1853         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1854         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1855         * tst-sem10.c: New file.
1856         * tst-sem11.c: New file.
1857         * tst-sem12.c: New file.
1858         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1859         of struct sem.
1861 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1862             Jakub Jelinek  <jakub@redhat.com>
1864         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1865         Move __pthread_enable_asynccancel right before futex syscall.
1866         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1867         Likewise.
1869 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1871         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1872         THREAD_COPY_PRIVATE_FUTEX): Define.
1873         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1874         THREAD_COPY_PRIVATE_FUTEX): Define.
1875         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1876         * init.c (__pthread_initialize_minimal_internal): Use
1877         THREAD_SET_PRIVATE_FUTEX.
1879         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1880         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1881         THREAD_GSCOPE_FLAG_WAIT): Define.
1882         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1883         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1884         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1885         PTR_DEMANGLE.
1886         (THREAD_GSCOPE_GET_FLAG): Define.
1887         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1888         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1889         instead of ->header.gscope_flag directly.
1891 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1893         * init.c (__pthread_initialize_minimal_internal): Check whether
1894         private futexes are available.
1895         * allocatestack.c (allocate_stack): Copy private_futex field from
1896         current thread into the new stack.
1897         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1898         futexes if they are available.
1899         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1900         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1901         in libc-lowlevellock.S allow using private futexes.
1902         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1903         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1904         FUTEX_PRIVATE_FLAG.
1905         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1906         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1907         if they are available.
1908         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1909         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1910         * sysdeps/i386/tcb-offsets.sym: Likewise.
1911         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1912         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1914 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1916         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1917         Remove ptr_wait_lookup_done again.
1918         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1919         (__pthread_initialize_minimal_internal): Initialize
1920         _dl_wait_lookup_done pointer in _rtld_global directly.
1921         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1922         Remove code to code _dl_wait_lookup_done.
1923         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1924         encrypted for now.
1926 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1928         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1929         pthread_mutex_init failed with ENOTSUP.
1931 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1933         * allocatestack.c (__wait_lookup_done): New function.
1934         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1935         Add ptr_wait_lookup_done.
1936         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1937         * pthreadP.h: Declare __wait_lookup_done.
1938         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1939         Define macros to implement reference handling of global scope.
1940         * sysdeps/x86_64/tls.h: Likewise.
1941         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1942         Initialize GL(dl_wait_lookup_done).
1944 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1946         [BZ #4512]
1947         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1948         is detected.
1949         * pthread_mutex_timedlock.c: Likewise.
1950         * pthread_mutex_trylock.c: Likewise.
1951         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1953         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1954         * tst-robust9.c: New file.
1955         * tst-robustpi9.c: New file.
1957         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1958         unnecessary extra cancellation test.
1960 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1962         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1963         extra cancellation test.
1964         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1966 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1968         * descr.h (struct pthread): Rearrange members to fill hole in
1969         64-bit layout.
1971         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1972         (__pthread_setaffinity_new): If syscall was successful and
1973         RESET_VGETCPU_CACHE is defined, use it before returning.
1974         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1976 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1978         [BZ #4455]
1979         * tst-align2.c: Include stackinfo.h.
1980         * tst-getpid1.c: Likewise.
1982 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1984         [BZ #4455]
1985         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1986         * tst-getpid1.c (do_test): Likewise.
1988         [BZ #4456]
1989         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1990         (allocate_stack): Likewise.
1992 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1995         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1996         (__lll_robust_timedlock_wait): Likewise.
1997         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1999 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
2001         [BZ #4465]
2002         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
2003         * tst-cancel4.c (tf_fdatasync): New test.
2005 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
2007         [BZ #4392]
2008         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
2009         check mutexes like normal mutexes.
2011         [BZ #4306]
2012         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
2013         Initialize the whole sigevent structure to appease valgrind.
2015 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
2017         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
2018         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
2020 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
2022         * tst-locale1.c: Avoid warnings.
2023         * tst-locale2.c: Likewise.
2025 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
2027         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
2028         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
2030 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
2032         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
2033         __extern_always_inline where appropriate.
2034         * sysdeps/pthread/pthread.h: Likewise.
2036 2007-03-13  Richard Henderson  <rth@redhat.com>
2038         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
2039         separate cfi regions for the two subsections.
2041 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
2043         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
2044         new thread, don't just decrement it.
2045         Patch by Suzuki K P <suzuki@in.ibm.com>.
2047 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
2049         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
2050         PTHFCT_CALL definition.
2052 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
2054         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
2055         available, don't use it.
2057 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
2059         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2060         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
2061         call into the kernel to delay.
2063 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
2065         * tst-initializers1.c: We want to test the initializers as seen
2066         outside of libc, so undefined _LIBC.
2068         * pthread_join.c (cleanup): Avoid warning.
2070 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
2072         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
2073         (__lll_timedwait_tid): Add unwind info.
2075         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
2076         function table, mangle the pointers.
2077         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
2078         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
2079         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
2080         demangle pointers before use.
2081         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
2082         demangle pointer.
2083         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
2084         * sysdeps/pthread/setxid.h: Likewise.
2086 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
2088         * tst-rwlock7.c: Show some more information in case of correct
2089         behavior.
2091 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
2093         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2094         (lll_futex_timed_wait): Undo part of last change, don't negate
2095         return value.
2097 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
2099         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
2100         FUTEX_CMP_REQUEUE and lll_futex_requeue.
2102 2006-12-28  David S. Miller  <davem@davemloft.net>
2104         * shlib-versions: Fix sparc64 linux target specification.
2106 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
2108         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2109         Adjust include path for pthread_barrier_wait.c move.
2111 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2113         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2114         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2116 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2118         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2119         6 argument cancellable syscalls.
2120         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2121         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2122         6 argument cancellable syscalls.
2123         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2125 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2127         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2128         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2130 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2132         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2133         __sync_lock_release instead of __sync_lock_release_si.
2135 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2137         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2138         Define.
2139         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2140         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2141         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2142         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2143         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2145         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2146         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2147         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2148         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2149         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2151 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2153         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2154         * pthread_barrier_wait.c: ...here.
2155         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2156         * pthread_cond_broadcast.c: ...here.
2157         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2158         * pthread_cond_signal.c: ...here.
2159         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2160         * pthread_cond_timedwait.c: ...here.
2161         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2162         * pthread_cond_wait.c: ...here.
2163         * sysdeps/pthread/pthread_once.c: Move to...
2164         * pthread_once.c: ...here.
2165         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2166         * pthread_rwlock_rdlock.c: ...here.
2167         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2168         * pthread_rwlock_timedrdlock.c: ...here.
2169         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2170         * pthread_rwlock_timedwrlock.c: ...here.
2171         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2172         * pthread_rwlock_unlock.c: ...here.
2173         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2174         * pthread_rwlock_wrlock.c: ...here.
2175         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2176         * pthread_spin_destroy.c: ...here.
2177         * sysdeps/pthread/pthread_spin_init.c: Move to...
2178         * pthread_spin_init.c: ...here.
2179         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2180         * pthread_spin_unlock.c: ...here.
2181         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2182         * pthread_getcpuclockid.c: ...here.
2184         * init.c: USE_TLS support is now always enabled.
2185         * tst-tls5.h: Likewise.
2186         * sysdeps/alpha/tls.h: Likewise.
2187         * sysdeps/i386/tls.h: Likewise.
2188         * sysdeps/ia64/tls.h: Likewise.
2189         * sysdeps/powerpc/tls.h: Likewise.
2190         * sysdeps/s390/tls.h: Likewise.
2191         * sysdeps/sh/tls.h: Likewise.
2192         * sysdeps/sparc/tls.h: Likewise.
2193         * sysdeps/x86_64/tls.h: Likewise.
2195 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2197         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2198         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2199         failed.
2201         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2202         Define to THREAD_SELF->header.multiple_threads.
2203         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2204         Likewise.
2205         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2206         Likewise.
2207         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2208         (SINGLE_THREAD_P): Likewise.
2209         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2210         (SINGLE_THREAD_P): Likewise.
2211         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2212         (SINGLE_THREAD_P): Likewise.
2213         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2214         (SINGLE_THREAD_P): Likewise.
2215         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2216         Likewise.
2217         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2218         (SINGLE_THREAD_P): Likewise.
2219         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2220         (SINGLE_THREAD_P): Likewise.
2221         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2222         Likewise.
2224 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2226         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2227         by default rather than 2_3_3.
2229 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2231         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2232         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2233         atomic_* instead of catomic_* macros.
2235 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2237         [BZ #3285]
2238         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2239         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2240         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2241         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2242         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2243         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2244         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2245         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2246         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2247         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2248         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2249         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2250         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2252 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2254         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2255         cancelable syscalls with six parameters.
2257         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2258         operations instead of atomic_*.
2260 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2262         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2264 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2266         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2267         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2268         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2269         New file.
2270         * pthread_attr_setstack.c: Allow overwriting the version number of the
2271         new symbol.
2272         * pthread_attr_setstacksize.c: Likewise.
2273         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2274         it.
2275         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2276         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2278 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2280         [BZ #3251]
2281         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2282         Patch by Petr Baudis.
2284 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2286         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2288         * tst-cancel2.c (tf): Loop as long as something was written.
2290 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2292         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2293         mutexes wake all mutexes.
2294         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2295         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2296         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2298 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2300         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2301         to guarantee the thread is always canceled.
2303 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2305         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2306         Include stdlib.h.
2307         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2308         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2309         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2310         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2311         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2313 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2315         [BZ #3123]
2316         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2317         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2319         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2320         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2321         * Makefile (tests): Add tst-cond22.
2322         * tst-cond22.c: New file.
2324 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2326         [BZ #3124]
2327         * descr.h (struct pthread): Add parent_cancelhandling.
2328         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2329         cancelhandling value to child.
2330         * pthread_create.c (start_thread): If parent thread was canceled
2331         reset the SIGCANCEL mask.
2332         * Makefile (tests): Add tst-cancel25.
2333         * tst-cancel25.c: New file.
2335 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2336             Ulrich Drepper  <drepper@redhat.com>
2338         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2339         counterp if it is already zero.
2340         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2342 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2343             Roland McGrath  <roland@redhat.com>
2345         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2346         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2347         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2348         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2349         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2350         lll_robust_mutex_timedlock, lll_mutex_unlock,
2351         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2352         Add _L_*_ symbols around the subsection.
2353         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2354         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2356 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2357             Roland McGrath  <roland@redhat.com>
2359         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2360         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2361         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2362         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2363         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2364         lll_robust_mutex_timedlock, lll_mutex_unlock,
2365         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2366         Add _L_*_ symbols around the subsection.
2367         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2368         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2370 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2372         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2373         change because it can disturb too much existing code.  If real hard
2374         reader preference is needed we'll introduce another type.
2375         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2376         (pthread_rwlock_timedwrlock): Likewise.
2377         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2378         Likewise.
2380 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2382         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2383         reader preference.
2384         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2385         (pthread_rwlock_timedwrlock): Likewise.
2386         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2387         Likewise.
2389 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2391         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2392         Only define ifdef SHARED.
2394 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2396         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2397         (free_stacks): ...here.
2398         (__free_stack_cache): New function.
2399         * pthreadP.h: Declare __free_stack_cache.
2400         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2401         ptr_freeres.
2402         * init.c (pthread_functions): Initialize ptr_freeres.
2403         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2404         New freeres function.
2406 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2408         [BZ #3018]
2409         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2411 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2413         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2414         _XOPEN_REALTIME_THREADS.
2416 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2418         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2419         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2420         HAVE_CLOCK_GETTIME_VSYSCALL.
2421         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2423 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2425         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2426         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2427         * descr.h (struct priority_protection_data): New type.
2428         (struct pthread): Add tpp field.
2429         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2430         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2431         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2432         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2433         TPP mutexes.
2434         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2435         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2436         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2437         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2438         * tpp.c: New file.
2439         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2440         boosted by TPP.
2441         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2442         * pthread_mutexattr_getprioceiling.c
2443         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2444         in the SCHED_FIFO priority range.
2445         * pthread_mutexattr_setprioceiling.c
2446         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2447         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2448         if mutex is not TPP.  Ceiling is now in __data.__lock.
2449         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2450         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2451         is now in __data.__lock.  Add locking.
2452         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2453         * Makefile (libpthread-routines): Add tpp.
2454         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2455         * tst-tpp.h: New file.
2456         * tst-mutexpp1.c: New file.
2457         * tst-mutexpp6.c: New file.
2458         * tst-mutexpp10.c: New file.
2459         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2460         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2462 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2464         [BZ #2843]
2465         * pthread_join.c (pthread_join): Account for self being canceled
2466         when checking for deadlocks.
2467         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2468         (tf1): Don't print anything after pthread_join returns, this would be
2469         another cancellation point.
2470         (tf2): Likewise.
2471         * tst-join6.c: New file.
2472         * Makefile (tests): Add tst-join6.
2474 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2476         [BZ #2892]
2477         * pthread_setspecific.c (__pthread_setspecific): Check
2478         out-of-range index before checking for unused key.
2480         * sysdeps/pthread/gai_misc.h: New file.
2482 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2484         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2485         file.  Don't use sysctl.
2486         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2487         overwrite the file if this is likely not true.
2489 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2491         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2492         * Makefile (tests): Add tst-getpid3.
2493         * tst-getpid3.c: New file.
2495 2006-07-30  Roland McGrath  <roland@redhat.com>
2497         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2499         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2500         (pause_not_cancel): New macro.
2501         (nanosleep_not_cancel): New macro.
2502         (sigsuspend_not_cancel): New macro.
2503         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2504         nanosleep_not_cancel macro from <not-cancel.h>.
2505         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2506         macro from <not-cancel.h>.
2508 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2509             Jakub Jelinek  <jakub@redhat.com>
2511         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2512         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2513         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2514         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2515         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2516         * pthread_mutex_lock.c: Likewise.
2517         * pthread_mutex_timedlock.c: Likewise.
2518         * pthread_mutex_trylock.c: Likewise.
2519         * pthread_mutex_unlock.c: Likewise.
2520         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2521         all mutexes.
2522         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2523         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2524         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2525         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2526         pthread-pi-defines.sym.
2527         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2528         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2529         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2530         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2531         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2532         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2533         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2534         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2535         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2536         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2537         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2538         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2539         * tst-mutex2.c: Likewise.
2540         * tst-mutex3.c: Likewise.
2541         * tst-mutex4.c: Likewise.
2542         * tst-mutex5.c: Likewise.
2543         * tst-mutex6.c: Likewise.
2544         * tst-mutex7.c: Likewise.
2545         * tst-mutex7a.c: Likewise.
2546         * tst-mutex8.c: Likewise.
2547         * tst-mutex9.c: Likewise.
2548         * tst-robust1.c: Likewise.
2549         * tst-robust7.c: Likewise.
2550         * tst-robust8.c: Likewise.
2551         * tst-mutexpi1.c: New file.
2552         * tst-mutexpi2.c: New file.
2553         * tst-mutexpi3.c: New file.
2554         * tst-mutexpi4.c: New file.
2555         * tst-mutexpi5.c: New file.
2556         * tst-mutexpi6.c: New file.
2557         * tst-mutexpi7.c: New file.
2558         * tst-mutexpi7a.c: New file.
2559         * tst-mutexpi8.c: New file.
2560         * tst-mutexpi9.c: New file.
2561         * tst-robust1.c: New file.
2562         * tst-robust2.c: New file.
2563         * tst-robust3.c: New file.
2564         * tst-robust4.c: New file.
2565         * tst-robust5.c: New file.
2566         * tst-robust6.c: New file.
2567         * tst-robust7.c: New file.
2568         * tst-robust8.c: New file.
2569         * Makefile (tests): Add the new tests.
2571         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2572         * pthread_mutex_destroy.c: Remove unneeded label.
2574 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2576         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2577         computations to compile time.
2579 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2581         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2583 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2585         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2587 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2589         * pthread_key_create.c (__pthread_key_create): Do away with
2590         __pthread_keys_lock.
2592         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2593         (__kernel_cpumask_size): Mark as hidden.
2594         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2596         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2597         * semaphoreP.h (__sem_mappings_lock): Likewise.
2599 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2601         * pthread_atfork.c: Mark __dso_handle as hidden.
2603 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2605         [BZ #2644]
2606         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2607         the reload problem.  Change the one path in pthread_cancel_init
2608         which causes the problem.  Force gcc to reload.  Simplify callers.
2609         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2610         (_Unwind_GetBSP): Undo last patch.
2612 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2614         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2615         function pointer is reloaded after pthread_cancel_init calls.
2617         [BZ #2644]
2618         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2619         pointers are reloaded after pthread_cancel_init calls.
2621 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2623         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2624         __always_inline.
2626 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2628         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2629         Allocate new object which is passed to timer_sigev_thread so that
2630         the timer can be deleted before the new thread is scheduled.
2632 2006-04-26  Roland McGrath  <roland@redhat.com>
2634         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2636 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2638         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2639         suffix for conditional jumps.
2640         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2641         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2642         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2643         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2644         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2645         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2647         * init.c (sigcancel_handler): Compare with correct PID even if the
2648         thread is in the middle of a fork call.
2649         (sighandler_setxid): Likewise.
2650         Reported by Suzuki K P <suzuki@in.ibm.com> .
2652 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2654         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2656 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2658         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2659         fails [Coverity CID 105].
2661 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2663         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2665 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2667         [BZ #2505]
2668         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2669         Define __lll_rel_instr using lwsync.
2671 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2673         * allocatestack.c (allocate_stack): Always initialize robust_head.
2674         * descr.h: Define struct robust_list_head.
2675         (struct pthread): Use robust_list_head in robust mutex list definition.
2676         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2677         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2678         (__pthread_initialize_minimal_internal): Register robust_list with
2679         the kernel.
2680         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2681         Declare __set_robust_list_avail.
2682         * pthread_create.c (start_thread): Register robust_list of new thread.
2683         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2684         waiters.
2685         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2686         number of users, it's unreliable.
2687         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2688         set_robust_list syscall is available.
2689         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2690         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2691         Set robust_head.list_op_pending before trying to lock a robust mutex.
2692         * pthread_mutex_timedlock.c: Likewise.
2693         * pthread_mutex_trylock.c: Likewise.
2694         * pthread_mutex_unlock.c: Likewise for unlocking.
2695         * Makefile (tests): Add tst-robust8.
2696         * tst-robust8.c: New file.
2698 2006-03-08  Andreas Schwab  <schwab@suse.de>
2700         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2701         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2703 2006-03-05  Roland McGrath  <roland@redhat.com>
2705         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2706         and $config_os doesn't match *linux*.
2708 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2710         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2711         Use __syscall_error.
2712         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2713         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2714         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2715         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2716         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2717         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2719 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2721         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2723 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2725         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2726         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2727         mutex.
2728         (__lll_robust_timedlock_wait): Likewise.
2729         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2730         (__lll_robust_lock_wait): Likewise.
2731         (__lll_robust_timedlock_wait): Likewise.
2732         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2733         (__lll_robust_lock_wait): Likewise.
2734         (__lll_robust_timedlock_wait): Likewise.
2736 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2738         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2739         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2740         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2741         lll_robust_mutex_unlock): Define.
2742         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2744 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2746         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2747         instead of <clone.S>.
2749 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2751         * Makefile (libpthread-routines): Add
2752         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2753         and pthread_mutex_[sg]etprioceiling.
2754         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2755         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2756         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2757         pthread_mutex_setprioceiling.
2758         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2759         PTHREAD_PRIO_PROTECT): New enum values.
2760         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2761         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2762         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2763         prototypes.
2764         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2765         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2766         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2767         Define.
2768         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2769         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2770         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2771         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2772         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2773         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2774         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2775         protocol mutexes.
2776         * pthread_mutex_getprioceiling.c: New file.
2777         * pthread_mutex_setprioceiling.c: New file.
2778         * pthread_mutexattr_getprioceiling.c: New file.
2779         * pthread_mutexattr_setprioceiling.c: New file.
2780         * pthread_mutexattr_getprotocol.c: New file.
2781         * pthread_mutexattr_setprotocol.c: New file.
2783 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2785         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2787 2006-02-27  Roland McGrath  <roland@redhat.com>
2789         * sysdeps/pthread/Subdirs: List nptl here too.
2790         * configure (libc_add_on_canonical): New variable.
2792         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2794         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2795         self to get main source tree's file.
2796         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2797         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2798         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2799         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2800         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2801         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2802         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2803         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2804         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2805         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2806         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2807         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2808         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2810         * Makefile: Use $(sysdirs) in vpath directive.
2812         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2813         (CPPFLAGS-timer_routines.c): Likewise.
2815         * Makeconfig (includes): Variable removed.
2817 2006-02-26  Roland McGrath  <roland@redhat.com>
2819         * sysdeps/generic/pt-raise.c: Moved to ...
2820         * pt-raise.c: ... here.
2821         * sysdeps/generic/lowlevellock.h: Moved to ...
2822         * lowlevellock.h: ... here.
2824 2006-02-23  Roland McGrath  <roland@redhat.com>
2826         * descr.h (struct pthread): Add final member `end_padding'.
2827         (PTHREAD_STRUCT_END_PADDING): Use it.
2829 2006-02-20  Roland McGrath  <roland@redhat.com>
2831         * sysdeps/mips: Directory removed, saved in ports repository.
2832         * sysdeps/unix/sysv/linux/mips: Likewise.
2834 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2836         * tst-robust1.c: Add second mutex to check that the mutex list is
2837         handled correctly.
2839 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2841         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2842         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2843         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2844         lll_robust_mutex_unlock): New macros.
2845         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2846         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2847         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2848         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2849         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2851 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2853         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2854         definitions.
2855         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2857 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2859         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2860         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2861         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2862         (lll_robust_mutex_unlock): Likewise.
2864 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2866         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2867         Set robust_list.__next rather than robust_list.
2868         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2869         (__pthread_list_t): New typedef.
2870         (pthread_mutex_t): Replace __next and __prev fields with __list.
2871         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2872         (__pthread_list_t): New typedef.
2873         (pthread_mutex_t): Replace __next and __prev fields with __list.
2874         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2875         (__pthread_list_t, __pthread_slist_t): New typedefs.
2876         (pthread_mutex_t): Replace __next and __prev fields with __list.
2877         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2878         (__pthread_list_t, __pthread_slist_t): New typedefs.
2879         (pthread_mutex_t): Replace __next and __prev fields with __list.
2880         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2881         (__pthread_list_t, __pthread_slist_t): New typedefs.
2882         (pthread_mutex_t): Replace __next and __prev fields with __list.
2883         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2884         (__pthread_slist_t): New typedef.
2885         (pthread_mutex_t): Replace __next field with __list.
2887 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2889         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2890         PTHREAD_MUTEX_OWNERDEAD.
2891         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2892         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2893         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2894         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2895         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2896         to PTHREAD_MUTEX_INCONSISTENT.
2897         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2898         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2899         * pthread_mutex_trylock.c: Likewise.
2900         * pthread_mutex_timedlock.c: Likewise.
2901         * pthread_mutex_unlock.c: Likewise.
2902         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2903         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2904         lowlevelrobustlock.sym.
2905         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2906         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2907         definitions.
2908         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2909         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2910         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2911         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2912         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2914 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2916         * allocatestack.c (allocate_stack): Initialize robust_list.
2917         * init.c (__pthread_initialize_minimal_internal): Likewise.
2918         * descr.h (struct xid_command): Pretty printing.
2919         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2920         robust_list.  Adjust macros.
2921         * pthread_create.c (start_thread): Adjust robust_list handling.
2922         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2923         but the owner for all robust mutex types.
2924         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2925         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2926         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2927         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2929         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2930         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2932 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2934         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2935         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2937 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2939         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2940         Return status.
2941         (lll_futex_timed_wait): Define.
2943 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2945         * tst-cancel4.c: Test ppoll.
2947 2006-01-18  Andreas Jaeger  <aj@suse.de>
2949         [BZ #2167]
2950         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2951         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2952         by Jim Gifford <patches@jg555.com>.
2954 2006-01-13  Richard Henderson  <rth@redhat.com>
2956         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2958 2006-01-10  Roland McGrath  <roland@redhat.com>
2960         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2961         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2962         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2963         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2964         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2965         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2966         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2967         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2968         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2969         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2971 2006-01-09  Roland McGrath  <roland@redhat.com>
2973         * tst-initializers1-c89.c: New file.
2974         * tst-initializers1-c99.c: New file.
2975         * tst-initializers1-gnu89.c: New file.
2976         * tst-initializers1-gnu99.c: New file.
2977         * Makefile (tests): Add them.
2978         (CFLAGS-tst-initializers1-c89.c): New variable.
2979         (CFLAGS-tst-initializers1-c99.c): New variable.
2980         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2981         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2983         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2984         Use __extension__ on anonymous union definition.
2985         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2986         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2987         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2988         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2989         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2991 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2993         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2994         Don't give the union a name because it changes the mangled name.
2995         Instead name the struct for __data.
2996         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2997         Likewise.
2998         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2999         Likewise.
3001 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
3003         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
3004         stack bias to mc_ftp field.
3006 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
3008         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
3009         being too clever and reloading the futex value where it shouldn't.
3011 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3013         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
3014         correct type.
3016 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
3018         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
3019         Add cfi directives.
3021 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
3023         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
3024         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
3025         rename in tcbhead_t.
3027         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
3028         Don't give the union a name because it changes the mangled name.
3029         Instead name the struct for __data.
3030         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3031         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3032         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3033         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3034         * pthread_create.c (start_thread): Adjust robust mutex free loop.
3035         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
3037 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
3039         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
3040         Return status.
3041         (lll_futex_timed_wait): Define.
3042         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
3043         * sysdeps/pthread/aio_misc.h: New file.
3045 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
3047         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
3049 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
3051         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3052         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
3053         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3055 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
3057         * tst-cancel24.cc: Use C headers instead of C++ headers.
3059 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
3061         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
3062         sparc-linux configured glibc.
3063         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
3064         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
3065         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
3066         atomic_compare_and_exchange_val_24_acq instead of
3067         atomic_compare_and_exchange_val_acq.
3068         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
3069         instead of atomic_exchange_rel.
3070         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
3071         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
3072         file.
3073         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
3074         file.
3075         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
3076         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
3077         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
3078         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
3079         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
3080         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
3081         New file.
3082         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
3083         New file.
3084         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
3085         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
3086         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
3087         file.
3088         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
3089         file.
3090         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
3092 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
3094         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
3095         mutex initializers.
3097 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
3099         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
3100         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3101         THREAD_COPY_POINTER_GUARD): Define.
3102         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
3103         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
3105 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
3107         * version.c: Update copyright year.
3109 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3111         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3112         .eh_frame section, use cfi_* directives.
3113         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3115 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3117         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3118         now.
3120 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3122         * sysdeps/pthread/sigaction.c: Removed.
3123         * sigaction.c: New file.
3124         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3126 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3128         * Makefile (tests): Add tst-signal7.
3129         * tst-signal7.c: New file.
3131 2005-12-27  Roland McGrath  <roland@redhat.com>
3133         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3134         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3135         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3136         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3137         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3138         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3139         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3140         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3141         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3142         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3143         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3145 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3147         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3148         and __prev field to pthread_mutex_t.
3149         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3150         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3151         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3152         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3153         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3154         to pthread_mutex_t.
3156 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3158         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3159         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3160         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3161         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3162         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3163         and PTHREAD_MUTEXATTR_FLAG_BITS.
3164         * descr.h (struct pthread): Add robust_list field and define
3165         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3166         * pthread_mutexattr_getrobust.c: New file.
3167         * pthread_mutexattr_setrobust.c: New file.
3168         * pthread_mutex_consistent.c: New file.
3169         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3170         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3171         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3172         Adjust pthread_mutex_t initializers.
3173         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3174         field to pthread_mutex_t.
3175         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3176         and __prev field to pthread_mutex_t.
3177         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3178         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3179         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3180         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3181         * pthread_mutexattr_gettype.c: Likewise.
3182         * pthread_mutexattr_setpshared.c: Likewise.
3183         * pthread_mutexattr_settype.c: Likewise.
3184         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3185         Initialize mutex kind according to robust flag.
3186         * pthread_mutex_lock.c: Implement local robust mutex.
3187         * pthread_mutex_timedlock.c: Likewise.
3188         * pthread_mutex_trylock.c: Likewise.
3189         * pthread_mutex_unlock.c: Likewise.
3190         * pthread_create.c (start_thread): Mark robust mutexes which remained
3191         locked as dead.
3192         * tst-robust1.c: New file.
3193         * tst-robust2.c: New file.
3194         * tst-robust3.c: New file.
3195         * tst-robust4.c: New file.
3196         * tst-robust5.c: New file.
3197         * tst-robust6.c: New file.
3198         * tst-robust7.c: New file.
3199         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3200         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3201         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3202         tst-robust5, tst-robust6, and tst-robust7.
3204         * tst-typesizes.c: New file.
3205         * Makefile (tests): Add tst-typesizes.
3207         * tst-once3.c: More debug output.
3209 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3211         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3212         missing after last change.
3214         * version.c: Update copyright year.
3216 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3218         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3219         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3220         * pthread_mutex_trylock.c: Likewise.
3221         * pthread_mutex_timedlock.c: Likewise.
3222         * pthread_mutex_unlock.c: Likewise.
3224 2005-12-22  Roland McGrath  <roland@redhat.com>
3226         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3227         so that #include_next's search location is not reset to the -I..
3228         directory where <nptl/...> can be found.
3230 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3232         [BZ #1913]
3233         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3234         Fix unwind info.  Remove useless branch prediction prefix.
3235         * tst-cancel24.cc: New file.
3236         * Makefile: Add rules to build and run tst-cancel24.
3238 2005-12-21  Roland McGrath  <roland@redhat.com>
3240         * libc-cancellation.c: Use <> rather than "" #includes.
3241         * pt-cleanup.c: Likewise.
3242         * pthread_create.c: Likewise.
3243         * pthread_join.c: Likewise.
3244         * pthread_timedjoin.c: Likewise.
3245         * pthread_tryjoin.c: Likewise.
3246         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3247         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3248         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3249         * unwind.c: Likewise.
3251 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3253         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3254         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3255         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3256         THREAD_COPY_POINTER_GUARD): Define.
3258 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3260         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3261         rather than one.
3262         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3263         THREAD_COPY_POINTER_GUARD): Define.
3264         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3265         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3266         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3267         THREAD_COPY_POINTER_GUARD): Define.
3268         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3269         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3270         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3271         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3272         Use PTR_DEMANGLE for B0 if defined.
3274 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3276         * pthread_create.c (__pthread_create_2_1): Use
3277         THREAD_COPY_POINTER_GUARD if available.
3278         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3279         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3280         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3281         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3282         * sysdeps/x86_64/tls.h: Likewise.
3284 2005-12-15  Roland McGrath  <roland@redhat.com>
3286         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3288 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3290         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3291         sysdeps/generic.
3292         * errno-loc.c: New file.
3294 2005-12-12  Roland McGrath  <roland@redhat.com>
3296         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3297         adjustments before choosing stack size.  Update minimum stack size
3298         calculation to match allocate_stack change.
3300 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3302         * allocatestack.c (allocate_stack): Don't demand that there is an
3303         additional full page available on the stack beside guard, TLS, the
3304         minimum stack.
3306 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3308         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3309         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3311         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3312         compiling 32-bit code we must define __cleanup_fct_attribute.
3314 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3316         [BZ #1920]
3317         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3318         __attribute__ instead of __attribute.
3319         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3320         (__cleanup_fct_attribute): Likewise.
3322 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3324         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3325         a write barrier before writing libgcc_s_getcfa.
3327 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3329         * sysdeps/unix/sysv/linux/configure: Removed.
3331 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3333         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3334         optional init_array/fini_array support.
3336 2005-10-24  Roland McGrath  <roland@redhat.com>
3338         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3339         versioned_symbol use.
3341 2005-10-16  Roland McGrath  <roland@redhat.com>
3343         * init.c (__pthread_initialize_minimal_internal): Even when using a
3344         compile-time default stack size, apply the minimum that allocate_stack
3345         will require, and round up to page size.
3347 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3349         * Makefile ($(test-modules)): Remove static pattern rule.
3351 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3352             Ulrich Drepper  <drepper@redhat.com>
3354         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3355         alignment in callback function.
3356         * Makefile: Add rules to build and run tst-align3.
3357         * tst-align3.c: New file.
3359 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3361         * allocatestack.c (setxid_signal_thread): Add
3362         INTERNAL_SYSCALL_DECL (err).
3364 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3366         * allocatestack.c (setxid_signal_thread): Need to use
3367         atomic_compare_and_exchange_bool_acq.
3369 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3370             Jakub Jelinek  <jakub@redhat.com>
3372         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3373         CANCEL_RESTMASK.
3374         (struct pthread): Move specific_used field to avoid padding.
3375         Add setxid_futex field.
3376         * init.c (sighandler_setxid): Reset setxid flag and release the
3377         setxid futex.
3378         * allocatestack.c (setxid_signal_thread): New function.  Broken
3379         out of the bodies of the two loops in __nptl_setxid.  For undetached
3380         threads check whether they are exiting and if yes, don't send a signal.
3381         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3382         * pthread_create.c (start_thread): For undetached threads, check
3383         whether setxid bit is set.  If yes, wait until signal has been
3384         processed.
3386         * allocatestack.c (STACK_VARIABLES): Initialize them.
3387         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3389 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3391         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3392         waiters, awake all waiters on the associated mutex.
3394 2005-09-22  Roland McGrath  <roland@redhat.com>
3396         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3397         ../sysdeps/x86_64/hp-timing.h).
3399 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3401         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3402         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3403         (lll_futex_wake_unlock): Define.
3404         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3405         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3406         (lll_futex_wake_unlock): Define.
3407         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3408         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3409         (lll_futex_wake_unlock): Define.
3410         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3411         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3412         (lll_futex_wake_unlock): Define.
3413         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3414         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3415         (lll_futex_wake_unlock): Define.
3416         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3417         lll_futex_wake_unlock.
3418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3419         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3420         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3422         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3423         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3425 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3427         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3428         Fix typo in register name.
3430 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3432         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3433         Use __sigfillset.  Document that sigfillset does the right thing wrt
3434         to SIGSETXID.
3436 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3438         [BZ #1102]
3439         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3440         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3441         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3442         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3443         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3444         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3445         in the structure.
3446         * Makefile (tests): Add tst-initializers1.
3447         (CFLAGS-tst-initializers1.c): Set.
3448         * tst-initializers1.c: New test.
3450 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3452         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3453         Make sure __flags are located at offset 48 from the start of the
3454         structure.
3456 2005-07-02  Roland McGrath  <roland@redhat.com>
3458         * Makeconfig: Comment fix.
3460 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3462         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3463         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3464         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3465         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3466         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3467         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3468         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3469         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3470         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3471         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3473 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3475         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3476         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3477         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3478         fields.
3479         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3480         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3481         field.  Put in sysinfo field unconditionally.
3482         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3483         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3484         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3485         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3486         fields.
3487         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3488         * pthread_create.c (__pthread_create_2_1): Use
3489         THREAD_COPY_STACK_GUARD macro.
3490         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3491         tests.
3492         * tst-stackguard1.c: New file.
3493         * tst-stackguard1-static.c: New file.
3495 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3497         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3498         Invoke CGOTSETUP and CGOTRESTORE.
3499         (CGOTSETUP, CGOTRESTORE): Define.
3501 2005-05-29  Richard Henderson  <rth@redhat.com>
3503         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3504         (tf_write, tf_writev): Use it.
3505         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3506         the system minimum.
3508 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3510         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3511         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3512         __librt_*_asynccancel@local.
3514 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3516         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3517         all occurrences of JUMPTARGET.  Instead append @local to labels.
3519 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3521         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3522         size/alignment of struct pthread rather than tcbhead_t.
3523         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3524         Likewise.
3525         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3526         Likewise.
3527         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3528         Likewise.
3530 2005-05-19  Richard Henderson  <rth@redhat.com>
3532         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3533         __sync_val_compare_and_swap, not explicit _si variant.
3534         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3536 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3538         [BZ #915]
3539         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3541 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3543         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3544         .eh_frame section, use cfi_* directives.
3546 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3548         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3549         of "" includes.
3551 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3553         [BZ #1075]
3554         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3555         aio_write blocks.
3557 2005-04-27  Roland McGrath  <roland@redhat.com>
3559         * Makefile (tests): Remove tst-clock2.
3561         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3562         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3563         translating to the kernel clockid_t for our own process/thread clock.
3565         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3567 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3569         * old_pthread_cond_init.c: Include <errno.h>.
3570         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3571         process shared or uses clock other than CLOCK_REALTIME.
3572         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3574 2005-04-13  David S. Miller  <davem@davemloft.net>
3576         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3577         * sysdeps/sparc/sparc64/clone.S: New file.
3579 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3581         [BZ #1102]
3582         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3583         __inline instead of inline.
3584         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3586 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3588         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3589         functionally equivalent, but shorter instructions.
3590         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3591         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3592         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3593         Likewise.
3594         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3595         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3596         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3597         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3599         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3600         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3601         Likewise.
3602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3604         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3605         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3606         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3608 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3610         * sysdeps/mips/Makefile: New file.
3611         * sysdeps/mips/nptl-sysdep.S: New file.
3612         * sysdeps/mips/tcb-offsets.sym: New file.
3613         * sysdeps/mips/pthread_spin_lock.S: New file.
3614         * sysdeps/mips/pthread_spin_trylock.S: New file.
3615         * sysdeps/mips/pthreaddef.h: New file.
3616         * sysdeps/mips/tls.h: New file.
3617         * sysdeps/mips/jmpbuf-unwind.h: New file.
3618         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3619         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3620         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3621         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3622         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3623         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3624         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3625         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3626         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3627         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3629 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3631         [BZ #1112]
3632         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3633         variable to scerr.
3635 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3637         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3639 2005-02-25  Roland McGrath  <roland@redhat.com>
3641         * alloca_cutoff.c: Correct license text.
3642         * tst-unload.c: Likewise.
3643         * sysdeps/pthread/allocalim.h: Likewise.
3644         * sysdeps/pthread/pt-initfini.c: Likewise.
3645         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3646         * sysdeps/pthread/bits/sigthread.h: Likewise.
3647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3648         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3650 2005-02-16  Roland McGrath  <roland@redhat.com>
3652         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3653         Use unsigned int * for ptr_nthreads.
3655 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3657         [BZ #721]
3658         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3659         gcc4.
3661 2005-02-07  Richard Henderson  <rth@redhat.com>
3663         [BZ #787]
3664         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3665         argument.
3667 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3669         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3670         order of arguments in invocation of atomic_add_zero.
3672 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3674         [BZ #737]
3675         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3676         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3677         at least gotntpoff relocation and addition.
3678         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3679         Likewise.
3680         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3681         Likewise.
3682         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3683         Likewise.
3685 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3687         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3688         entry for static tls deallocation fix.
3689         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3690         also contains information whether the memory pointed to is static
3691         TLS or not.
3692         * sysdeps/i386/tls.h: Likewise.
3693         * sysdeps/ia64/tls.h: Likewise.
3694         * sysdeps/powerpc/tls.h: Likewise.
3695         * sysdeps/s390/tls.h: Likewise.
3696         * sysdeps/sh/tls.h: Likewise.
3697         * sysdeps/sparc/tls.h: Likewise.
3698         * sysdeps/x86_64/tls.h: Likewise.
3700 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3702         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3704 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3706         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3707         %esp.
3708         * Makefile (tests): Add tst-align2.
3709         * tst-align2.c: New test.
3710         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3711         -mpreferred-stack-boundary=4.
3713 2004-12-18  Roland McGrath  <roland@redhat.com>
3715         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3716         New file removed withdrawn for the moment.
3718 2004-12-17  Richard Henderson  <rth@redhat.com>
3720         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3721         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3723 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3725         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3726         Increased PTHREAD_STACK_MIN.
3728         * tst-context1.c (stacks): Use bigger stack size.
3730 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3732         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3733         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3735 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3737         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3738         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3739         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3741 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3743         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3745 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3747         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3748         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3750         * tst-getpid1.c: If child crashes, report this first.  Print which
3751         signal.
3753 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3755         * init.c (__pthread_initialize_minimal_internal): Also unblock
3756         SIGSETXID.
3758 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3760         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3761         _POSIX_THREAD_CPUTIME): Define to 0.
3762         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3763         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3764         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3765         __timer_signal_thread_tclk): Remove.
3766         (init_module): Remove their initialization.
3767         (thread_cleanup): Remove their cleanup assertions.
3768         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3769         __timer_signal_thread_tclk): Remove.
3770         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3771         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3772         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3774 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3776         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3777         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3779         * Makefile (tests): Add tst-getpid2.
3780         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3781         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3782         * tst-getpid2.c: New test.
3784 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3786         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3788 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3790         * Makefile (tests): Add tst-getpid1.
3791         * tst-getpid1.c: New file.
3792         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3793         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3795 2004-12-02  Roland McGrath  <roland@redhat.com>
3797         * Makefile (libpthread-nonshared): Variable removed.
3798         ($(objpfx)libpthread_nonshared.a): Target removed.
3799         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3800         These are now handled by generic magic from
3801         libpthread-static-only-routines being set.
3803 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3805         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3806         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3807         _POSIX_THREAD_PRIO_PROTECT): Define.
3808         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3809         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3810         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3812 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3814         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3815         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3816         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3817         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3818         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3819         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3820         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3822 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3824         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3826         * Makefile (libpthread-routines): Add pthread_setschedprio.
3827         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3828         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3829         * pthread_setschedprio.c: New file.
3831 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3833         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3834         * pthread_cancel.c (pthread_create): Likewise.
3836         * Makefile (libpthread-routines): Add vars.
3837         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3838         * init.c (__default_stacksize, __is_smp): Remove.
3839         * vars.c: New file.
3840         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3841         and define a wrapper macro.
3842         (PTHREAD_STATIC_FN_REQUIRE): Define.
3843         * allocatestack.c (__find_thread_by_id): Undefine.
3844         * pthread_create (__pthread_keys): Remove.
3845         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3846         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3847         PTHREAD_STATIC_FN_REQUIRE.
3849 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3851         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3852         parameter to REGISTER macro.
3854 2004-11-17  Roland McGrath  <roland@redhat.com>
3856         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3857         Make sure SIGCANCEL is blocked as well.
3859 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3861         * sysdeps/pthread/setxid.h: New file.
3862         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3863         (struct xid_command): Add forward decl.
3864         (struct pthread_functions): Change return type of __nptl_setxid hook
3865         to int.
3866         * pthreadP.h (__nptl_setxid): Change return type to int.
3867         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3868         calling thread, return its return value and set errno on failure.
3869         * descr.h (struct xid_command): Change id type to long array.
3871         * Makefile: Add rules to build and test tst-setuid1 and
3872         tst-setuid1-static.
3873         * tst-setuid1.c: New test.
3874         * tst-setuid1-static.c: New test.
3876 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3878         * Makefile (tests): Add tst-exit3.
3879         * tst-exit3.c: New test.
3881 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3883         * Makefile (tests): Add tst-exit2.
3884         * tst-exit2.c: New file.
3886 2004-11-09  Roland McGrath  <roland@redhat.com>
3888         [BZ #530]
3889         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3890         here, before calling clone.
3891         * pthread_create.c (start_thread): Don't do it here.
3893 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3895         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3897 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3899         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3900         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3901         assembler warning.
3903 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3905         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3906         if sched_priority is not between minprio and maxprio.
3908 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3910         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3911         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3913         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3914         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3916 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3918         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3919         not-cancelable I/O functions.
3921 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3923         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3924         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3925         make sure 2 is stored in the futex and we looked at the old value.
3926         Fix a few other problems to return the correct value.
3928 2004-10-14  Richard Henderson  <rth@redhat.com>
3930         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3931         make gcc4 happy.
3933 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3935         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3936         of pthread-functions.h and pthreaddef.h.
3937         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3939         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3940         Change __data.__nwaiters from int to unsigned int.
3942         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3943         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3945         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3946         before return type.
3948         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3949         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3951 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3953         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3954         test fails, remove message queue.
3955         (tf_msgsnd): Likewise.
3957 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3959         * tst-clock1.c: Change #ifdef to #if defined.
3960         * tst-clock2.c: Likewise.
3961         * tst-cond11.c: Likewise.
3963         * sysdeps/pthread/timer_create.c (timer_create): Use
3964         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3965         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3966         THREAD_CPUTIME.
3968 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3970         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3971         _POSIX_THREAD_CPUTIME): Define to 0.
3973 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3975         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3976         and _POSIX_THREAD_CPUTIME to zero.
3977         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3978         * tst-barrier2.c: Fix testing for POSIX feature.
3979         * tst-clock1.c: Likewise.
3980         * tst-clock2.c: Likewise.
3981         * tst-cond11.c: Likewise.
3982         * tst-cond4.c: Likewise.
3983         * tst-cond6.c: Likewise.
3984         * tst-flock2.c: Likewise.
3985         * tst-mutex4.c: Likewise.
3986         * tst-mutex9.c: Likewise.
3987         * tst-rwlock12.c: Likewise.
3988         * tst-rwlock4.c: Likewise.
3989         * tst-signal1.c: Likewise.
3990         * tst-spin2.c: Likewise.
3991         * sysdeps/pthread/posix-timer.h: Likewise.
3992         * sysdeps/pthread/timer_create.c: Likewise.
3993         * sysdeps/pthread/timer_routines.c: Likewise.
3995 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3997         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3998         (__lll_mutex_timedlock_wait): Address futex correctly.
4000         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4001         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
4002         make sure 2 is stored in the futex and we looked at the old value.
4003         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4004         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
4005         which might very well made the code not working at all before.
4006         [BZ #417]
4008 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
4010         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
4011         allow SIGSETXID to be sent.
4012         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
4013         for SIGSETXID to be defined.
4014         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
4015         SIGSETXID cannot be blocked.
4017         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4018         Add __extension__ to long long types.
4019         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4020         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4021         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4022         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4023         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
4024         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4025         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4027 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
4029         * descr.h (struct pthread): Add stopped_start field.
4030         * sysdeps/pthread/createthread.c (create_thread): Set
4031         start_stopped flag in descriptor for new thread appropriately.
4032         * pthread_create.c (start_thread): Only take lock to be stopped on
4033         startup if stopped_start flag says so.
4035 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
4037         * pthread_create.c (__pthread_create_2_1): Remember whether thread
4038         is created detached and if yes, do not try to free the stack in case
4039         the thread creation failed.
4040         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
4041         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
4042         case there has been no error.  [BZ #405]
4044         * pthread_create.c (start_thread): Don't wait for scheduler data
4045         etc to be set at the beginning of the function.  The cancellation
4046         infrastructure must have been set up.  And enable async
4047         cancellation before potentially going to sleep.  [BZ #401]
4049 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
4051         * Versions: Remove exports for pthread_set*id_np functions.
4052         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
4053         for now.
4054         * Makefile: Don't build pthread_set*id code for now.
4056 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
4058         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
4059         internal use.
4060         * allocatestack.c (__nptl_setxid): New function.
4061         * descr.h (struct xid_command): Define type.
4062         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
4063         (sighandler_setxid): New function.
4064         (__pthread_initialize_minimal): Register sighandler_setxid for
4065         SIGCANCEL.
4066         * pt-allocrtsig.c: Update comment.
4067         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
4068         Declare __nptl_setxid.
4069         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
4070         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
4071         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4072         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4073         and pthread_setresuid_np.
4074         * pthread_setgid_np.c: New file.
4075         * pthread_setuid_np.c: New file.
4076         * pthread_setegid_np.c: New file.
4077         * pthread_seteuid_np.c: New file.
4078         * pthread_setregid_np.c: New file.
4079         * pthread_setreuid_np.c: New file.
4080         * pthread_setresgid_np.c: New file.
4081         * pthread_setresuid_np.c: New file.
4082         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
4083         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
4084         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
4085         and pthread_setresuid_np.
4086         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
4087         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
4088         pthread_setregid, and pthread_setresgid.
4090 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
4092         * allocatestack.c (allocate_stack): Return EAGAIN instead of
4093         ENOMEM when out of memory.
4095 2004-09-10  Roland McGrath  <roland@redhat.com>
4097         [BZ #379]
4098         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
4099         code, since we don't try to use the broken CLONE_STOPPED any more.
4100         * pthread_create.c (start_thread): Likewise.
4102 2004-09-15  Richard Henderson  <rth@redhat.com>
4104         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
4106 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
4108         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
4109         (__libc_unwind_longjmp): Delete macro and declare as function.
4110         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
4111         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4112         nptl directory.
4113         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4114         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4115         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4117 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4119         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4120         for __USE_XOPEN2K.
4121         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4122         types also for __USE_XOPEN2K.
4123         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4124         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4125         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4126         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4127         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4128         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4129         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4130         [BZ #320]
4132 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4134         * sysdeps/pthread/pthread.h
4135         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4136         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4137         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4138         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4139         [BZ #375]
4141 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4143         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4144         PSEUDO to be used with . prefix.
4146         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4147         Use atomic_increment instead of atomic_exchange_and_add.
4148         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4149         Likewise.
4150         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4151         Likewise.
4152         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4153         Likewise.
4155         * allocatestack.c (allocate_stack): Use atomic_increment_val
4156         instead of atomic_exchange_and_add.
4157         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4158         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4159         Likewise.
4160         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4161         Likewise.
4163         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4164         the initialization function might throw.
4166 2005-09-05  Richard Henderson  <rth@redhat.com>
4168         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4169         Move definition inside libpthread, libc, librt check.  Provide
4170         definition for rtld.
4172 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4174         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4175         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4176         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4177         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4178         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4179         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4180         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4181         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4182         * unwind.c: Use it.
4184         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4185         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4186         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4187         Likewise.
4188         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4189         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4190         this is the last waiter, signal pthread_cond_destroy caller and
4191         avoid using the pthread_cond_t structure after unlock.
4192         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4194         Read clock type from the least significant bits of __nwaiters instead
4195         of __clock.
4196         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4197         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4199 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4201         [BZ #342]
4202         * Makefile (tests): Add tst-cond20 and tst-cond21.
4203         * tst-cond20.c: New test.
4204         * tst-cond21.c: New test.
4205         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4206         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4207         it unsigned int.
4208         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4209         Likewise.
4210         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4211         (pthread_cond_t): Likewise.
4212         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4213         Likewise.
4214         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4215         Likewise.
4216         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4217         Likewise.
4218         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4219         (cond_nwaiters): New.
4220         (clock_bits): New.
4221         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4222         if there are waiters not signalled yet.
4223         Wait until all already signalled waiters wake up.
4224         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4225         __nwaiters.  If pthread_cond_destroy has been called and this is the
4226         last waiter, signal pthread_cond_destroy caller and avoid using
4227         the pthread_cond_t structure after unlock.
4228         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4229         decrement it when leaving.  If pthread_cond_destroy has been called
4230         and this is the last waiter, signal pthread_cond_destroy caller.
4231         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4232         Likewise.  Read clock type from the least significant bits of
4233         __nwaiters instead of __clock.
4234         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4235         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4236         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4237         clock type just from the last COND_CLOCK_BITS bits of value.
4238         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4239         instead of __clock, just from second bit of condattr's value.
4241 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4243         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4244         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4245         != 64.
4246         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4248 2004-08-15  Roland McGrath  <roland@frob.com>
4250         * pthread_atfork.c: Update copyright terms including special exception
4251         for these trivial files, which are statically linked into executables
4252         that use dynamic linking for the significant library code.
4254 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4256         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4257         pthread_rwlock_rdlock.
4258         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4259         Decrease __nr_readers_queued after reacquiring lock.
4260         * sysdeps/pthread/pthread_rwlock_timedrdlock
4261         (pthread_rwlock_timedrdlock): Likewise.
4262         Reported by Bob Cook <bobcook47@hotmail.com>.
4264 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4266         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4267         before pthread_barrier_wait.
4269 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4272         Remove unnecessary exception handling data.
4274 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4276         [BZ #284]
4277         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4278         instead of clockid_t.
4280 2004-07-21  Roland McGrath  <roland@redhat.com>
4282         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4284 2004-07-19  Roland McGrath  <roland@redhat.com>
4286         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4288 2004-07-02  Roland McGrath  <roland@redhat.com>
4290         * configure: Don't exit.
4292 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4294         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4295         (__pthread_cond_timedwait): Check for invalid nanosecond in
4296         timeout value.
4298 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4300         * Makefile: Add rules to build and run tst-fini1.
4301         * tst-fini1.c: New file.
4302         * tst-fini1mod.c: New file.
4304 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4306         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4307         if no cancellation support is needed.
4308         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4309         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4310         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4311         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4312         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4313         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4314         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4315         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4316         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4318         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4319         only if not already defined.
4321 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4323         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4324         constraint "m" instead of "0" for futex.
4326         * shlib-versions: Add powerpc64-.*-linux.*.
4328 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4330         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4331         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4332         for valid tv_nsec.
4333         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4334         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4335         bits.
4337 2004-06-29  Roland McGrath  <roland@redhat.com>
4339         * Banner: NPTL no longer has its own version number.
4340         * Makefile (nptl-version): Variable removed.
4341         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4342         using $(version), the glibc version number.
4344 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4346         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4347         Fix branch offset for a PLT entry.
4348         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4349         Likewise.
4350         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4351         Likewise.
4352         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4353         Likewise.
4354         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4355         Likewise.
4357 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4359         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4360         unconditionally.
4362 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4364         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4365         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4366         instead of tv_sec.
4367         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4368         (pthread_rwlock_timedrdlock): Likewise.
4370 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4372         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4373         Set __r7 to val, not mutex.
4375 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4377         * Makefile: Add rules to build tst-rwlock14.
4378         * tst-rwlock14.c: New file.
4380 2004-06-24  Boris Hu  <boris.hu@intel.com>
4382         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4383         check.
4384         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4386 2004-06-19  Andreas Jaeger  <aj@suse.de>
4388         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4389         assembler in last patch.
4391 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4393         * sysdeps/pthread/pthread_cond_timedwait.c
4394         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4396         (__pthread_cond_timedwait): Check for invalid nanosecond in
4397         timeout value.
4398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4399         * tst-cond19.c: New file.
4400         * Makefile: Add rules to build and run tst-cond19.
4402 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4404         * tst-context1.c (GUARD_PATTERN): Defined.
4405         (tst_context_t): Define struct containing ucontext_t & guard words.
4406         (ctx): Declare as an array of tst_context_t.
4407         (fct): Verify uc_link & guard words are still valid.
4408         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4410 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4412         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4413         Add __data.__futex field, reshuffle __data.__clock.
4414         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4415         (__pthread_cond_signal): Increment __futex at the same time as
4416         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4417         address of low 32-bits of __wakeup_seq to futex syscall.
4418         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4419         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4420         releasing internal lock to FUTEX_WAIT.
4421         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4422         (__pthread_cond_timedwait): Likewise.
4423         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4424         (FUTEX_CMP_REQUEUE): Define.
4425         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4426         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4427         Pass __futex value from before the unlock and __futex address instead
4428         of address of low 32-bits of __wakeup_seq to futex syscall.
4429         Fallback to FUTEX_WAKE all on any errors.
4431 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4433         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4434         comment typo.
4435         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4436         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4437         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4438         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4439         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4441 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4443         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4444         Add memory clobber to inline assembly.
4445         (__lll_mutex_trylock): Likewise.
4446         (__lll_mutex_cond_trylock): Likewise.
4448 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4450         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4451         Pass val argument as 6th system call argument in %r7.
4453 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4455         * Makefile (tests): Add tst-cond16.
4456         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4457         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4458         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4459         Add __data.__futex field, reshuffle __data.__clock.
4460         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4461         (__pthread_cond_signal): Increment __futex at the same time as
4462         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4463         address of low 32-bits of __wakeup_seq to futex syscall.
4464         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4465         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4466         releasing internal lock to FUTEX_WAIT.
4467         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4468         (__pthread_cond_timedwait): Likewise.
4469         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4470         (FUTEX_CMP_REQUEUE): Define.
4471         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4472         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4473         Pass __futex value from before the unlock and __futex address instead
4474         of address of low 32-bits of __wakeup_seq to futex syscall.
4475         Fallback to FUTEX_WAKE all on any errors.
4476         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4477         Define.
4478         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4479         internally.  Return non-zero if error, zero if success.
4480         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4481         Add __data.__futex field, reshuffle __data.__clock.
4482         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4483         Define.
4484         (lll_futex_requeue): Add val argument, return 1 unconditionally
4485         for the time being.
4486         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4487         Add __data.__futex field, reshuffle __data.__clock.
4488         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4489         Define.
4490         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4491         internally.  Return non-zero if error, zero if success.
4492         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4493         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4494         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4495         Define.
4496         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4497         internally.  Return non-zero if error, zero if success.
4498         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4499         Add __data.__futex field, reshuffle __data.__clock.
4500         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4501         Define.
4502         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4503         internally.  Return non-zero if error, zero if success.
4504         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4505         Add __data.__futex field, reshuffle __data.__clock.
4506         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4507         Add __data.__futex field, reshuffle __data.__clock.
4508         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4509         Increment __futex at the same time as __wakeup_seq or __total_seq.
4510         Pass address of __futex instead of address of low 32-bits of
4511         __wakeup_seq to futex syscall.
4512         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4513         Pass __futex value from before releasing internal lock
4514         to FUTEX_WAIT.
4515         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4516         Likewise.  Avoid unnecessary shadowing of variables.
4517         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4518         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4519         unlock and __futex address instead of address of low 32-bits of
4520         __wakeup_seq to futex_requeue macro, adjust for new return value
4521         meaning.
4522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4523         (__pthread_cond_signal): Increment __futex at the same time as
4524         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4525         address of low 32-bits of __wakeup_seq to futex syscall.
4526         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4527         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4528         releasing internal lock to FUTEX_WAIT.
4529         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4530         (__pthread_cond_timedwait): Likewise.
4531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4532         (FUTEX_CMP_REQUEUE): Define.
4533         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4534         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4535         Pass __futex value from before the unlock and __futex address instead
4536         of address of low 32-bits of __wakeup_seq to futex syscall.
4537         Fallback to FUTEX_WAKE all on any errors.
4539 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4541         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4542         Add nop to align the end of critical section.
4543         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4545 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4547         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4548         Add __broadcast_seq field.
4549         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4550         all waiters as woken with woken_seq and bump broadcast counter.
4551         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4552         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4553         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4554         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4556 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4558         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4559         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4560         Reported by Kaz Kojima.
4562 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4564         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4566 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4568         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4569         __broadcast_seq with bc_seq after acquiring internal lock instead of
4570         before it.
4572 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4574         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4575         compilation.
4576         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4577         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4578         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4579         (pthread_cond_t): Add __data.__broadcast_seq field.
4580         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4581         (FRAME_SIZE): Define.
4582         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4583         Comment typo fixes.
4584         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4585         Define.
4586         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4587         typo fixes.
4588         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4589         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4590         fixes.
4592 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4594         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4595         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4596         Add __broadcast_seq field.
4597         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4598         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4599         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4600         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4601         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4602         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4603         all waiters as woken with woken_seq and bump broadcast counter.
4604         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4606         __broadcast_seq field.
4607         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4608         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4609         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4610         * pthread_cond_init.c: Initialize __broadcast_seq field.
4611         * Makefile (tests): Add tst-cond17 and tst-cond18.
4612         Add .NOTPARALLEL goal.
4613         * tst-cond16.c: New file.  From Jakub.
4614         * tst-cond17.c: New file.  From Jakub.
4615         * tst-cond18.c: New file.  From Jakub.
4617 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4619         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4620         unwind info.
4622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4623         Parametrize frame size.  Correct some unwind info.
4624         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4626 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4628         * tst-stack3.c: Note testing functionality beyond POSIX.
4630 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4632         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4633         Change conditional from ifdef to if.
4635 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4637         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4638         SYSDEP_CANCEL_ERROR): Define.
4639         (PSEUDO): Use it.
4641 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4643         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4645 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4647         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4649 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4651         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4652         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4653         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4654         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4656 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4658         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4659         thread has all signals blocked.
4661 2004-04-18  Andreas Jaeger  <aj@suse.de>
4663         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4664         (SEM_VALUE_MAX): Add missing brace.
4666 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4668         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4669         in rt subdir.
4670         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4671         * sysdeps/pthread/tst-mqueue8x.c: New test.
4672         * tst-cancel4.c: Update comment about message queues.
4674         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4675         return it_value { 0, 0 }.
4676         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4677         like SIGEV_SIGNAL.
4678         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4679         assertion for SIGEV_NONE.
4680         (thread_attr_compare): Compare all attributes, not just a partial
4681         subset.
4683 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4685         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4687 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4689         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4690         Just use a plain number.
4691         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4692         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4693         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4694         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4695         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4696         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4697         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4699 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4701         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4702         frame info.
4703         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4705 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4707         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4708         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4709         of calling sigwaitinfo.
4711 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4713         * allocatestack.c (allocate_stack): Set reported_guardsize
4714         unconditionally.
4715         * pthread_getattr_np.c (pthread_getattr_np): Use
4716         reported_guardsize instead of guardsize.
4717         * descr.h (struct pthread): Add reported_guardsize field.
4719 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4721         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4723 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4725         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4727 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4729         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4730         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4731         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4732         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4733         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4734         Define.
4735         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4736         (_POSIX_MESSAGE_PASSING): Define.
4737         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4738         (_POSIX_MESSAGE_PASSING): Define.
4739         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4740         (_POSIX_MESSAGE_PASSING): Define.
4742 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4744         * tst-context1.c (fct): Check whether correct stack is used.
4746 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4748         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4749         matching constraints for asm mem parameters.
4751         * tst-clock2.c (tf): Don't define unless needed.
4753 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4755         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4756         $(gnulib).
4758 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4760         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4761         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4762         * pthreadP.h: Declare __nptl_deallocate_tsd.
4763         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4764         Adjust caller.
4766         * Makefile (tests): Add tst-tsd5.
4767         * tst-tsd5.c: New file.
4769 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4771         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4772         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4773         is SHLIB_COMPAT check.
4774         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4775         (__pthread_attr_getaffinity_old): Likewise.
4776         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4777         (__pthread_getaffinity_old): Likewise.
4778         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4779         (__pthread_setaffinity_old): Likewise.
4781 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4783         * allocatestack.c (_make_stacks_executable): Call
4784         _dl_make_stack_executable first.
4786 2004-03-24  Roland McGrath  <roland@redhat.com>
4788         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4789         constraint instead of "0".
4791 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4793         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4794         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4796         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4797         code to avoid warning.
4799 2004-03-24  Andreas Jaeger  <aj@suse.de>
4801         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4802         (__pthread_attr_setaffinity_old): Remove const.
4804 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4806         * sysdeps/unix/sysv/linux/smp.h: New file.
4807         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4808         * init.c: Define __is_smp.
4809         (__pthread_initialize_minimal_internal): Call is_smp_system to
4810         initialize __is_smp.
4811         * pthreadP.h: Declare __is_smp.
4812         Define MAX_ADAPTIVE_COUNT is necessary.
4813         * pthread_mutex_init.c: Add comment regarding __spins field.
4814         * pthread_mutex_lock.c: Implement adaptive mutex type.
4815         * pthread_mutex_timedlock.c: Likewise.
4816         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4817         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4818         Add __spins field.
4819         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4820         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4821         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4822         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4823         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4824         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4825         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4826         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4827         lll_mutex_cond_trylock.
4828         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4829         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4830         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4831         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4832         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4833         Define BUSY_WAIT_NOP.
4834         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4835         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4837         * tst-mutex5.c: Add support for testing adaptive mutexes.
4838         * tst-mutex7.c: Likewise.
4839         * tst-mutex5a.c: New file.
4840         * tst-mutex7a.c: New file.
4841         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4843         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4844         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4845         vgettimeofday call might destroy the content.
4847         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4848         @pause in the loop.
4850         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4851         No need to restrict type of ret.  Make it int.  Add comment.
4853         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4854         Remove unnecessary setne instruction.
4856 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4858         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4859         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4860         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4861         If realloc fails, break out of the loop.
4863 2004-03-20  Andreas Jaeger  <aj@suse.de>
4865         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4866         (__pthread_setaffinity_old): Fix interface.
4867         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4868         (__pthread_getaffinity_old): Likewise.
4870         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4871         (__pthread_setaffinity_new): Remove duplicate declaration.
4873 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4875         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4876         the return value to a safe register.
4877         (CDISABLE): Set the function argument correctly.
4879 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4881         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4882         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4883         Rewrite so that only one locked memory operation per round is needed.
4884         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4885         (pthread_barrier_wait): After wakeup, release lock only when the
4886         last thread stopped using the barrier object.
4887         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4888         (__pthread_cond_wait): Don't store mutex address if the current
4889         value is ~0l.  Add correct cleanup support and unwind info.
4890         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4891         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4892         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4893         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4894         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4895         Add correct cleanup support and unwind info.
4896         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4897         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4898         information for syscall wrappers.
4900 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4902         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4903         cpusetsize field, remove next.
4904         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4905         parameter for size of the CPU set.
4906         (pthread_setaffinity_np): Likewise.
4907         (pthread_attr_getaffinity_np): Likewise.
4908         (pthread_attr_setaffinity_np): Likewise.
4909         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4910         interface change, keep compatibility code.
4911         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4912         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4913         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4914         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4915         __pthread_getaffinity_np.
4916         * Versions: Add version for changed interfaces.
4917         * tst-attr3.c: Adjust test for interface change.
4918         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4919         increasing buffer sizes.
4920         * pthread_attr_destroy.c: Remove unused list handling.
4921         * pthread_attr_init.c: Likewise.
4923 2004-03-17  Roland McGrath  <roland@redhat.com>
4925         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4926         first argument to clock_getres so we ever enable kernel timers.
4928 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4930         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4932 2004-03-12  Richard Henderson  <rth@redhat.com>
4934         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4935         oldvalue from CENABLE to CDISABLE.
4937 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4939         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4940         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4941         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4942         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4944 2004-03-11  Richard Henderson  <rth@redhat.com>
4946         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4947         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4948         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4950 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4952         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4953         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4954         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4956 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4958         * forward.c (__pthread_cond_broadcast_2_0,
4959         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4960         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4961         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4963 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4965         * sysdeps/sh/tcb-offsets.sym: Add PID.
4966         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4967         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4969 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4971         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4972         include <sysdep-cancel.h>, vfork is no cancellation point.
4973         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4974         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4975         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4977 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4979         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4980         libc_hidden_def.
4981         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4982         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4983         Likewise.
4984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4985         Likewise.
4986         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4987         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4988         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4989         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4990         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4992         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4993         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4994         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4995         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4996         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4997         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4999         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
5000         a local register for saving old PID.  Negate PID in parent upon exit.
5002         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
5003         tcb-offsets.h.
5004         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5005         before syscall, set to the old value in the parent afterwards.
5006         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
5007         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
5008         tcb-offsets.h.
5009         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
5010         before syscall, set to the old value in the parent afterwards.
5011         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
5012         * sysdeps/s390/tcb-offsets.sym: Add PID.
5014         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
5015         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
5016         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
5017         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
5018         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
5019         * sysdeps/sparc/tcb-offsets.sym: Add PID.
5021 2004-03-10  Andreas Schwab  <schwab@suse.de>
5023         * sysdeps/ia64/tcb-offsets.sym: Add PID.
5024         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
5025         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
5027 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
5029         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
5030         * tst-cancel21.c (do_one_test): Likewise.
5031         Reported by Gordon Jin <gordon.jin@intel.com>.
5033 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
5035         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
5036         if non-zero and set to INT_MIN if zero.
5037         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
5038         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
5039         (SAVE_PID, RESTORE_PID): Define.
5040         (__vfork): Use it.
5041         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
5042         Use relative path to avoid including NPTL i386/vfork.S.
5043         (SAVE_PID, RESTORE_PID): Define.
5044         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
5045         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
5046         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
5047         tst-vfork2x.
5048         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
5049         * tst-vfork1.c: New test.
5050         * tst-vfork2.c: New test.
5051         * tst-vfork1x.c: New test.
5052         * tst-vfork2x.c: New test.
5054 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
5056         * sysdeps/i386/tcb-offsets.sym: Add PID.
5057         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
5058         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
5059         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
5061 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
5063         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
5065 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
5067         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5068         _rtld_global_ro.
5070 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
5072         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
5073         _rtld_global_ro.
5075         * tst-once4.c: Remove unnecessary macro definition.
5077         * tst-mutex7.c (do_test): Limit thread stack size.
5078         * tst-once2.c (do_test): Likewise.
5079         * tst-tls3.c (do_test): Likewise.
5080         * tst-tls1.c (do_test): Likewise.
5081         * tst-signal3.c (do_test): Likewise.
5082         * tst-kill6.c (do_test): Likewise.
5083         * tst-key4.c (do_test): Likewise.
5084         * tst-join4.c (do_test): Likewise.
5085         * tst-fork1.c (do_test): Likewise.
5086         * tst-context1.c (do_test): Likewise.
5087         * tst-cond2.c (do_test): Likewise.
5088         * tst-cond10.c (do_test): Likewise.
5089         * tst-clock2.c (do_test): Likewise.
5090         * tst-cancel10.c (do_test): Likewise.
5091         * tst-basic2.c (do_test): Likewise.
5092         * tst-barrier4.c (do_test): Likewise.
5094 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
5096         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
5098 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
5100         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5101         (__pthread_cond_timedwait): Optimize wakeup test.
5102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5103         (__pthread_cond_wait): Likewise.
5104         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
5105         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5106         Likewise.
5108 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
5110         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5111         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5112         the atomic instruction needed.
5113         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5114         (__lll_mutex_lock_wait): Likewise.
5116 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5118         * Makefile (tests): Add tst-cond14 and tst-cond15.
5119         * tst-cond14.c: New file.
5120         * tst-cond15.c: New file.
5122 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5124         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5125         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5126         needs to be implemented differently to be useful.
5128 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5130         * pthread_attr_setschedparam.c: Don't test priority against limits
5131         here.  Set ATTR_FLAG_SCHED_SET flag.
5132         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5133         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5134         from parent thread to child.  If attribute is used and scheduling
5135         parameters are not inherited, copy parameters from attribute or
5136         compute them.  Check priority value.
5137         * pthread_getschedparam.c: If the parameters aren't known yet get
5138         them from the kernel.
5139         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5140         ATTR_FLAG_POLICY_SET flag for thread.
5141         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5142         and ATTR_FLAG_POLICY_SET.
5144         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5146         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5147         fail if stack address hasn't been set.  Just return 0.
5149 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5151         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5152         libpthread for the files in this list.
5153         (CFLAGS-tst-unload): Removed.
5154         * tst-unload.c (do_test): Don't use complete path for
5155         LIBPHREAD_SO.
5157         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5158         tst-_res1mod2.
5160 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5162         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5163         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5164         operation per round is needed.
5165         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5166         (__lll_mutex_lock_wait): Likewise.
5168 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5170         * tst-cancel9.c (cleanup): Don't print to stderr.
5172 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5174         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5176 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5178         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5179         (__syscall_error_handler2): Call CDISABLE.
5180         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5181         (__syscall_error_handler2): Call CDISABLE.
5183         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5184         Release lock before the loop, don't reacquire it.
5186         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5188 2004-02-19  Andreas Schwab  <schwab@suse.de>
5190         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5191         Fix last change.
5193 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5195         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5196         (pthread_barrier_wait): After wakeup, release lock only when the
5197         last thread stopped using the barrier object.
5198         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5199         (pthread_barrier_wait): Likewise.
5200         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5201         Likewise.
5202         * Makefile (tests): Add tst-barrier4.
5203         * tst-barrier4.c: New file.
5205         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5206         (__pthread_cond_timedwait): Perform timeout test while holding
5207         internal lock to prevent wakeup race.
5208         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5209         * sysdeps/pthread/pthread_cond_timedwait.c
5210         (__pthread_cond_timedwait): Likewise.
5211         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5212         (__pthread_cond_timedwait): Likewise.
5214 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5216         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5217         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5218         * Makefile (tests): Add tst-rwlock13.
5219         * tst-rwlock13.c: New test.
5221 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5223         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5224         (__condvar_tw_cleanup): Little optimization.
5225         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5227 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5229         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5230         libpthread as "lib" parameter to SHLIB_COMPAT.
5231         (__novmx_siglongjmp): Fix typo in function name.
5232         (__novmx_longjmp): Fix typo in function name.
5234 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5236         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5237         __builtin_expect.
5239         * sysdeps/generic/pt-longjmp.c: Moved to...
5240         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5242 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5244         * Makefile (libpthread-routines): Add pt-cleanup.
5245         * pt-longjmp.c: Removed.
5246         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5247         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5248         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5249         Version longjmp, siglongjmp for GLIBC_2.3.4.
5250         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5252 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5254         * sysdeps/pthread/pthread_cond_timedwait.c
5255         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5256         Reuse code.  Add __builtin_expects.
5258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5259         (__pthread_cond_timedwait): Get internal lock in case timeout has
5260         passed before the futex syscall.
5261         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5263 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5265         * allocatestack.c: Pretty printing.
5267         * sysdeps/pthread/createthread.c (create_thread): Don't add
5268         CLONE_DETACHED bit if it is not necessary.
5270 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5272         * pthread_getattr_np.c: Include ldsodefs.h.
5274 2004-01-16  Richard Henderson  <rth@redhat.com>
5276         * allocatestack.c: Don't declare __libc_stack_end.
5277         * init.c (__pthread_initialize_minimal_internal): Likewise.
5278         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5280 2004-01-15  Richard Henderson  <rth@redhat.com>
5282         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5283         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5284         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5285         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5286         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5287         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5288         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5289         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5291 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5293         * init.c (pthread_functions): Make array const.
5295 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5297         * allocatestack.c (__make_stacks_executable): Change interface.
5298         Check parameters.  Pass parameter on to libc counterpart.
5299         * pthreadP.h: Change declaration.
5301 2004-01-13  Richard Henderson  <rth@redhat.com>
5303         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5304         prototype form.
5305         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5306         Likewise.
5308         * sysdeps/alpha/Makefile: New file.
5309         * sysdeps/alpha/tcb-offsets.sym: New file.
5310         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5311         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5313         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5314         on powerpc version.
5316 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5318         * Makefile (tests): Add tst-backtrace1.
5319         * tst-backtrace1.c: New test.
5321 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5323         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5324         register as second parameter to the REGISTER macro.
5325         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5326         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5327         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5328         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5329         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5330         of thread register as second parameter to REGISTER macro in 64 case.
5332 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5334         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5335         (CFLAGS-getpid.o): Defined.
5336         (CFLAGS-getpid.os): Defined.
5338 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5340         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5341         returned for main thread does not overlap with any other VMA.
5342         Patch by Jakub Jelinek.
5344 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5346         * tst-raise1.c: Include stdio.h.
5348 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5350         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5351         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5352         If pid is 0, set it to selftid.
5353         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5354         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5355         != 0, return self->tid without doing a syscall.
5356         * descr.h (struct pthread): Move pid field after tid.
5358         * Makefile (tests): Add tst-raise1.
5359         * tst-raise1.c: New file.
5361 2003-12-23  Roland McGrath  <roland@redhat.com>
5363         * tst-oddstacklimit.c: New file.
5364         * Makefile (tests): Add it.
5365         (tst-oddstacklimit-ENV): New variable.
5367         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5368         value up to page size for __default_stacksize.
5370 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5372         * Makefile (tests): Add tst-eintr5.
5373         * tst-eintr5.c: New file.
5375         * eintr.c (eintr_source): Prevent sending signal to self.
5377         * tst-eintr2.c (tf1): Improve error message.
5379 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5381         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5382         * sysdeps/unix/sysv/linux/getpid.c: New file.
5383         * pthread_cancel.c: Add comment explaining use of PID field.
5384         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5385         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5386         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5387         temporarily to signal the field must not be relied on and updated
5388         by getpid().
5389         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5390         temporarily negative.
5391         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5393 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5395         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5396         (eintr_source): If ARG != NULL, use pthread_kill.
5397         * tst-eintr1.c: Adjust for this change.
5398         * tst-eintr2.c: Likewise.
5399         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5400         * tst-eintr3.c: New file.
5401         * tst-eintr4.c: New file.
5403 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5405         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5406         if CANCELSTATE_BITMASK is set.
5407         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5408         Likewise.
5410         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5411         (tests-reverse): Add tst-cancel23.
5412         * tst-cancel22.c: New test.
5413         * tst-cancel23.c: New test.
5415 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5417         * tst-eintr1.c: Better error messages.
5419         * Makefile (tests): Add tst-eintr2.
5420         * tst-eintr2.c: New file.
5422 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5424         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5425         (CFLAGS-tst-cancelx21.c): Set.
5426         * tst-cancel21.c: New test.
5427         * tst-cancelx21.c: New test.
5429         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5430         comparison operand.
5431         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5432         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5433         * pt-longjmp.c: Include jmpbuf-unwind.h.
5434         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5435         _JMPBUF_UNWINDS.  Adjust compared pointers.
5436         * init.c (__pthread_initialize_minimal_internal): Initialize
5437         pd->stackblock_size.
5438         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5439         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5440         * sysdeps/i386/jmpbuf-unwind.h: New file.
5441         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5442         * sysdeps/s390/jmpbuf-unwind.h: New file.
5443         * sysdeps/sh/jmpbuf-unwind.h: New file.
5444         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5445         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5446         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5447         (_JMPBUF_CFA_UNWINDS): Remove.
5448         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5450 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5452         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5453         (CFLAGS-tst-cancelx20.c): Set.
5454         * tst-cancel20.c: New test.
5455         * tst-cancelx20.c: New test.
5457 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5459         * init.c (__pthread_initialize_minimal_internal): Don't treat
5460         architectures with separate register stack special here when
5461         computing default stack size.
5463 2003-12-17  Roland McGrath  <roland@redhat.com>
5465         * Makefile (tst-cancelx7-ARGS): New variable.
5466         Reportd by Greg Schafer <gschafer@zip.com.au>.
5468 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5470         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5471         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5472         (tst-stack3-ENV): Set.
5473         ($(objpfx)tst-stack3-mem): New.
5474         * tst-stack3.c: New test.
5476 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5478         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5479         Add unwind directives.  Drop unused .regstk directive.
5480         (_fini_EPILOG_BEGINS): Add unwind directives.
5482 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5484         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5485         Assume parameter is a pointer.
5486         (lll_futex_wake): Likewise.
5487         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5488         Likewise.
5489         (lll_futex_wake): Likewise.
5490         Reported by Boris Hu.
5491         * sysdeps/unix/sysv/linux/unregister-atfork.c
5492         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5494         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5496 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5498         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5499         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5500         __rtld_lock_initialize for ld.so lock.
5501         Patch in part by Adam Li <adam.li@intel.com>.
5503 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5505         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5506         in $(gnulib).  Also, remove stale comment.
5508 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5510         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5511         advantage of new syscall stub and optimize accordingly.
5513         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5514         from SYS_futex, to match expectations of
5515         sysdep.h:DO_INLINE_SYSCALL.
5516         (lll_futex_clobbers): Remove.
5517         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5518         (lll_futex_wake): Likewise.
5519         (lll_futex_requeue): Likewise.
5520         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5521         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5522         Jelinek).
5523         (__lll_mutex_lock): Likewise.
5524         (__lll_mutex_cond_lock): Likewise.
5525         (__lll_mutex_timed_lock): Likewise.
5526         (__lll_mutex_unlock): Likewise.
5527         (__lll_mutex_unlock_force): Likewise.
5529         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5530         comes before the include of <sysdep.h>.
5531         (THREAD_SELF_SYSINFO): New macro.
5532         (THREAD_SYSINFO): Likewise.
5533         (INIT_SYSINFO): New macro.
5534         (TLS_INIT_TP): Call INIT_SYSINFO.
5536         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5538         * sysdeps/pthread/createthread.c (create_thread): Use
5539         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5540         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5541         THREAD_SELF_SYSINFO instead of open code.
5542         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5543         (THREAD_SYSINFO): Likewise.
5545         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5547         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5549 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5551         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5552         instead of .init.  Patch by David Mosberger.
5554 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5556         * sysdeps/pthread/configure.in: Remove broken declaration in C
5557         cleanup handling check.
5559 2003-11-30  Andreas Jaeger  <aj@suse.de>
5561         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5562         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5563         Likewise.
5565 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5567         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5568         * pthread_attr_destroy.c: Include shlib-compat.h.
5569         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5570         is set in iattr->flags.
5571         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5573 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5575         * Makefile (distribute): Add tst-cleanup4aux.c.
5577         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5578         include.
5580 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5582         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5583         pthread_cond_signal.
5585         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5586         store mutex address if the current value is ~0l.
5587         * sysdeps/pthread/pthread_cond_timedwait.c
5588         (__pthread_cond_timedwait): Likewise.
5589         * sysdeps/pthread/pthread_cond_broadcast.c
5590         (__pthread_cond_broadcast): Don't use requeue for pshared
5591         condvars.
5593         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5594         (__pthread_cond_wait): Don't store mutex address if the current
5595         value is ~0l.
5596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5597         (__pthread_cond_timedwait): Likewise.
5598         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5599         (__pthread_cond_broadcast): Don't use requeue for pshared
5600         condvars.
5602         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5603         element with ~0l for pshared condvars, with NULL otherwise.
5605         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5606         (__pthread_cond_wait): Don't store mutex address if the current
5607         value is ~0l.
5608         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5609         (__pthread_cond_timedwait): Likewise.
5610         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5611         (__pthread_cond_broadcast): Don't use requeue for pshared
5612         condvars.
5614         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5615         * tst-cond12.c: New file.
5616         * tst-cond13.c: New file.
5618 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5620         * sysdeps/pthread/configure.in: Make missing forced unwind support
5621         fatal.
5623 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5625         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5627 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5629         * Makefile: Add magic to clean up correctly.
5631 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5633         * unwind.c (FRAME_LEFT): Define.
5634         (unwind_stop): Handle old style cleanups here.
5635         (__pthread_unwind): Handle old style cleanups only if
5636         !HAVE_FORCED_UNWIND.
5637         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5638         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5639         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5640         ($(objpfx)tst-cleanupx4): Likewise.
5641         * tst-cleanup4.c: New test.
5642         * tst-cleanup4aux.c: New.
5643         * tst-cleanupx4.c: New test.
5645 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5647         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5648         lll_mutex_*lock macros to skip atomic operations on some archs.
5650 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5652         * sysdeps/pthread/tst-timer.c (main): Initialize
5653         sigev2.sigev_value as well.
5655 2003-10-15  Roland McGrath  <roland@redhat.com>
5657         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5658         is missing.
5659         * sysdeps/pthread/configure: Regenerated.
5661 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5663         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5664         locking macros.  No distinction between normal and mutex locking
5665         anymore.
5666         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5667         Merge bits from lowlevelmutex.S we still need.
5668         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5669         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5670         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5671         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5672         new mutex implementation.
5673         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5674         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5675         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5676         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5679         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5680         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5681         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5682         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5683         symbol for entry point to avoid cancellation.
5685 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5687         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5688         changes.
5689         (SAVE_OLDTYPE_0): Fix a typo.
5691 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5693         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5694         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5696 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5698         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5699         correct offset.
5701 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5703         * Makefile (tests): Add tst-cancel19.
5704         * tst-cancel19.c: New test.
5706 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5708         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5709         restoring of the old cancellation type.
5711 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5713         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5715 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5717         * sysdeps/pthread/malloc-machine.h: New file
5719 2003-09-24  Roland McGrath  <roland@redhat.com>
5721         * allocatestack.c (__make_stacks_executable): Don't ignore return
5722         value from _dl_make_stack_executable.
5724 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5726         * allocatestack.c (__make_stacks_executable): Also change
5727         permission of the currently unused stacks.
5729         * allocatestack.c (change_stack_perm): Split out from
5730         __make_stacks_executable.
5731         (allocate_stack): If the required permission changed between the time
5732         we started preparing the stack and queueing it, change the permission.
5733         (__make_stacks_executable): Call change_stack_perm.
5735         * Makefile: Build tst-execstack-mod locally.
5736         * tst-execstack-mod.c: New file.
5738 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5740         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5742 2003-09-23  Roland McGrath  <roland@redhat.com>
5744         * tst-execstack.c: New file.
5745         * Makefile (tests): Add it.
5746         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5747         (LDFLAGS-tst-execstack): New variable.
5749         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5750         whether to use PROT_EXEC for stack mmap.
5751         (__make_stacks_executable): New function.
5752         * pthreadP.h: Declare it.
5753         * init.c (__pthread_initialize_minimal_internal): Set
5754         GL(dl_make_stack_executable_hook) to that.
5756 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5758         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5759         recommendation from AMD re avoidance of lock prefix.
5761 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5763         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5764         lll_futex_timed_wait instead of lll_futex_wait.
5765         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5766         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5767         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5768         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5769         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5770         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5771         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5772         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5773         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5774         Completely revamp the locking macros.  No distinction between
5775         normal and mutex locking anymore.
5776         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5777         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5778         __lll_lock_timedwait): Fix prototypes.
5779         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5780         __lll_lock_timedwait): Likewise.
5781         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5782         macros, add __builtin_expect.
5783         (lll_mutex_timedlock): Likewise.  Fix return value.
5784         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5785         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5786         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5787         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5788         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5789         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5790         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5791         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5793 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5795         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5796         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5797         operation if possible.
5799         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5800         like jumping over the lock prefix.
5802 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5804         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5805         locking macros.  No distinction between normal and mutex locking
5806         anymore.
5807         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5808         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5809         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5810         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5811         locking.  Merge bits from lowlevelmutex.S we still need.
5812         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5813         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5814         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5815         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5816         * Makefile (routines): Remove libc-lowlevelmutex.
5817         (libpthread-rountines): Remove lowlevelmutex.
5818         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5819         for new mutex implementation.
5820         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5821         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5822         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5823         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5824         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5825         Likewise.
5826         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5827         Likewise.
5828         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5829         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5830         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5831         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5834         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5835         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5836         Likewise.
5837         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5838         Likewise.
5839         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5840         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5841         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5842         Don't use requeue.
5843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5844         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5846 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5848         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5849         in parameters of asm with output parameters.
5851         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5852         type of DECR parameter to int.
5853         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5855 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5857         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5858         guardsize for each thread.
5860 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5862         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5863         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5864         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5866         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5867         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5868         NULL.
5869         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5870         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5871         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5872         (pthread_getaffinity_np): Add hidden_def.
5874         * Makefile (tests): Add tst-attr3.
5875         * tst-attr3.c: New test.
5877         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5879 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5881         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5882         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5884 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5886         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5887         * tst-align.c: Include tst-stack-align.h.
5888         (tf, do_test): Use TEST_STACK_ALIGN macro.
5890 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5892         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5893         variable.
5895 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5897         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5898         stack-related values for the initial thread.
5900 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5902         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5904 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5906         * pthread_mutex_lock.c: Minor code rearrangements.
5908 2003-09-05  Roland McGrath  <roland@redhat.com>
5910         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5911         Instead, include ../nptl_db/db_info.c to do its magic.
5912         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5913         (__pthread_pthread_key_2ndlevel_size): Likewise.
5914         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5915         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5916         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5917         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5918         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5919         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5920         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5921         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5922         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5923         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5924         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5925         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5926         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5927         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5928         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5929         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5930         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5932 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5934         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5935         of pthread_t to be compatible with LT.
5936         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5937         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5938         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5939         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5940         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5941         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5942         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5944 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5946         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5948 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5950         * unwind-forcedunwind.c: Move to...
5951         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5952         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5953         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5954         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5955         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5956         * unwind.c: Include jmpbuf-unwind.h.
5957         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5959 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5961         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5962         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5963         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5964         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5965         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5966         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5967         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5968         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5969         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5970         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5971         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5972         function.
5973         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5974         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5975         * Makefile (tests): Add tst-stack2.
5976         * tst-stack2.c: New test.
5977         * tst-stack1.c: Include limits.h and sys/param.h.
5978         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5980         * pthread_condattr_setpshared.c: Include errno.h.
5981         (pthread_condattr_setpshared): Return EINVAL if pshared
5982         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5984         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5985         defined symbol for entry point to avoid cancellation.
5986         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5987         Likewise.
5988         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5989         Likewise.
5990         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5991         Likewise.
5992         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5993         Likewise.
5994         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5995         Likewise.
5996         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5997         __close_nocancel, __read_nocancel, __write_nocancel,
5998         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5999         libpthread.so or librt.so, define to corresponding function
6000         without _nocancel suffix.
6001         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
6002         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
6003         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
6005         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
6007 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
6009         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
6010         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
6012         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
6013         in subsections has a symbol associated with it.
6015         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
6016         defined symbol for entry point to avoid cancellation.
6017         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
6019 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6021         * Makefile (tests): Add tst-tls5.
6022         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
6023         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
6024         ($(objpfx)tst-tls5): New.
6025         ($(objpfx)tst-tls6.out): Likewise.
6026         (tests): Depend on $(objpfx)tst-tls6.out.
6027         * tst-tls3.c: Include stdint.h and pthreaddef.h.
6028         (do_test): Check pthread_self () return value alignment.
6029         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
6030         (tf): Check pthread_self () return value alignment.
6031         * tst-tls5.c: New test.
6032         * tst-tls5.h: New.
6033         * tst-tls5mod.c: New.
6034         * tst-tls5moda.c: New.
6035         * tst-tls5modb.c: New.
6036         * tst-tls5modc.c: New.
6037         * tst-tls5modd.c: New.
6038         * tst-tls5mode.c: New.
6039         * tst-tls5modf.c: New.
6040         * tst-tls6.sh: New test.
6042         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
6043         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
6044         * init.c (pthread_functions): Initialize them.
6045         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
6046         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
6047         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
6048         pthread_cond_timedwait@@GLIBC_2.3.2.
6050 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
6052         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
6053         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
6054         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
6055         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
6056         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
6057         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
6059         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
6061         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
6062         _POSIX_THREAD_PRIORITY_SCHEDULING.
6063         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
6065 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
6067         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
6068         nested function, use static inline function from libio.h.
6069         Code by Richard Henderson.
6071         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
6072         weak.
6074 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
6076         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
6077         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
6078         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
6079         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
6080         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
6081         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
6082         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
6083         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
6084         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
6085         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
6086         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
6087         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
6088         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
6089         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
6090         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
6091         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
6092         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
6093         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
6094         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
6095         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
6096         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
6097         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
6098         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
6099         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
6100         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
6101         * sysdeps/sparc/tls.h: New file.
6102         * sysdeps/sparc/tcb-offsets.sym: New file.
6103         * sysdeps/sparc/Makefile: New file.
6104         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
6105         * init.c [__sparc__] (__NR_set_tid_address): Define.
6107 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
6109         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
6110         _IO_release_lock): Define.
6112 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6114         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6115         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6117 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6119         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6120         (__pthread_cleanup_class): Add missing return types of member
6121         functions.
6123 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6125         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6126         (lll_mutex_unlock_force): Add memory barrier between store and futex
6127         syscall.
6129 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6131         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6132         tempmsg in first loop.
6134 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6136         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6137         _POSIX_THREAD_PRIORITY_SCHEDULING.
6138         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6140 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6142         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6143         (__rtld_lock_default_lock_recursive,
6144         __rtld_lock_default_unlock_recursive): Define.
6145         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6146         __rtld_lock_unlock_recursive): Define using
6147         GL(_dl_rtld_*lock_recursive).
6148         * init.c (__pthread_initialize_minimal_internal): Initialize
6149         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6150         Lock GL(_dl_load_lock) the same number of times as
6151         GL(_dl_load_lock) using non-mt implementation was nested.
6153         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6154         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6156 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6158         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6159         PIPE_BUF.
6161 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6163         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6165 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6167         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6168         to first syscall error check.  Move syscall error check for tkill
6169         into __ASSUME_CLONE_STOPPED #ifdef.
6171 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6173         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6174         is not defined, do explicit synchronization.
6175         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6176         is not defined also unlock pd->lock for non-debugging case in case
6177         it is necessary.
6178         * pthread_create.c (start_thread): Always get and release pd->lock
6179         if __ASSUME_CLONE_STOPPED is not defined.
6180         (start_thread_debug): Removed.  Adjust users.
6181         * allocatestack.c (allocate_stack): Always initialize lock if
6182         __ASSUME_CLONE_STOPPED is not defined.
6183         * Makefile (tests): Add tst-sched1.
6184         * tst-sched1.c: New file.
6186         * sysdeps/pthread/createthread.c (do_clone): Only use
6187         sched_setschduler and pass correct parameters.
6189 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6191         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6192         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6193         PTHREAD_STACK_MIN in comments.
6195 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6197         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6198         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6199         argument.
6200         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6201         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6202         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6203         (__pthread_cleanup_upto): Fix prototype.
6204         (_longjmp_unwind): Adjust caller.
6205         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6206         Change second argument to const struct pointer.
6207         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6208         * tst-sem9.c (main): Likewise.
6209         * unwind.c: Include string.h for strlen prototype.
6211 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6213         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6214         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6215         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6216         Define HAVE_CMOV.
6217         Patch by Nicholas Miell <nmiell@attbi.com>.
6219 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6221         * init.c (__pthread_initialize_minimal_internal): Initialize
6222         GL(dl_init_static_tls).
6223         * pthreadP.h (__pthread_init_static_tls): New prototype.
6224         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6225         New functions.
6226         * Makefile (tests): Add tst-tls4.
6227         (modules-names): Add tst-tls4moda and tst-tls4modb.
6228         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6229         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6230         tst-tls4modb.so.
6231         * tst-tls4.c: New file.
6232         * tst-tls4moda.c: New file.
6233         * tst-tls4modb.c: New file.
6235 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6237         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6238         before __timer_dealloc.
6239         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6240         Don't call list_unlink.
6242 2003-07-29  Roland McGrath  <roland@redhat.com>
6244         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6246 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6248         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6249         Don't reuse struct aiocb A if it failed.
6250         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6251         not just one byte, as that does not block.
6253 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6255         * sysdeps/pthread/unwind-resume.c: New file.
6256         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6257         unwind-resume in csu subdir.
6258         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6259         exceptions.
6260         (librt-sysdep_routines, librt-shared-only-routines): Add
6261         rt-unwind-resume.
6262         * sysdeps/pthread/rt-unwind-resume.c: New file.
6263         * unwind-forcedunwind.c: New file.
6264         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6265         (libpthread-shared-only-routines): Likewise.
6266         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6267         * pthreadP.h (pthread_cancel_init): New prototype.
6268         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6270         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6271         attr argument const struct pthread_attr *.
6273         * res.c (__res_state): Return __resp.
6274         * descr.h: Include resolv.h.
6275         (struct pthread): Add res field.
6276         * pthread_create.c: Include resolv.h.
6277         (start_thread): Initialize __resp.
6278         * Makefile (tests): Add tst-_res1.
6279         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6280         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6281         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6282         libpthread.
6283         * tst-_res1.c: New file.
6284         * tst-_res1mod1.c: New file.
6285         * tst-_res1mod2.c: New file.
6287 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6289         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6291         * Makefile: Define various *-no-z-defs variables for test DSOs
6292         which has undefined symbols.
6294 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6296         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6297         Retry if the stwcx fails to store once_control.
6299 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6301         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6302         pthread_attr_setaffinity.
6303         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6304         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6305         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6306         * pthread_attr_destroy.c: Free cpuset element if allocated.
6307         * pthread_create.c: Pass iattr as additional parameter to
6308         create_thread.
6309         * sysdeps/pthread/createthread.c: If attribute is provided and
6310         a new thread is created with affinity set or scheduling parameters,
6311         start thread with CLONE_STOPPED.
6312         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6313         pthread_attr_setaffinity.
6314         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6315         cpuset element.
6317 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6319         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6321 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6323         * sysdeps/pthread/configure.in: Require CFI directives also for
6324         ppc and s390.
6326 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6328         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6329         Add cfi directives.
6331 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6333         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6334         CLEANUP_JMP_BUF.
6335         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6336         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6337         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6338         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6339         not self pointer in __writer.  Compare with TID to determine
6340         deadlocks.
6341         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6342         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6343         Likewise.
6344         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6345         Likewise.
6346         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6347         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6348         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6349         macros also when compiling librt.
6351 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6353         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6354         -fasynchronous-unwind-tables.
6355         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6356         (PSEUDO): Add cfi directives.
6357         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6358         Likewise.
6359         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6360         Likewise.
6362 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6364         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6365         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6366         * unwind.c (__pthread_unwind_next): Add hidden_def.
6367         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6368         Likewise.
6369         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6370         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6371         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6372         Likewise.
6373         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6374         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6375         Likewise.
6376         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6377         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6378         __pthread_unregister_cancel and __pthread_unwind_next.
6380 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6382         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6383         different symbol for the cancellation syscall wrapper and
6384         non-cancellation syscall wrapper.
6385         (PSEUDO_END): Define.
6387 2003-07-05  Richard Henderson  <rth@redhat.com>
6389         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6390         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6391         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6392         return actual return value from the syscall, not 0.
6394 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6396         * descr.h (struct pthread): Add pid field.
6397         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6398         (__reclaim_stacks): Likewise.
6399         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6400         also check for PID of the signal source.
6401         (__pthread_initialize_minimal_internal): Also initialize pid field
6402         of initial thread's descriptor.
6403         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6404         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6405         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6406         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6407         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6409 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6411         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6412         Fix use of parameter.
6413         (__libc_cleanup_pop): Likewise.
6415 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6417         * init.c (sigcancel_handler): Change parameters to match handler
6418         for SA_SIGACTION.  Check signal number and code to recognize
6419         invalid invocations.
6421 2003-07-03  Roland McGrath  <roland@redhat.com>
6423         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6424         Apply sizeof (struct pthread) bias to r13 value.
6426 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6428         * sysdeps/pthread/configure.in: Require CFI directives.
6430         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6431         definition.
6432         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6433         libpthread compilation.
6434         * unwind.c (__pthread_unwind): Add hidden_def.
6435         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6437 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6439         * libc-cancellation.c (__libc_cleanup_routine): Define.
6440         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6441         (__pthread_cleanup_pop): Define.
6443 2003-07-01  Richard Henderson  <rth@redhat.com>
6445         * sysdeps/alpha/elf/pt-initfini.c: New file.
6446         * sysdeps/alpha/pthread_spin_lock.S: New file.
6447         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6448         * sysdeps/alpha/pthreaddef.h: New file.
6449         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6450         * sysdeps/alpha/tls.h: New file.
6451         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6452         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6453         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6454         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6455         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6456         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6457         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6458         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6459         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6460         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6462 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6464         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6465         cleanup support and unwind info.
6467 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6469         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6470         Use correct cleanup handler registration.  Add unwind info.
6471         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6472         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6473         * tst-once3.c: Add cleanup handler and check it is called.
6474         * tst-once4.c: Likewise.
6475         * tst-oncex3.c: New file.
6476         * tst-oncex4.c: New file.
6477         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6479 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6481         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6483 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6485         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6486         (tf_msgsnd): Likewise.
6488         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6489         premature returns a bit more.
6491 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6493         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6494         definition to the front.
6496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6497         the cleanup functions to make the names unique.  Fix dwarf opcode
6498         un unwind table.
6499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6500         functions to make the names unique.  Fix CFA offset for two blocks.
6502 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6504         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6505         missing closing braces.
6506         Patch by Christophe Saout <christophe@saout.de>.
6508 2003-06-24  Roland McGrath  <roland@redhat.com>
6510         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6512 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6514         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6515         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6517         * pthreadP.h: Declare __find_thread_by_id.
6518         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6519         * pthread_clock_gettime.c: Allow using other thread's clock.
6520         * pthread_clock_settime.c: Likewise.
6521         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6522         * Makefile: Add rules to build and run tst-clock2.
6523         * tst-clock2.c: New file.
6525 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6527         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6528         to use exception-based cleanup handler.
6529         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6531         * tst-cond8.c (ch): Announce that we are done.
6533         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6535         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6536         Also test aio_suspend with timeout value.
6538 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6540         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6541         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6542         attribute_hidden.
6544         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6545         (__pthread_mutex_lock_internal): Likewise.
6546         (__pthread_mutex_unlock_internal): Likewise.
6547         (__pthread_mutex_unlock_usercnt): Declare.
6548         * pthread_mutex_destroy.c: Always fail if used in any way.
6549         * pthread_mutex_init.c: Update comment.
6550         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6551         * pthread_mutex_timedlock.c: Adjust __nusers.
6552         * pthread_mutex_trylock.c: Adjust __nusers.
6553         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6554         and public interfaces are wrapper with pass additional parameter.
6555         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6556         parameter zero.
6557         * tst-mutex8.c: New file.
6558         * Makefile (tests): Add tst-mutex8.
6559         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6560         __pthread_mutex_unlock_usercnt.
6561         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6562         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6563         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6564         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6565         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6566         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6567         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6568         Add __nusers.
6569         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6570         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6571         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6572         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6573         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6575         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6576         * pthread_mutex_timedlock.c: Likewise.
6577         * pthread_mutex_trylock.c: Adjust __nusers.
6578         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6579         * tst-mutex9.c: New file.
6580         * Makefile (tests): Add tst-mutex9.
6581         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6582         * sysdeps/ia64/tls.h: Likewise.
6583         * sysdeps/powerpc/tls.h: Likewise.
6584         * sysdeps/s390/tls.h: Likewise.
6585         * sysdeps/sh/tls.h: Likewise.
6586         * sysdeps/x86_64/tls.h: Likewise.
6587         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6588         Change type of __owner.
6589         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6590         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6591         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6592         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6593         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6595 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6597         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6598         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6600         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6601         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6602         instead of nr to lll_futex_wake.  Only set errno and return -1
6603         if err < 0.
6605         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6606         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6607         return actual return value from the syscall, not 0.
6609 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6611         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6612         find a random value.
6613         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6614         errno==EIDRM.
6616         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6617         compat_timer_settime.
6618         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6619         compat_timer_gettime.
6620         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6621         compat_timer_getoverrun.
6622         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6623         compat_timer_delete.
6625         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6626         error-checking mutex detect busy mutexes.
6628 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6630         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6631         Add ax to clobber list.
6632         (lll_mutex_cond_lock): Likewise.
6633         (lll_mutex_unlock): Likewise.
6634         (lll_lock): Likewise.
6635         (lll_unlock): Likewise.
6637         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6638         * tst-cancel18.c: New file.
6639         * tst-cancelx18.c: New file.
6641         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6642         and tcdrain.
6644         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6645         * tst-cancel17.c: New file.
6646         * tst-cancelx17.c: New file.
6648         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6649         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6650         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6652         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6654 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6656         * sysdeps/pthread/createthread.c (create_thread): Set
6657         header.multiple_threads unconditionally.
6658         * allocatestack.c (allocate_stack): Likewise.
6659         * descr.h (struct pthread): Add header.multiple_threads
6660         unconditionally.
6661         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6662         Define for librt.  #error if neither libpthread, libc nor librt.
6663         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6664         Likewise.
6665         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6666         CDISABLE): Likewise.
6667         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6668         CDISABLE): Likewise.
6669         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6670         CDISABLE): Likewise.
6671         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6672         CDISABLE): Likewise.  Access header.multiple_threads outside of
6673         libc and libpthread.
6674         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6675         Likewise.
6676         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6677         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6679 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6681         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6682         Also test early cancellation before the thread reaches the cancellation
6683         point.
6685         * Makefile: Compile forward.c with exceptions.
6687         * sysdeps/unix/sysv/linux/sleep.c: New file.
6689 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6691         * Makefile: Add CFLAGS definition to compile function wrappers
6692         duplicated from libc with exceptions.
6693         * tst-cancel4.c: Also check cancellation handlers.
6695         * Makefile: Add rules to build and run tst-cancel16 and
6696         tst-cancelx16.  Add missing CFLAGS definitions.
6697         * tst-cancel16.c: New file.
6698         * tst-cancelx16.c: New file.
6700 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6702         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6703         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6704         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6705         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6707         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6708         (LIBC_CANCEL_RESET): Likewise.
6709         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6710         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6711         librt-cancellation.
6712         (CFLAGS-libcrt-cancellation.c): Define.
6713         * sysdeps/pthread/librt-cancellation.c: New file.
6714         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6715         macros also when compiling librt.
6716         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6717         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6718         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6719         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6720         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6721         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6722         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6724         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6725         compat_timer_create.
6727 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6729         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6731         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6732         __register_atfork.
6733         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6734         Add libc_hidden_def.
6736 2003-06-13  Roland McGrath  <roland@redhat.com>
6738         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6739         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6741 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6743         * allocatestack.c (queue_stack): Always inline.
6744         * ptreadhP.h (__do_cancel): Likewise.
6746 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6748         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6749         a typo.
6751 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6753         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6754         (__pthread_cond_signal): Remove incorrect second addition for
6755         cond_lock!=0.
6757 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6759         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6760         (__pthread_cond_signal): Use correct futex pointer in
6761         __lll_mutex_lock_wait call.
6763         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6764         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6766 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6768         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6769         cancelable.
6770         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6771         Likewise.
6773         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6774         hand-written CFI generation code.  Since ENTRY/END also initiated
6775         CFI frames this caused two CFI sets to be generated.
6777 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6779         * cleanup_routine.c: New file.
6780         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6781         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6782         cleanup handling.
6783         * Makefile (libpthread-routines): Add cleanup_routine.
6784         Add more CFLAGS variables to compile with exceptions.  Add comments
6785         why which file needs unwind tables.
6786         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6787         tests.
6788         * tst-cancelx1.c: New file.
6789         * tst-cancelx2.c: New file.
6790         * tst-cancelx3.c: New file.
6791         * tst-cancelx4.c: New file.
6792         * tst-cancelx5.c: New file.
6793         * tst-cancelx6.c: New file.
6794         * tst-cancelx7.c: New file.
6795         * tst-cancelx8.c: New file.
6796         * tst-cancelx9.c: New file.
6797         * tst-cancelx10.c: New file.
6798         * tst-cancelx11.c: New file.
6799         * tst-cancelx12.c: New file.
6800         * tst-cancelx13.c: New file.
6801         * tst-cancelx14.c: New file.
6802         * tst-cancelx15.c: New file.
6803         * tst-cleanupx0.c: New file.
6804         * tst-cleanupx0.expect: New file.
6805         * tst-cleanupx1.c: New file.
6806         * tst-cleanupx2.c: New file.
6807         * tst-cleanupx3.c: New file.
6809         * tst-cleanup0.c: Make standard compliant.
6810         * tst-cleanup1.c: Likewise.
6812         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6813         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6814         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6815         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6816         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6817         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6818         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6819         CLEANUP_JMP_BUF.
6820         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6821         * tst-cancel12.c: New file.
6822         * tst-cancel13.c: New file.
6823         * tst-cancel14.c: New file.
6824         * tst-cancel15.c: New file.
6825         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6826         and tst-cancel15.
6828         * tst-cancel1.c: Add some comments.
6830         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6831         timeout correctly.
6833 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6835         * Makefile (CFLAGS-pthread_cancel.c): Define.
6837 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6839         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6840         Change type of __writer element to int.
6841         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6842         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6843         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6844         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6845         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6846         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6847         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6848         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6849         Compare with TID to determine deadlocks.
6850         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6851         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6852         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6853         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6854         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6855         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6856         Likewise.
6857         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6858         Likewise.
6859         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6860         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6861         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6862         Likewise.
6863         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6864         Likewise.
6865         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6866         * Makefile (tests): Add tst-rwlock12.
6867         * tst-rwlock12.c: New file.
6869 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6871         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6872         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6873         Remove bogus hidden_proto.
6874         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6875         Likewise.
6876         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6877         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6878         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6879         ___lll_mutex_timedlock): Likewise.
6881 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6884         (__pthread_cond_signal): Add some code to eventually handle
6885         cond_lock!=0.
6887 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6889         * Makefile (tests): Add tst-exec4.
6890         (tst-exec4-ARGS): Define.
6891         * tst-exec4.c: New file.
6893 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6895         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6896         Also fail if tv_nsec < 0.
6897         (__lll_timedwait_tid): Likewise.
6898         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6899         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6900         Likewise.
6901         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6902         Likewise.
6903         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6904         Likewise.
6905         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6906         Likewise.
6907         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6908         Likewise.
6909         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6910         Likewise.
6912         * Makefile (tests): Add tst-sem8 and tst-sem9.
6913         * tst-sem8.c: New file.
6914         * tst-sem9.c: New file.
6915         * sem_open.c: Fix creation of in_use record if the file exists but
6916         no internal record.
6918         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6919         definitions.
6921         * sysdeps/pthread/timer_create.c (timer_create): In case
6922         evp==NULL, assign timer ID to sival_ptr.
6924         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6925         struct pthread_unwind_buf *.
6926         (struct pthread): Likewise for cleanup_jmp_buf element.
6928         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6929         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6930         * unwind.c (__pthread_unwind_next): Likewise.
6932 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6934         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6935         (lll_futex_timed_wait): Use int for futex value parameter.
6936         (lll_futex_wake): Likewise.
6937         (lll_futex_requeue): Likewise.
6939         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6940         Replace one memory operation with one register operation.
6942         * tst-join4.c (do_test): Fix error message.
6944         * tst-rwlock6.c (do_test): Use correct format specifier.
6946         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6947         (__lll_mutex_lock_wait): Replace one memory operation with one
6948         register operation.
6949         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6950         (__lll_mutex_lock_wait): Likewise.
6952         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6953         (__lll_mutex_cond_lock): Add one to value parameter of
6954         __lll_lock_wait to reflect reality in the futex syscall.
6955         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6956         (lll_mutex_cond_lock): Likewise.
6958 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6960         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6961         New function.
6962         (lll_mutex_cond_lock): Define.
6964 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6966         * Makefile (tests): Add tst-signal6.
6967         * tst-signal6.c: New file.
6969         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6970         (__lll_mutex_unlock_force): New function
6971         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6973         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6974         (__lll_mutex_unlock_force): New function.
6975         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6977         * tst-rwlock7.c (do_test): Use correct format specifier.
6979         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6980         Find break parameter in correct asm argument.
6982 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6984         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6985         Remove out4.
6986         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6987         error occured.
6988         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6989         Add __mutex.
6990         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6991         lll_futex_requeue, lll_mutex_unlock_force): Define.
6993 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6995         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6996         (pthread_cond_t): Add __mutex.
6997         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6998         lll_futex_requeue, lll_mutex_unlock_force): Define.
7000 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7002         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
7003         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
7004         Add __mutex field.
7005         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
7006         Define.
7007         (lll_futex_wait, lll_futex_wake): Define.
7008         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
7009         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
7010         FUTEX_REQUEUE instead of FUTEX_WAIT.
7011         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
7012         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
7013         mutex which was used in condvar structure.  Call
7014         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
7015         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
7017         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
7018         include tcb-offsets.h.  Read wakeup value in locked region.
7019         Use the value of gbr register as THREAD_ID.
7020         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7021         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7022         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7024         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
7025         macros.
7027 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
7029         * sysdeps/pthread/pthread_cond_broadcast.c
7030         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
7032 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
7034         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
7035         typo in register name.
7036         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
7037         correctly.  Actually use requeue.  Little optimization.
7038         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
7039         mutex address early.  Handle cancellation state as 32-bit value.
7040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7041         Remove unnecessary label.
7043 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
7045         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
7046         instead of FUTEX_WAIT.
7047         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
7048         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
7049         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
7050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
7051         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7052         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
7053         used in condvar structure.  Call __pthread_mutex_cond_lock instead
7054         of __pthread_mutex_lock_internal.
7055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7056         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7057         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7058         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
7059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7061         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
7062         Add pthread_mutex_cond_lock.
7063         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
7064         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
7065         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
7066         lll_mutex_cond_lock.
7067         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
7068         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7069         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7070         Add __mutex field.
7071         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7072         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7074         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
7075         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
7077         * pthreadP.h: Declare __pthread_mutex_cond_lock.
7078         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
7079         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
7080         macro don't define aliases.
7082         * cancellation.c: Remove __pthread_enable_asynccancel_2.
7083         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
7084         * sysdeps/pthread/pthread_cond_timedwait.c: Use
7085         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
7086         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7087         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7088         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
7089         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7090         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7092 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
7094         * sem_open.c: Fix one endless loop.  Implement correct semantics
7095         wrt opening the same semaphore more then once.
7096         * sem_close.c: Adjust for sem_open change.
7097         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
7098         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
7099         * Makefile (tests): Add tst-sem7.
7100         * tst-sem7.c: New file.
7102 2003-05-16  Roland McGrath  <roland@redhat.com>
7104         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
7105         uninitialized variable braino.
7107 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
7109         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
7110         test for syscall availability.
7112         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7113         __no_posix_timers to -1 if the syscalls don't exist.
7115         * pthread_join.c (pthread_join): Set tid field of the joined
7116         thread to -1.  This isn't necessary but helps to recognize some
7117         error conditions with almost no cost.
7119         * allocatestack.c (FREE_P): Also negative values indicate an
7120         unused stack.
7122         * unwind.c: Include <unistd.h>.
7124 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7126         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7128 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7130         * Makefile (crti-objs, crtn-objs): New variables.
7131         (omit-deps, extra-objs): Add crtn.
7132         ($(objpfx)libpthread.so): Depend on both crti and crtn
7133         and links to them in multidir.
7134         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7136 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7138         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7139         (lll_mutex_unlock): Use atomic_exchange_rel.
7141 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7143         * cond-perf.c (cons): Add missing locking around setting of alldone.
7145 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7147         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7148         related macros.
7149         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7151 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7153         * tst-sem6.c: New file.
7154         * Makefile (tests): Add tst-sem6.
7156         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7157         Use atomic_exchange_rel instead of atomic_exchange.
7158         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7159         Likewise.
7161         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7162         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7163         vsyscall is possible.
7165         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7166         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7167         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7168         pthread_setaffinity_np.
7169         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7170         and pthread_setaffinity_np.
7171         * Makefile (libpthread-routines): Add pthread_getaffinity and
7172         pthread_setaffinity.
7174         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7175         use it in case mmap to allocate the stack fails.
7176         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7177         ARCH_MAP_FLAGS here.
7178         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7179         ARCH_RETRY_MMAP.
7181 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7183         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7184         handler implementation.  It is now lockless in fork().
7185         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7186         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7187         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7188         declare the __fork_*_lists.
7189         (struct fork_handler): Include pointers to all three functions.
7190         Add next, refcntr and need_signal elements.
7191         (__fork_handlers): New declaration.
7192         (__register_atfork_malloc): Remove declaration.
7193         (HAVE_register_atfork_malloc): Remove definition.
7194         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7195         __pthread_child_handler variable.
7196         (__libc_pthread_init): Use __register_atfork instead of explicitly
7197         adding to the list.
7198         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7199         and lll_futex_wake.
7200         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7202         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7203         function must never be reached.
7205         * cond-perf.c: New file.
7207 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7209         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7211 2003-05-04  Roland McGrath  <roland@redhat.com>
7213         * Makefile ($(objpfx)../libc.so): New target.
7215 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7217         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7218         (pthread_condattr_t): Size is only an int, don't use long for
7219         alignment.
7220         (pthread_mutexattr_t): Likewise.
7221         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7222         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7223         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7225 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7227         * sysdeps/i386/tls.h: Define THREAD_ID.
7228         * sysdeps/ia64/tls.h: Likewise.
7229         * sysdeps/powerpc/tls.h: Likewise.
7230         * sysdeps/s390/tls.h: Likewise.
7231         * sysdeps/sh/tls.h: Likewise.
7232         * sysdeps/x86_64/tls.h: Likewise.
7233         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7234         record ownership.
7235         * pthread_mutex_timedlock.c: Likewise.
7236         * pthread_mutex_trylock.c: Likewise.
7237         * pthread_mutex_unlock.c: Likewise.
7238         * pthread_rwlock_trywrlock.c: Likewise.
7239         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7240         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7241         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7242         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7244         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7245         flag.
7247 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7249         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7250         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7251         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7252         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7253         Make __align long long instead of long.
7254         (pthread_rwlock_t): Formatting.
7255         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7256         (pthread_rwlock_t): Formatting.
7257         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7258         (pthread_cond_t): Make __align long long instead of long.
7259         (pthread_rwlock_t): Move __flags field to the same position as in
7260         linuxthreads.
7262 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7264         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7265         * tst-rwlock7.c (do_test): Likewise.
7267 2003-04-26  Roland McGrath  <roland@redhat.com>
7269         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7271 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7273         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7274         sizeof (struct pthread).
7275         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7276         1 struct pthread.
7277         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7278         to 0.
7279         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7280         struct pthread.
7281         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7282         to 32-bit bytes.
7283         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7284         tcbp.
7285         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7286         unneccessarily.
7287         (NO_TLS_OFFSET): Define.
7288         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7289         add TLS_TCB_SIZE unnecessarily.
7291 2003-04-22  Roland McGrath  <roland@redhat.com>
7293         * Makeconfig (shared-thread-library): Reverse link order to work
7294         around linker bug.
7296 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7298         * semaphore.h: Fix typo in comment.
7300 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7302         * sysdeps/pthread/sigfillset.c: New file.
7304         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7305         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7306         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7307         * sysdeps/pthread/sigaction.c: Likewise.
7308         * sysdeps/pthread/sigprocmask.c: New file.
7309         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7310         __SIGRTMIN+1.
7311         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7312         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7313         in this case.
7315 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7317         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7318         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7320         * sysdeps/unix/sysv/linux/unregister-atfork.c
7321         (__unregister_atfork): Don't free memory not allocated dynamically.
7323         * semaphore.h: Remove __THROW marker from cancellation points.
7324         * nptl/sysdeps/pthread/pthread.h: Likewise.
7326 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7328         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7329         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7330         __THROW.
7332 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7334         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7336 2003-04-15  Roland McGrath  <roland@redhat.com>
7338         * forward.c (__pthread_unwind): Tweak to avoid warning.
7340 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7342         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7344 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7347         overflow CFA advance instructions.
7348         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7350 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7352         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7353         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7354         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7355         defined.
7357         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7358         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7360         DW_CFA_advance_loc for .Laddl-.Lsubl.
7362 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7364         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7365         position-independent unwind data for static libraries.
7366         Add missing unwind info.  Add comments.
7368         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7369         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7370         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7371         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7373 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7375         * Makefile: Make sure all cancellation points are compiled with
7376         exception and asynchronous unwind tables.
7378         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7379         which mishandles loading of global object addresses in PIC.
7380         (THREAD_SETMEM_NC): Likewise.
7382 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7384         * pthread.h: Define new data structure for cleanup buffer.  Declare
7385         new cleanup handler interfaces.
7386         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7387         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7388         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7389         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7390         it.  Declare old cleanup handler installation functions.
7391         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7392         handling.
7393         * cleanup_defer.c: Likewise.
7394         * cleanup_compat.c: New file.  Old cleanup code.
7395         * cleanup_def_compat.c: New file.  Old cleanup code.
7396         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7397         if own thread descriptor.
7398         * unwind.c: New file.
7399         * forward.c: Add __pthread_unwind.
7400         * init.c (pthread_functions): Add __pthread_unwind.
7401         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7402         Add ptr___pthread_unwind.
7403         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7404         and unwind function.
7405         * Makefile (libpthread-routines): Add cleanup_compat,
7406         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7407         table generation if necessary.
7408         * version.c: Record whether unwind support is compiled in.
7409         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7410         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7411         handler interfaces.
7412         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7413         complication to generate unwind information for syscall wrappers.
7414         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7415         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7416         __cleanup_fct_attribute.
7418         * Makefile: Add rules to build and run tst-cleanup0.
7419         * tst-cleanup0.c: New file.
7420         * tst-cleanup0.expect: New file.
7422         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7423         caller.  Optimize to avoid often unecessary local variable.
7425 2003-04-11  Roland McGrath  <roland@redhat.com>
7427         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7428         sets variable `multidir'; include that.
7429         (generated): Add it.
7430         ($(objpfx)$(multidir)/crti.o): New target.
7431         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7433 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7435         * tst-attr2.c (do_test): Add cast to avoid warning.
7436         * tst-mutex4.c (do_test): Likewise.
7438 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7440         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7441         in child.
7443 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7445         * Makefile (tests): Add tst-detach1.
7446         * tst-detach1.c: New file.
7448 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7450         * sysdeps/pthread/pthread.h: Remove duplicate
7451         pthread_cleanup_{push,pop} definitions.
7453         * tst-barrier2.c: Eliminate warnings.
7454         * tst-cancel4.c: Likewise.
7455         * tst-cond4.c: Likewise.
7456         * tst-cond6.c: Likewise.
7457         * tst-detach1.c: Likewise.
7458         * tst-rwlock4.c: Likewise.
7459         * tst-rwlock6.c: Likewise.
7460         * tst-rwlock7.c: Likewise.
7461         * tst-sem3.c: Likewise.
7462         * tst-spin2.c: Likewise.
7463         * tst-umask1.c: Likewise.
7465 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7467         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7469 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7471         * descr.h (struct pthread): Move cancelhandling member to the front.
7473 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7475         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7476         malloc_parent, and malloc_child statically.
7477         (__register_atfork_malloc): New function.
7478         (free_mem): Don't free any of the malloc_* variables on the list.
7479         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7480         Define HAVE_register_atfork_malloc.
7482 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7484         * sysdeps/pthread/createthread.c (create_thread): Add some more
7485         comments explaining when to set multiple_threads and when not.
7487         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7488         THREAD_ATOMIC_BIT_SET if not already defined.
7489         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7490         THREAD_ATOMIC_BIT_SET:
7491         * sysdeps/x86_64/tls.h: Likewise.
7492         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7493         THREAD_ATOMIC_CMPXCHG_VAL.
7494         (_pthread_cleanup_pop_restore): Likewise.
7495         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7496         (__pthread_enable_asynccancel_2): Likewise.
7497         (__pthread_disable_asynccancel): Likewise.
7498         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7499         (__libc_disable_asynccancel): Likewise.
7500         * init.c (sigcancel_handler): Likewise.
7501         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7502         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7504 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7506         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7507         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7508         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7509         * Makefile (tests): Add tst-cancel11.
7510         * tst-cancel11.c: New file.
7512 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7514         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7515         round, not the first.  Use specific_used flag instead of local
7516         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7517         (__free_tcb): Don't call deallocate_tsd here.
7518         (start_thread): Call deallocate_tsd here.
7519         * pthread_setspecific.c: Set specific_used flag really only when
7520         needed.
7521         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7522         * tst-tsd3.c: New file.
7523         * tst-tsd4.c: New file.
7525 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7527         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7528         Use atomic_exchange_and_add instead of __lll_add.
7529         (__lll_mutex_timedlock): Likewise.
7530         Patch by Ian Wienand.
7532 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7534         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7535         (SINGLE_THREAD_P): Fix typo.
7536         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7538 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7540         * Makefile (tests): Add tst-align.
7541         * tst-align.c: New file.
7542         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7544         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7545         function correctly.
7547         * tst-tsd2.c: Add casts to avoid warnings.
7549 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7551         * descr.h (struct pthread): Move most often used elements to the front.
7553 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7555         * Makefile (libpthread-routines): Add pthread_atfork.
7556         (libpthread-static-only-routines): Add pthread_atfork.
7558 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7560         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7561         of TLS_DTV_AT_TP.
7562         (INSTALL_DTV): Add parens.
7563         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7564         Use passed descr instead of THREAD_SELF.
7565         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7566         (__lll_mutex_timedlock_wait): Correct expected value after
7567         spurious wakeup.
7568         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7569         Release lock before waking up the waiters.
7570         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7571         criteria.  Reorderstruct passed to cleanup handler.  Fix
7572         handling of cancellation and failung pthread_mutex_unlock call.
7573         Use __pthread_enable_asynccancel_2 instead of
7574         __pthread_enable_asynccancel.
7575         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7576         Return result of lock re-get if it fails.
7577         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7578         for __pthread_cleanup_push.
7579         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7580         completely broken rwlock implementation.
7581         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7582         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7583         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7584         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7585         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7586         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7587         versioned_symbol macro.
7588         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7589         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7591 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7593         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7594         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7595         and __helper_tid.
7596         (struct timer): Remove th and bar field.
7597         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7598         debugging code.  Create only one helper thread.
7599         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7600         helper thread.
7601         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7602         Renamed.  Define statically.  Use thread info from siginfo.
7603         (__helper_once): New variable.
7604         (__helper_tid): New variable.
7605         (__reset_helper_control): New function.
7606         (__start_helper_thread): New function.
7608         * pthread_create.c (start_thread): Don't use setjmp inside
7609         __builtin_expect to work around gcc bug.
7611         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7612         timer_delete syscall fails, but not with ENOSYS, set
7613         __no_posix_timers.
7615         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7616         (timer_settime): Fix typo.
7617         * sysdeps/unix/sysv/linux/timer_getoverr.c
7618         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7620 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7622         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7623         offset of cleanupbuf.__prev.
7625 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7627         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7628         of included file.
7630 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7632         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7633         NULL provide default definition to syscall.
7635 2003-03-25  Roland McGrath  <roland@redhat.com>
7637         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7638         (timer_id2ptr): Fix typo.
7640 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7642         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7643         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7644         * sysdeps/ia64/pthreaddef.h: Likewise.
7645         * sysdeps/powerpc/pthreaddef.h: Likewise.
7646         * sysdeps/s390/pthreaddef.h: Likewise.
7647         * sysdeps/sh/pthreaddef.h: Likewise.
7648         * sysdeps/x86_64/pthreaddef.h: Likewise.
7649         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7650         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7651         being changed.
7652         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7653         SIGTIMER is not unblocked.
7654         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7655         RT signal taken.
7656         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7657         be send.
7658         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7659         pass pointer through as ID.
7660         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7661         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7662         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7663         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7664         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7665         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7666         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7667         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7668         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7669         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7670         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7671         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7672         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7673         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7674         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7675         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7676         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7677         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7678         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7679         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7680         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7681         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7682         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7683         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7684         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7685         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7686         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7687         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7688         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7689         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7690         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7691         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7692         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7694         * pthreadP.h: Remove FRAME_LEFT definition.
7695         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7696         already left frame.  Programs which have this problem are not POSIX
7697         compliant.
7698         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7700 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7702         * sysdeps/pthread/tst-timer.c: Check return values of the
7703         functions we test.
7705 2003-03-23  Roland McGrath  <roland@redhat.com>
7707         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7708         * tst-tls3mod.c: Likewise.
7709         * tst-tls1.c: Likewise.
7710         * tst-tls2.c: Likewise.
7712         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7713         undefined behavior.
7715         * tst-join5.c (tf1, tf2): Add a cast.
7717         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7719         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7720         Don't test anything.
7721         * tst-cond4.c: Likewise.
7722         * tst-cond6.c: Likewise.
7723         * tst-flock2.c: Likewise.
7724         * tst-mutex4.c: Likewise.
7725         * tst-rwlock4.c: Likewise.
7726         * tst-signal1.c: Likewise.
7727         * tst-spin2.c: Likewise.
7728         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7730         * tst-mutex4.c: Use test-skeleton.c.
7731         * tst-spin2.c: Likewise.
7732         * tst-sysconf.c: Likewise.
7733         * tst-barrier2.c: Likewise.
7734         * tst-cond4.c: Likewise.
7735         * tst-cond6.c: Likewise.
7736         * tst-rwlock4.c: Likewise.
7737         * tst-unload.c: Likewise.
7738         * tst-flock2.c (do_test): Use return instead of exit.
7740 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7742         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7744 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7746         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7747         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7748         instead of __lll_compare_and_swap.
7749         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7750         Likewise.
7751         Removed definition if __lll_compare_and_swap.
7753         * cancellation.c: Adjust for new form of compare&exchange macros.
7754         * cleanup_defer.c: Likewise.
7755         * init.c: Likewise.
7756         * libc-cancellation.c: Likewise.
7757         * old_pthread_cond_broadcast.c: Likewise.
7758         * old_pthread_cond_signal.c: Likewise.
7759         * old_pthread_cond_timedwait.c: Likewise.
7760         * old_pthread_cond_wait.c: Likewise.
7761         * pthread_cancel.c: Likewise.
7762         * pthread_create.c: Likewise.
7763         * pthread_detach.c: Likewise.
7764         * pthread_join.c: Likewise.
7765         * pthread_key_delete.c: Likewise.
7766         * pthread_setcancelstate.c: Likewise.
7767         * pthread_setcanceltype.c: Likewise.
7768         * pthread_timedjoin.c: Likewise.
7769         * pthread_tryjoin.c: Likewise.
7770         * sysdeps/pthread/createthread.c: Likewise.
7772 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7774         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7775         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7776         definitions.  Replace uses with calls to atomic_* functions.
7777         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7778         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7779         __lll_test_and_set calls with atomic_exchange_and_add and
7780         atomic_exchange calls respectively.
7781         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7782         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7783         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7784         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7785         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7786         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7787         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7789         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7790         returns the old value.
7792 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7794         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7795         int for variable OLDVAL and correct inline assembler contraint.
7796         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7797         type int for variable OLD.
7799         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7800         only for s390-32.
7801         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7802         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7803         instead of multiple_threads field in the TCB.
7805 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7807         * sysdeps/i386/i686/bits/atomic.h: Removed.
7808         * sysdeps/i386/i586/bits/atomic.h: Removed.
7809         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7810         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7811         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7812         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7813         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7814         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7815         * atomic.h: Removed.  Moved to glibc.
7817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7818         support for clock selection.
7820         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7821         signalling waiters.
7823 2003-03-18  Roland McGrath  <roland@redhat.com>
7825         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7826         Add __lll_rel_instr first.  Add memory clobber.
7827         (lll_mutex_unlock): Use __lll_test_and_set.
7828         From Paul Mackerras <paulus@samba.org>.
7830         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7831         unconditionally.
7832         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7833         (SINGLE_THREAD_P):  Add `header.' prefix.
7834         From Paul Mackerras <paulus@samba.org>.
7836         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7837         pthread_timedjoin_np to ...
7838         (libpthread: GLIBC_2.3.3): ... here.
7839         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7841         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7842         Avoid shadowing VAL variable.
7844         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7845         New macro.
7847 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7849         * Makefile (tests): Add tst-cond11.
7850         * tst-cond11.c: New file.
7852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7853         struct passed to cleanup handler to eliminate one more
7854         instruction.
7855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7857         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7858         (pthrad_cond_t): Replace __unused field with __clock.
7860         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7861         waken all waiters in cleanup handler.
7862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7863         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7865         * pthread_condattr_getclock.c: New file.
7866         * pthread_condattr_setclock.c: New file.
7867         * sysdeps/pthread/pthread.h: Declare these new functions.
7868         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7869         * Makefile (libpthread-routines): Add the new functions.
7870         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7871         Renamed field to value.  Document use of the bits.
7872         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7873         change.
7874         * pthread_condattr_setpshared.c: Likewise.
7875         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7876         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7877         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7878         Add __clock field.
7879         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7880         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7881         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7882         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7883         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7884         Implement clock selection.
7885         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7886         * pthread-errnos.sym: Add ENOSYS.
7887         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7888         _POSIX_CLOCK_SELECTION.
7889         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7892         invalid .size directive.
7894 2003-03-17  Roland McGrath  <roland@redhat.com>
7896         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7897         Formatting tweaks.
7899 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7901         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7902         Use __lll_add instead of spelling it out.  Use protected symbol names.
7903         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7904         Use __lll_add.
7905         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7906         Renamed from lll_compare_and_swap.  Use new name where necessary.
7907         (__lll_add): Defined.
7908         (__lll_dec_if_positive): Defined.
7909         (__lll_test_and_set): Defined.
7910         * sysdeps/ia64/pthread_spin_init.c: Removed.
7911         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7912         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7913         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7914         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7915         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7916         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7917         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7918         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7919         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7920         __sync_lock_release_si.
7921         Patch by Jakub Jelinek.
7923         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7924         Fix timeout handling.
7925         (__lll_timedwait_tid): Likewise.
7926         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7927         Patch by Jakub Jelinek.
7929         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7931 2003-03-17  Roland McGrath  <roland@redhat.com>
7933         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7934         * sysdeps/pthread/pthread_spin_init.c: New file.
7935         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7936         * sysdeps/powerpc/Makefile: New file.
7937         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7938         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7939         * sysdeps/powerpc/pthreaddef.h: New file.
7940         * sysdeps/powerpc/tcb-offsets.sym: New file.
7941         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7942         * sysdeps/powerpc/tls.h: New file.
7943         * sysdeps/powerpc/bits/atomic.h: New file.
7944         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7945         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7946         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7948         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7949         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7950         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7951         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7952         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7953         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7954         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7955         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7956         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7957         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7958         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7959         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7960         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7961         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7962         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7964         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7965         not gettimeofday.
7966         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7967         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7968         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7969         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7970         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7972 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7974         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7975         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7976         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7978         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7980 2003-03-16  Roland McGrath  <roland@redhat.com>
7982         * tst-fork4.c: Include <string.h>.
7983         * tst-signal2.c: Likewise.
7984         * tst-mutex5.c (do_test): exit -> return.
7985         * tst-mutex2.c: Include <stdlib.h>.
7987 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7989         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7990         (__lll_mutex_timedlock_wait): Correct expected value after
7991         spurious wakeup.  Otherwise we would never wait again.
7993         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7994         zone versus inline asm stupidity.  Use correct instructions.
7996         * tst-rwlock6.c: Add some more status output.
7998 2003-03-15  Roland McGrath  <roland@redhat.com>
8000         * sysdeps/pthread/configure.in: New file.
8001         * sysdeps/pthread/configure: New file (generated).
8003 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8005         * allocatestack.c (allocate_stack): Store the exact stack size of
8006         user allocated stacks.
8008 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
8010         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
8011         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
8012         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8013         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
8014         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
8015         Use `header.' prefix.
8016         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
8018 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
8020         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
8021         __builtin_frame_address, use stack pointer.
8023         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
8024         instead of __builtin_frame_pointer.
8026 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8028         * tst-basic1.c (do_test): Add cast to avoid warning.
8029         * tst-basic2.c (do_test): Likewise.
8031         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
8032         amount of stack correction.
8034         * tst-fork4.c: Use test-skeleton.c.
8036 2003-03-14  Roland McGrath  <roland@redhat.com>
8038         * init.c: Fix typo "#eli" for "#else".
8040 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
8042         * allocatestack.c (__stack_user): Use hidden_data_def.
8043         * pthread_create.c (__pthread_keys): Likewise.
8045         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
8047 2003-03-14  Roland McGrath  <roland@redhat.com>
8049         * tst-fork4.c: New file.
8050         * Makefile (tests): Add it.
8052         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
8053         we always define the padding space.
8054         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
8055         stopped supporting its own extensions fully.
8056         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
8057         struct also called `header', so `header.multiple_threads' is the field
8058         name to use on all machines.
8059         * allocatestack.c (allocate_stack): Use `header.' prefix.
8060         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8061         * pthread_create.c (__pthread_create_2_1): Likewise.
8062         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
8063         (THREAD_SELF): Likewise.
8064         * sysdeps/x86_64/tls.h: Likewise.
8065         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8066         (SINGLE_THREAD_P): Likewise.
8067         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8068         (SINGLE_THREAD_P): Likewise.
8069         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
8070         (SINGLE_THREAD_P): Likewise.
8072         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
8073         value directly.
8075 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
8077         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
8078         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
8080         * pthread_create.c (start_thread): setjmp is expected to return 0.
8082         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
8083         (THREAD_GETMEM_NC): Likewise.
8085 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
8087         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
8088         and the size of the stack which must be allocated is a multiple,
8089         allocate one more page.
8090         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
8091         MULTI_PAGE_ALIASING.
8093 2003-03-13  Roland McGrath  <roland@redhat.com>
8095         * pthread_create.c (start_thread): Set EXITING_BIT after the
8096         event-reporting (and destructors), not before.
8098 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
8100         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
8101         lll_futex_wake): Declare register variables as long int instead of
8102         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
8103         Make syscall arguments clobbered by the syscall.
8104         (lll_futex_wait): Define using lll_futex_timed_wait.
8106         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
8107         to void *.
8109         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
8110         PPID if [! NDEBUG].
8112         * allocatestack.c (nptl_ncreated): Only declare if
8113         COLORING_INCREMENT != 0.
8115         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8116         (__libc_enable_asynccancel_2): Remove prototype.
8118         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8119         ctid to match kernel.
8121 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8123         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8124         libc_multiple_threads.
8125         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8126         __libc_multiple_threads to...
8127         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8129         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8130         versioning.
8131         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8132         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8134         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8135         (__pthread_once_internal): Define.
8137         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8138         macros instead of .symver directly.
8139         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8140         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8142         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8143         * sysdeps/x86_64/tcb-offsets.sym: New file.
8144         * sysdeps/x86_64/Makefile: New file.
8146         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8148         to access own pthread_t in TCB.
8149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8150         Likewise.
8151         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8152         Likewise.
8153         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8155 2003-03-12  Roland McGrath  <roland@redhat.com>
8157         * pthread-errnos.sym: New file.
8158         * Makefile (gen-as-const-headers): New variable, list that file.
8159         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8160         header <pthread-errnos.h> instead of defining errno values here.
8161         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8162         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8163         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8166         Likewise.
8167         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8168         Likewise.
8169         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8170         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8171         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8172         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8173         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8174         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8175         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8176         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8178         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8179         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8180         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8181         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8182         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8183         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8184         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8187         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8188         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8190         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8191         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8192         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8193         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8194         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8195         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8197         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8198         CLONE_CHILD_SETTID worked.
8200 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8202         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8203         file.
8204         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8205         file.
8207         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8208         (pthread_cond_t): Add padding.
8210         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8211         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8212         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8214         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8215         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8216         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8217         (__pthread_rwlock_timedrdlock): Likewise.
8218         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8219         (__pthread_rwlock_wrlock): Likewise.
8220         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8221         (__pthread_rwlock_rdlock): Likewise.
8223         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8225         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8226         result of lock re-get if it fails.
8228 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8230         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8231         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8232         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8233         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8235         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8236         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8237         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8238         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8239         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8241         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8242         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8244         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8245         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8246         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8247         (create_thread): Likewise.
8248         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8249         * init.c (__pthread_initialize_minimal_internal): Initialize
8250         __libc_multiple_threads_ptr if necessary.
8251         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8252         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8253         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8254         __libc_multiple_threads.
8255         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8256         necessary.
8258         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8259         (THREAD_SETMEM_NC): Likewise.
8261         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8262         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8263         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8264         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8266         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8267         Eliminate one entire instruction.
8269         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8270         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8271         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8272         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8273         instead of __pthread_enable_asynccancel.
8274         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8275         (__pthread_cond_wait): Likewise.
8276         * sysdeps/pthread/pthread_cond_timedwait.c
8277         (__pthread_cond_timedwait): Likewise.
8278         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8280         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8281         (__condvar_cleanup): Wake up all waiters in case we got signaled
8282         after being woken up but before disabling asynchronous
8283         cancellation.
8284         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8285         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8286         (__condvar_cleanup): Likewise.
8288         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8289         Make it an error if architecture has no #if case.  Add x86-64.
8291         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8292         pt-initfini.s generation.
8294         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8295         (TLS_INIT_TP): Fix typo.
8297 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8299         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8300         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8302         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8303         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8304         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8305         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8306         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8307         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8308         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8309         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8311 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8313         * sysdeps/pthread/pthread_cond_timedwait.c
8314         (__pthread_cond_timedwait): Return the result of the final
8315         locking.  If it succeeds, the regular function return value.
8317         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8318         Return result of the final locking.
8319         * version.c (__nptl_main): Work around problems with the strange
8320         INTERNAL_SYSCALL macro on ppc32.
8321         * init.c (__pthread_initialize_minimal_internal): Unblock
8322         SIGCANCEL in case the parent blocked it.
8323         Reported by Paul Mackerras <paulus@samba.org>.
8325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8326         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8329 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8331         * sysdeps/pthread/pthread_cond_timedwait.c
8332         (__pthread_cond_timedwait): Unlock and fail if
8333         __pthread_mutex_unlock_internal failed.
8335         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8336         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8337         Use ARCH_CLONE.
8338         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8339         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8340         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8341         ALLOCATE_STACK): New macros.
8342         (TLS_TPADJ): New macro.
8343         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8344         (allocate_stack): Handle TLS_DTV_AT_TP and
8345         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8346         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8347         Don't set PD->self.
8348         * init.c [__ia64__] (__NR_set_tid_address): Define.
8350         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8351         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8352         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8353         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8354         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8355         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8356         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8357         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8358         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8359         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8360         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8361         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8362         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8363         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8364         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8365         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8366         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8367         * sysdeps/ia64/bits/atomic.h: New file.
8368         * sysdeps/ia64/Makefile: New file.
8369         * sysdeps/ia64/pthread_spin_init.c: New file.
8370         * sysdeps/ia64/pthread_spin_lock.c: New file.
8371         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8372         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8373         * sysdeps/ia64/pthreaddef.h: New file.
8374         * sysdeps/ia64/tcb-offsets.sym: New file.
8375         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8376         * sysdeps/ia64/tls.h: New file.
8378         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8379         to syscall instead of no arguments.
8381 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8383         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8384         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8385         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8386         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8388         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8389         unused code.
8391         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8393         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8394         lowlevelbarrier.sym.
8395         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8396         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8397         Include lowlevelbarrier.h and don't define offsets locally.
8398         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8400         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8401         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8402         (__lll_mutex_timedlock_wait): Likewise.
8403         (lll_mutex_lock): Adjust asm for that.
8404         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8405         (lll_lock): Adjust asm for operand order change.
8406         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8407         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8410         Reverse order of parameters.
8411         (__lll_timedwait_tid): Remove regparms attribute.
8412         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8413         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8415         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8416         (__lll_timedwait_tid): Remove one unnecessary instruction.
8418         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8419         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8420         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8421         lowlevelmutex.S.
8423         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8424         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8425         for NOT_IN_libc.
8426         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8427         lowlevellock.S.
8429         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8430         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8431         for libc.so.
8432         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8433         define LOCK here (if UP is not defined).  The actual code is in
8434         lowlevelmutex.S.
8436         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8437         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8438         __lll_timedwait_tid for libc.so.
8439         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8440         define LOCK here (if UP is not defined).  The actual code is in
8441         lowlevellock.S.
8443         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8444         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8445         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8446         instead of lowlevelsem.h.
8447         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8448         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8449         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8451         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8452         lowlevelrwlock.sym.
8453         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8454         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8455         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8457         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8458         register loading.
8459         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8460         last changed.  D'oh.
8462         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8464         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8465         of __libc_locking_needed.
8466         (lll_trylock): Initialize %eax to zero.
8468         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8469         pthread_cond_t definition.
8471 2003-03-10  Roland McGrath  <roland@redhat.com>
8473         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8474         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8475         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8476         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8477         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8479         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8480         Instead of setting PD->multiple_threads, set globals
8481         __pthread_multiple_threads and __libc_multiple_threads.
8482         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8483         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8484         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8486         * descr.h (struct pthread): Conditionalize first member on
8487         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8488         containing an anonymous tcbhead_t.  Move `list' member out.
8489         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8490         * allocatestack.c: Remove use of `header.data.' prefix.
8491         * pthread_create.c: Likewise.
8492         * init.c (__pthread_initialize_minimal_internal): Likewise.
8493         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8494         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8495         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8496         * sysdeps/x86_64/tls.h: Likewise.
8497         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8498         (SINGLE_THREAD_P): Likewise.
8499         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8500         (SINGLE_THREAD_P): Likewise.
8501         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8502         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8504 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8506         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8508         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8509         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8511         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8512         leftovers from the ia32 code.
8514         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8515         memory load.
8516         (clear_once_control): Don't load %esi.
8518         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8519         handling.
8521         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8523         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8524         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8526         * Makefile (tests): Add tst-cond10.
8527         * tst-cond10.c: New file.
8529 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8531         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8532         * tst-signal3.c (do_test): Likewise.
8533         * tst-sem5.c (do_test): Likewise.
8534         * tst-kill6.c (do_test): Likewise.
8535         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8537         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8538         of inc/dec.
8539         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8540         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8541         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8542         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8543         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8545         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8546         Likewise.
8547         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8548         Likewise.
8549         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8550         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8551         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8554         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8555         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8556         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8558         * allocatestack.c (allocate_stack): If mprotect() fails free the
8559         TLS memory.
8561 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8563         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8565         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8566         lll_wake_tid.  This was used only to work around kernel limits in
8567         the early days.
8568         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8569         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8570         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8571         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8573         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8574         (__pthread_initialize_minimal_internal): Change initialization of
8575         __static_tls_align_m1 appropriately.
8576         * pthreadP.h (__static_tls_align_m1): Renamed from
8577         __static_tls_align.
8578         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8579         instead of __static_tls_align-1.
8581 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8583         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8585         * pthread_create.c: Define __pthread_keys using nocommon
8586         attribute, not by placing it explicitly in bss.
8587         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8589         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8590         Use it in mmap call to allocate stacks.
8592         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8594         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8595         result of the thread function.
8597 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8599         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8600         version is just fine.
8602         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8603         (__pthread_child_handler): Renamed from pthread_child_handler,
8604         exported, and marked hidden.  Change all users.
8605         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8606         free __pthread_child_handler from child list.
8608 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8610         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8612         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8613         Fix handling of cancellation and failing pthread_mutex_unlock call.
8614         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8615         (__pthread_cond_wait): Likewise.
8617         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8618         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8619         lll_futex_timed_wait call.
8620         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8621         (pthread_rwlock_timedwrlock): Likewise.
8623         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8624         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8625         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8627         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8628         check of lll_futex_wake return value.
8630 2003-03-03  Roland McGrath  <roland@redhat.com>
8632         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8634         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8635         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8636         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8638 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8640         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8641         error for CPU clocks.
8643         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8644         _POSIX_MONOTONIC_CLOCK.
8645         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8647         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8648         recent kernels.
8650 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8652         * descr.h (struct pthread): Move cleanup field to the front.
8654 2003-03-01  Roland McGrath  <roland@redhat.com>
8656         * sem_open.c (sem_open): Braino fix.
8658 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8660         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8662         __pthread_cleanup_pop functionality.
8663         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8665         * descr.h (struct pthread): Move tid field to the front now that
8666         it is often used.
8668         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8669         (__lll_mutex_timedlock_wait): Remove.
8670         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8671         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8672         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8673         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8674         (lll_unlock_wake_cb): Don't save and restore %esi.
8675         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8676         %esi.
8677         (__lll_timedwait_tid): Add alignment.
8678         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8679         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8680         %esi.
8681         (__lll_timedwait_tid): Removed.
8682         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8683         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8684         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8685         (pthread_barrier_wait): Don't save, load, and restore %esi for
8686         last thread.
8687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8688         (__pthread_cond_signal): Don't save, load, and restore %esi.
8689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8690         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8691         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8692         Don't save, load, and restore %esi.
8694 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8697         Release lock before waking up the waiters.
8699         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8701         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8702         (reader_thread): Likewise.
8704         * sysdeps/pthread/pthread_rwlock_unlock.c
8705         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8706         to wake up readers if there are none.
8708         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8709         Release internal lock before wake threads.
8711 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8713         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8714         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8715         predefined.
8716         * tst-rwlock9.c: Likewise.
8717         * tst-rwlock10.c: New file.
8718         * tst-rwlock11.c: New file.
8720         * Makefile (tests): Add tst-dlsym1.
8721         * tst-dlsym1.c: New file.
8723         * init.c (__pthread_initialize_minimal_internal): Set
8724         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8725         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8727 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8729         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8731         * tst-cond2.c: Fix sychronization with child.
8733         * tst-rwlock8.c (reader_thread): Remove unused variable.
8735         * Makefile: Add rules to build and run tst-tls3.
8736         * tst-tls3.c: New file.
8737         * tst-tls3mod.c: New file.
8739         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8740         * tst-rwlock8.c: New file.
8741         * tst-rwlock9.c: New file.
8742         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8743         complete broken rwlock implementation.
8744         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8745         Likewise.
8746         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8747         Likewise.
8748         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8749         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8750         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8751         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8752         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8753         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8754         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8756 2003-02-23  Roland McGrath  <roland@redhat.com>
8758         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8760 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8762         * Makefile (tests): Add tst-context1.
8763         * tst-context1.c: New file.
8765         * Makefile (tests): Add tst-tls1 and tst-tls2.
8766         * tst-tls1.c: New file.
8767         * tst-tls2.c: New file.
8769         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8770         for failed cmpxchg.
8772         * pthread_create.c (start_thread): Set EXITING_BIT early.
8774         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8775         (THREAD_GETMEM_NC): Likewise.
8777 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8779         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8780         off 3 more bytes by using offset-less instructions when possible.
8782         * Makefile: Add dependency for $(objpfx)version.d.
8784         * eintr.c (eintr_source): Add unnecessary return but the compiler
8785         insists.
8787         * tst-kill3.c: Include <unistd.h>.
8789 2003-02-21  Roland McGrath  <roland@redhat.com>
8791         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8793 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8795         * Makefile (tests): Add tst-eintr1.
8796         (distribute): Add eintr.c.
8797         * tst-eintr1.c: New file.
8798         * eintr.c: New file.
8800         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8802         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8803         Disallow sending SIGCANCEL.
8805         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8806         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8807         * tst-kill1.c: New file.
8808         * tst-kill2.c: New file.
8809         * tst-kill3.c: New file.
8810         * tst-kill5.c: New file.
8811         * tst-kill6.c: New file.
8812         * tst-basic7.c: Renamed to...
8813         * tst-kill4.c: ...this.
8815 2003-02-21  Roland McGrath  <roland@redhat.com>
8817         * Makefile (install-lib-ldscripts): New variable.
8819 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8821         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8822         * pthread_cancel.c: Use INVALID_TD_P.
8823         * pthread_detach.c: Likewise.
8824         * pthread_getschedparam.c: Likewise.
8825         * pthread_setschedparam.c: Likewise.
8826         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8827         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8828         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8829         * pthread_timedjoin.c: Likewise.
8831         * tst-basic7.c: Include <signal.h>.
8833         * pthread_join.c (pthread_join): Limited checking for invalid
8834         descriptors.
8835         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8837 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8839         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8840         beginning of the loop.  Clear the entire first block of TSD.
8841         * Makefile (tests): Add tst-key4.
8842         * tst-key4.c: New file.
8844 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8846         * Makefile (tests): Add tst-basic7.
8847         * tst-basic7.c: New file.
8849         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8850         Add some more __builtin_expect.
8852         * pthreadP.h: Define dummy version of DEBUGGING_P.
8854 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8856         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8857         _POSIX_THREAD_PRIORITY_SCHEDULING.
8858         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8859         _XOPEN_REALTIME_THREADS.
8860         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8862         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8863         kernel returns EINVAL for PID <= 0, work around it.
8865         * Makefile (tests): Add tst-signal5.
8866         * tst-signal5.c: New file.
8868         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8869         and LOGIN_NAME_MAX.
8871         * tst-cancel1.c (tf): Block all signals.
8873         * Makefile (tests): Add tst-basic6.
8874         * tst-basic6.c: New file.
8876         * tst-basic1.c: Add test for process ID.
8878         * Makefile (tests): Add tst-cancel10.
8879         * tst-cancel10.c: New file.
8881         * Makefile (tests): Add tst-signal4.
8882         * tst-signal4.c: New file.
8884         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8885         __sigismember instead of sigismember.  Add __builtin_expect.
8887 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8889         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8890         pthread_setcancelstate, and pthread_rwlock_setpshared.
8892         * tst-cancel7.c (do_test): Make sure the pid file exists before
8893         canceling the thread.
8895         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8896         pthread_rwlock_timedrdlock tests.
8897         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8898         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8899         Check for invalid tv_nsec field.
8900         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8901         Likewise.
8903         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8904         recursive mutex of overflow.
8906         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8908         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8909         going into an endless loop.
8910         * Makefile (tests): Add tst-cancel9.
8911         * tst-cancel9.c: New file.
8913         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8915 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8917         * tst-mutex5.c (do_test): Add more timedlock tests.
8919         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8920         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8922         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8923         use INLINE_SYSCALL.  Error number is returned, not -1.
8925         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8926         and __deallocate_stack with internal_function.
8927         * pthread_create.c: Adjust definitions appropriately.
8928         * allocatestack.c: Likewise.
8930         * pthread_join.c: Add one more __builtin_expect.
8931         * pthread_timedjoin.c: Likewise.
8933         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8934         not data of sequence number does not match.
8935         Add one __builtin_expect.
8937         * Makefile (tests): Add tst-clock1.
8938         * tst-clock1.c: New file.
8940         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8941         negative arguments.
8942         * Makefile (tests): Add tst-basic5.
8943         * tst-basic5.c: New file.
8945 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8947         * Makefile (tests): Add tst-basic4.
8948         * tst-basic4.c: New file.
8950         * pthreadP.h: Add declaraction for __nptl_nthreads.
8951         * pthread_create.c: Define __nptl_nthreads
8952         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8953         after thread is done.  If then zero, call exit(0).
8954         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8955         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8956         * init.c (pthread_functions): Initialize ptr_nthreads.
8957         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8958         (__reclaim_stacks): Decrement __nptl_nthreads.
8959         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8960         Define.
8961         * Makefile (tests): Add tst-basic3.
8962         * tst-basic3.c: New file.
8964         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8965         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8966         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8967         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8968         if asynchronous canceling is enabled.
8969         * pthread_join.c (pthread_join): When recognizing circular joins,
8970         take into account the other thread might be already canceled.
8971         * Makefile (tests): Add tst-join5.
8972         * tst-join5.c: New file.
8974         * Makefile (tests): Add tst-join4.
8975         * tst-join4.c: New file.
8977 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8979         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8981 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8983         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8984         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8985         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8986         warning.
8987         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8988         to avoid warning.
8989         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8990         error if lll_futex_wake failed.
8992 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8995         handling of cancellation and failung pthread_mutex_unlock call.
8996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8997         * Makefile (tests): Add tst-cond8 and tst-cond9.
8998         * tst-cond8.c: New file.
8999         * tst-cond9.c: New file.
9001         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
9003         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
9004         non-standard initializers with __USE_GNU.
9006         * Makefile (tests): Add tst-cleanup3.
9007         * tst-cleanup3.c: New file.
9009 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
9011         * Makefile (tests): Add tst-attr1 and tst-attr2.
9012         * tst-attr1.c: New file.
9013         * tst-attr2.c: New file.
9015         * Makefile: Add rules to build and run tst-atfork2 test.
9016         * tst-atfork2.c: New file.
9017         * tst-atfork2mod.c: New file.
9019         * sysdeps/unix/sysv/linux/unregister-atfork.c
9020         (__unregister_atfork): Free the memory allocated for the handlers
9021         after removing them from the lists.
9023         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
9024         cleanup function.
9026         * tst-atfork1.c (do_test): Wait for the child we forked.
9027         Report error in child.
9029         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
9031         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
9033 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
9035         * Makefile (tests): Add tst-cancel8.
9036         * tst-cancel8.c: New file.
9038         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
9039         clearing of control variable.
9040         * Makefile (tests): Add tst-once3 and tst-once4.
9041         * tst-once3.c: New file.
9042         * tst-once4.c: New file.
9044 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
9046         * sysdeps/sh/Makefile: New file.
9047         * sysdeps/sh/bits/atomic.h: New file.
9048         * sysdeps/sh/pthread_spin_init.c: New file.
9049         * sysdeps/sh/pthread_spin_lock.c: New file.
9050         * sysdeps/sh/pthread_spin_trylock.S: New file.
9051         * sysdeps/sh/pthread_spin_unlock.S: New file.
9052         * sysdeps/sh/pthreaddef.h: New file.
9053         * sysdeps/sh/tcb-offsets.sym: New file.
9054         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
9055         * sysdeps/sh/tls.h: New file.
9056         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
9057         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
9058         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
9059         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
9060         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
9061         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
9062         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
9063         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
9064         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
9065         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
9066         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
9067         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
9068         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
9069         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
9070         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
9071         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
9072         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
9073         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
9074         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
9075         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
9076         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
9077         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
9078         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
9079         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
9080         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
9081         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
9082         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
9083         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
9084         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
9085         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
9087 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
9089         * tst-cond2.c: Rearrange code to not rely on behavior undefined
9090         according to POSIX.
9092         * tst-basic2.c (do_test): Lock mutex before creating the thread.
9094 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
9096         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
9097         (TLS_GET_FS): New #define.
9098         (TLS_SET_FS): New #define.
9099         Correct value of __NR_set_thread_area.
9101         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
9103 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
9105         * Makefile (tests): Add tst-popen1.
9106         * tst-popen1.c: New file.
9108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
9109         but inactive generalization.
9110         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
9111         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9112         Minor optimization, remove one instruction.
9113         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9115 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9117         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9119 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9121         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9122         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9123         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9124         * sysdeps/pthread/pthread_cond_signal.c: New file.
9125         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9126         * sysdeps/pthread/pthread_cond_wait.c: New file.
9127         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9128         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9129         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9130         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9131         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9132         * sysdeps/s390/Makefile: New file.
9133         * sysdeps/s390/bits/atomic.h: New file.
9134         * sysdeps/s390/pthread_spin_init.c: New file.
9135         * sysdeps/s390/pthread_spin_lock.c: New file.
9136         * sysdeps/s390/pthread_spin_trylock.c: New file.
9137         * sysdeps/s390/pthread_spin_unlock.c: New file.
9138         * sysdeps/s390/pthreaddef.h: New file.
9139         * sysdeps/s390/tcb-offsets.sym: New file.
9140         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9141         * sysdeps/s390/tls.h: New file.
9142         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9143         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9144         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9145         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9146         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9147         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9148         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9149         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9150         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9151         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9152         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9153         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9154         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9155         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9156         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9157         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9158         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9159         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9160         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9161         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9162         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9163         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9164         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9166 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9168         * atomic.h: Add a couple more default implementations.
9169         (atomic_compare_and_exchange_acq): Use
9170         __arch_compare_and_exchange_32_acq in return value definition.  It
9171         always exists.
9172         (atomic_bit_set): Renamed from atomic_set_bit.
9173         Add missing atomic_ prefixes.
9175         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9176         thread library is available, use correct value to mark initialized
9177         once variable.
9179 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9181         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9182         __sysconf to determine pagesize.
9184         * pthread_create.c: Include <atomic.h>.
9185         * allocatestack.c (allocate_stack): Implement coloring of the
9186         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9187         size minus one.  Adjust users.
9188         * sysdeps/i386/i686/Makefile: New file.
9190 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9192         * allocatestack.c: Improve comment throughout the file.
9194         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9195         (__lll_lock_wait): Add branch prediction.
9196         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9197         (__lll_lock_wait): Likewise.
9198         (lll_unlock_wake_cb): Removed.
9200 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9202         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9203         _POSIX_THREAD_PRIORITY_SCHEDULING.
9205 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9207         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9208         Fix return type of ptr___pthread_getspecific.
9210 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9212         * Makefile (tests): Add tst-umask1.
9213         (tst-umask1-ARGS): Define.
9214         * tst-umask1.c: New file.
9216 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9218         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9219         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9220         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9221         pthread_rwlock_unlock.
9222         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9223         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9224         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9225         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9226         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9227         New file.
9228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9229         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9230         New file.
9231         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9232         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9233         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9234         New file.
9235         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9236         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9237         New file.
9238         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9239         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9240         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9241         New file.
9242         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9243         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9244         New file.
9245         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9247         * Makefile (libpthread-routines): Remove lowlevelcond and
9248         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9249         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9250         and pthread_cond_broadcast.
9251         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9252         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9253         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9254         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9255         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9256         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9257         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9258         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9259         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9260         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9262         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9263         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9264         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9265         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9266         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9267         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9268         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9269         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9270         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9271         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9272         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9273         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9274         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9275         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9276         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9277         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9278         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9279         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9280         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9281         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9283         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9284         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9285         of the code is moved to ...
9286         * sysdeps/pthread/createthread.c: ...here.  New file.
9288 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9290         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9291         (__new_sem_post): Clear %eax before returning.
9292         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9294         * Makefile (tests): Add tst-cleanup2.
9295         * tst-cleanup2.c: New file.
9297         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9298         Interpret first parameter correctly.
9300 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9302         * Makefile (headers): Add bits/semaphore.h.
9304 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9306         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9307         if not SHARED.
9309 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9311         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9312         must be used and mapping failed.
9313         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9315         * Makefile (CFLAGS-pthread_self.os): Define this, not
9316         CFLAGS-pthread_self.c.
9318 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9320         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9321         lll_unlock_wake_cb.
9323         * Makefile (libpthread-routines): Add version.  Add rules to build
9324         version.os and banner.h.
9325         * version.c: New file.
9327 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9329         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9330         the alias unconditional.
9331         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9333 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9335         * Makefile (CFLAGS-pthread_self.c): New definition.
9337 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9339         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9340         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9341         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9342         * init.c (__pthread_initialize_minimal_internal): Likewise.
9344 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9346         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9348         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9349         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9350         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9351         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9352         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9353         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9355 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9357         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9358         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9359         * tst-cancel-wrappers.sh: Remove all exceptions.
9361 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9363         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9364         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9366         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9367         Use __libc_pthread_functions array if SHARED.
9369         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9370         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9372         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9373         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9374         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9375         __libc_ptf_call instead of __libc_maybe_call.
9376         (PTF): New #define.
9377         (__libc_cleanup_region_start): Wrap function name with PTF call.
9378         (__libc_cleanup_region_end): Likewise.
9379         (__libc_cleanup_end): Likewise.
9381         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9382         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9383         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9384         * pthreadP.h: Add prototypes.
9386         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9387         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9388         __pthread_rwlock_unlock aliases.
9389         * pthreadP.h: Add prototypes for new aliases.
9391         * pthreadP.h (struct pthead_functions): Moved to...
9392         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9393         * init.c (pthread_functions): Add initializers for new elements.
9395         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9396         __pthread_cleanup_pop_restore aliases.
9397         * pthreadP.h: Add prototypes.
9399         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9400         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9401         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9402         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9403         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9404         * pthreadP.h: Adjust prototypes and callers.
9406 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9408         * Makefile (tests): Add tst-cancel7.
9409         (tst-cancel7-ARGS): New variable.
9410         * tst-cancel7.c: New file.
9412         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9413         around gcc defficiencies.
9414         * old_pthread_cond_signal.c: Likewise.
9415         * old_pthread_cond_timedwait.c: Likewise.
9416         * old_pthread_cond_wait.c: Likewise.
9418         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9420 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9422         * Makefile (tests): Add tst-cond7.
9423         * tst-cond7.c: New file.
9425         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9426         (condvar_cleanup): Get condvar address from the right place.
9428         * atomic.h: Correct definitions of atomic_full_barrier,
9429         atomic_read_barrier, atomic_write_barrier.
9431         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9432         race-free.
9433         * old_pthread_cond_signal.c: Likewise.
9434         * old_pthread_cond_timedwait.c: Likewise.
9435         * old_pthread_cond_wait.c: Likewise.
9437 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9439         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9441 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9443         * pthreadP.h (pthread_cond_2_0_t): New type.
9444         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9445         Use new type for the 2.0 condvar function prototypes.
9446         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9447         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9448         parameter.
9449         * old_pthread_cond_destroy.c: Likewise.
9450         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9451         * old_pthread_cond_signal.c: Likewise.
9452         * old_pthread_cond_timedwait.c: Likewise.
9453         * old_pthread_cond_wait.c: Likewise.
9455         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9456         (__pthread_cond_wait): Don't save cancellation mode and seq value
9457         in same location.
9459         * herrno.c (__h_errno_location): Don't define as weak.
9461 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9463         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9464         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9465         and pthread_cond_wait.
9466         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9467         Renamed to...
9468         (__pthread_cond_broadcast_2_0): ... this.
9469         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9470         Renamed to...
9471         (__pthread_cond_destroy_2_0): ... this.
9472         * old_pthread_cond_init.c (__old_pthread_cond_init):
9473         Renamed to...
9474         (__pthread_cond_init_2_0): ... this.
9475         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9476         Renamed to...
9477         (__pthread_cond_signal_2_0): ... this.
9478         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9479         Renamed to...
9480         (__pthread_cond_wait_2_0): ... this.
9481         * pthread_cond_destroy.c: Include shlib-compat.h.
9482         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9483         * pthread_cond_init.c: Include shlib-compat.h.
9484         (pthread_cond_init): Change strong_alias into versioned_symbol.
9485         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9486         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9487         fields.
9488         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9489         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9490         __pthread_cond_wait_2_0): New prototypes.
9491         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9492         __old_pthread_cond_init, __old_pthread_cond_signal,
9493         __old_pthread_cond_wait): Removed.
9494         * init.c: Include shlib-compat.h.
9495         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9496         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9497         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9498         ptr___pthread_cond_*_2_0 fields.
9499         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9500         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9502         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9503         LIBC_SIGACTION was not yet defined.
9504         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9505         [!defined LIBC_SIGACTION] (__sigaction): New function and
9506         libc_hidden_weak.
9507         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9508         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9510 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9512         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9514 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9516         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9517         New, larger type definition.
9518         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9519         implementation.
9520         * Versions [libpthread]: Add definitions for new pthread_cond_*
9521         interfaces for version GLIBC_2.3.2.
9522         * pthread_cond_init.c: Update initialization for new type definition.
9523         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9524         pthread_cond_timedwait, pthread_cond_signal, and
9525         pthread_cond_broadcast.  Add old_pthread_cond_init,
9526         old_pthread_cond_destroy, old_pthread_cond_wait,
9527         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9528         old_pthread_cond_broadcast.
9529         * old_pthread_cond_broadcast.c: New file.
9530         * old_pthread_cond_destroy.c: New file.
9531         * old_pthread_cond_init.c: New file.
9532         * old_pthread_cond_signal.c: New file.
9533         * old_pthread_cond_timedwait.c: New file.
9534         * old_pthread_cond_wait.c: New file.
9535         * pthreadP.h: Add prototypes for the compatibility interfaces.
9537         * pthread_cond_destroy.c: Don't include <errno.h>.
9539 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9541         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9542         unnecessary zero offset when addressing MUTEX.
9544 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9546         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9547         __register_atfork.
9548         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9549         for __register_atfork.
9551 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9553         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9554         instead of ASSEMBLER test macro.
9556         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9557         __libc_current_sigrtmax): Add libc_hidden_def.
9559         * sysdeps/pthread/list.h: Remove assert.h include.
9561 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9563         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9564         __pthread_initialize_minimal_internal not
9565         __pthread_initialize_minimal.
9567 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9569         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9570         __pthread_initialize_minimal as hidden.
9572         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9573         constructor.
9575 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9577         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9578         $(common-objpfx)format.lds, include that into the output script.
9579         Fix comment.
9580         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9582 2002-12-28  Andreas Jaeger  <aj@suse.de>
9584         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9585         nsec resolution changes.
9586         (xstat64_conv): Likewise.
9587         (xstat32_conv): Likewise.
9588         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9589         struct kernel_stat.
9590         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9591         structs stat and stat64.
9592         * time/time.h (__timespec_defined): Define for __USE_MISC.
9593         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9595 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9597         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9598         argument.
9599         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9600         (pthread_exit): Use strong_alias to avoid warnings.
9601         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9602         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9603         ptr___pthread_attr_init_2_*.
9604         * init.c (pthread_functions): Adjust.
9606 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9608         * forward.c: Make all functions available by default again.  It
9609         caused too much trouble.
9611         * pt-siglongjmp.c: Removed.
9613 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9615         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9616         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9617         * sysdeps/i386/Makefile: New file.
9618         * sysdeps/i386/tcb-offsets.sym: New file.
9619         * sysdeps/pthread/tcb-offsets.h: New file.
9620         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9621         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9623         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9624         __register_atfork...
9625         (GLIBC_2.3.2): ...here.
9627 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9629         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9630         pthread_attr_setstackaddr with __attribute_deprecated__.
9632 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9634         * pt-system.c (system): Remove cancellation handling.
9635         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9636         cancellation routines.
9638 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9640         * descr.h: Include <dl-sysdep.h>.
9641         (struct pthread): Move header.data.list to the back of the struct.
9642         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9643         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9644         (SYSINFO_OFFSEET): Likewise.
9646 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9648         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9649         Define.
9650         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9651         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9652         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9653         (USE_DL_SYSINFO): Undef.
9655 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9657         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9658         $(common-objpfx)libc.so.
9659         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9660         it is bigger than pipe buffer size even on arches with bigger
9661         page size.
9662         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9664 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9666         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9667         correct errno access for case that USE___THREAD is not defined.
9669 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9671         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9672         Patch by Marijn Ros <marijn@mad.scientist.com>.
9674 2002-12-22  Roland McGrath  <roland@redhat.com>
9676         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9678 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9680         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9682 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9684         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9685         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9686         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9688         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9689         of int $0x80.
9690         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9691         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9692         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9693         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9694         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9695         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9696         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9697         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9699         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9700         sysenter.
9701         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9703         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9705         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9706         in new TCB.
9707         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9708         that sysinfo is properly initialized.
9709         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9710         to 1 only for ld.so.
9712         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9713         RTLD_CORRECT_DYNAMIC_WEAK.
9715 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9717         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9718         Use return 0 as 6th argument to FORWARD4.
9719         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9721 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9723         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9724         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9725         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9726         (INIT_SYSINFO): New #define.
9727         (TLS_TP_INIT): Use INIT_SYSINFO.
9728         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9729         At test to make sure SYSINFO_OFFSET value is correct.
9730         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9732 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9734         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9735         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9736         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9737         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9738         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9739         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9740         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9742 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9744         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9745         macro instead of using int $0x80 directly.
9747         * sysdeps/pthread/bits/stdio-lock.h: New file.
9748         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9749         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9750         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9751         * Makefile (routines): Add libc-lowlevelmutex.
9753         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9754         __i686.get_pc_thunk.dx.
9756 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9758         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9759         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9760         ($(objpfx)tst-cancel-wrappers.out): New rule.
9761         * tst-cancel-wrappers.sh: New test.
9762         * tst-locale1.c: Include signal.h.
9763         (uselocale): Test static linking of __libc_current_sigrt*.
9765 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9767         * Makefile (tests): Add tst-cancel6.
9768         * tst-cancel6.c: New file
9770 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9772         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9773         Define meaningfully for assembler as well.
9774         * pthreadP.h (struct pthread_functions): Remove
9775         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9776         and ptr_pthread_attr_init_2_1 fields.
9777         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9778         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9779         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9780         (FORWARD3): Define using FORWARD4.
9781         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9782         versions.
9783         * pt-system.c: Remove duplicate stdlib.h include.
9785 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9787         * sem_init.c: Define sem_init@GLIBC_2.0.
9788         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9789         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9791         * flockfile.c: Moved to...
9792         * sysdeps/pthread/flockfile.c: ...here.  New file.
9793         * funlockfile.c: Moved to...
9794         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9795         * ftrylockfile.c: Moved to...
9796         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9798 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9800         * libc-cancellation.c: Guard both function with
9801         #if !defined NOT_IN_libc.
9802         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9803         automatically provided pthread wrappers.
9804         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9805         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9806         nor in libpthread.
9807         * pt-open.c: Removed.
9808         * pt-fcntl.c: Removed.
9809         * pt-fsync.c: Removed.
9810         * pt-lseek.c: Removed.
9811         * pt-msgrcv.c: Removed.
9812         * pt-msgsnd.c: Removed.
9813         * pt-msync.c: Removed.
9814         * pt-nanosleep.c: Removed.
9815         * pt-open64.c: Removed.
9816         * pt-pause.c: Removed.
9817         * pt-pread.c: Removed.
9818         * pt-pread64.c: Removed.
9819         * pt-pwrite.c: Removed.
9820         * pt-pwrite64.c: Removed.
9821         * pt-read.c: Removed.
9822         * pt-recv.c: Removed.
9823         * pt-recvfrom.c: Removed.
9824         * pt-recvmsg.c: Removed.
9825         * pt-send.c: Removed.
9826         * pt-sendto.c: Removed.
9827         * pt-sigtimedwait.c: Removed.
9828         * pt-sigwait.c: Removed.
9829         * pt-wait.c: Removed.
9830         * pt-waitpid.c: Removed.
9831         * pt-write.c: Removed.
9832         * pt-accept.c: Removed.
9833         * pt-close.c: Removed.
9834         * pt-connect.c: Removed.
9835         * pt-lseek64.c: Removed.
9836         * pt-sendmsg.c: Removed.
9837         * pt-tcdrain.c: Removed.
9839 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9841         * init.c (__pthread_initialize_minimal_internal): Renamed from
9842         __pthread_initialize_minimal.  Make old name an alias.  This
9843         converts a normal relocation into a relative relocation.
9845         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9847         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9848         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9849         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9850         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9851         pt-sigwaitinfo, pt-waitid, and pt-writev.
9852         * pt-creat.c: Removed.
9853         * pt-poll.c: Removed.
9854         * pt-pselect.c: Removed.
9855         * pt-readv.c: Removed.
9856         * pt-select.c: Removed.
9857         * pt-sigpause.c: Removed.
9858         * pt-sigsuspend.c: Removed.
9859         * pt-sigwaitinfo.c: Removed.
9860         * pt-waitid.c: Removed.
9861         * pt-writev.c: Removed.
9863         * init.c (pthread_functions): New variable.
9864         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9865         (or NULL) to __libc_pthread_init.
9866         * forward.c: Rewrite to use __libc:pthread_functions array to get
9867         function addresses.
9868         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9869         prototype.
9870         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9871         Take new parameter.  Copy content of variable pointed to by it
9872         to __libc_pthread_init.
9874         * pthreadP.h (struct pthread_functions): New type.
9875         (__libc_pthread_init): Declare.
9877         * pthread_attr_destroy.c: Add namespace protected alias.
9878         * pthread_attr_getdetachstate.c: Likewise.
9879         * pthread_attr_getinheritsched.c: Likewise.
9880         * pthread_attr_getschedparam.c: Likewise.
9881         * pthread_attr_getschedpolicy.c: Likewise.
9882         * pthread_attr_getscope.c: Likewise.
9883         * pthread_attr_setdetachstate.c: Likewise.
9884         * pthread_attr_setinheritsched.c: Likewise.
9885         * pthread_attr_setschedparam.c: Likewise.
9886         * pthread_attr_setschedpolicy.c: Likewise.
9887         * pthread_attr_setscope.c: Likewise.
9888         * pthread_cond_broadcast.c: Likewise.
9889         * pthread_cond_destroy.c: Likewise.
9890         * pthread_cond_init.c: Likewise.
9891         * pthread_cond_signal.c: Likewise.
9892         * pthread_cond_wait.c: Likewise.
9893         * pthread_condattr_destroy.c: Likewise.
9894         * pthread_condattr_init.c: Likewise.
9895         * pthread_equal.c: Likewise.
9896         * pthread_exit.c: Likewise.
9897         * pthread_getschedparam.c: Likewise.
9898         * pthread_self.c: Likewise.
9899         * pthread_setcancelstate.c: Likewise.
9900         * pthread_setschedparam.c: Likewise.
9901         * pthread_mutex_destroy.c: Likewise.
9902         * pthread_mutex_init.c: Likewise.
9903         * pthreadP.h: Add prototypes for the aliases.
9905         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9906         multiple_threads member in correct TCB to 1.
9908         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9909         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9910         member of thread decriptor, otherwise return unconditionally 1.
9912 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9914         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9915         regular Linux version.  Remove file.
9916         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9917         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9918         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9919         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9920         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9921         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9922         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9923         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9924         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9925         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9926         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9927         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9928         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9929         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9930         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9931         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9932         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9933         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9934         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9935         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9936         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9937         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9938         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9939         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9940         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9941         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9942         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9943         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9944         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9945         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9947 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9949         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9950         * sysdeps/unix/sysv/linux/open.c: Removed.
9951         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9952         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9953         * sysdeps/unix/sysv/linux/msync.c: Removed.
9954         * sysdeps/unix/sysv/linux/read.c: Removed.
9955         * sysdeps/unix/sysv/linux/close.c: Removed.
9956         * sysdeps/unix/sysv/linux/creat.c: Removed.
9957         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9958         * sysdeps/unix/sysv/linux/pause.c: Removed.
9959         * sysdeps/unix/sysv/linux/select.c: Removed.
9960         * sysdeps/unix/sysv/linux/write.c: Removed.
9962 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9964         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9965         element in TCB to see whether locking is needed.
9967         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9968         MULTIPLE_THREADS_OFFSET value is correct.
9970         * sysdeps/unix/sysv/linux/close.c: New file.
9971         * sysdeps/unix/sysv/linux/connect.S: New file.
9972         * sysdeps/unix/sysv/linux/creat.c: New file.
9973         * sysdeps/unix/sysv/linux/fsync.c: New file.
9974         * sysdeps/unix/sysv/linux/llseek.c: New file.
9975         * sysdeps/unix/sysv/linux/lseek.c: New file.
9976         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9977         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9978         * sysdeps/unix/sysv/linux/msync.c: New file.
9979         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9980         * sysdeps/unix/sysv/linux/open.c: New file.
9981         * sysdeps/unix/sysv/linux/open64.c: New file.
9982         * sysdeps/unix/sysv/linux/pause.c: New file.
9983         * sysdeps/unix/sysv/linux/poll.c: New file.
9984         * sysdeps/unix/sysv/linux/pread.c: New file.
9985         * sysdeps/unix/sysv/linux/pread64.c: New file.
9986         * sysdeps/unix/sysv/linux/pselect.c: New file.
9987         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9988         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9989         * sysdeps/unix/sysv/linux/readv.c: New file.
9990         * sysdeps/unix/sysv/linux/recv.S: New file.
9991         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9992         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9993         * sysdeps/unix/sysv/linux/select.c: New file.
9994         * sysdeps/unix/sysv/linux/send.S: New file.
9995         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9996         * sysdeps/unix/sysv/linux/sendto.S: New file.
9997         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9998         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9999         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
10000         * sysdeps/unix/sysv/linux/sigwait.c: New file.
10001         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
10002         * sysdeps/unix/sysv/linux/system.c: New file.
10003         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
10004         * sysdeps/unix/sysv/linux/wait.c: New file.
10005         * sysdeps/unix/sysv/linux/waitid.c: New file.
10006         * sysdeps/unix/sysv/linux/waitpid.c: New file.
10007         * sysdeps/unix/sysv/linux/writev.c: New file.
10008         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
10010         * pt-readv.c: Fix comment.
10012 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
10014         * tst-cleanup1.c: Include stdlib.h.
10016         * tst-cancel5.c: New test.
10017         * Makefile (tests): Add tst-cancel5.
10018         (tst-cancel5): Link against libc.so libpthread.so in that order.
10020 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
10022         * forward.c (test_loaded): Prevent recursive calls.
10024         * Makefile (routines): Add libc-cancellation.
10025         * libc-cancellation.c: New file.
10026         * descr.h (struct pthread): Add multiple_threads field.
10027         * allocatestack.c (allocate_stack): Initialize multiple_header field of
10028         new thread descriptor to 1.
10029         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
10030         Initialize multiple_thread field after successful thread creation.
10031         * cancellation.c (__do_cancel): Move to pthreadP.h.
10032         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
10033         (__pthread_disable_asynccancel): Add internal_function attribute.
10034         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
10035         * pthread_setcancelstate.c: Likewise.
10036         * pthread_setcanceltype.c: Likewise.
10037         * pthread_exit.c: Likewise.
10038         * pthreadP.h (CANCELLATION_P): Likewise.
10039         (__do_cancel): Define as static inline.
10040         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
10041         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
10042         declarations.
10043         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
10044         fields.  Define MULTIPLE_THREADS_OFFSET.
10045         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
10046         declaration.
10047         * sysdeps/unix/sysv/linux/accept.S: New file.
10048         * sysdeps/unix/sysv/linux/read.c: New file.
10049         * sysdeps/unix/sysv/linux/write.c: New file.
10050         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
10051         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
10052         initialization of __libc_locking_needed.
10053         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
10054         __libc_locking_needed, use multiple_threads field in TCB.
10055         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10057 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10059         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
10060         version.
10061         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
10063         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
10064         access to __libc_locking_needed for PIC.
10066 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
10068         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
10069         declare for libc.so.
10070         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
10071         expression.
10072         (__libc_lock_lock): Put into statement expression.
10073         (__libc_lock_unlock): Remove trailing semicolon.
10074         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
10076 2002-12-12  Roland McGrath  <roland@redhat.com>
10078         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
10079         "m" constraint to refer to __libc_locking_needed.  Declare it here.
10081 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
10083         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
10084         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
10085         Initialize __libc_locking_needed.
10086         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
10087         instead of __register_pthread_fork_handler.
10088         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
10089         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
10090         fork-gen with libc_pthread_init.
10091         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
10092         of __register_pthread_fork_handler.
10093         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
10094         of __register_pthread_fork_handler.
10095         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
10096         __libc_locking_needed to determine whether lock prefix can be avoided.
10097         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
10099 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
10101         * Makefile (tests): Add tst-cleanup1.
10102         * tst-cleanup1.c: New file.
10103         * cancellation.c (__cleanup_thread): Removed.
10104         (__do_cancel): Remove call to __cleanup_thread.
10105         * pthreadP.h: Remove __cleanup_thread prorotype.
10107         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
10108         Remember function and argument even if cancellation handler
10109         function is not available.
10110         (__libc_cleanup_region_end): Execute registered function directly if
10111         pthread functions are not available.
10112         (__libc_cleanup_end): Likewise.
10114         * init.c (__pthread_initialize_minimal): Fix initialization in
10115         static lib by preventing gcc from being too clever.
10117 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10119         * init.c (__pthread_initialize_minimal): Remove unneccesary
10120         sigaddset call.
10122         * Makefile (tests): We can run tst-locale2 now.
10124 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10126         * Versions: Remove duplicated sigwait entry.
10128 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10130         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10131         inside libpthread.
10133         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10135         * pthreadP.h: Declare __pthread_enable_asynccancel and
10136         __pthread_disable_asynccancel.
10137         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10138         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10139         * cancellation.c (__pthread_enable_asynccancel): New function.
10140         (__pthread_disable_asynccancel): New function.
10141         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10142         * pt-close.c: Likewise.
10143         * pt-connect.c: Likewise.
10144         * pt-creat.c: Likewise.
10145         * pt-fcntl.c: Likewise.
10146         * pt-fsync.c: Likewise.
10147         * pt-lseek.c: Likewise.
10148         * pt-lseek64.c: Likewise.
10149         * pt-msgrcv.c: Likewise.
10150         * pt-msgsnd.c: Likewise.
10151         * pt-msync.c: Likewise.
10152         * pt-nanosleep.c: Likewise.
10153         * pt-open.c: Likewise.
10154         * pt-open64.c: Likewise.
10155         * pt-pause.c: Likewise.
10156         * pt-poll.c: Likewise.
10157         * pt-pread.c: Likewise.
10158         * pt-pread64.c: Likewise.
10159         * pt-pselect.c: Likewise.
10160         * pt-pwrite.c: Likewise.
10161         * pt-pwrite64.c: Likewise.
10162         * pt-read.c: Likewise.
10163         * pt-readv.c: Likewise.
10164         * pt-recv.c: Likewise.
10165         * pt-recvfrom.c: Likewise.
10166         * pt-recvmsg.c: Likewise.
10167         * pt-select.c: Likewise.
10168         * pt-send.c: Likewise.
10169         * pt-sendmsg.c: Likewise.
10170         * pt-sendto.c: Likewise.
10171         * pt-sigpause.c: Likewise.
10172         * pt-sigsuspend.c: Likewise.
10173         * pt-sigtimedwait.c: Likewise.
10174         * pt-sigwait.c: Likewise.
10175         * pt-sigwaitinfo.c: Likewise.
10176         * pt-system.c: Likewise.
10177         * pt-tcdrain.c: Likewise.
10178         * pt-wait.c: Likewise.
10179         * pt-waitid.c: Likewise.
10180         * pt-waitpid.c: Likewise.
10181         * pt-write.c: Likewise.
10182         * pt-writev.c: Likewise.
10183         * pthread_join.c: Likewise.
10184         * pthread_timedjoin.c: Likewise.
10186         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10187         (__xpg_sigpause): New function.
10188         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10190 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10192         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10194         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10195         _GI_pthread_cleanup_pop to pthreadP.h.
10197         * ftrylockfile.c: Use _IO_lock_trylock instead of
10198         pthread_mutex_trylock.
10200         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10201         (CANCEL_RESET): Likewise.
10202         (__pthread_setcanceltype_): Declare.
10203         (__pthread_mutex_lock_internal): Declare.
10204         (__pthread_mutex_unlock_internal): Declare.
10205         (__pthread_once_internal): Declare.
10206         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10207         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10209         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10210         and pthread_mutex_unlock.
10211         * pthread_cond_wait.c: Likewise.
10212         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10213         * pthread_mutex_unlock.c: Likewise.
10215         * pthread_setcanceltype.c: Add additional alias
10216         __pthread_setcanceltype.
10218         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10219         * sem_open.c (sem_open): Likewise.
10220         Use __libc_open, __libc_write, and __libc_close instead of
10221         open, write, and close respectively.
10223         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10224         Rewrite as statement expression since it must return a value.
10226         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10227         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10228         __pthread_kill.
10230         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10231         alias __pthread_once_internal.
10233         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10235 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10237         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10238         * tst-stdio1.c: New file.
10239         * tst-stdio2.c: New file.
10241         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10243         * Makefile (tests): Comment out tst-locale2 for now.
10244         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10246         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10247         -D_IO_MTSAFE_IO.
10248         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10249         Use _IO_lock_init instead of explicit assignment.
10251         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10252         Define __libc_lock_* and __libc_lock_recursive macros with
10253         lowlevellock macros, not pthread mutexes.
10255         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10256         of pthread_mutex_lock.
10257         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10258         instead of pthread_mutex_unlock.
10260 2002-12-06  Roland McGrath  <roland@redhat.com>
10262         * allocatestack.c (__stack_user): Use uninitialized defn.
10263         * init.c (__pthread_initialize_minimal): Initialize it here.
10265 2002-12-05  Roland McGrath  <roland@redhat.com>
10267         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10268         string.
10269         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10271         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10272         missing & here too.
10274 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10276         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10277         lowlevellock.
10278         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10279         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10280         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10281         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10282         for __libc_lock_* macros.
10283         * Makefile (routines): Add libc-lowlevellock.
10285 2002-10-09  Roland McGrath  <roland@redhat.com>
10287         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10288         Under [__PIC__], call the function via the pointer fetched for
10289         comparison rather than a call by name that uses the PLT.
10290         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10291         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10292         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10293         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10294         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10296 2002-12-04  Roland McGrath  <roland@redhat.com>
10298         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10300         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10301         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10303         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10305 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10307         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10308         a completely opaque, non-integer type.
10309         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10311 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10313         * sysdeps/i386/tls.h: Include stdlib.h.
10314         * sysdeps/x86_64/tls.h: Likewise.
10316 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10318         * Makefile (tests): Add tst-locale2.
10319         (tests-static): Likewise.
10320         * tst-locale2.c: New file.
10322         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10323         volatile and add memory clobbers to lock operations.
10325 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10327         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10328         * sysdeps/i386/i486/bits/atomic.h: New file.
10329         * sysdeps/i386/i586/bits/atomic.h: New file.
10330         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10331         include i486 version.
10332         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10333         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10334         Patch by Marijn Ros <marijn@mad.scientist.com>.
10336         * allocatestack.c (get_cached_stack): Don't crash if we first
10337         found a stack with a larger size then needed.
10338         Reported by Hui Huang <hui.huang@sun.com>.
10340         * Makefile (tests): Add tst-sysconf.
10341         * tst-sysconf.c: New file.
10343         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10344         PTHREAD_THREADS_MAX.
10346 2002-12-02  Roland McGrath  <roland@redhat.com>
10348         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10349         Declare using hidden_proto instead of attribute_hidden, so there are
10350         non-.hidden static symbols for gdb to find.
10351         (__pthread_keys): Likewise.
10352         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10353         * allocatestack.c (__stack_user): Likewise.
10354         * pthread_create.c (__pthread_keys): Likewise.
10355         (__nptl_threads_events, __nptl_last_event): Make these static instead
10356         of hidden.
10357         * pthread_key_create.c (__pthread_pthread_keys_max,
10358         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10360 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10362         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10363         statically.
10364         * tst-locale1.c: New file.
10366         * pthread_cond_timedwait.c: Include <stdlib.h>.
10368         * Makefile (tests): Add tst-fork2 and tst-fork3.
10369         * tst-fork2.c: New file.
10370         * tst-fork3.c: New file.
10372 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10374         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10376         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10377         require it to 200112L.
10379         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10380         instruction only if HAVE_CMOV is defined.
10381         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10383         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10385         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10387         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10389         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10391 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10393         * sysdeps/x86_64/bits/atomic.h: New file.
10395         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10396         16-bit operations.
10398         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10399         possible since gettid cannot fail.
10401         * sysdeps/x86_64/pthreaddef.h: New file.
10403         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10405         * sysdeps/x86_64/pthread_spin_init.c: New file.
10406         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10407         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10408         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10410         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10411         Add missing lock prefix.  Minute optimization.
10413         * tst-spin2.c (main): Also check successful trylock call.
10415         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10416         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10418         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10419         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10421         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10422         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10423         value in case of an error.  Add support for INTERNAL_SYSCALL.
10425         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10426         value in case of an error.
10428         * sysdeps/x86_64/tls.h: New file.
10430 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10432         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10433         takes the array member name and the index as parameters.
10434         (THREAD_SETMEM_NC): Likewise.
10435         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10436         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10437         interfaces.
10439         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10440         to decide which code to use.
10441         (THREAD_SETMEM_NC): Likewise.
10443         * allocatestack.c (queue_stack): Don't remove stack from list here.
10444         Do it in the caller.  Correct condition to prematurely terminate
10445         loop to free stacks.
10446         (__deallocate_stack): Remove stack from list here.
10448 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10450         * Makefile (tests): Add tst-stack1.
10451         * tst-stack1.c: New file.
10453         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10454         provided stack.
10456         * pthread_attr_getstack.c: Return bottom of the thread area.
10458 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10460         * Makefile (libpthread-routines): Add pt-allocrtsig and
10461         pthread_kill_other_threads.
10462         * pt-allocrtsig.c: New file.
10463         * pthread_kill_other_threads.c: New file.
10464         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10465         all three functions.
10466         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10467         allocrtsig.
10468         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10469         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10470         and __libc_allocate_rtsig_private.
10471         * Versions (libpthread): Export pthread_kill_other_threads_np,
10472         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10474 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10476         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10477         the end of the stack.  Adjust computations.
10478         When mprotect call fails dequeue stack and free it.
10479         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10480         attribute.
10481         * pthread_getattr_np.c: Likewise.
10483         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10484         surprises.
10486 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10488         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10489         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10491 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10493         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10494         * pthread_setspecific.c: Likewise.
10496 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10498         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10499         definitions.  Get them from the official place.
10500         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10502         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10503         Use new CLONE_ flags in clone() calls.
10505         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10506         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10508         * Versions: Add pthread_* functions for libc.
10509         * forward.c: New file.
10511         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10512         errno-loc.
10513         * herrno.c: New file.
10514         * res.c: New file.
10516         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10517         sem_trywait, and sem_timedwait.  Add herrno and res.
10518         * sem_init.c: Don't initialize lock and waiters members.
10519         * sem_open.c: Likewise.
10520         * sem_post.c: Removed.
10521         * sem_wait.c: Removed.
10522         * sem_trywait.c: Removed.
10523         * sem_timedwait.c: Removed.
10524         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10525         Includes full implementations of sem_post, sem_wait, sem_trywait,
10526         and sem_timedwait.
10527         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10528         for new implementation.
10529         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10530         and waiters fields.
10532         * tst-sem3.c: Improve error message.
10533         * tst-signal3.c: Likewise.
10535         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10536         to tell the kernel about the termination futex and to initialize tid
10537         member.  Don't initialize main_thread.
10538         * descr.h (struct pthread): Remove main_thread member.
10539         * cancelllation.c (__do_cancel): Remove code handling main thread.
10540         The main thread is not special anymore.
10542         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10543         size of the stacks to stack_cache_actsize.
10545         * pt-readv.c: Add missing "defined".
10546         * pt-sigwait.c: Likewise.
10547         * pt-writev.c: Likewise.
10549 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10551         * Versions: Export __connect from libpthread.
10552         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10554         * Makefile (libpthread-routines): Add pt-raise.
10555         * sysdeps/unix/sysv/linux/raise.c: New file.
10556         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10557         * sysdeps/generic/pt-raise.c: New file.
10559         * pthread_cond_init.c: Initialize all data elements of the condvar
10560         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10562         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10563         * pthread_create.c: Likewise.
10565         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10566         * tst-key1.c: New file.
10567         * tst-key2.c: New file.
10568         * tst-key3.c: New file.
10570         * Versions: Export pthread_detach for version GLIBC_2.0.
10571         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10573 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10575         * pthread_key_create.c: Terminate search after an unused key was found.
10576         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10578         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10579         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10581 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10583         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10584         dynamic lookup for errno in PIC.
10586         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10587         release the stack lock as soon as possible.
10588         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10589         the static TLS block.
10590         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10592         * cancellation.c: Renamed from cancelation.c.
10593         * Makefile: Adjust accordingly.
10594         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10595         * cleanup_defer.c: Use CANCELLATION_P.
10596         * pthread_testcancel.c: Likewise.
10597         * descr.h: Fix spelling in comments.
10598         * init.c: Likewise.
10599         * pthread_getattr_np.c: Likewise.
10600         * pthread_getschedparam.c: Likewise.
10601         * pthread_setschedparam.c: Likewise.
10602         * Versions: Likewise.
10604         * pt-pselect.c: New file.
10605         * Makefile (libpthread-routines): Add pt-pselect.
10606         * Versions: Add pselect.
10608         * tst-cancel4.c: New file.
10609         * Makefile (tests): Add tst-cancel4.
10611 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10613         * pthread_mutex_lock.c: Always record lock ownership.
10614         * pthread_mutex_timedlock.c: Likewise.
10615         * pthread_mutex_trylock.c: Likewise.
10617         * pt-readv.c: New file.
10618         * pt-writev.c: New file.
10619         * pt-creat.c: New file.
10620         * pt-msgrcv.c: New file.
10621         * pt-msgsnd.c: New file.
10622         * pt-poll.c: New file.
10623         * pt-select.c: New file.
10624         * pt-sigpause.c: New file.
10625         * pt-sigsuspend.c: New file.
10626         * pt-sigwait.c: New file.
10627         * pt-sigwaitinfo.c: New file.
10628         * pt-waitid.c: New file.
10629         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10630         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10631         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10632         * Versions: Add all the new functions.
10634         * tst-exit1.c: New file.
10635         * Makefile (tests): Add tst-exit1.
10637         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10639 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10641         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10643         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10644         call.  pthread_join is an official cancellation point.
10645         * pthread_timedjoin.c: Likewise.
10647         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10648         and the condvar's mutex are retrieved.
10649         * pthread_cond_timedwait.c: Likewise.
10650         Reported by dice@saros.East.Sun.COM.
10652 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10654         * pthreadP.h: Cut out all type definitions and move them...
10655         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10656         * pthreadP.h: Include <internaltypes.h>.
10658         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10659         performance tweaks.
10661         * sem_trywait.c: Shuffle #includes around to get right order.
10662         * sem_timedwait.c: Likewise.
10663         * sem_post.c: Likewise.
10664         * sem_wait.c: Likewise.
10666         * nptl 0.3 released.
10668         * Makefile (tests): Add tst-signal3.
10669         * tst-signal3.c: New file.
10671 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10673         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10674         the asms modify the sem object.
10675         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10677         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10678         the actual members.
10679         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10680         * semaphoreP.h: Include pthreadP.h.
10681         * sem_getvalue.c: Adjust to sem_t change.
10682         * sem_init.c: Likewise.
10683         * sem_open.c: Likewise.
10684         * sem_post.c: Likewise.
10685         * sem_timedwait.c: Likewise.
10686         * sem_trywait.c: Likewise.
10687         * sem_wait.c: Likewise.
10689 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10691         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10692         * tst-basic2.c: New file.
10693         * tst-exec1.c: New file.
10694         * tst-exec2.c: New file.
10695         * tst-exec3.c: New file.
10697         * tst-fork1.c: Remove extra */.
10699         * nptl 0.2 released.  The API for IA-32 is complete.