Add 4-byte header to messages so that we can have different message types
[glibc/nacl-glibc.git] / nptl / ChangeLog
blob8aa7f9ba3e1ed41dd8cb198e17e59017091ef4d8
1 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
3         [BZ #7008]
4         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
5         of old value.
6         * pthread_cond_init.c (__pthread_cond_init): Fix
7         cond->__data.__nwaiters initialization.
8         * Makefile (tests): Add tst-cond23.
9         * tst-cond23.c: New test.
11 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
13         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
14         arguments.
15         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
16         arguments.
18 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
20         [BZ #6955]
21         * pthread_mutex_lock.c: Add support for private PI mutexes.
22         * pthread_mutex_timedlock.c: Likewise.
23         * pthread_mutex_trylock.c: Likewise.
24         * pthread_mutex_unlock.c: Likewise.
25         Patch mostly by Ben Jackson <ben@ben.com>.
27 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
29         [BZ #6843]
30         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
31         Increase stack size for helper thread.
33 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
35         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
36         assembly with a clobber list for access registers a0 and a1.
38 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
40         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
41         to force runp->refcntr to be read from memory.
43 2008-09-08  Richard Guenther  <rguenther@suse.de>
45         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
46         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
47         lll_timedlock, lll_robust_timedlock, lll_unlock,
48         lll_robust_unlock): Promote private to int.
50 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
52         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
53         ARCH_RETRY_MMAP definitions.
54         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
55         Define MAP_STACK when not defined.
56         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
57         handling of ARCH_RETRY_MMAP.
59 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
61         * tst-align2.c (f): Print message that f is reached.
63 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
65         [BZ #6740]
66         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
67         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
69 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
71         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
72         SOCK_CLOEXEC if possible.
74 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
76         * Makefile (tests): Add tst-rwlock2a.
77         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
78         * tst-rwlock2a.c: New file.
80 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
82         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
84 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
86         * sysdeps/pthread/pthread.h: Fix typo in comment.
88 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
90         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
91         of CPU set to the kernel.
93 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
95         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
96         cfi directives.
97         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
98         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
99         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
100         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
102         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
104 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
106         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
107         cfi directives.
108         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
109         Likewise.
110         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
111         Likewise.
112         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
113         Likewise.
115 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
117         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
119 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
121         David S. Miller  <davem@davemloft.net>
123         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
125 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
127         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
128         __pshared correctly.
129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
130         Likewise.
131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
132         Likewise.
133         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
134         Likewise.
135         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
136         Likewise.
137         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
139 2008-04-14  David S. Miller  <davem@davemloft.net>
141         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
142         (__old_sem_wait): Fix argument to lll_futex_wait().
144 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
146         * pthread_create.c: Require pthread_mutex_trylock and
147         pthread_key_delete for libgcc.
149 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
151         [BZ #6020]
152         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
153         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
154         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
156 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
158         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
159         <linux/limits.h> has defined it.
160         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
161         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
162         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
163         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
165 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
167         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
168         of ASSEMBLER.
169         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
170         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
172 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
174         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
175         HAVE_DL_DISCOVER_OSVERSION.
176         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
177         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
179 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
181         [BZ #5778]
182         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
183         _POSIX_CHOWN_RESTRICTED value to zero.
185 2008-01-31  Roland McGrath  <roland@redhat.com>
187         * Makefile (omit-deps): Variable removed.
189 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
191         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
192         unnecessary addr32 prefix.
194 2008-01-29  Roland McGrath  <roland@redhat.com>
196         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
198 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
200         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
202 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
204         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
205         a scratch register.
206         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
207         (__lll_lock_wait_private): Fix typo.
208         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
209         (pthread_barrier_wait): Likewise.  Adjust XADD use.
210         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
211         Adjust XADD use.
212         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
213         (pthread_rwlock_timedrdlock): Return correct return value.
214         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
215         (pthread_rwlock_timedwrlock): Likewise.
217 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
219         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
220         thread returns the program exits with an error code.
222 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
224         * pthread-errnos.sym: Add EOVERFLOW.
225         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
226         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
227         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
228         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
230 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
232         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
233         parameter.  Passed it as permission to mmap.
234         * allocatestack.c (allocate_stack): Pass prot as second parameter
235         to ARCH_RETRY_MMAP.
237 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
239         * tst-basic7.c: Allocate memory for the stack.
241         [BZ #5465]
242         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
243         (__pthread_cond_timedwait): Don't use VDSO.
244         Patch by Michal Januszewski.
246 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
248         [BZ #5455]
249         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
250         Allow label before pthread_cleanup_pop.
251         (pthread_cleanup_pop_restore_np): Likewise.
253 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
255         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
256         Store 2 before returning ETIMEDOUT.
258 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
260         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
261         Store 2 before returning ETIMEDOUT.
262         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
263         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
264         (__lll_lock_wait_private): Optimize.
265         (__lll_lock_wait): Likewise.
267 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
269         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
270         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
271         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
273 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
275         [BZ #5240]
276         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
277         If we time out, try one last time to lock the futex to avoid
278         losing a wakeup signal.
279         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
280         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
282         [BZ #5245]
283         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
284         if necessary.
286 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
288         [BZ #5245]
289         * allocatestack.c (allocate_stack): Change ENOMEM error in case
290         mmap failed to EAGAIN.
291         * Makefile (tests): Add tst-basic7.
292         * tst-basic7.c: New file.
294 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
296         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
297         Use __linkin_atfork.
299 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
301         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
302         missing line continuations.
303         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
304         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
306 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
308         [BZ #5220]
309         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
310         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
311         (struct timer): Add next element.
312         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
313         enqueue timer structure into __active_timer_sigev_thread list.
314         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
315         remove timer struct from __active_timer_sigev_thread.
316         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
317         Before using timer structure make sure it is still on the
318         __active_timer_sigev_thread list.  Keep lock until done.
319         Define __active_timer_sigev_thread and
320         __active_timer_sigev_thread_lock.
322 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
324         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
325         Redefine thread_atfork for use of ATFORK_MEM.
326         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
327         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
328         function.
329         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
330         Use atomic operation when removing first element of list.
332 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
334         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
335         routine instead of an alias to __new_sem_post.
337 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
339         * init.c (__pthread_initialize_minimal): Initialize word to appease
340         valgrind.
342 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
344         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
345         libc.so just clear NAME.
346         (__libc_rwlock_fini): Nop inside of libc.so.
347         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
348         all zeros.
350 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
352         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
353         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
354         unlocking failed.
355         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
357 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
359         [BZ #4938]
360         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
361         reclaimed stack if necessary.
362         * Makefile (tests): Add tst-tsd6.
363         * tst-tsd6.c: New file.
365 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
367         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
368         Add private argument.
370 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
373         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
375 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
377         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
378         (__lll_robust_timedlock): Pass private as last argument to
379         __lll_robust_timedlock_wait.
380         (__lll_unlock): Fix a pasto.
382 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
384         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
385         sparc_old_sem): New structs.
386         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
387         (__sem_wait_cleanup): New function.
388         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
389         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
390         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
391         lll_futex_wait.
392         (__old_sem_wait): New function.
393         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
394         nptl/sysdeps/unix/sysv/linux/sparc version.
395         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
396         Likewise.
397         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
398         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
399         (__new_sem_trywait): Use sparc_old_sem structure.
400         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
401         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
402         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
403         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
404         lll_futex_timed_wait.
405         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
406         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
407         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
408         lll_futex_wake.
409         (__old_sem_post): New function.
410         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
411         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
412         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
413         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
414         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
415         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
417 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
419         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
420         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
421         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
422         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
423         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
424         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
425         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
426         Use FUTEX_WAKE_OP.
427         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
428         kernel-features.h and tcb-offsets.h.
429         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
430         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
431         process private.
432         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
433         tcb-offsets.h.
434         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
435         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
436         process private.
437         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
438         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
439         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
440         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
441         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
442         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
445 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
447         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
448         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
449         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
450         lll_futex_timed_wait.
452         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
453         __lll_robust_unlock): Rewrite as macros instead of inline functions.
454         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
455         __lll_robust_unlock, __lll_wait_tid): Likewise.
457 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
459         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
460         Fix a pasto.
461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
462         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
463         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
464         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
466         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
467         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
468         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
469         kernel-features.h.
470         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
471         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
472         process private.  Switch DW_CFA_advance_loc1 and some
473         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
474         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
475         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
476         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
477         process private.  Switch DW_CFA_advance_loc{1,2} and some
478         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
479         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
480         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
481         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
482         Likewise.
483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
484         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
486         Likewise.
487         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
488         (__pthread_cond_broadcast): Compare %r8 instead of
489         dep_mutex-cond_*(%rdi) with $-1.
490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
491         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
492         of oring.
494 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
496         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
498 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
500         * allocatestack.c: Include kernel-features.h.
501         * pthread_create.c: Likewise.
502         * pthread_mutex_init.c: Likewise.
503         * init.c: Likewise.
504         * pthread_cond_timedwait.c: Likewise.
505         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
506         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
507         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
509         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
512         Likewise.
513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
514         Likewise.
515         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
516         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
517         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
518         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
520 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
522         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
523         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
524         byte elements.  One of them is the new __shared element.
525         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
526         adjust names of other padding elements.
527         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
528         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
529         byte elements.  One of them is the new __shared element.
530         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
531         adjust names of other padding elements.
532         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
533         Renamed __pad1 element to __shared, adjust names of other padding
534         elements.
535         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
536         (pthread_rwlock_t): Likewise.
537         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
538         typo.
540 2007-08-09  Anton Blanchard  <anton@samba.org>
542         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
544 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
546         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
547         <kernel-features.h>.
548         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
550 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
552         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
553         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
554         dealing with robust mutexes.
555         * pthread_mutex_timedlock.c: Likewise.
556         * pthread_mutex_trylock.c: Likewise.
557         * pthread_mutex_unlock.c: Likewise.
558         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
560 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
562         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
563         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
564         (PTHREAD_MUTEX_PSHARED): Define.
565         * pthread_mutex_init.c (__pthread_mutex_init): Set
566         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
567         mutexes.
568         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
569         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
570         as second argument to lll_lock.
571         (LLL_MUTEX_TRYLOCK): Take mutex as argument
572         instead of its __data.__lock field.
573         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
574         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
575         to lll_robust_lock.
576         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
577         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
578         instead of mutex->__data.__kind directly, pass
579         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
580         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
581         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
582         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
583         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
584         to lll_timedlock, lll_robust_timedlock, lll_unlock and
585         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
586         of mutex->__data.__kind directly.
587         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
588         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
589         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
590         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
591         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
592         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
593         and lll_futex_wake.
594         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
595         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
596         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
597         directly.
598         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
599         Take mutex as argument instead of its __data.__lock field, pass
600         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
601         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
602         __data.__lock field.
603         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
604         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
605         to lll_robust_cond_lock.
606         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
607         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
608         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
609         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
610         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
611         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
612         lll_futex_wait.
613         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
614         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
615         lll_futex_wake.
616         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
617         pshared variable, pass it to lll_lock, lll_unlock,
618         lll_futex_timedwait and lll_futex_wake.
619         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
620         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
621         and lll_futex_wake.
622         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
623         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
624         macro.
625         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
626         lll_futex_wake_unlock): Likewise.
627         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
628         Likewise.
629         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
630         lll_futex_wake_unlock): Likewise.
631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
632         Likewise.
633         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
634         lll_futex_wake_unlock): Likewise.
635         (lll_futex_wake): Fix a typo.
636         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
637         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
638         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
639         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
640         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
642         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
643         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
644         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
645         (__pthread_cond_timedwait): Likewise.
646         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
647         (__condvar_cleanup, __pthread_cond_wait): Likewise.
649 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
651         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
652         Don't use CGOTSETUP and CGOTRESTORE macros.
653         (CGOTSETUP, CGOTRESTORE): Remove.
654         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
655         @local symbol.
657 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
659         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
660         definitions for private futexes.
661         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
662         kernel-features.h and lowlevellock.h.  Use private futexes if
663         they are available.
664         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
665         (__lll_mutex_lock_wait): Rename to
666         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
667         (__lll_mutex_timedlock_wait): Rename to ...
668         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
669         Don't compile in for libc.so.
670         (__lll_mutex_unlock_wake): Rename to ...
671         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
672         (__lll_timedwait_tid): Use __NR_gettimeofday.
673         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
674         the header from assembler.  Renamed all lll_mutex_* resp.
675         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
676         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
677         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
678         Define.
679         (__lll_lock_wait_private): Add prototype.
680         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
681         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
682         __lll_unlock_wake): Likewise.
683         (lll_lock): Add private argument.  Call __lll_lock_wait_private
684         if private is constant LLL_PRIVATE.
685         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
686         lll_timedlock, lll_robust_timedlock): Add private argument.
687         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
688         if private is constant LLL_PRIVATE.
689         (lll_robust_unlock, lll_robust_dead): Add private argument.
690         (lll_lock_t): Remove.
691         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
692         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
693         lll_cond_wake, lll_cond_broadcast): Remove.
694         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
695         kernel-features.h and lowlevellock.h.
696         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
697         (LOAD_FUTEX_WAIT): Define.
698         (__lll_robust_mutex_lock_wait): Rename to ...
699         (__lll_robust_lock_wait): ... this.  Add private argument.
700         Use LOAD_FUTEX_WAIT macro.
701         (__lll_robust_mutex_timedlock_wait): Rename to ...
702         (__lll_robust_timedlock_wait): ... this.    Add private argument.
703         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
704         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
705         lowlevellock.h.
706         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
707         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
708         __lll_mutex_{lock,unlock}_*.
709         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
710         lowlevellock.h and pthread-errnos.h.
711         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
712         FUTEX_CMP_REQUEUE, EINVAL): Remove.
713         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
714         __lll_mutex_{lock,unlock}_*.
715         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
716         lowlevellock.h and pthread-errnos.h.
717         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
718         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
719         __lll_mutex_{lock,unlock}_*.
720         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
721         lowlevellock.h.
722         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
723         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
724         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
725         (__condvar_tw_cleanup): Likewise.
726         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
727         lowlevellock.h.
728         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
729         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
730         __lll_mutex_{lock,unlock}_*.
731         ( __condvar_w_cleanup): Likewise.
732         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
733         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
734         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
735         lowlevellock.h.
736         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
737         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
738         __lll_mutex_{lock,unlock}_*.
739         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
740         lowlevellock.h.
741         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
742         FUTEX_PRIVATE_FLAG): Remove.
743         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
744         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
745         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
746         lowlevellock.h.
747         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
748         FUTEX_PRIVATE_FLAG): Remove.
749         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
750         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
751         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
752         lowlevellock.h.
753         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
754         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
755         __lll_mutex_{lock,unlock}_*.
756         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
757         lowlevellock.h.
758         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
759         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
760         __lll_mutex_{lock,unlock}_*.
761         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
762         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
763         (__new_sem_post): Use standard initial exec code sequences.
764         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
765         lowlevellock.h.
766         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
767         FUTEX_PRIVATE_FLAG): Remove.
768         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
769         exec code sequences.
770         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
771         (__new_sem_trywait): Use standard initial exec code sequences.
772         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
773         (__new_sem_wait): Use standard initial exec code sequences.
775 2007-07-31  Anton Blanchard  <anton@samba.org>
777         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
778         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
779         atomic_full_barrier.
781 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
783         * allocatestack.c (stack_cache_lock): Change type to int.
784         (get_cached_stack, allocate_stack, __deallocate_stack,
785         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
786         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
787         as second argument to lll_lock and lll_unlock macros on
788         stack_cache_lock.
789         * pthread_create.c (__find_in_stack_list): Likewise.
790         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
791         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
792         as second argument.
793         * descr.h (struct pthread): Change lock and setxid_futex field
794         type to int.
795         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
796         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
797         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
798         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
799         Likewise.
800         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
801         * pthread_cond_init.c (__pthread_cond_init): Likewise.
802         * pthreadP.h (__attr_list_lock): Change type to int.
803         * pthread_attr_init.c (__attr_list_lock): Likewise.
804         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
805         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
806         lll_{,un}lock.
807         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
808         also for lll_futex_{wake,wait}.
809         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
810         a pointer to const.
811         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
812         LLL_SHARED as second argument to lll_{,un}lock.
813         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
814         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
815         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
816         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
817         Likewise.
818         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
819         as second argument to lll_{,un}lock macros on pd->lock.
820         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
821         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
822         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
823         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
824         Likewise.
825         * sysdeps/pthread/createthread.c (do_clone, create_thread):
826         Likewise.
827         * pthread_once.c (once_lock): Change type to int.
828         (__pthread_once): Pass LLL_PRIVATE as second argument to
829         lll_{,un}lock macros on once_lock.
830         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
831         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
832         rwlock->__data.__shared as second argument to them and similarly
833         for lll_futex_w*.
834         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
835         Likewise.
836         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
837         Likewise.
838         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
839         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
840         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
841         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
842         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
843         to lll_{,un}lock macros on __sem_mappings_lock.
844         * sem_open.c (check_add_mapping): Likewise.
845         (__sem_mappings_lock): Change type to int.
846         * semaphoreP.h (__sem_mappings_lock): Likewise.
847         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
848         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
849         instead of lll_*mutex_*, pass LLL_SHARED as last
850         argument.
851         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
852         pass LLL_SHARED as last argument.
853         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
854         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
855         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
856         pass LLL_SHARED as last argument.
857         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
858         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
859         LLL_SHARED as last argument.
860         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
861         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
862         Similarly.
863         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
864         __libc_lock_lock_recursive, __libc_lock_unlock,
865         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
866         argument to lll_{,un}lock.
867         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
868         _IO_lock_unlock): Likewise.
869         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
870         compound literal.
871         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
872         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
873         __fork_lock.
874         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
875         free_mem): Likewise.
876         (__fork_lock): Change type to int.
877         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
878         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
879         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
880         lll_futex_wake.
881         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
882         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
883         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
884         New function.
885         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
886         pass it through to lll_futex_*wait, only compile in when
887         IS_IN_libpthread.
888         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
889         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
890         argument and pass it through to lll_futex_*wait.
891         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
892         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
893         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
894         inline functions to __lll_* resp. __lll_robust_*.
895         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
896         (lll_mutex_dead): Add private argument.
897         (__lll_lock_wait_private): New prototype.
898         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
899         __lll_robust_lock_timedwait): Add private argument to prototypes.
900         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
901         call __lll_lock_wait_private, otherwise pass private to
902         __lll_lock_wait.
903         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
904         __lll_robust_timedlock): Add private argument, pass it to
905         __lll_*wait functions.
906         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
907         call __lll_unlock_wake_private, otherwise pass private to
908         __lll_unlock_wake.
909         (__lll_robust_unlock): Add private argument, pass it to
910         __lll_robust_unlock_wake.
911         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
912         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
913         argument, pass it through to __lll_* inline function.
914         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
915         (lll_lock_t): Remove.
916         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
917         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
918         lll_cond_wake, lll_cond_broadcast): Remove.
919         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
920         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
921         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
922         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
923         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
924         the header from assembler.  Renamed all lll_mutex_* resp.
925         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
926         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
927         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
928         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
929         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
930         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
931         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
932         Remove prototype.
933         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
934         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
935         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
936         (lll_trylock): Likewise, use __lll_trylock_asm, pass
937         MULTIPLE_THREADS_OFFSET as another asm operand.
938         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
939         MULTIPLE_THREADS_OFFSET as last asm operand, call
940         __lll_lock_wait_private if private is constant LLL_PRIVATE,
941         otherwise pass private as another argument to __lll_lock_wait.
942         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
943         lll_timedlock, lll_robust_timedlock): Add private argument, pass
944         private as another argument to __lll_*lock_wait call.
945         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
946         MULTIPLE_THREADS_OFFSET as another asm operand, call
947         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
948         otherwise pass private as another argument to __lll_unlock_wake.
949         (lll_robust_unlock): Add private argument, pass private as another
950         argument to __lll_unlock_wake.
951         (lll_robust_dead): Add private argument, use __lll_private_flag
952         macro.
953         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
954         LLL_MUTEX_LOCK_INITIALIZER.
955         (lll_lock_t): Remove.
956         (LLL_LOCK_INITIALIZER_WAITERS): Define.
957         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
958         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
959         lll_cond_wake, lll_cond_broadcast): Remove.
960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
961         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
962         2007-05-2{3,9} changes.
963         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
964         kernel-features.h and lowlevellock.h.
965         (LOAD_PRIVATE_FUTEX_WAIT): Define.
966         (LOAD_FUTEX_WAIT): Rewritten.
967         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
968         define.
969         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
970         (__lll_mutex_lock_wait): Rename to ...
971         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
972         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
973         (__lll_mutex_timedlock_wait): Rename to ...
974         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
975         contains private argument.  Don't compile in for libc.so.
976         (__lll_mutex_unlock_wake): Rename to ...
977         (__lll_unlock_wake): ... this.  %ecx contains private argument.
978         Don't compile in for libc.so.
979         (__lll_timedwait_tid): Use __NR_gettimeofday.
980         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
981         kernel-features.h and lowlevellock.h.
982         (LOAD_FUTEX_WAIT): Define.
983         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
984         define.
985         (__lll_robust_mutex_lock_wait): Rename to ...
986         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
987         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
988         macro.
989         (__lll_robust_mutex_timedlock_wait): Rename to ...
990         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
991         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
992         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
993         lowlevellock.h.
994         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
995         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
996         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
997         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
998         to __lll_lock_wait in %edx.
999         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1000         Include lowlevellock.h and pthread-errnos.h.
1001         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1002         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1003         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1004         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1005         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1006         __lll_unlock_wake.
1007         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1008         Include lowlevellock.h and pthread-errnos.h.
1009         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1010         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1011         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1012         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1013         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1014         __lll_unlock_wake.
1015         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1016         Include lowlevellock.h.
1017         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1018         Don't define.
1019         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1020         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1021         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1022         __lll_unlock_wake.  Use __NR_gettimeofday.
1023         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1024         Include lowlevellock.h.
1025         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1026         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1027         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1028         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1029         and __lll_unlock_wake.
1030         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1031         Include lowlevellock.h.
1032         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1033         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1034         MUTEX(%ebx) address in %edx rather than %ecx to
1035         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1036         and __lll_unlock_wake.  Move return value from %ecx to %edx
1037         register.
1038         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1039         Include lowlevellock.h.
1040         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1041         Don't define.
1042         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1043         MUTEX(%ebp) address in %edx rather than %ecx to
1044         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1045         and __lll_unlock_wake.  Move return value from %ecx to %edx
1046         register.  Use __NR_gettimeofday.
1047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1048         Include lowlevellock.h.
1049         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1050         Don't define.
1051         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1052         MUTEX(%ebp) address in %edx rather than %ecx to
1053         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1054         and __lll_unlock_wake.  Move return value from %ecx to %edx
1055         register.  Use __NR_gettimeofday.
1056         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1057         Include lowlevellock.h.
1058         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1059         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1060         MUTEX(%edi) address in %edx rather than %ecx to
1061         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1062         and __lll_unlock_wake.
1063         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1064         Include lowlevellock.h.
1065         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1066         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1067         MUTEX(%ebx) address in %edx rather than %ecx to
1068         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1069         and __lll_unlock_wake.  Move return value from %ecx to %edx
1070         register.
1071         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1072         lowlevellock.h.
1073         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1074         define.
1075         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1076         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1077         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1078         lowlevellock.h.
1079         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1080         (sem_timedwait): Use __NR_gettimeofday.
1081         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1082         lowlevellock.h.
1083         (LOCK): Don't define.
1084         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1085         lowlevellock.h.
1086         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1087         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1088         are waiters.
1089         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1090         2007-05-2{3,9} changes.
1091         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1092         kernel-features.h and lowlevellock.h.
1093         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1094         (LOAD_FUTEX_WAIT): Rewritten.
1095         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1096         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1097         (__lll_mutex_lock_wait): Rename to ...
1098         (__lll_lock_wait): ... this.  %esi is now private argument.
1099         Don't compile in for libc.so.
1100         (__lll_mutex_timedlock_wait): Rename to ...
1101         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1102         Don't compile in for libc.so.
1103         (__lll_mutex_unlock_wake): Rename to ...
1104         (__lll_unlock_wake): ... this.  %esi contains private argument.
1105         Don't compile in for libc.so.
1106         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1107         kernel-features.h and lowlevellock.h.
1108         (LOAD_FUTEX_WAIT): Define.
1109         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1110         (__lll_robust_mutex_lock_wait): Rename to ...
1111         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1112         Use LOAD_FUTEX_WAIT macro.
1113         (__lll_robust_mutex_timedlock_wait): Rename to ...
1114         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1115         private, use LOAD_FUTEX_WAIT macro.
1116         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1117         lowlevellock.h.
1118         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1119         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1120         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1121         __lll_lock_wait and __lll_unlock_wake.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1123         Include lowlevellock.h and pthread-errnos.h.
1124         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1125         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1126         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1127         pass LLL_SHARED in %esi to both __lll_lock_wait and
1128         __lll_unlock_wake.
1129         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1130         Include lowlevellock.h and pthread-errnos.h.
1131         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1132         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1133         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1134         pass LLL_SHARED in %esi to both __lll_lock_wait and
1135         __lll_unlock_wake.
1136         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1137         Include lowlevellock.h.
1138         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1139         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1140         pass LLL_SHARED in %esi to both __lll_lock_wait and
1141         __lll_unlock_wake.
1142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1143         Include lowlevellock.h.
1144         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1145         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1146         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1147         and __lll_unlock_wake.
1148         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1149         Include lowlevellock.h.
1150         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1151         Don't define.
1152         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1153         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1154         and __lll_unlock_wake.
1155         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1156         Include lowlevellock.h.
1157         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1158         Don't define.
1159         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1160         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1161         and __lll_unlock_wake.
1162         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1163         Include lowlevellock.h.
1164         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1165         Don't define.
1166         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1167         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1168         and __lll_unlock_wake.
1169         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1170         Include lowlevellock.h.
1171         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1172         Don't define.
1173         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1174         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1175         and __lll_unlock_wake.
1176         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1177         Include lowlevellock.h.
1178         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1179         Don't define.
1180         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1181         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1182         and __lll_unlock_wake.
1183         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1184         lowlevellock.h.
1185         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1186         define.
1187         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1188         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1189         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1190         lowlevellock.h.
1191         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1192         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1193         lowlevellock.h.
1194         (LOCK): Don't define.
1195         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1196         lowlevellock.h.
1197         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1198         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1199         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1200         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1201         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1202         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1203         (__lll_lock_wait_private): New function.
1204         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1205         it to lll_futex_*wait.  Don't compile in for libc.so.
1206         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1207         Remove.
1208         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1209         (struct sparc_pthread_barrier): Remove.
1210         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1211         struct sparc_pthread_barrier.  Pass
1212         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1213         and lll_futex_wait macros.
1214         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1215         Remove.
1216         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1217         Include sparc pthread_barrier_wait.c instead of generic one.
1219 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1221         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1223         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1224         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1225         %ecx.
1226         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1227         (pthread_rwlock_timedwrlock): Likewise.
1228         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1229         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1231 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1233         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1235 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1237         * tst-locale2.c (useless): Add return statement.
1239 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1241         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1242         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1243         * pthread_create.c (start_thread): Likewise.
1244         * init.c (sighandler_setxid): Likewise.
1245         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1246         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1247         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1248         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1249         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1250         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1251         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1252         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1253         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1254         Likewise.
1255         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1256         Likewise.
1257         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1258         Likewise.
1259         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1260         __rtld_notify): Likewise.
1261         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1262         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1263         __pthread_once): Likewise.
1264         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1265         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1266         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1267         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1268         (lll_futex_wait): Add private argument, define as wrapper around
1269         lll_futex_timed_wait.
1270         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1271         use __lll_private_flag macro.
1272         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1273         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1274         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1275         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1276         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1277         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1278         (lll_futex_wait): Add private argument, define as wrapper around
1279         lll_futex_timed_wait.
1280         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1281         use __lll_private_flag macro.
1282         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1283         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1284         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1285         Define.
1286         (lll_futex_timed_wait, lll_futex_wake): Use it.
1287         (lll_private_futex_wait, lll_private_futex_timed_wait,
1288         lll_private_futex_wake): Removed.
1289         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1290         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1291         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1292         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1293         (lll_futex_wait): Add private argument, define as wrapper around
1294         lll_futex_timed_wait.
1295         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1296         use __lll_private_flag macro.
1297         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1298         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1299         to lll_futex_*.
1300         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1301         (lll_private_futex_wait, lll_private_futex_timed_wait,
1302         lll_private_futex_wake): Removed.
1303         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1304         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1305         (lll_private_futex_wait, lll_private_futex_timed_wait,
1306         lll_private_futex_wake): Removed.
1307         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1308         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1309         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1310         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1311         (lll_futex_wait): Add private argument, define as wrapper around
1312         lll_futex_timed_wait.
1313         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1314         use __lll_private_flag macro.
1315         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1316         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1317         to lll_futex_*.
1318         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1319         Define.
1320         (lll_futex_timed_wait, lll_futex_wake): Use it.
1321         (lll_private_futex_wait, lll_private_futex_timed_wait,
1322         lll_private_futex_wake): Removed.
1324 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1326         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1327         of the structure for sparc32.
1329 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1331         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1333 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1335         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1336         code used when private futexes are assumed.
1337         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1338         Likewise.
1340 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1342         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1343         (__lll_private_flag): Define.
1344         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1345         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1346         __lll_private_flag.
1347         (lll_private_futex_wait, lll_private_futex_timedwait,
1348         lll_private_futex_wake): Define as wrapper around non-_private
1349         macros.
1350         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1351         (__lll_private_flag): Define.
1352         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1353         (lll_private_futex_wait, lll_private_futex_timedwait,
1354         lll_private_futex_wake): Define as wrapper around non-_private
1355         macros.
1357 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1359         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1360         parameter to lll_futex_wait call.
1361         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1363         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1364         Replace lll_futex_wait with lll_private_futex_wait.
1365         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1366         Add LLL_SHARED parameter to lll_futex_wake().
1368         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1369         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1370         lll_private_futex_wake.
1371         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1372         bit from private parm before syscall.
1373         (lll_futex_timed_wait): Likewise.
1374         (lll_futex_wake): Likewise.
1375         (lll_futex_wake_unlock): Likewise.
1376         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1377         (lll_robust_mutex_unlock): Likewise.
1378         (lll_mutex_unlock_force): Likewise.
1379         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1381 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1383         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1384         compilation when unconditionally using private futexes.
1385         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1386         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1387         Likewise.
1388         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1389         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1391 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1393         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1394         Define.
1396 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1398         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1399         kernel-features.h.
1401 2007-05-16  Roland McGrath  <roland@redhat.com>
1403         * init.c (__nptl_initial_report_events): New variable.
1404         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1405         to that.
1407 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1409         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1410         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1412 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1414         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1415         implementation.
1417 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1419         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1420         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1421         * pthread_mutex_timedlock.c: Likewise.
1422         * pthread_mutex_trylock.c: Likewise.
1423         * pthread_mutex_unlock.c: Likewise.
1425 2007-06-17  Andreas Schwab  <schwab@suse.de>
1427         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1428         sections.
1430 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1432         * allocatestack.c (allocate_stack): Make code compile if
1433         __ASSUME_PRIVATE_FUTEX is set.
1435 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1437         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1438         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1439         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1440         (__pthread_rwlock_wrlock): Likewise.
1441         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1442         (pthread_rwlock_timedrdlock): Likewise.
1443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1444         (pthread_rwlock_timedwrlock): Likewise.
1445         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1446         (__pthread_rwlock_unlock): Likewise.
1448 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1450         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1451         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1452         Split __flags into __flags, __shared, __pad1 and __pad2.
1453         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1454         futexes if they are available.
1455         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1456         in libc-lowlevellock.S allow using private futexes.
1457         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1458         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1459         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1460         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1461         lll_private_futex_timed_wait and lll_private_futex_wake.
1462         (lll_robust_mutex_unlock): Fix typo.
1463         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1464         field in futex command setup.
1465         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1466         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1467         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1468         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1469         if they are available.  Remove clear_once_control.
1470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1471         futexes if they are available.
1472         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1474         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1475         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1476         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1477         Wake only when there are waiters.
1478         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1479         support.  Indicate that there are waiters.  Remove unnecessary
1480         extra cancellation test.
1481         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1482         left-over duplication of __sem_wait_cleanup.
1484 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1486         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1487         parameter to lll_futex_wait, lll_futex_timed_wait, and
1488         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1489         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1490         lll_private_futex_wake.
1491         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1492         * allocatestack.c: Adjust use of lll_futex_* macros.
1493         * init.c: Likewise.
1494         * lowlevellock.h: Likewise.
1495         * pthread_barrier_wait.c: Likewise.
1496         * pthread_cond_broadcast.c: Likewise.
1497         * pthread_cond_destroy.c: Likewise.
1498         * pthread_cond_signal.c: Likewise.
1499         * pthread_cond_timedwait.c: Likewise.
1500         * pthread_cond_wait.c: Likewise.
1501         * pthread_create.c: Likewise.
1502         * pthread_mutex_lock.c: Likewise.
1503         * pthread_mutex_setprioceiling.c: Likewise.
1504         * pthread_mutex_timedlock.c: Likewise.
1505         * pthread_mutex_unlock.c: Likewise.
1506         * pthread_rwlock_timedrdlock.c: Likewise.
1507         * pthread_rwlock_timedwrlock.c: Likewise.
1508         * pthread_rwlock_unlock.c: Likewise.
1509         * sysdeps/alpha/tls.h: Likewise.
1510         * sysdeps/i386/tls.h: Likewise.
1511         * sysdeps/ia64/tls.h: Likewise.
1512         * sysdeps/powerpc/tls.h: Likewise.
1513         * sysdeps/pthread/aio_misc.h: Likewise.
1514         * sysdeps/pthread/gai_misc.h: Likewise.
1515         * sysdeps/s390/tls.h: Likewise.
1516         * sysdeps/sh/tls.h: Likewise.
1517         * sysdeps/sparc/tls.h: Likewise.
1518         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1519         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1520         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1521         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1522         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1523         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1524         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1525         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1526         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1527         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1528         Likewise.
1529         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1530         * sysdeps/x86_64/tls.h: Likewise.
1532 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1534         * pthread_getattr_np.c: No need to install a cancellation handler,
1535         this is no cancellation point.
1536         * pthread_getschedparam.c: Likewise.
1537         * pthread_setschedparam.c: Likewise.
1538         * pthread_setschedprio.c: Likewise.
1539         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1540         lll_unlock_wake_cb.
1541         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1542         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1543         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1544         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1545         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1546         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1547         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1548         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1549         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1550         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1551         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1552         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1554         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1555         whether there are more than one thread makes no sense here since
1556         we only call the slow path if the locks are taken.
1557         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1559         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1560         COND_NWAITERS_SHIFT.
1561         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1562         COND_CLOCK_BITS.
1563         * pthread_cond_init.c: Likewise.
1564         * pthread_cond_timedwait.c: Likewise.
1565         * pthread_cond_wait.c: Likewise.
1566         * pthread_condattr_getclock.c: Likewise.
1567         * pthread_condattr_setclock.c: Likewise.
1568         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1569         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1571         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1572         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1574 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1576         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1577         unistd.h.
1579         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1580         insn suffix.
1581         (THREAD_GSCOPE_GET_FLAG): Remove.
1582         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1583         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1584         changes.
1585         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1586         (THREAD_GSCOPE_GET_FLAG): Remove.
1587         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1588         instead of THREAD_GSCOPE_GET_FLAG.
1589         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1590         it.
1591         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1592         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1593         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1594         THREAD_GSCOPE_WAIT): Define.
1595         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1596         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1597         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1598         THREAD_GSCOPE_WAIT): Define.
1599         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1600         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1601         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1602         THREAD_GSCOPE_WAIT): Define.
1603         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1604         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1605         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1606         THREAD_GSCOPE_WAIT): Define.
1608 2007-05-24  Richard Henderson  <rth@redhat.com>
1610         * descr.h (struct pthread): Add header.gscope_flag.
1611         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1612         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1613         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1614         THREAD_GSCOPE_WAIT): Define.
1616 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1618         * init.c: Make it compile with older kernel headers.
1620         * tst-initializers1.c: Show through exit code which test failed.
1622         * pthread_rwlock_init.c: Also initialize __shared field.
1623         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1624         element in rwlock structure into four byte elements.  One of them is
1625         the new __shared element.
1626         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1627         Likewise.
1628         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1629         __shared, adjust names of other padding elements.
1630         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1631         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1632         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1633         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1634         FUTEX_PRIVATE_FLAG.
1635         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1636         futex to use private operations if possible.
1637         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1638         Likewise.
1639         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1640         Likewise.
1641         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1642         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1643         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1644         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1645         Likewise.
1646         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1647         Likewise.
1648         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1649         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1651 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1653         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1654         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1655         * pthread_rwlock_timedrdlock.c: Likewise.
1656         * pthread_rwlock_tryrdlock.c: Likewise.
1658         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1659         optimization.
1661         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1662         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1663         duplication of __sem_wait_cleanup.
1665         * allocatestack.c: Revert last change.
1666         * init.c: Likewise.
1667         * sysdeps/i386/tls.h: Likewise.
1668         * sysdeps/x86_64/tls.h: Likewise.
1669         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1670         header structure.
1671         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1673         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1674         Add private field.
1675         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1676         * pthread_barrier_init.c: Set private flag if pshared and private
1677         futexes are supported.
1678         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1679         private field in futex command setup.
1680         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1682 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1684         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1685         support.
1686         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1687         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1688         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1689         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1690         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1692         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1693         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1694         fields in the structure.
1695         (__old_sem_init): New function.
1696         * sem_open.c: Initialize all fields of the structure.
1697         * sem_getvalue.c: Adjust for renamed element.
1698         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1699         (gen-as-const-headers): Add structsem.sym.
1700         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1701         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1702         struct new_sem.  Add struct old_sem.
1703         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1704         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1705         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1706         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1707         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1708         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1709         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1710         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1711         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1712         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1713         * tst-sem10.c: New file.
1714         * tst-sem11.c: New file.
1715         * tst-sem12.c: New file.
1716         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1717         of struct sem.
1719 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1720             Jakub Jelinek  <jakub@redhat.com>
1722         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1723         Move __pthread_enable_asynccancel right before futex syscall.
1724         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1725         Likewise.
1727 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1729         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1730         THREAD_COPY_PRIVATE_FUTEX): Define.
1731         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1732         THREAD_COPY_PRIVATE_FUTEX): Define.
1733         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1734         * init.c (__pthread_initialize_minimal_internal): Use
1735         THREAD_SET_PRIVATE_FUTEX.
1737         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1738         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1739         THREAD_GSCOPE_FLAG_WAIT): Define.
1740         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1741         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1742         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1743         PTR_DEMANGLE.
1744         (THREAD_GSCOPE_GET_FLAG): Define.
1745         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1746         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1747         instead of ->header.gscope_flag directly.
1749 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1751         * init.c (__pthread_initialize_minimal_internal): Check whether
1752         private futexes are available.
1753         * allocatestack.c (allocate_stack): Copy private_futex field from
1754         current thread into the new stack.
1755         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1756         futexes if they are available.
1757         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1758         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1759         in libc-lowlevellock.S allow using private futexes.
1760         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1761         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1762         FUTEX_PRIVATE_FLAG.
1763         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1764         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1765         if they are available.
1766         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1767         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1768         * sysdeps/i386/tcb-offsets.sym: Likewise.
1769         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1770         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1772 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1774         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1775         Remove ptr_wait_lookup_done again.
1776         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1777         (__pthread_initialize_minimal_internal): Initialize
1778         _dl_wait_lookup_done pointer in _rtld_global directly.
1779         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1780         Remove code to code _dl_wait_lookup_done.
1781         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1782         encrypted for now.
1784 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1786         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1787         pthread_mutex_init failed with ENOTSUP.
1789 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1791         * allocatestack.c (__wait_lookup_done): New function.
1792         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1793         Add ptr_wait_lookup_done.
1794         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1795         * pthreadP.h: Declare __wait_lookup_done.
1796         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1797         Define macros to implement reference handling of global scope.
1798         * sysdeps/x86_64/tls.h: Likewise.
1799         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1800         Initialize GL(dl_wait_lookup_done).
1802 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1804         [BZ #4512]
1805         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1806         is detected.
1807         * pthread_mutex_timedlock.c: Likewise.
1808         * pthread_mutex_trylock.c: Likewise.
1809         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1811         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1812         * tst-robust9.c: New file.
1813         * tst-robustpi9.c: New file.
1815         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1816         unnecessary extra cancellation test.
1818 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1820         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1821         extra cancellation test.
1822         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1824 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1826         * descr.h (struct pthread): Rearrange members to fill hole in
1827         64-bit layout.
1829         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1830         (__pthread_setaffinity_new): If syscall was successful and
1831         RESET_VGETCPU_CACHE is defined, use it before returning.
1832         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1834 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1836         [BZ #4455]
1837         * tst-align2.c: Include stackinfo.h.
1838         * tst-getpid1.c: Likewise.
1840 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1842         [BZ #4455]
1843         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1844         * tst-getpid1.c (do_test): Likewise.
1846         [BZ #4456]
1847         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1848         (allocate_stack): Likewise.
1850 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1852         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1853         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1854         (__lll_robust_timedlock_wait): Likewise.
1855         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1857 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1859         [BZ #4465]
1860         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1861         * tst-cancel4.c (tf_fdatasync): New test.
1863 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1865         [BZ #4392]
1866         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1867         check mutexes like normal mutexes.
1869         [BZ #4306]
1870         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1871         Initialize the whole sigevent structure to appease valgrind.
1873 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1875         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1876         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1878 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1880         * tst-locale1.c: Avoid warnings.
1881         * tst-locale2.c: Likewise.
1883 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1885         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1886         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1888 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1890         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1891         __extern_always_inline where appropriate.
1892         * sysdeps/pthread/pthread.h: Likewise.
1894 2007-03-13  Richard Henderson  <rth@redhat.com>
1896         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1897         separate cfi regions for the two subsections.
1899 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1901         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1902         new thread, don't just decrement it.
1903         Patch by Suzuki K P <suzuki@in.ibm.com>.
1905 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1907         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1908         PTHFCT_CALL definition.
1910 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1912         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1913         available, don't use it.
1915 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1917         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1918         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1919         call into the kernel to delay.
1921 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1923         * tst-initializers1.c: We want to test the initializers as seen
1924         outside of libc, so undefined _LIBC.
1926         * pthread_join.c (cleanup): Avoid warning.
1928 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1930         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1931         (__lll_timedwait_tid): Add unwind info.
1933         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1934         function table, mangle the pointers.
1935         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1936         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1937         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1938         demangle pointers before use.
1939         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1940         demangle pointer.
1941         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1942         * sysdeps/pthread/setxid.h: Likewise.
1944 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1946         * tst-rwlock7.c: Show some more information in case of correct
1947         behavior.
1949 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1952         (lll_futex_timed_wait): Undo part of last change, don't negate
1953         return value.
1955 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1957         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1958         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1960 2006-12-28  David S. Miller  <davem@davemloft.net>
1962         * shlib-versions: Fix sparc64 linux target specification.
1964 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1966         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1967         Adjust include path for pthread_barrier_wait.c move.
1969 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1971         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1972         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1974 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1976         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1977         6 argument cancellable syscalls.
1978         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1979         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1980         6 argument cancellable syscalls.
1981         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1983 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1985         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1986         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1988 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1990         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1991         __sync_lock_release instead of __sync_lock_release_si.
1993 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1995         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1996         Define.
1997         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1998         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1999         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2000         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2001         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2002         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2003         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2004         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2005         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2006         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2007         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2009 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2011         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2012         * pthread_barrier_wait.c: ...here.
2013         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2014         * pthread_cond_broadcast.c: ...here.
2015         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2016         * pthread_cond_signal.c: ...here.
2017         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2018         * pthread_cond_timedwait.c: ...here.
2019         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2020         * pthread_cond_wait.c: ...here.
2021         * sysdeps/pthread/pthread_once.c: Move to...
2022         * pthread_once.c: ...here.
2023         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2024         * pthread_rwlock_rdlock.c: ...here.
2025         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2026         * pthread_rwlock_timedrdlock.c: ...here.
2027         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2028         * pthread_rwlock_timedwrlock.c: ...here.
2029         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2030         * pthread_rwlock_unlock.c: ...here.
2031         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2032         * pthread_rwlock_wrlock.c: ...here.
2033         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2034         * pthread_spin_destroy.c: ...here.
2035         * sysdeps/pthread/pthread_spin_init.c: Move to...
2036         * pthread_spin_init.c: ...here.
2037         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2038         * pthread_spin_unlock.c: ...here.
2039         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2040         * pthread_getcpuclockid.c: ...here.
2042         * init.c: USE_TLS support is now always enabled.
2043         * tst-tls5.h: Likewise.
2044         * sysdeps/alpha/tls.h: Likewise.
2045         * sysdeps/i386/tls.h: Likewise.
2046         * sysdeps/ia64/tls.h: Likewise.
2047         * sysdeps/powerpc/tls.h: Likewise.
2048         * sysdeps/s390/tls.h: Likewise.
2049         * sysdeps/sh/tls.h: Likewise.
2050         * sysdeps/sparc/tls.h: Likewise.
2051         * sysdeps/x86_64/tls.h: Likewise.
2053 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2055         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2056         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2057         failed.
2059         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2060         Define to THREAD_SELF->header.multiple_threads.
2061         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2062         Likewise.
2063         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2064         Likewise.
2065         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2066         (SINGLE_THREAD_P): Likewise.
2067         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2068         (SINGLE_THREAD_P): Likewise.
2069         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2070         (SINGLE_THREAD_P): Likewise.
2071         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2072         (SINGLE_THREAD_P): Likewise.
2073         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2074         Likewise.
2075         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2076         (SINGLE_THREAD_P): Likewise.
2077         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2078         (SINGLE_THREAD_P): Likewise.
2079         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2080         Likewise.
2082 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2084         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2085         by default rather than 2_3_3.
2087 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2089         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2090         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2091         atomic_* instead of catomic_* macros.
2093 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2095         [BZ #3285]
2096         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2097         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2098         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2099         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2100         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2101         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2102         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2103         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2104         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2105         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2106         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2107         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2108         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2110 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2112         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2113         cancelable syscalls with six parameters.
2115         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2116         operations instead of atomic_*.
2118 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2120         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2122 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2124         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2125         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2126         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2127         New file.
2128         * pthread_attr_setstack.c: Allow overwriting the version number of the
2129         new symbol.
2130         * pthread_attr_setstacksize.c: Likewise.
2131         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2132         it.
2133         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2134         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2136 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2138         [BZ #3251]
2139         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2140         Patch by Petr Baudis.
2142 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2144         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2146         * tst-cancel2.c (tf): Loop as long as something was written.
2148 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2150         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2151         mutexes wake all mutexes.
2152         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2153         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2154         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2156 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2158         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2159         to guarantee the thread is always canceled.
2161 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2163         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2164         Include stdlib.h.
2165         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2166         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2169         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2171 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2173         [BZ #3123]
2174         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2175         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2176         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2177         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2179         * Makefile (tests): Add tst-cond22.
2180         * tst-cond22.c: New file.
2182 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2184         [BZ #3124]
2185         * descr.h (struct pthread): Add parent_cancelhandling.
2186         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2187         cancelhandling value to child.
2188         * pthread_create.c (start_thread): If parent thread was canceled
2189         reset the SIGCANCEL mask.
2190         * Makefile (tests): Add tst-cancel25.
2191         * tst-cancel25.c: New file.
2193 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2194             Ulrich Drepper  <drepper@redhat.com>
2196         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2197         counterp if it is already zero.
2198         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2200 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2201             Roland McGrath  <roland@redhat.com>
2203         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2204         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2205         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2206         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2207         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2208         lll_robust_mutex_timedlock, lll_mutex_unlock,
2209         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2210         Add _L_*_ symbols around the subsection.
2211         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2212         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2214 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2215             Roland McGrath  <roland@redhat.com>
2217         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2218         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2219         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2220         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2221         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2222         lll_robust_mutex_timedlock, lll_mutex_unlock,
2223         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2224         Add _L_*_ symbols around the subsection.
2225         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2226         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2228 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2230         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2231         change because it can disturb too much existing code.  If real hard
2232         reader preference is needed we'll introduce another type.
2233         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2234         (pthread_rwlock_timedwrlock): Likewise.
2235         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2236         Likewise.
2238 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2240         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2241         reader preference.
2242         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2243         (pthread_rwlock_timedwrlock): Likewise.
2244         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2245         Likewise.
2247 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2249         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2250         Only define ifdef SHARED.
2252 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2254         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2255         (free_stacks): ...here.
2256         (__free_stack_cache): New function.
2257         * pthreadP.h: Declare __free_stack_cache.
2258         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2259         ptr_freeres.
2260         * init.c (pthread_functions): Initialize ptr_freeres.
2261         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2262         New freeres function.
2264 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2266         [BZ #3018]
2267         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2269 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2271         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2272         _XOPEN_REALTIME_THREADS.
2274 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2276         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2277         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2278         HAVE_CLOCK_GETTIME_VSYSCALL.
2279         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2281 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2283         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2284         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2285         * descr.h (struct priority_protection_data): New type.
2286         (struct pthread): Add tpp field.
2287         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2288         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2289         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2290         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2291         TPP mutexes.
2292         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2293         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2294         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2295         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2296         * tpp.c: New file.
2297         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2298         boosted by TPP.
2299         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2300         * pthread_mutexattr_getprioceiling.c
2301         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2302         in the SCHED_FIFO priority range.
2303         * pthread_mutexattr_setprioceiling.c
2304         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2305         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2306         if mutex is not TPP.  Ceiling is now in __data.__lock.
2307         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2308         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2309         is now in __data.__lock.  Add locking.
2310         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2311         * Makefile (libpthread-routines): Add tpp.
2312         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2313         * tst-tpp.h: New file.
2314         * tst-mutexpp1.c: New file.
2315         * tst-mutexpp6.c: New file.
2316         * tst-mutexpp10.c: New file.
2317         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2318         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2320 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2322         [BZ #2843]
2323         * pthread_join.c (pthread_join): Account for self being canceled
2324         when checking for deadlocks.
2325         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2326         (tf1): Don't print anything after pthread_join returns, this would be
2327         another cancellation point.
2328         (tf2): Likewise.
2329         * tst-join6.c: New file.
2330         * Makefile (tests): Add tst-join6.
2332 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2334         [BZ #2892]
2335         * pthread_setspecific.c (__pthread_setspecific): Check
2336         out-of-range index before checking for unused key.
2338         * sysdeps/pthread/gai_misc.h: New file.
2340 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2342         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2343         file.  Don't use sysctl.
2344         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2345         overwrite the file if this is likely not true.
2347 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2349         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2350         * Makefile (tests): Add tst-getpid3.
2351         * tst-getpid3.c: New file.
2353 2006-07-30  Roland McGrath  <roland@redhat.com>
2355         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2357         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2358         (pause_not_cancel): New macro.
2359         (nanosleep_not_cancel): New macro.
2360         (sigsuspend_not_cancel): New macro.
2361         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2362         nanosleep_not_cancel macro from <not-cancel.h>.
2363         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2364         macro from <not-cancel.h>.
2366 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2367             Jakub Jelinek  <jakub@redhat.com>
2369         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2370         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2371         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2372         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2373         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2374         * pthread_mutex_lock.c: Likewise.
2375         * pthread_mutex_timedlock.c: Likewise.
2376         * pthread_mutex_trylock.c: Likewise.
2377         * pthread_mutex_unlock.c: Likewise.
2378         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2379         all mutexes.
2380         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2382         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2383         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2384         pthread-pi-defines.sym.
2385         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2386         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2387         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2388         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2389         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2390         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2391         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2392         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2393         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2394         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2395         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2396         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2397         * tst-mutex2.c: Likewise.
2398         * tst-mutex3.c: Likewise.
2399         * tst-mutex4.c: Likewise.
2400         * tst-mutex5.c: Likewise.
2401         * tst-mutex6.c: Likewise.
2402         * tst-mutex7.c: Likewise.
2403         * tst-mutex7a.c: Likewise.
2404         * tst-mutex8.c: Likewise.
2405         * tst-mutex9.c: Likewise.
2406         * tst-robust1.c: Likewise.
2407         * tst-robust7.c: Likewise.
2408         * tst-robust8.c: Likewise.
2409         * tst-mutexpi1.c: New file.
2410         * tst-mutexpi2.c: New file.
2411         * tst-mutexpi3.c: New file.
2412         * tst-mutexpi4.c: New file.
2413         * tst-mutexpi5.c: New file.
2414         * tst-mutexpi6.c: New file.
2415         * tst-mutexpi7.c: New file.
2416         * tst-mutexpi7a.c: New file.
2417         * tst-mutexpi8.c: New file.
2418         * tst-mutexpi9.c: New file.
2419         * tst-robust1.c: New file.
2420         * tst-robust2.c: New file.
2421         * tst-robust3.c: New file.
2422         * tst-robust4.c: New file.
2423         * tst-robust5.c: New file.
2424         * tst-robust6.c: New file.
2425         * tst-robust7.c: New file.
2426         * tst-robust8.c: New file.
2427         * Makefile (tests): Add the new tests.
2429         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2430         * pthread_mutex_destroy.c: Remove unneeded label.
2432 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2434         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2435         computations to compile time.
2437 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2439         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2441 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2443         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2445 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2447         * pthread_key_create.c (__pthread_key_create): Do away with
2448         __pthread_keys_lock.
2450         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2451         (__kernel_cpumask_size): Mark as hidden.
2452         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2454         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2455         * semaphoreP.h (__sem_mappings_lock): Likewise.
2457 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2459         * pthread_atfork.c: Mark __dso_handle as hidden.
2461 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2463         [BZ #2644]
2464         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2465         the reload problem.  Change the one path in pthread_cancel_init
2466         which causes the problem.  Force gcc to reload.  Simplify callers.
2467         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2468         (_Unwind_GetBSP): Undo last patch.
2470 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2472         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2473         function pointer is reloaded after pthread_cancel_init calls.
2475         [BZ #2644]
2476         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2477         pointers are reloaded after pthread_cancel_init calls.
2479 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2481         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2482         __always_inline.
2484 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2486         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2487         Allocate new object which is passed to timer_sigev_thread so that
2488         the timer can be deleted before the new thread is scheduled.
2490 2006-04-26  Roland McGrath  <roland@redhat.com>
2492         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2494 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2496         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2497         suffix for conditional jumps.
2498         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2499         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2500         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2501         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2502         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2503         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2505         * init.c (sigcancel_handler): Compare with correct PID even if the
2506         thread is in the middle of a fork call.
2507         (sighandler_setxid): Likewise.
2508         Reported by Suzuki K P <suzuki@in.ibm.com> .
2510 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2512         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2514 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2516         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2517         fails [Coverity CID 105].
2519 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2521         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2523 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2525         [BZ #2505]
2526         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2527         Define __lll_rel_instr using lwsync.
2529 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2531         * allocatestack.c (allocate_stack): Always initialize robust_head.
2532         * descr.h: Define struct robust_list_head.
2533         (struct pthread): Use robust_list_head in robust mutex list definition.
2534         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2535         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2536         (__pthread_initialize_minimal_internal): Register robust_list with
2537         the kernel.
2538         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2539         Declare __set_robust_list_avail.
2540         * pthread_create.c (start_thread): Register robust_list of new thread.
2541         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2542         waiters.
2543         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2544         number of users, it's unreliable.
2545         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2546         set_robust_list syscall is available.
2547         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2548         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2549         Set robust_head.list_op_pending before trying to lock a robust mutex.
2550         * pthread_mutex_timedlock.c: Likewise.
2551         * pthread_mutex_trylock.c: Likewise.
2552         * pthread_mutex_unlock.c: Likewise for unlocking.
2553         * Makefile (tests): Add tst-robust8.
2554         * tst-robust8.c: New file.
2556 2006-03-08  Andreas Schwab  <schwab@suse.de>
2558         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2559         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2561 2006-03-05  Roland McGrath  <roland@redhat.com>
2563         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2564         and $config_os doesn't match *linux*.
2566 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2568         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2569         Use __syscall_error.
2570         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2571         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2572         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2573         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2574         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2575         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2577 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2579         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2581 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2583         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2584         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2585         mutex.
2586         (__lll_robust_timedlock_wait): Likewise.
2587         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2588         (__lll_robust_lock_wait): Likewise.
2589         (__lll_robust_timedlock_wait): Likewise.
2590         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2591         (__lll_robust_lock_wait): Likewise.
2592         (__lll_robust_timedlock_wait): Likewise.
2594 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2596         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2597         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2598         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2599         lll_robust_mutex_unlock): Define.
2600         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2602 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2604         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2605         instead of <clone.S>.
2607 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2609         * Makefile (libpthread-routines): Add
2610         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2611         and pthread_mutex_[sg]etprioceiling.
2612         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2613         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2614         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2615         pthread_mutex_setprioceiling.
2616         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2617         PTHREAD_PRIO_PROTECT): New enum values.
2618         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2619         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2620         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2621         prototypes.
2622         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2623         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2624         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2625         Define.
2626         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2627         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2628         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2629         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2630         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2631         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2632         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2633         protocol mutexes.
2634         * pthread_mutex_getprioceiling.c: New file.
2635         * pthread_mutex_setprioceiling.c: New file.
2636         * pthread_mutexattr_getprioceiling.c: New file.
2637         * pthread_mutexattr_setprioceiling.c: New file.
2638         * pthread_mutexattr_getprotocol.c: New file.
2639         * pthread_mutexattr_setprotocol.c: New file.
2641 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2643         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2645 2006-02-27  Roland McGrath  <roland@redhat.com>
2647         * sysdeps/pthread/Subdirs: List nptl here too.
2648         * configure (libc_add_on_canonical): New variable.
2650         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2652         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2653         self to get main source tree's file.
2654         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2655         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2656         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2657         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2658         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2659         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2660         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2661         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2662         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2663         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2664         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2665         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2666         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2668         * Makefile: Use $(sysdirs) in vpath directive.
2670         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2671         (CPPFLAGS-timer_routines.c): Likewise.
2673         * Makeconfig (includes): Variable removed.
2675 2006-02-26  Roland McGrath  <roland@redhat.com>
2677         * sysdeps/generic/pt-raise.c: Moved to ...
2678         * pt-raise.c: ... here.
2679         * sysdeps/generic/lowlevellock.h: Moved to ...
2680         * lowlevellock.h: ... here.
2682 2006-02-23  Roland McGrath  <roland@redhat.com>
2684         * descr.h (struct pthread): Add final member `end_padding'.
2685         (PTHREAD_STRUCT_END_PADDING): Use it.
2687 2006-02-20  Roland McGrath  <roland@redhat.com>
2689         * sysdeps/mips: Directory removed, saved in ports repository.
2690         * sysdeps/unix/sysv/linux/mips: Likewise.
2692 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2694         * tst-robust1.c: Add second mutex to check that the mutex list is
2695         handled correctly.
2697 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2699         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2700         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2701         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2702         lll_robust_mutex_unlock): New macros.
2703         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2704         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2705         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2706         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2707         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2709 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2711         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2712         definitions.
2713         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2715 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2717         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2718         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2719         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2720         (lll_robust_mutex_unlock): Likewise.
2722 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2724         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2725         Set robust_list.__next rather than robust_list.
2726         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2727         (__pthread_list_t): New typedef.
2728         (pthread_mutex_t): Replace __next and __prev fields with __list.
2729         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2730         (__pthread_list_t): New typedef.
2731         (pthread_mutex_t): Replace __next and __prev fields with __list.
2732         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2733         (__pthread_list_t, __pthread_slist_t): New typedefs.
2734         (pthread_mutex_t): Replace __next and __prev fields with __list.
2735         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2736         (__pthread_list_t, __pthread_slist_t): New typedefs.
2737         (pthread_mutex_t): Replace __next and __prev fields with __list.
2738         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2739         (__pthread_list_t, __pthread_slist_t): New typedefs.
2740         (pthread_mutex_t): Replace __next and __prev fields with __list.
2741         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2742         (__pthread_slist_t): New typedef.
2743         (pthread_mutex_t): Replace __next field with __list.
2745 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2747         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2748         PTHREAD_MUTEX_OWNERDEAD.
2749         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2750         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2751         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2752         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2753         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2754         to PTHREAD_MUTEX_INCONSISTENT.
2755         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2756         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2757         * pthread_mutex_trylock.c: Likewise.
2758         * pthread_mutex_timedlock.c: Likewise.
2759         * pthread_mutex_unlock.c: Likewise.
2760         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2761         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2762         lowlevelrobustlock.sym.
2763         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2764         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2765         definitions.
2766         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2767         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2768         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2769         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2770         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2772 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2774         * allocatestack.c (allocate_stack): Initialize robust_list.
2775         * init.c (__pthread_initialize_minimal_internal): Likewise.
2776         * descr.h (struct xid_command): Pretty printing.
2777         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2778         robust_list.  Adjust macros.
2779         * pthread_create.c (start_thread): Adjust robust_list handling.
2780         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2781         but the owner for all robust mutex types.
2782         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2783         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2784         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2785         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2787         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2788         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2790 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2792         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2793         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2795 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2797         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2798         Return status.
2799         (lll_futex_timed_wait): Define.
2801 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2803         * tst-cancel4.c: Test ppoll.
2805 2006-01-18  Andreas Jaeger  <aj@suse.de>
2807         [BZ #2167]
2808         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2809         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2810         by Jim Gifford <patches@jg555.com>.
2812 2006-01-13  Richard Henderson  <rth@redhat.com>
2814         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2816 2006-01-10  Roland McGrath  <roland@redhat.com>
2818         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2819         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2820         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2821         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2822         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2823         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2824         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2825         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2826         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2827         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2829 2006-01-09  Roland McGrath  <roland@redhat.com>
2831         * tst-initializers1-c89.c: New file.
2832         * tst-initializers1-c99.c: New file.
2833         * tst-initializers1-gnu89.c: New file.
2834         * tst-initializers1-gnu99.c: New file.
2835         * Makefile (tests): Add them.
2836         (CFLAGS-tst-initializers1-c89.c): New variable.
2837         (CFLAGS-tst-initializers1-c99.c): New variable.
2838         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2839         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2841         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2842         Use __extension__ on anonymous union definition.
2843         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2844         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2845         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2846         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2847         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2849 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2851         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2852         Don't give the union a name because it changes the mangled name.
2853         Instead name the struct for __data.
2854         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2855         Likewise.
2856         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2857         Likewise.
2859 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2861         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2862         stack bias to mc_ftp field.
2864 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2866         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2867         being too clever and reloading the futex value where it shouldn't.
2869 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2871         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2872         correct type.
2874 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2876         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2877         Add cfi directives.
2879 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2881         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2882         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2883         rename in tcbhead_t.
2885         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2886         Don't give the union a name because it changes the mangled name.
2887         Instead name the struct for __data.
2888         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2889         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2890         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2891         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2892         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2893         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2895 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2897         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2898         Return status.
2899         (lll_futex_timed_wait): Define.
2900         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2901         * sysdeps/pthread/aio_misc.h: New file.
2903 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2905         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2907 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2909         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2910         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2911         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2913 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2915         * tst-cancel24.cc: Use C headers instead of C++ headers.
2917 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2919         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2920         sparc-linux configured glibc.
2921         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2922         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2923         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2924         atomic_compare_and_exchange_val_24_acq instead of
2925         atomic_compare_and_exchange_val_acq.
2926         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2927         instead of atomic_exchange_rel.
2928         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2929         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2930         file.
2931         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2932         file.
2933         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2934         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2935         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2936         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2937         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2938         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2939         New file.
2940         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2941         New file.
2942         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2943         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2944         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2945         file.
2946         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2947         file.
2948         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2950 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2952         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2953         mutex initializers.
2955 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2957         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2958         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2959         THREAD_COPY_POINTER_GUARD): Define.
2960         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2961         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2963 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2965         * version.c: Update copyright year.
2967 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2969         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2970         .eh_frame section, use cfi_* directives.
2971         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2973 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2975         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2976         now.
2978 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2980         * sysdeps/pthread/sigaction.c: Removed.
2981         * sigaction.c: New file.
2982         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2984 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2986         * Makefile (tests): Add tst-signal7.
2987         * tst-signal7.c: New file.
2989 2005-12-27  Roland McGrath  <roland@redhat.com>
2991         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2992         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2993         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2994         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2995         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2996         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2997         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2998         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2999         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3000         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3001         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3003 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3005         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3006         and __prev field to pthread_mutex_t.
3007         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3008         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3009         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3010         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3011         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3012         to pthread_mutex_t.
3014 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3016         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3017         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3018         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3019         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3020         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3021         and PTHREAD_MUTEXATTR_FLAG_BITS.
3022         * descr.h (struct pthread): Add robust_list field and define
3023         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3024         * pthread_mutexattr_getrobust.c: New file.
3025         * pthread_mutexattr_setrobust.c: New file.
3026         * pthread_mutex_consistent.c: New file.
3027         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3028         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3029         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3030         Adjust pthread_mutex_t initializers.
3031         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3032         field to pthread_mutex_t.
3033         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3034         and __prev field to pthread_mutex_t.
3035         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3036         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3037         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3038         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3039         * pthread_mutexattr_gettype.c: Likewise.
3040         * pthread_mutexattr_setpshared.c: Likewise.
3041         * pthread_mutexattr_settype.c: Likewise.
3042         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3043         Initialize mutex kind according to robust flag.
3044         * pthread_mutex_lock.c: Implement local robust mutex.
3045         * pthread_mutex_timedlock.c: Likewise.
3046         * pthread_mutex_trylock.c: Likewise.
3047         * pthread_mutex_unlock.c: Likewise.
3048         * pthread_create.c (start_thread): Mark robust mutexes which remained
3049         locked as dead.
3050         * tst-robust1.c: New file.
3051         * tst-robust2.c: New file.
3052         * tst-robust3.c: New file.
3053         * tst-robust4.c: New file.
3054         * tst-robust5.c: New file.
3055         * tst-robust6.c: New file.
3056         * tst-robust7.c: New file.
3057         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3058         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3059         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3060         tst-robust5, tst-robust6, and tst-robust7.
3062         * tst-typesizes.c: New file.
3063         * Makefile (tests): Add tst-typesizes.
3065         * tst-once3.c: More debug output.
3067 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3069         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3070         missing after last change.
3072         * version.c: Update copyright year.
3074 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3076         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3077         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3078         * pthread_mutex_trylock.c: Likewise.
3079         * pthread_mutex_timedlock.c: Likewise.
3080         * pthread_mutex_unlock.c: Likewise.
3082 2005-12-22  Roland McGrath  <roland@redhat.com>
3084         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3085         so that #include_next's search location is not reset to the -I..
3086         directory where <nptl/...> can be found.
3088 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3090         [BZ #1913]
3091         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3092         Fix unwind info.  Remove useless branch prediction prefix.
3093         * tst-cancel24.cc: New file.
3094         * Makefile: Add rules to build and run tst-cancel24.
3096 2005-12-21  Roland McGrath  <roland@redhat.com>
3098         * libc-cancellation.c: Use <> rather than "" #includes.
3099         * pt-cleanup.c: Likewise.
3100         * pthread_create.c: Likewise.
3101         * pthread_join.c: Likewise.
3102         * pthread_timedjoin.c: Likewise.
3103         * pthread_tryjoin.c: Likewise.
3104         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3105         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3106         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3107         * unwind.c: Likewise.
3109 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3111         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3112         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3113         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3114         THREAD_COPY_POINTER_GUARD): Define.
3116 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3118         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3119         rather than one.
3120         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3121         THREAD_COPY_POINTER_GUARD): Define.
3122         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3123         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3124         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3125         THREAD_COPY_POINTER_GUARD): Define.
3126         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3127         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3128         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3129         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3130         Use PTR_DEMANGLE for B0 if defined.
3132 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3134         * pthread_create.c (__pthread_create_2_1): Use
3135         THREAD_COPY_POINTER_GUARD if available.
3136         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3137         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3138         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3139         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3140         * sysdeps/x86_64/tls.h: Likewise.
3142 2005-12-15  Roland McGrath  <roland@redhat.com>
3144         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3146 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3148         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3149         sysdeps/generic.
3150         * errno-loc.c: New file.
3152 2005-12-12  Roland McGrath  <roland@redhat.com>
3154         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3155         adjustments before choosing stack size.  Update minimum stack size
3156         calculation to match allocate_stack change.
3158 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3160         * allocatestack.c (allocate_stack): Don't demand that there is an
3161         additional full page available on the stack beside guard, TLS, the
3162         minimum stack.
3164 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3166         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3167         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3169         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3170         compiling 32-bit code we must define __cleanup_fct_attribute.
3172 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3174         [BZ #1920]
3175         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3176         __attribute__ instead of __attribute.
3177         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3178         (__cleanup_fct_attribute): Likewise.
3180 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3182         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3183         a write barrier before writing libgcc_s_getcfa.
3185 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3187         * sysdeps/unix/sysv/linux/configure: Removed.
3189 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3191         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3192         optional init_array/fini_array support.
3194 2005-10-24  Roland McGrath  <roland@redhat.com>
3196         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3197         versioned_symbol use.
3199 2005-10-16  Roland McGrath  <roland@redhat.com>
3201         * init.c (__pthread_initialize_minimal_internal): Even when using a
3202         compile-time default stack size, apply the minimum that allocate_stack
3203         will require, and round up to page size.
3205 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3207         * Makefile ($(test-modules)): Remove static pattern rule.
3209 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3210             Ulrich Drepper  <drepper@redhat.com>
3212         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3213         alignment in callback function.
3214         * Makefile: Add rules to build and run tst-align3.
3215         * tst-align3.c: New file.
3217 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3219         * allocatestack.c (setxid_signal_thread): Add
3220         INTERNAL_SYSCALL_DECL (err).
3222 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3224         * allocatestack.c (setxid_signal_thread): Need to use
3225         atomic_compare_and_exchange_bool_acq.
3227 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3228             Jakub Jelinek  <jakub@redhat.com>
3230         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3231         CANCEL_RESTMASK.
3232         (struct pthread): Move specific_used field to avoid padding.
3233         Add setxid_futex field.
3234         * init.c (sighandler_setxid): Reset setxid flag and release the
3235         setxid futex.
3236         * allocatestack.c (setxid_signal_thread): New function.  Broken
3237         out of the bodies of the two loops in __nptl_setxid.  For undetached
3238         threads check whether they are exiting and if yes, don't send a signal.
3239         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3240         * pthread_create.c (start_thread): For undetached threads, check
3241         whether setxid bit is set.  If yes, wait until signal has been
3242         processed.
3244         * allocatestack.c (STACK_VARIABLES): Initialize them.
3245         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3247 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3249         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3250         waiters, awake all waiters on the associated mutex.
3252 2005-09-22  Roland McGrath  <roland@redhat.com>
3254         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3255         ../sysdeps/x86_64/hp-timing.h).
3257 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3259         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3260         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3261         (lll_futex_wake_unlock): Define.
3262         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3263         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3264         (lll_futex_wake_unlock): Define.
3265         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3266         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3267         (lll_futex_wake_unlock): Define.
3268         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3269         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3270         (lll_futex_wake_unlock): Define.
3271         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3272         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3273         (lll_futex_wake_unlock): Define.
3274         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3275         lll_futex_wake_unlock.
3276         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3277         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3278         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3279         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3280         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3281         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3283 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3285         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3286         Fix typo in register name.
3288 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3290         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3291         Use __sigfillset.  Document that sigfillset does the right thing wrt
3292         to SIGSETXID.
3294 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3296         [BZ #1102]
3297         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3298         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3299         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3300         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3301         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3302         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3303         in the structure.
3304         * Makefile (tests): Add tst-initializers1.
3305         (CFLAGS-tst-initializers1.c): Set.
3306         * tst-initializers1.c: New test.
3308 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3310         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3311         Make sure __flags are located at offset 48 from the start of the
3312         structure.
3314 2005-07-02  Roland McGrath  <roland@redhat.com>
3316         * Makeconfig: Comment fix.
3318 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3320         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3321         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3322         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3323         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3324         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3325         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3326         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3327         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3328         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3329         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3331 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3333         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3334         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3335         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3336         fields.
3337         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3338         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3339         field.  Put in sysinfo field unconditionally.
3340         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3341         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3342         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3343         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3344         fields.
3345         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3346         * pthread_create.c (__pthread_create_2_1): Use
3347         THREAD_COPY_STACK_GUARD macro.
3348         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3349         tests.
3350         * tst-stackguard1.c: New file.
3351         * tst-stackguard1-static.c: New file.
3353 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3355         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3356         Invoke CGOTSETUP and CGOTRESTORE.
3357         (CGOTSETUP, CGOTRESTORE): Define.
3359 2005-05-29  Richard Henderson  <rth@redhat.com>
3361         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3362         (tf_write, tf_writev): Use it.
3363         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3364         the system minimum.
3366 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3368         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3369         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3370         __librt_*_asynccancel@local.
3372 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3374         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3375         all occurrences of JUMPTARGET.  Instead append @local to labels.
3377 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3379         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3380         size/alignment of struct pthread rather than tcbhead_t.
3381         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3382         Likewise.
3383         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3384         Likewise.
3385         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3386         Likewise.
3388 2005-05-19  Richard Henderson  <rth@redhat.com>
3390         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3391         __sync_val_compare_and_swap, not explicit _si variant.
3392         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3394 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3396         [BZ #915]
3397         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3399 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3401         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3402         .eh_frame section, use cfi_* directives.
3404 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3406         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3407         of "" includes.
3409 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3411         [BZ #1075]
3412         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3413         aio_write blocks.
3415 2005-04-27  Roland McGrath  <roland@redhat.com>
3417         * Makefile (tests): Remove tst-clock2.
3419         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3420         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3421         translating to the kernel clockid_t for our own process/thread clock.
3423         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3425 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3427         * old_pthread_cond_init.c: Include <errno.h>.
3428         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3429         process shared or uses clock other than CLOCK_REALTIME.
3430         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3432 2005-04-13  David S. Miller  <davem@davemloft.net>
3434         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3435         * sysdeps/sparc/sparc64/clone.S: New file.
3437 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3439         [BZ #1102]
3440         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3441         __inline instead of inline.
3442         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3444 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3446         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3447         functionally equivalent, but shorter instructions.
3448         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3449         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3450         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3451         Likewise.
3452         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3453         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3454         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3455         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3457         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3458         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3459         Likewise.
3460         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3461         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3462         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3463         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3464         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3466 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3468         * sysdeps/mips/Makefile: New file.
3469         * sysdeps/mips/nptl-sysdep.S: New file.
3470         * sysdeps/mips/tcb-offsets.sym: New file.
3471         * sysdeps/mips/pthread_spin_lock.S: New file.
3472         * sysdeps/mips/pthread_spin_trylock.S: New file.
3473         * sysdeps/mips/pthreaddef.h: New file.
3474         * sysdeps/mips/tls.h: New file.
3475         * sysdeps/mips/jmpbuf-unwind.h: New file.
3476         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3477         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3478         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3479         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3480         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3481         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3482         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3483         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3484         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3485         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3487 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3489         [BZ #1112]
3490         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3491         variable to scerr.
3493 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3495         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3497 2005-02-25  Roland McGrath  <roland@redhat.com>
3499         * alloca_cutoff.c: Correct license text.
3500         * tst-unload.c: Likewise.
3501         * sysdeps/pthread/allocalim.h: Likewise.
3502         * sysdeps/pthread/pt-initfini.c: Likewise.
3503         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3504         * sysdeps/pthread/bits/sigthread.h: Likewise.
3505         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3506         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3508 2005-02-16  Roland McGrath  <roland@redhat.com>
3510         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3511         Use unsigned int * for ptr_nthreads.
3513 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3515         [BZ #721]
3516         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3517         gcc4.
3519 2005-02-07  Richard Henderson  <rth@redhat.com>
3521         [BZ #787]
3522         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3523         argument.
3525 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3527         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3528         order of arguments in invocation of atomic_add_zero.
3530 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3532         [BZ #737]
3533         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3534         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3535         at least gotntpoff relocation and addition.
3536         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3537         Likewise.
3538         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3539         Likewise.
3540         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3541         Likewise.
3543 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3545         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3546         entry for static tls deallocation fix.
3547         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3548         also contains information whether the memory pointed to is static
3549         TLS or not.
3550         * sysdeps/i386/tls.h: Likewise.
3551         * sysdeps/ia64/tls.h: Likewise.
3552         * sysdeps/powerpc/tls.h: Likewise.
3553         * sysdeps/s390/tls.h: Likewise.
3554         * sysdeps/sh/tls.h: Likewise.
3555         * sysdeps/sparc/tls.h: Likewise.
3556         * sysdeps/x86_64/tls.h: Likewise.
3558 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3560         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3562 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3564         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3565         %esp.
3566         * Makefile (tests): Add tst-align2.
3567         * tst-align2.c: New test.
3568         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3569         -mpreferred-stack-boundary=4.
3571 2004-12-18  Roland McGrath  <roland@redhat.com>
3573         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3574         New file removed withdrawn for the moment.
3576 2004-12-17  Richard Henderson  <rth@redhat.com>
3578         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3579         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3581 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3583         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3584         Increased PTHREAD_STACK_MIN.
3586         * tst-context1.c (stacks): Use bigger stack size.
3588 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3590         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3591         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3593 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3595         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3596         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3597         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3599 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3601         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3603 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3605         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3606         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3608         * tst-getpid1.c: If child crashes, report this first.  Print which
3609         signal.
3611 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3613         * init.c (__pthread_initialize_minimal_internal): Also unblock
3614         SIGSETXID.
3616 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3618         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3619         _POSIX_THREAD_CPUTIME): Define to 0.
3620         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3621         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3622         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3623         __timer_signal_thread_tclk): Remove.
3624         (init_module): Remove their initialization.
3625         (thread_cleanup): Remove their cleanup assertions.
3626         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3627         __timer_signal_thread_tclk): Remove.
3628         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3629         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3630         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3632 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3634         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3635         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3637         * Makefile (tests): Add tst-getpid2.
3638         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3639         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3640         * tst-getpid2.c: New test.
3642 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3644         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3646 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3648         * Makefile (tests): Add tst-getpid1.
3649         * tst-getpid1.c: New file.
3650         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3651         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3653 2004-12-02  Roland McGrath  <roland@redhat.com>
3655         * Makefile (libpthread-nonshared): Variable removed.
3656         ($(objpfx)libpthread_nonshared.a): Target removed.
3657         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3658         These are now handled by generic magic from
3659         libpthread-static-only-routines being set.
3661 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3663         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3664         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3665         _POSIX_THREAD_PRIO_PROTECT): Define.
3666         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3667         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3668         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3670 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3672         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3673         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3674         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3675         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3676         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3677         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3678         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3680 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3682         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3684         * Makefile (libpthread-routines): Add pthread_setschedprio.
3685         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3686         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3687         * pthread_setschedprio.c: New file.
3689 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3691         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3692         * pthread_cancel.c (pthread_create): Likewise.
3694         * Makefile (libpthread-routines): Add vars.
3695         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3696         * init.c (__default_stacksize, __is_smp): Remove.
3697         * vars.c: New file.
3698         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3699         and define a wrapper macro.
3700         (PTHREAD_STATIC_FN_REQUIRE): Define.
3701         * allocatestack.c (__find_thread_by_id): Undefine.
3702         * pthread_create (__pthread_keys): Remove.
3703         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3704         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3705         PTHREAD_STATIC_FN_REQUIRE.
3707 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3709         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3710         parameter to REGISTER macro.
3712 2004-11-17  Roland McGrath  <roland@redhat.com>
3714         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3715         Make sure SIGCANCEL is blocked as well.
3717 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3719         * sysdeps/pthread/setxid.h: New file.
3720         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3721         (struct xid_command): Add forward decl.
3722         (struct pthread_functions): Change return type of __nptl_setxid hook
3723         to int.
3724         * pthreadP.h (__nptl_setxid): Change return type to int.
3725         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3726         calling thread, return its return value and set errno on failure.
3727         * descr.h (struct xid_command): Change id type to long array.
3729         * Makefile: Add rules to build and test tst-setuid1 and
3730         tst-setuid1-static.
3731         * tst-setuid1.c: New test.
3732         * tst-setuid1-static.c: New test.
3734 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3736         * Makefile (tests): Add tst-exit3.
3737         * tst-exit3.c: New test.
3739 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3741         * Makefile (tests): Add tst-exit2.
3742         * tst-exit2.c: New file.
3744 2004-11-09  Roland McGrath  <roland@redhat.com>
3746         [BZ #530]
3747         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3748         here, before calling clone.
3749         * pthread_create.c (start_thread): Don't do it here.
3751 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3753         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3755 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3757         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3758         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3759         assembler warning.
3761 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3763         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3764         if sched_priority is not between minprio and maxprio.
3766 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3768         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3769         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3771         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3772         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3774 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3776         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3777         not-cancelable I/O functions.
3779 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3781         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3782         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3783         make sure 2 is stored in the futex and we looked at the old value.
3784         Fix a few other problems to return the correct value.
3786 2004-10-14  Richard Henderson  <rth@redhat.com>
3788         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3789         make gcc4 happy.
3791 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3793         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3794         of pthread-functions.h and pthreaddef.h.
3795         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3797         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3798         Change __data.__nwaiters from int to unsigned int.
3800         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3801         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3803         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3804         before return type.
3806         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3807         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3809 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3811         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3812         test fails, remove message queue.
3813         (tf_msgsnd): Likewise.
3815 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3817         * tst-clock1.c: Change #ifdef to #if defined.
3818         * tst-clock2.c: Likewise.
3819         * tst-cond11.c: Likewise.
3821         * sysdeps/pthread/timer_create.c (timer_create): Use
3822         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3823         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3824         THREAD_CPUTIME.
3826 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3828         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3829         _POSIX_THREAD_CPUTIME): Define to 0.
3831 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3833         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3834         and _POSIX_THREAD_CPUTIME to zero.
3835         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3836         * tst-barrier2.c: Fix testing for POSIX feature.
3837         * tst-clock1.c: Likewise.
3838         * tst-clock2.c: Likewise.
3839         * tst-cond11.c: Likewise.
3840         * tst-cond4.c: Likewise.
3841         * tst-cond6.c: Likewise.
3842         * tst-flock2.c: Likewise.
3843         * tst-mutex4.c: Likewise.
3844         * tst-mutex9.c: Likewise.
3845         * tst-rwlock12.c: Likewise.
3846         * tst-rwlock4.c: Likewise.
3847         * tst-signal1.c: Likewise.
3848         * tst-spin2.c: Likewise.
3849         * sysdeps/pthread/posix-timer.h: Likewise.
3850         * sysdeps/pthread/timer_create.c: Likewise.
3851         * sysdeps/pthread/timer_routines.c: Likewise.
3853 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3855         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3856         (__lll_mutex_timedlock_wait): Address futex correctly.
3858         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3859         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3860         make sure 2 is stored in the futex and we looked at the old value.
3861         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3862         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3863         which might very well made the code not working at all before.
3864         [BZ #417]
3866 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3868         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3869         allow SIGSETXID to be sent.
3870         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3871         for SIGSETXID to be defined.
3872         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3873         SIGSETXID cannot be blocked.
3875         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3876         Add __extension__ to long long types.
3877         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3878         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3879         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3880         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3881         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3882         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3883         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3885 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3887         * descr.h (struct pthread): Add stopped_start field.
3888         * sysdeps/pthread/createthread.c (create_thread): Set
3889         start_stopped flag in descriptor for new thread appropriately.
3890         * pthread_create.c (start_thread): Only take lock to be stopped on
3891         startup if stopped_start flag says so.
3893 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3895         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3896         is created detached and if yes, do not try to free the stack in case
3897         the thread creation failed.
3898         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3899         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3900         case there has been no error.  [BZ #405]
3902         * pthread_create.c (start_thread): Don't wait for scheduler data
3903         etc to be set at the beginning of the function.  The cancellation
3904         infrastructure must have been set up.  And enable async
3905         cancellation before potentially going to sleep.  [BZ #401]
3907 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3909         * Versions: Remove exports for pthread_set*id_np functions.
3910         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3911         for now.
3912         * Makefile: Don't build pthread_set*id code for now.
3914 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3916         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3917         internal use.
3918         * allocatestack.c (__nptl_setxid): New function.
3919         * descr.h (struct xid_command): Define type.
3920         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3921         (sighandler_setxid): New function.
3922         (__pthread_initialize_minimal): Register sighandler_setxid for
3923         SIGCANCEL.
3924         * pt-allocrtsig.c: Update comment.
3925         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3926         Declare __nptl_setxid.
3927         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3928         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3929         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3930         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3931         and pthread_setresuid_np.
3932         * pthread_setgid_np.c: New file.
3933         * pthread_setuid_np.c: New file.
3934         * pthread_setegid_np.c: New file.
3935         * pthread_seteuid_np.c: New file.
3936         * pthread_setregid_np.c: New file.
3937         * pthread_setreuid_np.c: New file.
3938         * pthread_setresgid_np.c: New file.
3939         * pthread_setresuid_np.c: New file.
3940         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3941         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3942         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3943         and pthread_setresuid_np.
3944         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3945         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3946         pthread_setregid, and pthread_setresgid.
3948 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3950         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3951         ENOMEM when out of memory.
3953 2004-09-10  Roland McGrath  <roland@redhat.com>
3955         [BZ #379]
3956         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3957         code, since we don't try to use the broken CLONE_STOPPED any more.
3958         * pthread_create.c (start_thread): Likewise.
3960 2004-09-15  Richard Henderson  <rth@redhat.com>
3962         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3964 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3966         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3967         (__libc_unwind_longjmp): Delete macro and declare as function.
3968         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3969         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3970         nptl directory.
3971         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3972         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3973         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3975 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3977         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3978         for __USE_XOPEN2K.
3979         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3980         types also for __USE_XOPEN2K.
3981         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3982         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3983         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3984         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3985         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3986         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3987         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3988         [BZ #320]
3990 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3992         * sysdeps/pthread/pthread.h
3993         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3994         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3995         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3996         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3997         [BZ #375]
3999 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4001         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4002         PSEUDO to be used with . prefix.
4004         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4005         Use atomic_increment instead of atomic_exchange_and_add.
4006         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4007         Likewise.
4008         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4009         Likewise.
4010         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4011         Likewise.
4013         * allocatestack.c (allocate_stack): Use atomic_increment_val
4014         instead of atomic_exchange_and_add.
4015         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4016         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4017         Likewise.
4018         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4019         Likewise.
4021         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4022         the initialization function might throw.
4024 2005-09-05  Richard Henderson  <rth@redhat.com>
4026         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4027         Move definition inside libpthread, libc, librt check.  Provide
4028         definition for rtld.
4030 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4032         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4033         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4034         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4035         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4036         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4037         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4038         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4039         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4040         * unwind.c: Use it.
4042         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4043         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4044         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4045         Likewise.
4046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4047         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4048         this is the last waiter, signal pthread_cond_destroy caller and
4049         avoid using the pthread_cond_t structure after unlock.
4050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4051         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4052         Read clock type from the least significant bits of __nwaiters instead
4053         of __clock.
4054         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4055         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4057 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4059         [BZ #342]
4060         * Makefile (tests): Add tst-cond20 and tst-cond21.
4061         * tst-cond20.c: New test.
4062         * tst-cond21.c: New test.
4063         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4064         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4065         it unsigned int.
4066         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4067         Likewise.
4068         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4069         (pthread_cond_t): Likewise.
4070         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4071         Likewise.
4072         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4073         Likewise.
4074         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4075         Likewise.
4076         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4077         (cond_nwaiters): New.
4078         (clock_bits): New.
4079         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4080         if there are waiters not signalled yet.
4081         Wait until all already signalled waiters wake up.
4082         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4083         __nwaiters.  If pthread_cond_destroy has been called and this is the
4084         last waiter, signal pthread_cond_destroy caller and avoid using
4085         the pthread_cond_t structure after unlock.
4086         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4087         decrement it when leaving.  If pthread_cond_destroy has been called
4088         and this is the last waiter, signal pthread_cond_destroy caller.
4089         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4090         Likewise.  Read clock type from the least significant bits of
4091         __nwaiters instead of __clock.
4092         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4093         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4094         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4095         clock type just from the last COND_CLOCK_BITS bits of value.
4096         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4097         instead of __clock, just from second bit of condattr's value.
4099 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4101         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4102         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4103         != 64.
4104         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4106 2004-08-15  Roland McGrath  <roland@frob.com>
4108         * pthread_atfork.c: Update copyright terms including special exception
4109         for these trivial files, which are statically linked into executables
4110         that use dynamic linking for the significant library code.
4112 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4114         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4115         pthread_rwlock_rdlock.
4116         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4117         Decrease __nr_readers_queued after reacquiring lock.
4118         * sysdeps/pthread/pthread_rwlock_timedrdlock
4119         (pthread_rwlock_timedrdlock): Likewise.
4120         Reported by Bob Cook <bobcook47@hotmail.com>.
4122 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4124         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4125         before pthread_barrier_wait.
4127 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4130         Remove unnecessary exception handling data.
4132 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4134         [BZ #284]
4135         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4136         instead of clockid_t.
4138 2004-07-21  Roland McGrath  <roland@redhat.com>
4140         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4142 2004-07-19  Roland McGrath  <roland@redhat.com>
4144         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4146 2004-07-02  Roland McGrath  <roland@redhat.com>
4148         * configure: Don't exit.
4150 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4152         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4153         (__pthread_cond_timedwait): Check for invalid nanosecond in
4154         timeout value.
4156 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4158         * Makefile: Add rules to build and run tst-fini1.
4159         * tst-fini1.c: New file.
4160         * tst-fini1mod.c: New file.
4162 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4164         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4165         if no cancellation support is needed.
4166         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4167         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4168         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4169         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4170         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4171         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4172         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4173         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4174         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4176         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4177         only if not already defined.
4179 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4181         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4182         constraint "m" instead of "0" for futex.
4184         * shlib-versions: Add powerpc64-.*-linux.*.
4186 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4188         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4189         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4190         for valid tv_nsec.
4191         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4192         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4193         bits.
4195 2004-06-29  Roland McGrath  <roland@redhat.com>
4197         * Banner: NPTL no longer has its own version number.
4198         * Makefile (nptl-version): Variable removed.
4199         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4200         using $(version), the glibc version number.
4202 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4204         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4205         Fix branch offset for a PLT entry.
4206         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4207         Likewise.
4208         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4209         Likewise.
4210         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4211         Likewise.
4212         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4213         Likewise.
4215 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4217         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4218         unconditionally.
4220 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4222         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4223         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4224         instead of tv_sec.
4225         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4226         (pthread_rwlock_timedrdlock): Likewise.
4228 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4230         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4231         Set __r7 to val, not mutex.
4233 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4235         * Makefile: Add rules to build tst-rwlock14.
4236         * tst-rwlock14.c: New file.
4238 2004-06-24  Boris Hu  <boris.hu@intel.com>
4240         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4241         check.
4242         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4244 2004-06-19  Andreas Jaeger  <aj@suse.de>
4246         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4247         assembler in last patch.
4249 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4251         * sysdeps/pthread/pthread_cond_timedwait.c
4252         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4254         (__pthread_cond_timedwait): Check for invalid nanosecond in
4255         timeout value.
4256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4257         * tst-cond19.c: New file.
4258         * Makefile: Add rules to build and run tst-cond19.
4260 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4262         * tst-context1.c (GUARD_PATTERN): Defined.
4263         (tst_context_t): Define struct containing ucontext_t & guard words.
4264         (ctx): Declare as an array of tst_context_t.
4265         (fct): Verify uc_link & guard words are still valid.
4266         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4268 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4270         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4271         Add __data.__futex field, reshuffle __data.__clock.
4272         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4273         (__pthread_cond_signal): Increment __futex at the same time as
4274         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4275         address of low 32-bits of __wakeup_seq to futex syscall.
4276         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4277         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4278         releasing internal lock to FUTEX_WAIT.
4279         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4280         (__pthread_cond_timedwait): Likewise.
4281         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4282         (FUTEX_CMP_REQUEUE): Define.
4283         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4284         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4285         Pass __futex value from before the unlock and __futex address instead
4286         of address of low 32-bits of __wakeup_seq to futex syscall.
4287         Fallback to FUTEX_WAKE all on any errors.
4289 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4291         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4292         comment typo.
4293         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4294         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4295         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4296         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4297         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4299 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4301         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4302         Add memory clobber to inline assembly.
4303         (__lll_mutex_trylock): Likewise.
4304         (__lll_mutex_cond_trylock): Likewise.
4306 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4308         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4309         Pass val argument as 6th system call argument in %r7.
4311 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4313         * Makefile (tests): Add tst-cond16.
4314         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4315         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4316         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4317         Add __data.__futex field, reshuffle __data.__clock.
4318         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4319         (__pthread_cond_signal): Increment __futex at the same time as
4320         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4321         address of low 32-bits of __wakeup_seq to futex syscall.
4322         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4323         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4324         releasing internal lock to FUTEX_WAIT.
4325         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4326         (__pthread_cond_timedwait): Likewise.
4327         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4328         (FUTEX_CMP_REQUEUE): Define.
4329         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4330         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4331         Pass __futex value from before the unlock and __futex address instead
4332         of address of low 32-bits of __wakeup_seq to futex syscall.
4333         Fallback to FUTEX_WAKE all on any errors.
4334         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4335         Define.
4336         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4337         internally.  Return non-zero if error, zero if success.
4338         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4339         Add __data.__futex field, reshuffle __data.__clock.
4340         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4341         Define.
4342         (lll_futex_requeue): Add val argument, return 1 unconditionally
4343         for the time being.
4344         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4345         Add __data.__futex field, reshuffle __data.__clock.
4346         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4347         Define.
4348         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4349         internally.  Return non-zero if error, zero if success.
4350         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4351         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4352         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4353         Define.
4354         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4355         internally.  Return non-zero if error, zero if success.
4356         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4357         Add __data.__futex field, reshuffle __data.__clock.
4358         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4359         Define.
4360         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4361         internally.  Return non-zero if error, zero if success.
4362         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4363         Add __data.__futex field, reshuffle __data.__clock.
4364         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4365         Add __data.__futex field, reshuffle __data.__clock.
4366         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4367         Increment __futex at the same time as __wakeup_seq or __total_seq.
4368         Pass address of __futex instead of address of low 32-bits of
4369         __wakeup_seq to futex syscall.
4370         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4371         Pass __futex value from before releasing internal lock
4372         to FUTEX_WAIT.
4373         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4374         Likewise.  Avoid unnecessary shadowing of variables.
4375         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4376         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4377         unlock and __futex address instead of address of low 32-bits of
4378         __wakeup_seq to futex_requeue macro, adjust for new return value
4379         meaning.
4380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4381         (__pthread_cond_signal): Increment __futex at the same time as
4382         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4383         address of low 32-bits of __wakeup_seq to futex syscall.
4384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4385         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4386         releasing internal lock to FUTEX_WAIT.
4387         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4388         (__pthread_cond_timedwait): Likewise.
4389         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4390         (FUTEX_CMP_REQUEUE): Define.
4391         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4392         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4393         Pass __futex value from before the unlock and __futex address instead
4394         of address of low 32-bits of __wakeup_seq to futex syscall.
4395         Fallback to FUTEX_WAKE all on any errors.
4397 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4399         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4400         Add nop to align the end of critical section.
4401         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4403 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4405         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4406         Add __broadcast_seq field.
4407         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4408         all waiters as woken with woken_seq and bump broadcast counter.
4409         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4410         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4411         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4412         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4414 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4416         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4417         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4418         Reported by Kaz Kojima.
4420 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4422         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4424 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4426         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4427         __broadcast_seq with bc_seq after acquiring internal lock instead of
4428         before it.
4430 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4432         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4433         compilation.
4434         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4435         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4436         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4437         (pthread_cond_t): Add __data.__broadcast_seq field.
4438         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4439         (FRAME_SIZE): Define.
4440         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4441         Comment typo fixes.
4442         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4443         Define.
4444         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4445         typo fixes.
4446         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4447         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4448         fixes.
4450 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4452         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4453         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4454         Add __broadcast_seq field.
4455         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4456         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4457         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4458         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4459         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4460         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4461         all waiters as woken with woken_seq and bump broadcast counter.
4462         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4464         __broadcast_seq field.
4465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4466         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4467         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4468         * pthread_cond_init.c: Initialize __broadcast_seq field.
4469         * Makefile (tests): Add tst-cond17 and tst-cond18.
4470         Add .NOTPARALLEL goal.
4471         * tst-cond16.c: New file.  From Jakub.
4472         * tst-cond17.c: New file.  From Jakub.
4473         * tst-cond18.c: New file.  From Jakub.
4475 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4477         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4478         unwind info.
4480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4481         Parametrize frame size.  Correct some unwind info.
4482         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4484 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4486         * tst-stack3.c: Note testing functionality beyond POSIX.
4488 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4490         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4491         Change conditional from ifdef to if.
4493 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4495         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4496         SYSDEP_CANCEL_ERROR): Define.
4497         (PSEUDO): Use it.
4499 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4501         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4503 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4505         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4507 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4509         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4510         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4511         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4512         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4514 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4516         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4517         thread has all signals blocked.
4519 2004-04-18  Andreas Jaeger  <aj@suse.de>
4521         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4522         (SEM_VALUE_MAX): Add missing brace.
4524 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4526         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4527         in rt subdir.
4528         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4529         * sysdeps/pthread/tst-mqueue8x.c: New test.
4530         * tst-cancel4.c: Update comment about message queues.
4532         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4533         return it_value { 0, 0 }.
4534         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4535         like SIGEV_SIGNAL.
4536         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4537         assertion for SIGEV_NONE.
4538         (thread_attr_compare): Compare all attributes, not just a partial
4539         subset.
4541 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4543         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4545 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4547         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4548         Just use a plain number.
4549         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4550         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4551         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4552         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4553         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4554         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4555         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4557 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4559         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4560         frame info.
4561         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4563 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4565         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4566         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4567         of calling sigwaitinfo.
4569 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4571         * allocatestack.c (allocate_stack): Set reported_guardsize
4572         unconditionally.
4573         * pthread_getattr_np.c (pthread_getattr_np): Use
4574         reported_guardsize instead of guardsize.
4575         * descr.h (struct pthread): Add reported_guardsize field.
4577 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4579         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4581 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4583         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4585 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4587         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4588         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4589         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4590         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4591         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4592         Define.
4593         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4594         (_POSIX_MESSAGE_PASSING): Define.
4595         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4596         (_POSIX_MESSAGE_PASSING): Define.
4597         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4598         (_POSIX_MESSAGE_PASSING): Define.
4600 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4602         * tst-context1.c (fct): Check whether correct stack is used.
4604 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4606         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4607         matching constraints for asm mem parameters.
4609         * tst-clock2.c (tf): Don't define unless needed.
4611 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4613         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4614         $(gnulib).
4616 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4618         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4619         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4620         * pthreadP.h: Declare __nptl_deallocate_tsd.
4621         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4622         Adjust caller.
4624         * Makefile (tests): Add tst-tsd5.
4625         * tst-tsd5.c: New file.
4627 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4629         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4630         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4631         is SHLIB_COMPAT check.
4632         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4633         (__pthread_attr_getaffinity_old): Likewise.
4634         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4635         (__pthread_getaffinity_old): Likewise.
4636         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4637         (__pthread_setaffinity_old): Likewise.
4639 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4641         * allocatestack.c (_make_stacks_executable): Call
4642         _dl_make_stack_executable first.
4644 2004-03-24  Roland McGrath  <roland@redhat.com>
4646         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4647         constraint instead of "0".
4649 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4651         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4652         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4654         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4655         code to avoid warning.
4657 2004-03-24  Andreas Jaeger  <aj@suse.de>
4659         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4660         (__pthread_attr_setaffinity_old): Remove const.
4662 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4664         * sysdeps/unix/sysv/linux/smp.h: New file.
4665         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4666         * init.c: Define __is_smp.
4667         (__pthread_initialize_minimal_internal): Call is_smp_system to
4668         initialize __is_smp.
4669         * pthreadP.h: Declare __is_smp.
4670         Define MAX_ADAPTIVE_COUNT is necessary.
4671         * pthread_mutex_init.c: Add comment regarding __spins field.
4672         * pthread_mutex_lock.c: Implement adaptive mutex type.
4673         * pthread_mutex_timedlock.c: Likewise.
4674         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4675         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4676         Add __spins field.
4677         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4678         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4679         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4680         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4681         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4682         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4683         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4684         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4685         lll_mutex_cond_trylock.
4686         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4687         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4688         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4689         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4690         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4691         Define BUSY_WAIT_NOP.
4692         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4693         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4695         * tst-mutex5.c: Add support for testing adaptive mutexes.
4696         * tst-mutex7.c: Likewise.
4697         * tst-mutex5a.c: New file.
4698         * tst-mutex7a.c: New file.
4699         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4701         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4702         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4703         vgettimeofday call might destroy the content.
4705         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4706         @pause in the loop.
4708         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4709         No need to restrict type of ret.  Make it int.  Add comment.
4711         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4712         Remove unnecessary setne instruction.
4714 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4716         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4717         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4718         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4719         If realloc fails, break out of the loop.
4721 2004-03-20  Andreas Jaeger  <aj@suse.de>
4723         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4724         (__pthread_setaffinity_old): Fix interface.
4725         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4726         (__pthread_getaffinity_old): Likewise.
4728         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4729         (__pthread_setaffinity_new): Remove duplicate declaration.
4731 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4733         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4734         the return value to a safe register.
4735         (CDISABLE): Set the function argument correctly.
4737 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4739         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4740         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4741         Rewrite so that only one locked memory operation per round is needed.
4742         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4743         (pthread_barrier_wait): After wakeup, release lock only when the
4744         last thread stopped using the barrier object.
4745         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4746         (__pthread_cond_wait): Don't store mutex address if the current
4747         value is ~0l.  Add correct cleanup support and unwind info.
4748         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4749         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4750         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4751         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4752         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4753         Add correct cleanup support and unwind info.
4754         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4755         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4756         information for syscall wrappers.
4758 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4760         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4761         cpusetsize field, remove next.
4762         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4763         parameter for size of the CPU set.
4764         (pthread_setaffinity_np): Likewise.
4765         (pthread_attr_getaffinity_np): Likewise.
4766         (pthread_attr_setaffinity_np): Likewise.
4767         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4768         interface change, keep compatibility code.
4769         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4770         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4771         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4772         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4773         __pthread_getaffinity_np.
4774         * Versions: Add version for changed interfaces.
4775         * tst-attr3.c: Adjust test for interface change.
4776         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4777         increasing buffer sizes.
4778         * pthread_attr_destroy.c: Remove unused list handling.
4779         * pthread_attr_init.c: Likewise.
4781 2004-03-17  Roland McGrath  <roland@redhat.com>
4783         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4784         first argument to clock_getres so we ever enable kernel timers.
4786 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4788         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4790 2004-03-12  Richard Henderson  <rth@redhat.com>
4792         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4793         oldvalue from CENABLE to CDISABLE.
4795 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4797         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4798         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4799         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4800         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4802 2004-03-11  Richard Henderson  <rth@redhat.com>
4804         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4805         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4806         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4808 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4810         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4811         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4812         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4814 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4816         * forward.c (__pthread_cond_broadcast_2_0,
4817         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4818         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4819         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4821 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4823         * sysdeps/sh/tcb-offsets.sym: Add PID.
4824         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4825         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4827 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4829         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4830         include <sysdep-cancel.h>, vfork is no cancellation point.
4831         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4832         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4833         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4835 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4837         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4838         libc_hidden_def.
4839         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4840         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4841         Likewise.
4842         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4843         Likewise.
4844         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4845         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4846         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4847         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4848         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4850         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4851         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4852         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4853         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4854         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4855         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4857         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4858         a local register for saving old PID.  Negate PID in parent upon exit.
4860         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4861         tcb-offsets.h.
4862         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4863         before syscall, set to the old value in the parent afterwards.
4864         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4865         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4866         tcb-offsets.h.
4867         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4868         before syscall, set to the old value in the parent afterwards.
4869         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4870         * sysdeps/s390/tcb-offsets.sym: Add PID.
4872         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4873         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4874         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4875         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4876         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4877         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4879 2004-03-10  Andreas Schwab  <schwab@suse.de>
4881         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4882         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4883         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4885 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4887         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4888         * tst-cancel21.c (do_one_test): Likewise.
4889         Reported by Gordon Jin <gordon.jin@intel.com>.
4891 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4893         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4894         if non-zero and set to INT_MIN if zero.
4895         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4896         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4897         (SAVE_PID, RESTORE_PID): Define.
4898         (__vfork): Use it.
4899         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4900         Use relative path to avoid including NPTL i386/vfork.S.
4901         (SAVE_PID, RESTORE_PID): Define.
4902         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4903         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4904         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4905         tst-vfork2x.
4906         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4907         * tst-vfork1.c: New test.
4908         * tst-vfork2.c: New test.
4909         * tst-vfork1x.c: New test.
4910         * tst-vfork2x.c: New test.
4912 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4914         * sysdeps/i386/tcb-offsets.sym: Add PID.
4915         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4916         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4917         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4919 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4921         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4923 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4925         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4926         _rtld_global_ro.
4928 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4930         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4931         _rtld_global_ro.
4933         * tst-once4.c: Remove unnecessary macro definition.
4935         * tst-mutex7.c (do_test): Limit thread stack size.
4936         * tst-once2.c (do_test): Likewise.
4937         * tst-tls3.c (do_test): Likewise.
4938         * tst-tls1.c (do_test): Likewise.
4939         * tst-signal3.c (do_test): Likewise.
4940         * tst-kill6.c (do_test): Likewise.
4941         * tst-key4.c (do_test): Likewise.
4942         * tst-join4.c (do_test): Likewise.
4943         * tst-fork1.c (do_test): Likewise.
4944         * tst-context1.c (do_test): Likewise.
4945         * tst-cond2.c (do_test): Likewise.
4946         * tst-cond10.c (do_test): Likewise.
4947         * tst-clock2.c (do_test): Likewise.
4948         * tst-cancel10.c (do_test): Likewise.
4949         * tst-basic2.c (do_test): Likewise.
4950         * tst-barrier4.c (do_test): Likewise.
4952 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4954         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4956 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4958         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4959         (__pthread_cond_timedwait): Optimize wakeup test.
4960         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4961         (__pthread_cond_wait): Likewise.
4962         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4963         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4964         Likewise.
4966 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4968         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4969         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4970         the atomic instruction needed.
4971         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4972         (__lll_mutex_lock_wait): Likewise.
4974 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4976         * Makefile (tests): Add tst-cond14 and tst-cond15.
4977         * tst-cond14.c: New file.
4978         * tst-cond15.c: New file.
4980 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4982         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4983         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4984         needs to be implemented differently to be useful.
4986 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4988         * pthread_attr_setschedparam.c: Don't test priority against limits
4989         here.  Set ATTR_FLAG_SCHED_SET flag.
4990         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4991         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4992         from parent thread to child.  If attribute is used and scheduling
4993         parameters are not inherited, copy parameters from attribute or
4994         compute them.  Check priority value.
4995         * pthread_getschedparam.c: If the parameters aren't known yet get
4996         them from the kernel.
4997         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4998         ATTR_FLAG_POLICY_SET flag for thread.
4999         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5000         and ATTR_FLAG_POLICY_SET.
5002         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5004         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5005         fail if stack address hasn't been set.  Just return 0.
5007 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5009         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5010         libpthread for the files in this list.
5011         (CFLAGS-tst-unload): Removed.
5012         * tst-unload.c (do_test): Don't use complete path for
5013         LIBPHREAD_SO.
5015         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5016         tst-_res1mod2.
5018 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5020         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5021         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5022         operation per round is needed.
5023         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5024         (__lll_mutex_lock_wait): Likewise.
5026 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5028         * tst-cancel9.c (cleanup): Don't print to stderr.
5030 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5032         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5034 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5036         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5037         (__syscall_error_handler2): Call CDISABLE.
5038         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5039         (__syscall_error_handler2): Call CDISABLE.
5041         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5042         Release lock before the loop, don't reacquire it.
5044         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5046 2004-02-19  Andreas Schwab  <schwab@suse.de>
5048         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5049         Fix last change.
5051 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5053         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5054         (pthread_barrier_wait): After wakeup, release lock only when the
5055         last thread stopped using the barrier object.
5056         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5057         (pthread_barrier_wait): Likewise.
5058         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5059         Likewise.
5060         * Makefile (tests): Add tst-barrier4.
5061         * tst-barrier4.c: New file.
5063         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5064         (__pthread_cond_timedwait): Perform timeout test while holding
5065         internal lock to prevent wakeup race.
5066         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5067         * sysdeps/pthread/pthread_cond_timedwait.c
5068         (__pthread_cond_timedwait): Likewise.
5069         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5070         (__pthread_cond_timedwait): Likewise.
5072 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5074         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5075         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5076         * Makefile (tests): Add tst-rwlock13.
5077         * tst-rwlock13.c: New test.
5079 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5082         (__condvar_tw_cleanup): Little optimization.
5083         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5085 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5087         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5088         libpthread as "lib" parameter to SHLIB_COMPAT.
5089         (__novmx_siglongjmp): Fix typo in function name.
5090         (__novmx_longjmp): Fix typo in function name.
5092 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5094         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5095         __builtin_expect.
5097         * sysdeps/generic/pt-longjmp.c: Moved to...
5098         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5100 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5102         * Makefile (libpthread-routines): Add pt-cleanup.
5103         * pt-longjmp.c: Removed.
5104         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5105         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5106         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5107         Version longjmp, siglongjmp for GLIBC_2.3.4.
5108         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5110 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5112         * sysdeps/pthread/pthread_cond_timedwait.c
5113         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5114         Reuse code.  Add __builtin_expects.
5116         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5117         (__pthread_cond_timedwait): Get internal lock in case timeout has
5118         passed before the futex syscall.
5119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5121 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5123         * allocatestack.c: Pretty printing.
5125         * sysdeps/pthread/createthread.c (create_thread): Don't add
5126         CLONE_DETACHED bit if it is not necessary.
5128 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5130         * pthread_getattr_np.c: Include ldsodefs.h.
5132 2004-01-16  Richard Henderson  <rth@redhat.com>
5134         * allocatestack.c: Don't declare __libc_stack_end.
5135         * init.c (__pthread_initialize_minimal_internal): Likewise.
5136         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5138 2004-01-15  Richard Henderson  <rth@redhat.com>
5140         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5141         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5142         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5143         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5144         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5145         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5146         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5147         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5149 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5151         * init.c (pthread_functions): Make array const.
5153 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5155         * allocatestack.c (__make_stacks_executable): Change interface.
5156         Check parameters.  Pass parameter on to libc counterpart.
5157         * pthreadP.h: Change declaration.
5159 2004-01-13  Richard Henderson  <rth@redhat.com>
5161         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5162         prototype form.
5163         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5164         Likewise.
5166         * sysdeps/alpha/Makefile: New file.
5167         * sysdeps/alpha/tcb-offsets.sym: New file.
5168         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5169         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5171         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5172         on powerpc version.
5174 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5176         * Makefile (tests): Add tst-backtrace1.
5177         * tst-backtrace1.c: New test.
5179 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5181         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5182         register as second parameter to the REGISTER macro.
5183         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5184         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5185         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5186         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5187         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5188         of thread register as second parameter to REGISTER macro in 64 case.
5190 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5192         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5193         (CFLAGS-getpid.o): Defined.
5194         (CFLAGS-getpid.os): Defined.
5196 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5198         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5199         returned for main thread does not overlap with any other VMA.
5200         Patch by Jakub Jelinek.
5202 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5204         * tst-raise1.c: Include stdio.h.
5206 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5208         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5209         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5210         If pid is 0, set it to selftid.
5211         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5212         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5213         != 0, return self->tid without doing a syscall.
5214         * descr.h (struct pthread): Move pid field after tid.
5216         * Makefile (tests): Add tst-raise1.
5217         * tst-raise1.c: New file.
5219 2003-12-23  Roland McGrath  <roland@redhat.com>
5221         * tst-oddstacklimit.c: New file.
5222         * Makefile (tests): Add it.
5223         (tst-oddstacklimit-ENV): New variable.
5225         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5226         value up to page size for __default_stacksize.
5228 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5230         * Makefile (tests): Add tst-eintr5.
5231         * tst-eintr5.c: New file.
5233         * eintr.c (eintr_source): Prevent sending signal to self.
5235         * tst-eintr2.c (tf1): Improve error message.
5237 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5239         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5240         * sysdeps/unix/sysv/linux/getpid.c: New file.
5241         * pthread_cancel.c: Add comment explaining use of PID field.
5242         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5243         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5244         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5245         temporarily to signal the field must not be relied on and updated
5246         by getpid().
5247         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5248         temporarily negative.
5249         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5251 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5253         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5254         (eintr_source): If ARG != NULL, use pthread_kill.
5255         * tst-eintr1.c: Adjust for this change.
5256         * tst-eintr2.c: Likewise.
5257         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5258         * tst-eintr3.c: New file.
5259         * tst-eintr4.c: New file.
5261 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5263         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5264         if CANCELSTATE_BITMASK is set.
5265         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5266         Likewise.
5268         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5269         (tests-reverse): Add tst-cancel23.
5270         * tst-cancel22.c: New test.
5271         * tst-cancel23.c: New test.
5273 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5275         * tst-eintr1.c: Better error messages.
5277         * Makefile (tests): Add tst-eintr2.
5278         * tst-eintr2.c: New file.
5280 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5282         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5283         (CFLAGS-tst-cancelx21.c): Set.
5284         * tst-cancel21.c: New test.
5285         * tst-cancelx21.c: New test.
5287         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5288         comparison operand.
5289         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5290         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5291         * pt-longjmp.c: Include jmpbuf-unwind.h.
5292         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5293         _JMPBUF_UNWINDS.  Adjust compared pointers.
5294         * init.c (__pthread_initialize_minimal_internal): Initialize
5295         pd->stackblock_size.
5296         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5297         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5298         * sysdeps/i386/jmpbuf-unwind.h: New file.
5299         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5300         * sysdeps/s390/jmpbuf-unwind.h: New file.
5301         * sysdeps/sh/jmpbuf-unwind.h: New file.
5302         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5303         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5304         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5305         (_JMPBUF_CFA_UNWINDS): Remove.
5306         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5308 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5310         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5311         (CFLAGS-tst-cancelx20.c): Set.
5312         * tst-cancel20.c: New test.
5313         * tst-cancelx20.c: New test.
5315 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5317         * init.c (__pthread_initialize_minimal_internal): Don't treat
5318         architectures with separate register stack special here when
5319         computing default stack size.
5321 2003-12-17  Roland McGrath  <roland@redhat.com>
5323         * Makefile (tst-cancelx7-ARGS): New variable.
5324         Reportd by Greg Schafer <gschafer@zip.com.au>.
5326 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5328         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5329         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5330         (tst-stack3-ENV): Set.
5331         ($(objpfx)tst-stack3-mem): New.
5332         * tst-stack3.c: New test.
5334 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5336         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5337         Add unwind directives.  Drop unused .regstk directive.
5338         (_fini_EPILOG_BEGINS): Add unwind directives.
5340 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5342         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5343         Assume parameter is a pointer.
5344         (lll_futex_wake): Likewise.
5345         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5346         Likewise.
5347         (lll_futex_wake): Likewise.
5348         Reported by Boris Hu.
5349         * sysdeps/unix/sysv/linux/unregister-atfork.c
5350         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5352         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5354 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5356         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5357         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5358         __rtld_lock_initialize for ld.so lock.
5359         Patch in part by Adam Li <adam.li@intel.com>.
5361 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5363         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5364         in $(gnulib).  Also, remove stale comment.
5366 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5368         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5369         advantage of new syscall stub and optimize accordingly.
5371         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5372         from SYS_futex, to match expectations of
5373         sysdep.h:DO_INLINE_SYSCALL.
5374         (lll_futex_clobbers): Remove.
5375         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5376         (lll_futex_wake): Likewise.
5377         (lll_futex_requeue): Likewise.
5378         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5379         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5380         Jelinek).
5381         (__lll_mutex_lock): Likewise.
5382         (__lll_mutex_cond_lock): Likewise.
5383         (__lll_mutex_timed_lock): Likewise.
5384         (__lll_mutex_unlock): Likewise.
5385         (__lll_mutex_unlock_force): Likewise.
5387         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5388         comes before the include of <sysdep.h>.
5389         (THREAD_SELF_SYSINFO): New macro.
5390         (THREAD_SYSINFO): Likewise.
5391         (INIT_SYSINFO): New macro.
5392         (TLS_INIT_TP): Call INIT_SYSINFO.
5394         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5396         * sysdeps/pthread/createthread.c (create_thread): Use
5397         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5398         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5399         THREAD_SELF_SYSINFO instead of open code.
5400         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5401         (THREAD_SYSINFO): Likewise.
5403         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5405         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5407 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5409         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5410         instead of .init.  Patch by David Mosberger.
5412 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5414         * sysdeps/pthread/configure.in: Remove broken declaration in C
5415         cleanup handling check.
5417 2003-11-30  Andreas Jaeger  <aj@suse.de>
5419         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5420         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5421         Likewise.
5423 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5425         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5426         * pthread_attr_destroy.c: Include shlib-compat.h.
5427         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5428         is set in iattr->flags.
5429         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5431 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5433         * Makefile (distribute): Add tst-cleanup4aux.c.
5435         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5436         include.
5438 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5440         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5441         pthread_cond_signal.
5443         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5444         store mutex address if the current value is ~0l.
5445         * sysdeps/pthread/pthread_cond_timedwait.c
5446         (__pthread_cond_timedwait): Likewise.
5447         * sysdeps/pthread/pthread_cond_broadcast.c
5448         (__pthread_cond_broadcast): Don't use requeue for pshared
5449         condvars.
5451         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5452         (__pthread_cond_wait): Don't store mutex address if the current
5453         value is ~0l.
5454         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5455         (__pthread_cond_timedwait): Likewise.
5456         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5457         (__pthread_cond_broadcast): Don't use requeue for pshared
5458         condvars.
5460         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5461         element with ~0l for pshared condvars, with NULL otherwise.
5463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5464         (__pthread_cond_wait): Don't store mutex address if the current
5465         value is ~0l.
5466         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5467         (__pthread_cond_timedwait): Likewise.
5468         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5469         (__pthread_cond_broadcast): Don't use requeue for pshared
5470         condvars.
5472         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5473         * tst-cond12.c: New file.
5474         * tst-cond13.c: New file.
5476 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5478         * sysdeps/pthread/configure.in: Make missing forced unwind support
5479         fatal.
5481 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5483         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5485 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5487         * Makefile: Add magic to clean up correctly.
5489 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5491         * unwind.c (FRAME_LEFT): Define.
5492         (unwind_stop): Handle old style cleanups here.
5493         (__pthread_unwind): Handle old style cleanups only if
5494         !HAVE_FORCED_UNWIND.
5495         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5496         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5497         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5498         ($(objpfx)tst-cleanupx4): Likewise.
5499         * tst-cleanup4.c: New test.
5500         * tst-cleanup4aux.c: New.
5501         * tst-cleanupx4.c: New test.
5503 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5505         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5506         lll_mutex_*lock macros to skip atomic operations on some archs.
5508 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5510         * sysdeps/pthread/tst-timer.c (main): Initialize
5511         sigev2.sigev_value as well.
5513 2003-10-15  Roland McGrath  <roland@redhat.com>
5515         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5516         is missing.
5517         * sysdeps/pthread/configure: Regenerated.
5519 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5521         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5522         locking macros.  No distinction between normal and mutex locking
5523         anymore.
5524         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5525         Merge bits from lowlevelmutex.S we still need.
5526         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5527         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5528         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5529         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5530         new mutex implementation.
5531         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5532         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5533         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5534         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5535         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5536         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5537         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5538         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5539         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5540         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5541         symbol for entry point to avoid cancellation.
5543 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5545         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5546         changes.
5547         (SAVE_OLDTYPE_0): Fix a typo.
5549 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5551         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5552         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5554 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5556         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5557         correct offset.
5559 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5561         * Makefile (tests): Add tst-cancel19.
5562         * tst-cancel19.c: New test.
5564 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5566         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5567         restoring of the old cancellation type.
5569 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5571         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5573 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5575         * sysdeps/pthread/malloc-machine.h: New file
5577 2003-09-24  Roland McGrath  <roland@redhat.com>
5579         * allocatestack.c (__make_stacks_executable): Don't ignore return
5580         value from _dl_make_stack_executable.
5582 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5584         * allocatestack.c (__make_stacks_executable): Also change
5585         permission of the currently unused stacks.
5587         * allocatestack.c (change_stack_perm): Split out from
5588         __make_stacks_executable.
5589         (allocate_stack): If the required permission changed between the time
5590         we started preparing the stack and queueing it, change the permission.
5591         (__make_stacks_executable): Call change_stack_perm.
5593         * Makefile: Build tst-execstack-mod locally.
5594         * tst-execstack-mod.c: New file.
5596 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5598         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5600 2003-09-23  Roland McGrath  <roland@redhat.com>
5602         * tst-execstack.c: New file.
5603         * Makefile (tests): Add it.
5604         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5605         (LDFLAGS-tst-execstack): New variable.
5607         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5608         whether to use PROT_EXEC for stack mmap.
5609         (__make_stacks_executable): New function.
5610         * pthreadP.h: Declare it.
5611         * init.c (__pthread_initialize_minimal_internal): Set
5612         GL(dl_make_stack_executable_hook) to that.
5614 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5616         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5617         recommendation from AMD re avoidance of lock prefix.
5619 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5621         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5622         lll_futex_timed_wait instead of lll_futex_wait.
5623         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5624         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5625         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5626         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5627         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5628         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5629         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5630         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5631         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5632         Completely revamp the locking macros.  No distinction between
5633         normal and mutex locking anymore.
5634         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5635         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5636         __lll_lock_timedwait): Fix prototypes.
5637         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5638         __lll_lock_timedwait): Likewise.
5639         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5640         macros, add __builtin_expect.
5641         (lll_mutex_timedlock): Likewise.  Fix return value.
5642         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5643         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5644         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5645         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5646         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5647         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5648         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5649         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5651 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5653         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5654         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5655         operation if possible.
5657         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5658         like jumping over the lock prefix.
5660 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5662         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5663         locking macros.  No distinction between normal and mutex locking
5664         anymore.
5665         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5666         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5667         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5668         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5669         locking.  Merge bits from lowlevelmutex.S we still need.
5670         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5671         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5672         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5673         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5674         * Makefile (routines): Remove libc-lowlevelmutex.
5675         (libpthread-rountines): Remove lowlevelmutex.
5676         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5677         for new mutex implementation.
5678         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5680         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5681         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5682         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5683         Likewise.
5684         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5685         Likewise.
5686         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5687         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5688         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5689         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5691         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5692         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5693         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5694         Likewise.
5695         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5696         Likewise.
5697         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5698         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5699         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5700         Don't use requeue.
5701         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5702         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5704 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5706         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5707         in parameters of asm with output parameters.
5709         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5710         type of DECR parameter to int.
5711         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5713 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5715         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5716         guardsize for each thread.
5718 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5720         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5721         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5722         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5724         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5725         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5726         NULL.
5727         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5728         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5729         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5730         (pthread_getaffinity_np): Add hidden_def.
5732         * Makefile (tests): Add tst-attr3.
5733         * tst-attr3.c: New test.
5735         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5737 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5739         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5740         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5742 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5744         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5745         * tst-align.c: Include tst-stack-align.h.
5746         (tf, do_test): Use TEST_STACK_ALIGN macro.
5748 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5750         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5751         variable.
5753 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5755         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5756         stack-related values for the initial thread.
5758 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5760         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5762 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5764         * pthread_mutex_lock.c: Minor code rearrangements.
5766 2003-09-05  Roland McGrath  <roland@redhat.com>
5768         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5769         Instead, include ../nptl_db/db_info.c to do its magic.
5770         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5771         (__pthread_pthread_key_2ndlevel_size): Likewise.
5772         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5773         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5774         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5775         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5776         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5777         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5778         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5779         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5780         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5781         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5782         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5783         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5784         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5785         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5786         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5787         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5788         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5790 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5792         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5793         of pthread_t to be compatible with LT.
5794         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5795         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5796         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5797         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5798         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5799         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5800         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5802 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5804         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5806 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5808         * unwind-forcedunwind.c: Move to...
5809         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5810         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5811         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5812         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5813         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5814         * unwind.c: Include jmpbuf-unwind.h.
5815         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5817 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5819         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5820         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5821         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5822         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5823         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5824         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5825         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5826         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5827         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5828         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5829         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5830         function.
5831         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5832         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5833         * Makefile (tests): Add tst-stack2.
5834         * tst-stack2.c: New test.
5835         * tst-stack1.c: Include limits.h and sys/param.h.
5836         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5838         * pthread_condattr_setpshared.c: Include errno.h.
5839         (pthread_condattr_setpshared): Return EINVAL if pshared
5840         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5842         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5843         defined symbol for entry point to avoid cancellation.
5844         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5845         Likewise.
5846         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5847         Likewise.
5848         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5849         Likewise.
5850         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5851         Likewise.
5852         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5853         Likewise.
5854         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5855         __close_nocancel, __read_nocancel, __write_nocancel,
5856         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5857         libpthread.so or librt.so, define to corresponding function
5858         without _nocancel suffix.
5859         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5860         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5861         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5863         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5865 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5867         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5868         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5870         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5871         in subsections has a symbol associated with it.
5873         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5874         defined symbol for entry point to avoid cancellation.
5875         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5877 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5879         * Makefile (tests): Add tst-tls5.
5880         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5881         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5882         ($(objpfx)tst-tls5): New.
5883         ($(objpfx)tst-tls6.out): Likewise.
5884         (tests): Depend on $(objpfx)tst-tls6.out.
5885         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5886         (do_test): Check pthread_self () return value alignment.
5887         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5888         (tf): Check pthread_self () return value alignment.
5889         * tst-tls5.c: New test.
5890         * tst-tls5.h: New.
5891         * tst-tls5mod.c: New.
5892         * tst-tls5moda.c: New.
5893         * tst-tls5modb.c: New.
5894         * tst-tls5modc.c: New.
5895         * tst-tls5modd.c: New.
5896         * tst-tls5mode.c: New.
5897         * tst-tls5modf.c: New.
5898         * tst-tls6.sh: New test.
5900         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5901         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5902         * init.c (pthread_functions): Initialize them.
5903         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5904         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5905         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5906         pthread_cond_timedwait@@GLIBC_2.3.2.
5908 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5910         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5911         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5912         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5913         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5914         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5915         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5917         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5919         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5920         _POSIX_THREAD_PRIORITY_SCHEDULING.
5921         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5923 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5925         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5926         nested function, use static inline function from libio.h.
5927         Code by Richard Henderson.
5929         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5930         weak.
5932 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5934         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5935         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5936         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5937         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5938         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5939         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5940         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5941         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5942         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5943         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5945         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5946         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5947         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5948         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5949         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5950         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5951         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5952         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5953         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5954         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5955         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5956         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5957         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5958         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5959         * sysdeps/sparc/tls.h: New file.
5960         * sysdeps/sparc/tcb-offsets.sym: New file.
5961         * sysdeps/sparc/Makefile: New file.
5962         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5963         * init.c [__sparc__] (__NR_set_tid_address): Define.
5965 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5967         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5968         _IO_release_lock): Define.
5970 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5972         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5973         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5975 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5977         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5978         (__pthread_cleanup_class): Add missing return types of member
5979         functions.
5981 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5983         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5984         (lll_mutex_unlock_force): Add memory barrier between store and futex
5985         syscall.
5987 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5989         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5990         tempmsg in first loop.
5992 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5994         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5995         _POSIX_THREAD_PRIORITY_SCHEDULING.
5996         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5998 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6000         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6001         (__rtld_lock_default_lock_recursive,
6002         __rtld_lock_default_unlock_recursive): Define.
6003         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6004         __rtld_lock_unlock_recursive): Define using
6005         GL(_dl_rtld_*lock_recursive).
6006         * init.c (__pthread_initialize_minimal_internal): Initialize
6007         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6008         Lock GL(_dl_load_lock) the same number of times as
6009         GL(_dl_load_lock) using non-mt implementation was nested.
6011         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6012         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6014 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6016         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6017         PIPE_BUF.
6019 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6021         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6023 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6025         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6026         to first syscall error check.  Move syscall error check for tkill
6027         into __ASSUME_CLONE_STOPPED #ifdef.
6029 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6031         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6032         is not defined, do explicit synchronization.
6033         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6034         is not defined also unlock pd->lock for non-debugging case in case
6035         it is necessary.
6036         * pthread_create.c (start_thread): Always get and release pd->lock
6037         if __ASSUME_CLONE_STOPPED is not defined.
6038         (start_thread_debug): Removed.  Adjust users.
6039         * allocatestack.c (allocate_stack): Always initialize lock if
6040         __ASSUME_CLONE_STOPPED is not defined.
6041         * Makefile (tests): Add tst-sched1.
6042         * tst-sched1.c: New file.
6044         * sysdeps/pthread/createthread.c (do_clone): Only use
6045         sched_setschduler and pass correct parameters.
6047 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6049         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6050         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6051         PTHREAD_STACK_MIN in comments.
6053 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6055         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6056         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6057         argument.
6058         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6059         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6060         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6061         (__pthread_cleanup_upto): Fix prototype.
6062         (_longjmp_unwind): Adjust caller.
6063         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6064         Change second argument to const struct pointer.
6065         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6066         * tst-sem9.c (main): Likewise.
6067         * unwind.c: Include string.h for strlen prototype.
6069 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6072         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6073         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6074         Define HAVE_CMOV.
6075         Patch by Nicholas Miell <nmiell@attbi.com>.
6077 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6079         * init.c (__pthread_initialize_minimal_internal): Initialize
6080         GL(dl_init_static_tls).
6081         * pthreadP.h (__pthread_init_static_tls): New prototype.
6082         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6083         New functions.
6084         * Makefile (tests): Add tst-tls4.
6085         (modules-names): Add tst-tls4moda and tst-tls4modb.
6086         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6087         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6088         tst-tls4modb.so.
6089         * tst-tls4.c: New file.
6090         * tst-tls4moda.c: New file.
6091         * tst-tls4modb.c: New file.
6093 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6095         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6096         before __timer_dealloc.
6097         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6098         Don't call list_unlink.
6100 2003-07-29  Roland McGrath  <roland@redhat.com>
6102         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6104 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6106         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6107         Don't reuse struct aiocb A if it failed.
6108         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6109         not just one byte, as that does not block.
6111 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6113         * sysdeps/pthread/unwind-resume.c: New file.
6114         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6115         unwind-resume in csu subdir.
6116         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6117         exceptions.
6118         (librt-sysdep_routines, librt-shared-only-routines): Add
6119         rt-unwind-resume.
6120         * sysdeps/pthread/rt-unwind-resume.c: New file.
6121         * unwind-forcedunwind.c: New file.
6122         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6123         (libpthread-shared-only-routines): Likewise.
6124         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6125         * pthreadP.h (pthread_cancel_init): New prototype.
6126         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6128         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6129         attr argument const struct pthread_attr *.
6131         * res.c (__res_state): Return __resp.
6132         * descr.h: Include resolv.h.
6133         (struct pthread): Add res field.
6134         * pthread_create.c: Include resolv.h.
6135         (start_thread): Initialize __resp.
6136         * Makefile (tests): Add tst-_res1.
6137         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6138         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6139         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6140         libpthread.
6141         * tst-_res1.c: New file.
6142         * tst-_res1mod1.c: New file.
6143         * tst-_res1mod2.c: New file.
6145 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6147         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6149         * Makefile: Define various *-no-z-defs variables for test DSOs
6150         which has undefined symbols.
6152 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6154         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6155         Retry if the stwcx fails to store once_control.
6157 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6159         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6160         pthread_attr_setaffinity.
6161         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6162         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6163         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6164         * pthread_attr_destroy.c: Free cpuset element if allocated.
6165         * pthread_create.c: Pass iattr as additional parameter to
6166         create_thread.
6167         * sysdeps/pthread/createthread.c: If attribute is provided and
6168         a new thread is created with affinity set or scheduling parameters,
6169         start thread with CLONE_STOPPED.
6170         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6171         pthread_attr_setaffinity.
6172         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6173         cpuset element.
6175 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6177         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6179 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6181         * sysdeps/pthread/configure.in: Require CFI directives also for
6182         ppc and s390.
6184 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6186         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6187         Add cfi directives.
6189 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6191         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6192         CLEANUP_JMP_BUF.
6193         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6194         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6195         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6196         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6197         not self pointer in __writer.  Compare with TID to determine
6198         deadlocks.
6199         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6200         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6201         Likewise.
6202         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6203         Likewise.
6204         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6205         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6206         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6207         macros also when compiling librt.
6209 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6211         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6212         -fasynchronous-unwind-tables.
6213         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6214         (PSEUDO): Add cfi directives.
6215         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6216         Likewise.
6217         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6218         Likewise.
6220 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6222         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6223         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6224         * unwind.c (__pthread_unwind_next): Add hidden_def.
6225         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6226         Likewise.
6227         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6228         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6229         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6230         Likewise.
6231         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6232         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6233         Likewise.
6234         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6235         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6236         __pthread_unregister_cancel and __pthread_unwind_next.
6238 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6240         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6241         different symbol for the cancellation syscall wrapper and
6242         non-cancellation syscall wrapper.
6243         (PSEUDO_END): Define.
6245 2003-07-05  Richard Henderson  <rth@redhat.com>
6247         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6248         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6249         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6250         return actual return value from the syscall, not 0.
6252 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6254         * descr.h (struct pthread): Add pid field.
6255         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6256         (__reclaim_stacks): Likewise.
6257         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6258         also check for PID of the signal source.
6259         (__pthread_initialize_minimal_internal): Also initialize pid field
6260         of initial thread's descriptor.
6261         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6262         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6263         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6264         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6265         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6267 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6269         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6270         Fix use of parameter.
6271         (__libc_cleanup_pop): Likewise.
6273 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6275         * init.c (sigcancel_handler): Change parameters to match handler
6276         for SA_SIGACTION.  Check signal number and code to recognize
6277         invalid invocations.
6279 2003-07-03  Roland McGrath  <roland@redhat.com>
6281         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6282         Apply sizeof (struct pthread) bias to r13 value.
6284 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6286         * sysdeps/pthread/configure.in: Require CFI directives.
6288         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6289         definition.
6290         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6291         libpthread compilation.
6292         * unwind.c (__pthread_unwind): Add hidden_def.
6293         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6295 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6297         * libc-cancellation.c (__libc_cleanup_routine): Define.
6298         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6299         (__pthread_cleanup_pop): Define.
6301 2003-07-01  Richard Henderson  <rth@redhat.com>
6303         * sysdeps/alpha/elf/pt-initfini.c: New file.
6304         * sysdeps/alpha/pthread_spin_lock.S: New file.
6305         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6306         * sysdeps/alpha/pthreaddef.h: New file.
6307         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6308         * sysdeps/alpha/tls.h: New file.
6309         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6310         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6311         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6312         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6313         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6314         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6315         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6316         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6317         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6318         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6320 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6322         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6323         cleanup support and unwind info.
6325 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6327         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6328         Use correct cleanup handler registration.  Add unwind info.
6329         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6330         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6331         * tst-once3.c: Add cleanup handler and check it is called.
6332         * tst-once4.c: Likewise.
6333         * tst-oncex3.c: New file.
6334         * tst-oncex4.c: New file.
6335         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6337 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6339         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6341 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6343         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6344         (tf_msgsnd): Likewise.
6346         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6347         premature returns a bit more.
6349 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6351         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6352         definition to the front.
6354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6355         the cleanup functions to make the names unique.  Fix dwarf opcode
6356         un unwind table.
6357         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6358         functions to make the names unique.  Fix CFA offset for two blocks.
6360 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6362         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6363         missing closing braces.
6364         Patch by Christophe Saout <christophe@saout.de>.
6366 2003-06-24  Roland McGrath  <roland@redhat.com>
6368         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6370 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6372         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6373         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6375         * pthreadP.h: Declare __find_thread_by_id.
6376         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6377         * pthread_clock_gettime.c: Allow using other thread's clock.
6378         * pthread_clock_settime.c: Likewise.
6379         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6380         * Makefile: Add rules to build and run tst-clock2.
6381         * tst-clock2.c: New file.
6383 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6386         to use exception-based cleanup handler.
6387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6389         * tst-cond8.c (ch): Announce that we are done.
6391         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6393         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6394         Also test aio_suspend with timeout value.
6396 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6398         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6399         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6400         attribute_hidden.
6402         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6403         (__pthread_mutex_lock_internal): Likewise.
6404         (__pthread_mutex_unlock_internal): Likewise.
6405         (__pthread_mutex_unlock_usercnt): Declare.
6406         * pthread_mutex_destroy.c: Always fail if used in any way.
6407         * pthread_mutex_init.c: Update comment.
6408         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6409         * pthread_mutex_timedlock.c: Adjust __nusers.
6410         * pthread_mutex_trylock.c: Adjust __nusers.
6411         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6412         and public interfaces are wrapper with pass additional parameter.
6413         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6414         parameter zero.
6415         * tst-mutex8.c: New file.
6416         * Makefile (tests): Add tst-mutex8.
6417         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6418         __pthread_mutex_unlock_usercnt.
6419         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6421         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6422         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6423         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6424         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6425         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6426         Add __nusers.
6427         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6428         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6429         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6431         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6433         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6434         * pthread_mutex_timedlock.c: Likewise.
6435         * pthread_mutex_trylock.c: Adjust __nusers.
6436         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6437         * tst-mutex9.c: New file.
6438         * Makefile (tests): Add tst-mutex9.
6439         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6440         * sysdeps/ia64/tls.h: Likewise.
6441         * sysdeps/powerpc/tls.h: Likewise.
6442         * sysdeps/s390/tls.h: Likewise.
6443         * sysdeps/sh/tls.h: Likewise.
6444         * sysdeps/x86_64/tls.h: Likewise.
6445         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6446         Change type of __owner.
6447         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6448         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6449         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6450         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6451         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6453 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6455         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6456         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6458         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6459         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6460         instead of nr to lll_futex_wake.  Only set errno and return -1
6461         if err < 0.
6463         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6464         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6465         return actual return value from the syscall, not 0.
6467 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6469         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6470         find a random value.
6471         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6472         errno==EIDRM.
6474         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6475         compat_timer_settime.
6476         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6477         compat_timer_gettime.
6478         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6479         compat_timer_getoverrun.
6480         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6481         compat_timer_delete.
6483         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6484         error-checking mutex detect busy mutexes.
6486 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6488         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6489         Add ax to clobber list.
6490         (lll_mutex_cond_lock): Likewise.
6491         (lll_mutex_unlock): Likewise.
6492         (lll_lock): Likewise.
6493         (lll_unlock): Likewise.
6495         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6496         * tst-cancel18.c: New file.
6497         * tst-cancelx18.c: New file.
6499         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6500         and tcdrain.
6502         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6503         * tst-cancel17.c: New file.
6504         * tst-cancelx17.c: New file.
6506         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6507         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6508         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6510         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6512 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6514         * sysdeps/pthread/createthread.c (create_thread): Set
6515         header.multiple_threads unconditionally.
6516         * allocatestack.c (allocate_stack): Likewise.
6517         * descr.h (struct pthread): Add header.multiple_threads
6518         unconditionally.
6519         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6520         Define for librt.  #error if neither libpthread, libc nor librt.
6521         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6522         Likewise.
6523         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6524         CDISABLE): Likewise.
6525         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6526         CDISABLE): Likewise.
6527         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6528         CDISABLE): Likewise.
6529         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6530         CDISABLE): Likewise.  Access header.multiple_threads outside of
6531         libc and libpthread.
6532         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6533         Likewise.
6534         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6535         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6537 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6539         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6540         Also test early cancellation before the thread reaches the cancellation
6541         point.
6543         * Makefile: Compile forward.c with exceptions.
6545         * sysdeps/unix/sysv/linux/sleep.c: New file.
6547 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6549         * Makefile: Add CFLAGS definition to compile function wrappers
6550         duplicated from libc with exceptions.
6551         * tst-cancel4.c: Also check cancellation handlers.
6553         * Makefile: Add rules to build and run tst-cancel16 and
6554         tst-cancelx16.  Add missing CFLAGS definitions.
6555         * tst-cancel16.c: New file.
6556         * tst-cancelx16.c: New file.
6558 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6560         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6561         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6562         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6563         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6565         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6566         (LIBC_CANCEL_RESET): Likewise.
6567         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6568         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6569         librt-cancellation.
6570         (CFLAGS-libcrt-cancellation.c): Define.
6571         * sysdeps/pthread/librt-cancellation.c: New file.
6572         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6573         macros also when compiling librt.
6574         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6575         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6576         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6577         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6578         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6579         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6580         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6582         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6583         compat_timer_create.
6585 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6587         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6589         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6590         __register_atfork.
6591         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6592         Add libc_hidden_def.
6594 2003-06-13  Roland McGrath  <roland@redhat.com>
6596         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6597         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6599 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6601         * allocatestack.c (queue_stack): Always inline.
6602         * ptreadhP.h (__do_cancel): Likewise.
6604 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6606         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6607         a typo.
6609 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6611         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6612         (__pthread_cond_signal): Remove incorrect second addition for
6613         cond_lock!=0.
6615 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6618         (__pthread_cond_signal): Use correct futex pointer in
6619         __lll_mutex_lock_wait call.
6621         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6622         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6624 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6626         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6627         cancelable.
6628         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6629         Likewise.
6631         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6632         hand-written CFI generation code.  Since ENTRY/END also initiated
6633         CFI frames this caused two CFI sets to be generated.
6635 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6637         * cleanup_routine.c: New file.
6638         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6639         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6640         cleanup handling.
6641         * Makefile (libpthread-routines): Add cleanup_routine.
6642         Add more CFLAGS variables to compile with exceptions.  Add comments
6643         why which file needs unwind tables.
6644         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6645         tests.
6646         * tst-cancelx1.c: New file.
6647         * tst-cancelx2.c: New file.
6648         * tst-cancelx3.c: New file.
6649         * tst-cancelx4.c: New file.
6650         * tst-cancelx5.c: New file.
6651         * tst-cancelx6.c: New file.
6652         * tst-cancelx7.c: New file.
6653         * tst-cancelx8.c: New file.
6654         * tst-cancelx9.c: New file.
6655         * tst-cancelx10.c: New file.
6656         * tst-cancelx11.c: New file.
6657         * tst-cancelx12.c: New file.
6658         * tst-cancelx13.c: New file.
6659         * tst-cancelx14.c: New file.
6660         * tst-cancelx15.c: New file.
6661         * tst-cleanupx0.c: New file.
6662         * tst-cleanupx0.expect: New file.
6663         * tst-cleanupx1.c: New file.
6664         * tst-cleanupx2.c: New file.
6665         * tst-cleanupx3.c: New file.
6667         * tst-cleanup0.c: Make standard compliant.
6668         * tst-cleanup1.c: Likewise.
6670         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6671         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6672         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6673         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6674         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6675         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6676         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6677         CLEANUP_JMP_BUF.
6678         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6679         * tst-cancel12.c: New file.
6680         * tst-cancel13.c: New file.
6681         * tst-cancel14.c: New file.
6682         * tst-cancel15.c: New file.
6683         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6684         and tst-cancel15.
6686         * tst-cancel1.c: Add some comments.
6688         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6689         timeout correctly.
6691 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6693         * Makefile (CFLAGS-pthread_cancel.c): Define.
6695 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6697         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6698         Change type of __writer element to int.
6699         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6700         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6701         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6702         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6703         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6704         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6705         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6706         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6707         Compare with TID to determine deadlocks.
6708         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6709         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6710         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6711         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6712         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6713         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6714         Likewise.
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6716         Likewise.
6717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6718         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6719         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6720         Likewise.
6721         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6722         Likewise.
6723         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6724         * Makefile (tests): Add tst-rwlock12.
6725         * tst-rwlock12.c: New file.
6727 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6729         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6730         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6731         Remove bogus hidden_proto.
6732         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6733         Likewise.
6734         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6735         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6736         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6737         ___lll_mutex_timedlock): Likewise.
6739 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6742         (__pthread_cond_signal): Add some code to eventually handle
6743         cond_lock!=0.
6745 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6747         * Makefile (tests): Add tst-exec4.
6748         (tst-exec4-ARGS): Define.
6749         * tst-exec4.c: New file.
6751 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6753         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6754         Also fail if tv_nsec < 0.
6755         (__lll_timedwait_tid): Likewise.
6756         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6757         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6758         Likewise.
6759         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6760         Likewise.
6761         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6762         Likewise.
6763         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6764         Likewise.
6765         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6766         Likewise.
6767         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6768         Likewise.
6770         * Makefile (tests): Add tst-sem8 and tst-sem9.
6771         * tst-sem8.c: New file.
6772         * tst-sem9.c: New file.
6773         * sem_open.c: Fix creation of in_use record if the file exists but
6774         no internal record.
6776         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6777         definitions.
6779         * sysdeps/pthread/timer_create.c (timer_create): In case
6780         evp==NULL, assign timer ID to sival_ptr.
6782         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6783         struct pthread_unwind_buf *.
6784         (struct pthread): Likewise for cleanup_jmp_buf element.
6786         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6787         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6788         * unwind.c (__pthread_unwind_next): Likewise.
6790 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6792         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6793         (lll_futex_timed_wait): Use int for futex value parameter.
6794         (lll_futex_wake): Likewise.
6795         (lll_futex_requeue): Likewise.
6797         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6798         Replace one memory operation with one register operation.
6800         * tst-join4.c (do_test): Fix error message.
6802         * tst-rwlock6.c (do_test): Use correct format specifier.
6804         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6805         (__lll_mutex_lock_wait): Replace one memory operation with one
6806         register operation.
6807         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6808         (__lll_mutex_lock_wait): Likewise.
6810         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6811         (__lll_mutex_cond_lock): Add one to value parameter of
6812         __lll_lock_wait to reflect reality in the futex syscall.
6813         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6814         (lll_mutex_cond_lock): Likewise.
6816 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6818         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6819         New function.
6820         (lll_mutex_cond_lock): Define.
6822 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6824         * Makefile (tests): Add tst-signal6.
6825         * tst-signal6.c: New file.
6827         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6828         (__lll_mutex_unlock_force): New function
6829         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6831         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6832         (__lll_mutex_unlock_force): New function.
6833         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6835         * tst-rwlock7.c (do_test): Use correct format specifier.
6837         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6838         Find break parameter in correct asm argument.
6840 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6842         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6843         Remove out4.
6844         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6845         error occured.
6846         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6847         Add __mutex.
6848         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6849         lll_futex_requeue, lll_mutex_unlock_force): Define.
6851 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6853         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6854         (pthread_cond_t): Add __mutex.
6855         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6856         lll_futex_requeue, lll_mutex_unlock_force): Define.
6858 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6860         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6861         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6862         Add __mutex field.
6863         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6864         Define.
6865         (lll_futex_wait, lll_futex_wake): Define.
6866         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6867         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6868         FUTEX_REQUEUE instead of FUTEX_WAIT.
6869         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6870         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6871         mutex which was used in condvar structure.  Call
6872         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6873         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6875         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6876         include tcb-offsets.h.  Read wakeup value in locked region.
6877         Use the value of gbr register as THREAD_ID.
6878         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6879         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6880         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6882         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6883         macros.
6885 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6887         * sysdeps/pthread/pthread_cond_broadcast.c
6888         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6890 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6892         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6893         typo in register name.
6894         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6895         correctly.  Actually use requeue.  Little optimization.
6896         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6897         mutex address early.  Handle cancellation state as 32-bit value.
6898         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6899         Remove unnecessary label.
6901 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6903         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6904         instead of FUTEX_WAIT.
6905         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6906         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6907         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6909         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6910         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6911         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6912         of __pthread_mutex_lock_internal.
6913         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6914         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6915         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6916         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6918         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6919         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6920         Add pthread_mutex_cond_lock.
6921         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6922         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6923         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6924         lll_mutex_cond_lock.
6925         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6926         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6927         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6928         Add __mutex field.
6929         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6930         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6932         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6933         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6935         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6936         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6937         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6938         macro don't define aliases.
6940         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6941         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6942         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6943         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6945         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6946         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6947         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6950 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6952         * sem_open.c: Fix one endless loop.  Implement correct semantics
6953         wrt opening the same semaphore more then once.
6954         * sem_close.c: Adjust for sem_open change.
6955         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6956         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6957         * Makefile (tests): Add tst-sem7.
6958         * tst-sem7.c: New file.
6960 2003-05-16  Roland McGrath  <roland@redhat.com>
6962         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6963         uninitialized variable braino.
6965 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6967         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6968         test for syscall availability.
6970         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6971         __no_posix_timers to -1 if the syscalls don't exist.
6973         * pthread_join.c (pthread_join): Set tid field of the joined
6974         thread to -1.  This isn't necessary but helps to recognize some
6975         error conditions with almost no cost.
6977         * allocatestack.c (FREE_P): Also negative values indicate an
6978         unused stack.
6980         * unwind.c: Include <unistd.h>.
6982 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6984         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6986 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6988         * Makefile (crti-objs, crtn-objs): New variables.
6989         (omit-deps, extra-objs): Add crtn.
6990         ($(objpfx)libpthread.so): Depend on both crti and crtn
6991         and links to them in multidir.
6992         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6994 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6996         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6997         (lll_mutex_unlock): Use atomic_exchange_rel.
6999 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7001         * cond-perf.c (cons): Add missing locking around setting of alldone.
7003 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7005         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7006         related macros.
7007         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7009 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7011         * tst-sem6.c: New file.
7012         * Makefile (tests): Add tst-sem6.
7014         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7015         Use atomic_exchange_rel instead of atomic_exchange.
7016         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7017         Likewise.
7019         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7020         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7021         vsyscall is possible.
7023         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7024         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7025         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7026         pthread_setaffinity_np.
7027         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7028         and pthread_setaffinity_np.
7029         * Makefile (libpthread-routines): Add pthread_getaffinity and
7030         pthread_setaffinity.
7032         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7033         use it in case mmap to allocate the stack fails.
7034         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7035         ARCH_MAP_FLAGS here.
7036         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7037         ARCH_RETRY_MMAP.
7039 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7042         handler implementation.  It is now lockless in fork().
7043         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7044         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7045         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7046         declare the __fork_*_lists.
7047         (struct fork_handler): Include pointers to all three functions.
7048         Add next, refcntr and need_signal elements.
7049         (__fork_handlers): New declaration.
7050         (__register_atfork_malloc): Remove declaration.
7051         (HAVE_register_atfork_malloc): Remove definition.
7052         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7053         __pthread_child_handler variable.
7054         (__libc_pthread_init): Use __register_atfork instead of explicitly
7055         adding to the list.
7056         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7057         and lll_futex_wake.
7058         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7060         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7061         function must never be reached.
7063         * cond-perf.c: New file.
7065 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7067         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7069 2003-05-04  Roland McGrath  <roland@redhat.com>
7071         * Makefile ($(objpfx)../libc.so): New target.
7073 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7075         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7076         (pthread_condattr_t): Size is only an int, don't use long for
7077         alignment.
7078         (pthread_mutexattr_t): Likewise.
7079         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7080         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7081         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7083 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7085         * sysdeps/i386/tls.h: Define THREAD_ID.
7086         * sysdeps/ia64/tls.h: Likewise.
7087         * sysdeps/powerpc/tls.h: Likewise.
7088         * sysdeps/s390/tls.h: Likewise.
7089         * sysdeps/sh/tls.h: Likewise.
7090         * sysdeps/x86_64/tls.h: Likewise.
7091         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7092         record ownership.
7093         * pthread_mutex_timedlock.c: Likewise.
7094         * pthread_mutex_trylock.c: Likewise.
7095         * pthread_mutex_unlock.c: Likewise.
7096         * pthread_rwlock_trywrlock.c: Likewise.
7097         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7098         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7099         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7100         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7102         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7103         flag.
7105 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7108         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7109         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7110         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7111         Make __align long long instead of long.
7112         (pthread_rwlock_t): Formatting.
7113         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7114         (pthread_rwlock_t): Formatting.
7115         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7116         (pthread_cond_t): Make __align long long instead of long.
7117         (pthread_rwlock_t): Move __flags field to the same position as in
7118         linuxthreads.
7120 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7122         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7123         * tst-rwlock7.c (do_test): Likewise.
7125 2003-04-26  Roland McGrath  <roland@redhat.com>
7127         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7129 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7131         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7132         sizeof (struct pthread).
7133         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7134         1 struct pthread.
7135         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7136         to 0.
7137         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7138         struct pthread.
7139         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7140         to 32-bit bytes.
7141         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7142         tcbp.
7143         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7144         unneccessarily.
7145         (NO_TLS_OFFSET): Define.
7146         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7147         add TLS_TCB_SIZE unnecessarily.
7149 2003-04-22  Roland McGrath  <roland@redhat.com>
7151         * Makeconfig (shared-thread-library): Reverse link order to work
7152         around linker bug.
7154 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7156         * semaphore.h: Fix typo in comment.
7158 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7160         * sysdeps/pthread/sigfillset.c: New file.
7162         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7163         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7164         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7165         * sysdeps/pthread/sigaction.c: Likewise.
7166         * sysdeps/pthread/sigprocmask.c: New file.
7167         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7168         __SIGRTMIN+1.
7169         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7170         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7171         in this case.
7173 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7175         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7176         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7178         * sysdeps/unix/sysv/linux/unregister-atfork.c
7179         (__unregister_atfork): Don't free memory not allocated dynamically.
7181         * semaphore.h: Remove __THROW marker from cancellation points.
7182         * nptl/sysdeps/pthread/pthread.h: Likewise.
7184 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7186         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7187         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7188         __THROW.
7190 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7192         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7194 2003-04-15  Roland McGrath  <roland@redhat.com>
7196         * forward.c (__pthread_unwind): Tweak to avoid warning.
7198 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7200         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7202 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7204         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7205         overflow CFA advance instructions.
7206         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7208 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7210         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7211         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7212         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7213         defined.
7215         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7216         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7217         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7218         DW_CFA_advance_loc for .Laddl-.Lsubl.
7220 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7222         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7223         position-independent unwind data for static libraries.
7224         Add missing unwind info.  Add comments.
7226         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7227         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7228         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7229         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7231 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7233         * Makefile: Make sure all cancellation points are compiled with
7234         exception and asynchronous unwind tables.
7236         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7237         which mishandles loading of global object addresses in PIC.
7238         (THREAD_SETMEM_NC): Likewise.
7240 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7242         * pthread.h: Define new data structure for cleanup buffer.  Declare
7243         new cleanup handler interfaces.
7244         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7245         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7246         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7247         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7248         it.  Declare old cleanup handler installation functions.
7249         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7250         handling.
7251         * cleanup_defer.c: Likewise.
7252         * cleanup_compat.c: New file.  Old cleanup code.
7253         * cleanup_def_compat.c: New file.  Old cleanup code.
7254         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7255         if own thread descriptor.
7256         * unwind.c: New file.
7257         * forward.c: Add __pthread_unwind.
7258         * init.c (pthread_functions): Add __pthread_unwind.
7259         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7260         Add ptr___pthread_unwind.
7261         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7262         and unwind function.
7263         * Makefile (libpthread-routines): Add cleanup_compat,
7264         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7265         table generation if necessary.
7266         * version.c: Record whether unwind support is compiled in.
7267         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7268         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7269         handler interfaces.
7270         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7271         complication to generate unwind information for syscall wrappers.
7272         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7273         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7274         __cleanup_fct_attribute.
7276         * Makefile: Add rules to build and run tst-cleanup0.
7277         * tst-cleanup0.c: New file.
7278         * tst-cleanup0.expect: New file.
7280         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7281         caller.  Optimize to avoid often unecessary local variable.
7283 2003-04-11  Roland McGrath  <roland@redhat.com>
7285         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7286         sets variable `multidir'; include that.
7287         (generated): Add it.
7288         ($(objpfx)$(multidir)/crti.o): New target.
7289         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7291 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7293         * tst-attr2.c (do_test): Add cast to avoid warning.
7294         * tst-mutex4.c (do_test): Likewise.
7296 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7298         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7299         in child.
7301 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7303         * Makefile (tests): Add tst-detach1.
7304         * tst-detach1.c: New file.
7306 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7308         * sysdeps/pthread/pthread.h: Remove duplicate
7309         pthread_cleanup_{push,pop} definitions.
7311         * tst-barrier2.c: Eliminate warnings.
7312         * tst-cancel4.c: Likewise.
7313         * tst-cond4.c: Likewise.
7314         * tst-cond6.c: Likewise.
7315         * tst-detach1.c: Likewise.
7316         * tst-rwlock4.c: Likewise.
7317         * tst-rwlock6.c: Likewise.
7318         * tst-rwlock7.c: Likewise.
7319         * tst-sem3.c: Likewise.
7320         * tst-spin2.c: Likewise.
7321         * tst-umask1.c: Likewise.
7323 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7325         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7327 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7329         * descr.h (struct pthread): Move cancelhandling member to the front.
7331 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7333         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7334         malloc_parent, and malloc_child statically.
7335         (__register_atfork_malloc): New function.
7336         (free_mem): Don't free any of the malloc_* variables on the list.
7337         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7338         Define HAVE_register_atfork_malloc.
7340 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7342         * sysdeps/pthread/createthread.c (create_thread): Add some more
7343         comments explaining when to set multiple_threads and when not.
7345         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7346         THREAD_ATOMIC_BIT_SET if not already defined.
7347         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7348         THREAD_ATOMIC_BIT_SET:
7349         * sysdeps/x86_64/tls.h: Likewise.
7350         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7351         THREAD_ATOMIC_CMPXCHG_VAL.
7352         (_pthread_cleanup_pop_restore): Likewise.
7353         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7354         (__pthread_enable_asynccancel_2): Likewise.
7355         (__pthread_disable_asynccancel): Likewise.
7356         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7357         (__libc_disable_asynccancel): Likewise.
7358         * init.c (sigcancel_handler): Likewise.
7359         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7360         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7362 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7364         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7365         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7366         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7367         * Makefile (tests): Add tst-cancel11.
7368         * tst-cancel11.c: New file.
7370 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7372         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7373         round, not the first.  Use specific_used flag instead of local
7374         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7375         (__free_tcb): Don't call deallocate_tsd here.
7376         (start_thread): Call deallocate_tsd here.
7377         * pthread_setspecific.c: Set specific_used flag really only when
7378         needed.
7379         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7380         * tst-tsd3.c: New file.
7381         * tst-tsd4.c: New file.
7383 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7385         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7386         Use atomic_exchange_and_add instead of __lll_add.
7387         (__lll_mutex_timedlock): Likewise.
7388         Patch by Ian Wienand.
7390 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7392         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7393         (SINGLE_THREAD_P): Fix typo.
7394         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7396 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7398         * Makefile (tests): Add tst-align.
7399         * tst-align.c: New file.
7400         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7402         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7403         function correctly.
7405         * tst-tsd2.c: Add casts to avoid warnings.
7407 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7409         * descr.h (struct pthread): Move most often used elements to the front.
7411 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7413         * Makefile (libpthread-routines): Add pthread_atfork.
7414         (libpthread-static-only-routines): Add pthread_atfork.
7416 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7418         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7419         of TLS_DTV_AT_TP.
7420         (INSTALL_DTV): Add parens.
7421         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7422         Use passed descr instead of THREAD_SELF.
7423         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7424         (__lll_mutex_timedlock_wait): Correct expected value after
7425         spurious wakeup.
7426         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7427         Release lock before waking up the waiters.
7428         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7429         criteria.  Reorderstruct passed to cleanup handler.  Fix
7430         handling of cancellation and failung pthread_mutex_unlock call.
7431         Use __pthread_enable_asynccancel_2 instead of
7432         __pthread_enable_asynccancel.
7433         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7434         Return result of lock re-get if it fails.
7435         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7436         for __pthread_cleanup_push.
7437         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7438         completely broken rwlock implementation.
7439         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7440         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7441         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7442         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7443         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7444         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7445         versioned_symbol macro.
7446         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7447         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7449 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7451         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7452         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7453         and __helper_tid.
7454         (struct timer): Remove th and bar field.
7455         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7456         debugging code.  Create only one helper thread.
7457         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7458         helper thread.
7459         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7460         Renamed.  Define statically.  Use thread info from siginfo.
7461         (__helper_once): New variable.
7462         (__helper_tid): New variable.
7463         (__reset_helper_control): New function.
7464         (__start_helper_thread): New function.
7466         * pthread_create.c (start_thread): Don't use setjmp inside
7467         __builtin_expect to work around gcc bug.
7469         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7470         timer_delete syscall fails, but not with ENOSYS, set
7471         __no_posix_timers.
7473         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7474         (timer_settime): Fix typo.
7475         * sysdeps/unix/sysv/linux/timer_getoverr.c
7476         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7478 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7480         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7481         offset of cleanupbuf.__prev.
7483 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7485         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7486         of included file.
7488 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7490         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7491         NULL provide default definition to syscall.
7493 2003-03-25  Roland McGrath  <roland@redhat.com>
7495         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7496         (timer_id2ptr): Fix typo.
7498 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7500         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7501         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7502         * sysdeps/ia64/pthreaddef.h: Likewise.
7503         * sysdeps/powerpc/pthreaddef.h: Likewise.
7504         * sysdeps/s390/pthreaddef.h: Likewise.
7505         * sysdeps/sh/pthreaddef.h: Likewise.
7506         * sysdeps/x86_64/pthreaddef.h: Likewise.
7507         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7508         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7509         being changed.
7510         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7511         SIGTIMER is not unblocked.
7512         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7513         RT signal taken.
7514         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7515         be send.
7516         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7517         pass pointer through as ID.
7518         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7519         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7520         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7521         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7522         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7523         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7524         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7525         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7526         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7527         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7528         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7529         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7530         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7531         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7532         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7533         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7534         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7535         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7536         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7537         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7538         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7539         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7540         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7541         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7542         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7543         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7544         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7545         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7546         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7547         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7548         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7549         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7550         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7552         * pthreadP.h: Remove FRAME_LEFT definition.
7553         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7554         already left frame.  Programs which have this problem are not POSIX
7555         compliant.
7556         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7558 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7560         * sysdeps/pthread/tst-timer.c: Check return values of the
7561         functions we test.
7563 2003-03-23  Roland McGrath  <roland@redhat.com>
7565         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7566         * tst-tls3mod.c: Likewise.
7567         * tst-tls1.c: Likewise.
7568         * tst-tls2.c: Likewise.
7570         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7571         undefined behavior.
7573         * tst-join5.c (tf1, tf2): Add a cast.
7575         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7577         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7578         Don't test anything.
7579         * tst-cond4.c: Likewise.
7580         * tst-cond6.c: Likewise.
7581         * tst-flock2.c: Likewise.
7582         * tst-mutex4.c: Likewise.
7583         * tst-rwlock4.c: Likewise.
7584         * tst-signal1.c: Likewise.
7585         * tst-spin2.c: Likewise.
7586         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7588         * tst-mutex4.c: Use test-skeleton.c.
7589         * tst-spin2.c: Likewise.
7590         * tst-sysconf.c: Likewise.
7591         * tst-barrier2.c: Likewise.
7592         * tst-cond4.c: Likewise.
7593         * tst-cond6.c: Likewise.
7594         * tst-rwlock4.c: Likewise.
7595         * tst-unload.c: Likewise.
7596         * tst-flock2.c (do_test): Use return instead of exit.
7598 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7600         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7602 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7604         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7605         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7606         instead of __lll_compare_and_swap.
7607         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7608         Likewise.
7609         Removed definition if __lll_compare_and_swap.
7611         * cancellation.c: Adjust for new form of compare&exchange macros.
7612         * cleanup_defer.c: Likewise.
7613         * init.c: Likewise.
7614         * libc-cancellation.c: Likewise.
7615         * old_pthread_cond_broadcast.c: Likewise.
7616         * old_pthread_cond_signal.c: Likewise.
7617         * old_pthread_cond_timedwait.c: Likewise.
7618         * old_pthread_cond_wait.c: Likewise.
7619         * pthread_cancel.c: Likewise.
7620         * pthread_create.c: Likewise.
7621         * pthread_detach.c: Likewise.
7622         * pthread_join.c: Likewise.
7623         * pthread_key_delete.c: Likewise.
7624         * pthread_setcancelstate.c: Likewise.
7625         * pthread_setcanceltype.c: Likewise.
7626         * pthread_timedjoin.c: Likewise.
7627         * pthread_tryjoin.c: Likewise.
7628         * sysdeps/pthread/createthread.c: Likewise.
7630 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7632         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7633         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7634         definitions.  Replace uses with calls to atomic_* functions.
7635         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7636         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7637         __lll_test_and_set calls with atomic_exchange_and_add and
7638         atomic_exchange calls respectively.
7639         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7640         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7641         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7642         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7643         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7644         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7645         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7647         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7648         returns the old value.
7650 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7652         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7653         int for variable OLDVAL and correct inline assembler contraint.
7654         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7655         type int for variable OLD.
7657         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7658         only for s390-32.
7659         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7660         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7661         instead of multiple_threads field in the TCB.
7663 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7665         * sysdeps/i386/i686/bits/atomic.h: Removed.
7666         * sysdeps/i386/i586/bits/atomic.h: Removed.
7667         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7668         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7669         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7670         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7671         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7672         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7673         * atomic.h: Removed.  Moved to glibc.
7675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7676         support for clock selection.
7678         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7679         signalling waiters.
7681 2003-03-18  Roland McGrath  <roland@redhat.com>
7683         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7684         Add __lll_rel_instr first.  Add memory clobber.
7685         (lll_mutex_unlock): Use __lll_test_and_set.
7686         From Paul Mackerras <paulus@samba.org>.
7688         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7689         unconditionally.
7690         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7691         (SINGLE_THREAD_P):  Add `header.' prefix.
7692         From Paul Mackerras <paulus@samba.org>.
7694         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7695         pthread_timedjoin_np to ...
7696         (libpthread: GLIBC_2.3.3): ... here.
7697         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7699         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7700         Avoid shadowing VAL variable.
7702         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7703         New macro.
7705 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7707         * Makefile (tests): Add tst-cond11.
7708         * tst-cond11.c: New file.
7710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7711         struct passed to cleanup handler to eliminate one more
7712         instruction.
7713         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7715         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7716         (pthrad_cond_t): Replace __unused field with __clock.
7718         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7719         waken all waiters in cleanup handler.
7720         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7721         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7723         * pthread_condattr_getclock.c: New file.
7724         * pthread_condattr_setclock.c: New file.
7725         * sysdeps/pthread/pthread.h: Declare these new functions.
7726         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7727         * Makefile (libpthread-routines): Add the new functions.
7728         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7729         Renamed field to value.  Document use of the bits.
7730         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7731         change.
7732         * pthread_condattr_setpshared.c: Likewise.
7733         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7734         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7735         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7736         Add __clock field.
7737         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7738         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7739         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7740         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7741         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7742         Implement clock selection.
7743         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7744         * pthread-errnos.sym: Add ENOSYS.
7745         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7746         _POSIX_CLOCK_SELECTION.
7747         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7749         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7750         invalid .size directive.
7752 2003-03-17  Roland McGrath  <roland@redhat.com>
7754         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7755         Formatting tweaks.
7757 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7759         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7760         Use __lll_add instead of spelling it out.  Use protected symbol names.
7761         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7762         Use __lll_add.
7763         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7764         Renamed from lll_compare_and_swap.  Use new name where necessary.
7765         (__lll_add): Defined.
7766         (__lll_dec_if_positive): Defined.
7767         (__lll_test_and_set): Defined.
7768         * sysdeps/ia64/pthread_spin_init.c: Removed.
7769         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7770         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7771         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7772         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7773         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7774         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7775         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7776         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7777         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7778         __sync_lock_release_si.
7779         Patch by Jakub Jelinek.
7781         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7782         Fix timeout handling.
7783         (__lll_timedwait_tid): Likewise.
7784         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7785         Patch by Jakub Jelinek.
7787         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7789 2003-03-17  Roland McGrath  <roland@redhat.com>
7791         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7792         * sysdeps/pthread/pthread_spin_init.c: New file.
7793         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7794         * sysdeps/powerpc/Makefile: New file.
7795         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7796         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7797         * sysdeps/powerpc/pthreaddef.h: New file.
7798         * sysdeps/powerpc/tcb-offsets.sym: New file.
7799         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7800         * sysdeps/powerpc/tls.h: New file.
7801         * sysdeps/powerpc/bits/atomic.h: New file.
7802         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7803         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7804         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7806         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7807         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7808         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7809         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7810         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7811         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7812         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7813         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7814         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7815         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7816         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7817         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7818         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7819         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7820         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7822         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7823         not gettimeofday.
7824         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7825         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7826         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7827         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7828         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7830 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7832         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7833         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7834         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7835         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7836         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7838 2003-03-16  Roland McGrath  <roland@redhat.com>
7840         * tst-fork4.c: Include <string.h>.
7841         * tst-signal2.c: Likewise.
7842         * tst-mutex5.c (do_test): exit -> return.
7843         * tst-mutex2.c: Include <stdlib.h>.
7845 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7847         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7848         (__lll_mutex_timedlock_wait): Correct expected value after
7849         spurious wakeup.  Otherwise we would never wait again.
7851         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7852         zone versus inline asm stupidity.  Use correct instructions.
7854         * tst-rwlock6.c: Add some more status output.
7856 2003-03-15  Roland McGrath  <roland@redhat.com>
7858         * sysdeps/pthread/configure.in: New file.
7859         * sysdeps/pthread/configure: New file (generated).
7861 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7863         * allocatestack.c (allocate_stack): Store the exact stack size of
7864         user allocated stacks.
7866 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7868         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7869         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7870         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7871         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7872         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7873         Use `header.' prefix.
7874         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7876 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7878         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7879         __builtin_frame_address, use stack pointer.
7881         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7882         instead of __builtin_frame_pointer.
7884 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7886         * tst-basic1.c (do_test): Add cast to avoid warning.
7887         * tst-basic2.c (do_test): Likewise.
7889         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7890         amount of stack correction.
7892         * tst-fork4.c: Use test-skeleton.c.
7894 2003-03-14  Roland McGrath  <roland@redhat.com>
7896         * init.c: Fix typo "#eli" for "#else".
7898 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7900         * allocatestack.c (__stack_user): Use hidden_data_def.
7901         * pthread_create.c (__pthread_keys): Likewise.
7903         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7905 2003-03-14  Roland McGrath  <roland@redhat.com>
7907         * tst-fork4.c: New file.
7908         * Makefile (tests): Add it.
7910         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7911         we always define the padding space.
7912         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7913         stopped supporting its own extensions fully.
7914         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7915         struct also called `header', so `header.multiple_threads' is the field
7916         name to use on all machines.
7917         * allocatestack.c (allocate_stack): Use `header.' prefix.
7918         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7919         * pthread_create.c (__pthread_create_2_1): Likewise.
7920         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7921         (THREAD_SELF): Likewise.
7922         * sysdeps/x86_64/tls.h: Likewise.
7923         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7924         (SINGLE_THREAD_P): Likewise.
7925         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7926         (SINGLE_THREAD_P): Likewise.
7927         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7928         (SINGLE_THREAD_P): Likewise.
7930         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7931         value directly.
7933 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7935         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7936         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7938         * pthread_create.c (start_thread): setjmp is expected to return 0.
7940         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7941         (THREAD_GETMEM_NC): Likewise.
7943 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7945         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7946         and the size of the stack which must be allocated is a multiple,
7947         allocate one more page.
7948         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7949         MULTI_PAGE_ALIASING.
7951 2003-03-13  Roland McGrath  <roland@redhat.com>
7953         * pthread_create.c (start_thread): Set EXITING_BIT after the
7954         event-reporting (and destructors), not before.
7956 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7958         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7959         lll_futex_wake): Declare register variables as long int instead of
7960         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7961         Make syscall arguments clobbered by the syscall.
7962         (lll_futex_wait): Define using lll_futex_timed_wait.
7964         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7965         to void *.
7967         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7968         PPID if [! NDEBUG].
7970         * allocatestack.c (nptl_ncreated): Only declare if
7971         COLORING_INCREMENT != 0.
7973         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7974         (__libc_enable_asynccancel_2): Remove prototype.
7976         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7977         ctid to match kernel.
7979 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7981         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7982         libc_multiple_threads.
7983         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7984         __libc_multiple_threads to...
7985         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7987         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7988         versioning.
7989         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7990         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7992         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7993         (__pthread_once_internal): Define.
7995         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7996         macros instead of .symver directly.
7997         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7998         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8000         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8001         * sysdeps/x86_64/tcb-offsets.sym: New file.
8002         * sysdeps/x86_64/Makefile: New file.
8004         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8006         to access own pthread_t in TCB.
8007         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8008         Likewise.
8009         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8010         Likewise.
8011         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8013 2003-03-12  Roland McGrath  <roland@redhat.com>
8015         * pthread-errnos.sym: New file.
8016         * Makefile (gen-as-const-headers): New variable, list that file.
8017         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8018         header <pthread-errnos.h> instead of defining errno values here.
8019         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8020         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8021         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8022         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8023         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8024         Likewise.
8025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8026         Likewise.
8027         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8028         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8029         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8030         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8031         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8032         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8033         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8034         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8035         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8036         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8037         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8038         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8039         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8040         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8041         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8042         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8043         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8044         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8045         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8046         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8047         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8048         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8049         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8050         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8051         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8052         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8055         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8056         CLONE_CHILD_SETTID worked.
8058 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8060         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8061         file.
8062         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8063         file.
8065         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8066         (pthread_cond_t): Add padding.
8068         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8069         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8070         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8072         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8073         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8074         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8075         (__pthread_rwlock_timedrdlock): Likewise.
8076         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8077         (__pthread_rwlock_wrlock): Likewise.
8078         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8079         (__pthread_rwlock_rdlock): Likewise.
8081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8083         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8084         result of lock re-get if it fails.
8086 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8088         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8089         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8090         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8091         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8092         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8093         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8094         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8095         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8096         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8097         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8099         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8100         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8102         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8103         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8104         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8105         (create_thread): Likewise.
8106         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8107         * init.c (__pthread_initialize_minimal_internal): Initialize
8108         __libc_multiple_threads_ptr if necessary.
8109         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8110         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8111         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8112         __libc_multiple_threads.
8113         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8114         necessary.
8116         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8117         (THREAD_SETMEM_NC): Likewise.
8119         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8120         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8121         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8122         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8124         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8125         Eliminate one entire instruction.
8127         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8128         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8129         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8130         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8131         instead of __pthread_enable_asynccancel.
8132         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8133         (__pthread_cond_wait): Likewise.
8134         * sysdeps/pthread/pthread_cond_timedwait.c
8135         (__pthread_cond_timedwait): Likewise.
8136         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8139         (__condvar_cleanup): Wake up all waiters in case we got signaled
8140         after being woken up but before disabling asynchronous
8141         cancellation.
8142         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8143         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8144         (__condvar_cleanup): Likewise.
8146         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8147         Make it an error if architecture has no #if case.  Add x86-64.
8149         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8150         pt-initfini.s generation.
8152         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8153         (TLS_INIT_TP): Fix typo.
8155 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8157         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8158         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8160         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8161         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8162         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8163         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8164         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8165         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8166         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8167         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8169 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8171         * sysdeps/pthread/pthread_cond_timedwait.c
8172         (__pthread_cond_timedwait): Return the result of the final
8173         locking.  If it succeeds, the regular function return value.
8175         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8176         Return result of the final locking.
8177         * version.c (__nptl_main): Work around problems with the strange
8178         INTERNAL_SYSCALL macro on ppc32.
8179         * init.c (__pthread_initialize_minimal_internal): Unblock
8180         SIGCANCEL in case the parent blocked it.
8181         Reported by Paul Mackerras <paulus@samba.org>.
8183         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8184         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8185         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8187 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8189         * sysdeps/pthread/pthread_cond_timedwait.c
8190         (__pthread_cond_timedwait): Unlock and fail if
8191         __pthread_mutex_unlock_internal failed.
8193         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8194         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8195         Use ARCH_CLONE.
8196         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8197         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8198         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8199         ALLOCATE_STACK): New macros.
8200         (TLS_TPADJ): New macro.
8201         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8202         (allocate_stack): Handle TLS_DTV_AT_TP and
8203         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8204         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8205         Don't set PD->self.
8206         * init.c [__ia64__] (__NR_set_tid_address): Define.
8208         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8209         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8210         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8211         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8212         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8213         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8214         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8215         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8216         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8217         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8218         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8219         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8220         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8221         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8222         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8223         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8224         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8225         * sysdeps/ia64/bits/atomic.h: New file.
8226         * sysdeps/ia64/Makefile: New file.
8227         * sysdeps/ia64/pthread_spin_init.c: New file.
8228         * sysdeps/ia64/pthread_spin_lock.c: New file.
8229         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8230         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8231         * sysdeps/ia64/pthreaddef.h: New file.
8232         * sysdeps/ia64/tcb-offsets.sym: New file.
8233         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8234         * sysdeps/ia64/tls.h: New file.
8236         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8237         to syscall instead of no arguments.
8239 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8241         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8242         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8243         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8244         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8246         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8247         unused code.
8249         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8251         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8252         lowlevelbarrier.sym.
8253         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8254         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8255         Include lowlevelbarrier.h and don't define offsets locally.
8256         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8259         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8260         (__lll_mutex_timedlock_wait): Likewise.
8261         (lll_mutex_lock): Adjust asm for that.
8262         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8263         (lll_lock): Adjust asm for operand order change.
8264         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8265         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8267         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8268         Reverse order of parameters.
8269         (__lll_timedwait_tid): Remove regparms attribute.
8270         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8271         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8273         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8274         (__lll_timedwait_tid): Remove one unnecessary instruction.
8276         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8277         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8278         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8279         lowlevelmutex.S.
8281         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8282         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8283         for NOT_IN_libc.
8284         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8285         lowlevellock.S.
8287         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8288         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8289         for libc.so.
8290         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8291         define LOCK here (if UP is not defined).  The actual code is in
8292         lowlevelmutex.S.
8294         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8295         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8296         __lll_timedwait_tid for libc.so.
8297         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8298         define LOCK here (if UP is not defined).  The actual code is in
8299         lowlevellock.S.
8301         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8302         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8303         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8304         instead of lowlevelsem.h.
8305         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8306         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8307         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8309         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8310         lowlevelrwlock.sym.
8311         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8312         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8313         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8315         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8316         register loading.
8317         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8318         last changed.  D'oh.
8320         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8322         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8323         of __libc_locking_needed.
8324         (lll_trylock): Initialize %eax to zero.
8326         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8327         pthread_cond_t definition.
8329 2003-03-10  Roland McGrath  <roland@redhat.com>
8331         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8332         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8333         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8334         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8335         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8337         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8338         Instead of setting PD->multiple_threads, set globals
8339         __pthread_multiple_threads and __libc_multiple_threads.
8340         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8341         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8342         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8344         * descr.h (struct pthread): Conditionalize first member on
8345         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8346         containing an anonymous tcbhead_t.  Move `list' member out.
8347         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8348         * allocatestack.c: Remove use of `header.data.' prefix.
8349         * pthread_create.c: Likewise.
8350         * init.c (__pthread_initialize_minimal_internal): Likewise.
8351         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8352         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8353         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8354         * sysdeps/x86_64/tls.h: Likewise.
8355         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8356         (SINGLE_THREAD_P): Likewise.
8357         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8358         (SINGLE_THREAD_P): Likewise.
8359         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8360         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8362 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8364         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8366         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8367         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8369         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8370         leftovers from the ia32 code.
8372         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8373         memory load.
8374         (clear_once_control): Don't load %esi.
8376         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8377         handling.
8379         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8381         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8382         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8384         * Makefile (tests): Add tst-cond10.
8385         * tst-cond10.c: New file.
8387 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8389         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8390         * tst-signal3.c (do_test): Likewise.
8391         * tst-sem5.c (do_test): Likewise.
8392         * tst-kill6.c (do_test): Likewise.
8393         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8395         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8396         of inc/dec.
8397         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8398         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8399         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8400         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8401         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8402         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8403         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8404         Likewise.
8405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8406         Likewise.
8407         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8408         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8409         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8411         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8412         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8413         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8414         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8416         * allocatestack.c (allocate_stack): If mprotect() fails free the
8417         TLS memory.
8419 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8421         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8423         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8424         lll_wake_tid.  This was used only to work around kernel limits in
8425         the early days.
8426         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8427         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8428         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8429         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8431         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8432         (__pthread_initialize_minimal_internal): Change initialization of
8433         __static_tls_align_m1 appropriately.
8434         * pthreadP.h (__static_tls_align_m1): Renamed from
8435         __static_tls_align.
8436         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8437         instead of __static_tls_align-1.
8439 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8441         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8443         * pthread_create.c: Define __pthread_keys using nocommon
8444         attribute, not by placing it explicitly in bss.
8445         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8447         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8448         Use it in mmap call to allocate stacks.
8450         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8452         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8453         result of the thread function.
8455 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8457         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8458         version is just fine.
8460         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8461         (__pthread_child_handler): Renamed from pthread_child_handler,
8462         exported, and marked hidden.  Change all users.
8463         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8464         free __pthread_child_handler from child list.
8466 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8468         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8470         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8471         Fix handling of cancellation and failing pthread_mutex_unlock call.
8472         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8473         (__pthread_cond_wait): Likewise.
8475         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8476         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8477         lll_futex_timed_wait call.
8478         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8479         (pthread_rwlock_timedwrlock): Likewise.
8481         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8482         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8483         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8485         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8486         check of lll_futex_wake return value.
8488 2003-03-03  Roland McGrath  <roland@redhat.com>
8490         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8492         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8493         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8494         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8496 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8498         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8499         error for CPU clocks.
8501         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8502         _POSIX_MONOTONIC_CLOCK.
8503         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8505         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8506         recent kernels.
8508 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8510         * descr.h (struct pthread): Move cleanup field to the front.
8512 2003-03-01  Roland McGrath  <roland@redhat.com>
8514         * sem_open.c (sem_open): Braino fix.
8516 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8518         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8520         __pthread_cleanup_pop functionality.
8521         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8523         * descr.h (struct pthread): Move tid field to the front now that
8524         it is often used.
8526         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8527         (__lll_mutex_timedlock_wait): Remove.
8528         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8529         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8530         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8531         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8532         (lll_unlock_wake_cb): Don't save and restore %esi.
8533         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8534         %esi.
8535         (__lll_timedwait_tid): Add alignment.
8536         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8537         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8538         %esi.
8539         (__lll_timedwait_tid): Removed.
8540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8541         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8542         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8543         (pthread_barrier_wait): Don't save, load, and restore %esi for
8544         last thread.
8545         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8546         (__pthread_cond_signal): Don't save, load, and restore %esi.
8547         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8548         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8549         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8550         Don't save, load, and restore %esi.
8552 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8554         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8555         Release lock before waking up the waiters.
8557         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8559         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8560         (reader_thread): Likewise.
8562         * sysdeps/pthread/pthread_rwlock_unlock.c
8563         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8564         to wake up readers if there are none.
8566         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8567         Release internal lock before wake threads.
8569 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8571         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8572         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8573         predefined.
8574         * tst-rwlock9.c: Likewise.
8575         * tst-rwlock10.c: New file.
8576         * tst-rwlock11.c: New file.
8578         * Makefile (tests): Add tst-dlsym1.
8579         * tst-dlsym1.c: New file.
8581         * init.c (__pthread_initialize_minimal_internal): Set
8582         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8583         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8585 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8587         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8589         * tst-cond2.c: Fix sychronization with child.
8591         * tst-rwlock8.c (reader_thread): Remove unused variable.
8593         * Makefile: Add rules to build and run tst-tls3.
8594         * tst-tls3.c: New file.
8595         * tst-tls3mod.c: New file.
8597         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8598         * tst-rwlock8.c: New file.
8599         * tst-rwlock9.c: New file.
8600         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8601         complete broken rwlock implementation.
8602         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8603         Likewise.
8604         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8605         Likewise.
8606         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8608         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8609         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8610         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8611         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8612         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8614 2003-02-23  Roland McGrath  <roland@redhat.com>
8616         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8618 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8620         * Makefile (tests): Add tst-context1.
8621         * tst-context1.c: New file.
8623         * Makefile (tests): Add tst-tls1 and tst-tls2.
8624         * tst-tls1.c: New file.
8625         * tst-tls2.c: New file.
8627         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8628         for failed cmpxchg.
8630         * pthread_create.c (start_thread): Set EXITING_BIT early.
8632         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8633         (THREAD_GETMEM_NC): Likewise.
8635 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8637         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8638         off 3 more bytes by using offset-less instructions when possible.
8640         * Makefile: Add dependency for $(objpfx)version.d.
8642         * eintr.c (eintr_source): Add unnecessary return but the compiler
8643         insists.
8645         * tst-kill3.c: Include <unistd.h>.
8647 2003-02-21  Roland McGrath  <roland@redhat.com>
8649         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8651 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8653         * Makefile (tests): Add tst-eintr1.
8654         (distribute): Add eintr.c.
8655         * tst-eintr1.c: New file.
8656         * eintr.c: New file.
8658         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8660         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8661         Disallow sending SIGCANCEL.
8663         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8664         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8665         * tst-kill1.c: New file.
8666         * tst-kill2.c: New file.
8667         * tst-kill3.c: New file.
8668         * tst-kill5.c: New file.
8669         * tst-kill6.c: New file.
8670         * tst-basic7.c: Renamed to...
8671         * tst-kill4.c: ...this.
8673 2003-02-21  Roland McGrath  <roland@redhat.com>
8675         * Makefile (install-lib-ldscripts): New variable.
8677 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8679         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8680         * pthread_cancel.c: Use INVALID_TD_P.
8681         * pthread_detach.c: Likewise.
8682         * pthread_getschedparam.c: Likewise.
8683         * pthread_setschedparam.c: Likewise.
8684         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8685         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8686         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8687         * pthread_timedjoin.c: Likewise.
8689         * tst-basic7.c: Include <signal.h>.
8691         * pthread_join.c (pthread_join): Limited checking for invalid
8692         descriptors.
8693         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8695 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8697         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8698         beginning of the loop.  Clear the entire first block of TSD.
8699         * Makefile (tests): Add tst-key4.
8700         * tst-key4.c: New file.
8702 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8704         * Makefile (tests): Add tst-basic7.
8705         * tst-basic7.c: New file.
8707         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8708         Add some more __builtin_expect.
8710         * pthreadP.h: Define dummy version of DEBUGGING_P.
8712 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8714         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8715         _POSIX_THREAD_PRIORITY_SCHEDULING.
8716         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8717         _XOPEN_REALTIME_THREADS.
8718         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8720         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8721         kernel returns EINVAL for PID <= 0, work around it.
8723         * Makefile (tests): Add tst-signal5.
8724         * tst-signal5.c: New file.
8726         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8727         and LOGIN_NAME_MAX.
8729         * tst-cancel1.c (tf): Block all signals.
8731         * Makefile (tests): Add tst-basic6.
8732         * tst-basic6.c: New file.
8734         * tst-basic1.c: Add test for process ID.
8736         * Makefile (tests): Add tst-cancel10.
8737         * tst-cancel10.c: New file.
8739         * Makefile (tests): Add tst-signal4.
8740         * tst-signal4.c: New file.
8742         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8743         __sigismember instead of sigismember.  Add __builtin_expect.
8745 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8747         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8748         pthread_setcancelstate, and pthread_rwlock_setpshared.
8750         * tst-cancel7.c (do_test): Make sure the pid file exists before
8751         canceling the thread.
8753         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8754         pthread_rwlock_timedrdlock tests.
8755         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8756         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8757         Check for invalid tv_nsec field.
8758         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8759         Likewise.
8761         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8762         recursive mutex of overflow.
8764         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8766         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8767         going into an endless loop.
8768         * Makefile (tests): Add tst-cancel9.
8769         * tst-cancel9.c: New file.
8771         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8773 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8775         * tst-mutex5.c (do_test): Add more timedlock tests.
8777         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8778         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8780         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8781         use INLINE_SYSCALL.  Error number is returned, not -1.
8783         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8784         and __deallocate_stack with internal_function.
8785         * pthread_create.c: Adjust definitions appropriately.
8786         * allocatestack.c: Likewise.
8788         * pthread_join.c: Add one more __builtin_expect.
8789         * pthread_timedjoin.c: Likewise.
8791         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8792         not data of sequence number does not match.
8793         Add one __builtin_expect.
8795         * Makefile (tests): Add tst-clock1.
8796         * tst-clock1.c: New file.
8798         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8799         negative arguments.
8800         * Makefile (tests): Add tst-basic5.
8801         * tst-basic5.c: New file.
8803 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8805         * Makefile (tests): Add tst-basic4.
8806         * tst-basic4.c: New file.
8808         * pthreadP.h: Add declaraction for __nptl_nthreads.
8809         * pthread_create.c: Define __nptl_nthreads
8810         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8811         after thread is done.  If then zero, call exit(0).
8812         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8813         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8814         * init.c (pthread_functions): Initialize ptr_nthreads.
8815         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8816         (__reclaim_stacks): Decrement __nptl_nthreads.
8817         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8818         Define.
8819         * Makefile (tests): Add tst-basic3.
8820         * tst-basic3.c: New file.
8822         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8823         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8824         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8825         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8826         if asynchronous canceling is enabled.
8827         * pthread_join.c (pthread_join): When recognizing circular joins,
8828         take into account the other thread might be already canceled.
8829         * Makefile (tests): Add tst-join5.
8830         * tst-join5.c: New file.
8832         * Makefile (tests): Add tst-join4.
8833         * tst-join4.c: New file.
8835 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8837         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8839 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8841         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8842         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8843         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8844         warning.
8845         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8846         to avoid warning.
8847         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8848         error if lll_futex_wake failed.
8850 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8852         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8853         handling of cancellation and failung pthread_mutex_unlock call.
8854         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8855         * Makefile (tests): Add tst-cond8 and tst-cond9.
8856         * tst-cond8.c: New file.
8857         * tst-cond9.c: New file.
8859         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8861         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8862         non-standard initializers with __USE_GNU.
8864         * Makefile (tests): Add tst-cleanup3.
8865         * tst-cleanup3.c: New file.
8867 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8869         * Makefile (tests): Add tst-attr1 and tst-attr2.
8870         * tst-attr1.c: New file.
8871         * tst-attr2.c: New file.
8873         * Makefile: Add rules to build and run tst-atfork2 test.
8874         * tst-atfork2.c: New file.
8875         * tst-atfork2mod.c: New file.
8877         * sysdeps/unix/sysv/linux/unregister-atfork.c
8878         (__unregister_atfork): Free the memory allocated for the handlers
8879         after removing them from the lists.
8881         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8882         cleanup function.
8884         * tst-atfork1.c (do_test): Wait for the child we forked.
8885         Report error in child.
8887         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8889         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8891 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8893         * Makefile (tests): Add tst-cancel8.
8894         * tst-cancel8.c: New file.
8896         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8897         clearing of control variable.
8898         * Makefile (tests): Add tst-once3 and tst-once4.
8899         * tst-once3.c: New file.
8900         * tst-once4.c: New file.
8902 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8904         * sysdeps/sh/Makefile: New file.
8905         * sysdeps/sh/bits/atomic.h: New file.
8906         * sysdeps/sh/pthread_spin_init.c: New file.
8907         * sysdeps/sh/pthread_spin_lock.c: New file.
8908         * sysdeps/sh/pthread_spin_trylock.S: New file.
8909         * sysdeps/sh/pthread_spin_unlock.S: New file.
8910         * sysdeps/sh/pthreaddef.h: New file.
8911         * sysdeps/sh/tcb-offsets.sym: New file.
8912         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8913         * sysdeps/sh/tls.h: New file.
8914         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8915         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8916         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8917         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8918         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8919         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8920         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8921         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8922         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8923         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8924         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8925         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8926         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8927         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8928         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8929         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8930         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8931         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8932         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8933         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8934         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8935         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8936         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8937         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8938         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8939         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8940         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8941         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8942         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8943         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8945 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8947         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8948         according to POSIX.
8950         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8952 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8954         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8955         (TLS_GET_FS): New #define.
8956         (TLS_SET_FS): New #define.
8957         Correct value of __NR_set_thread_area.
8959         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8961 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8963         * Makefile (tests): Add tst-popen1.
8964         * tst-popen1.c: New file.
8966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8967         but inactive generalization.
8968         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8970         Minor optimization, remove one instruction.
8971         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8973 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8975         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8977 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8979         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8980         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8981         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8982         * sysdeps/pthread/pthread_cond_signal.c: New file.
8983         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8984         * sysdeps/pthread/pthread_cond_wait.c: New file.
8985         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8986         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8987         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8988         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8989         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8990         * sysdeps/s390/Makefile: New file.
8991         * sysdeps/s390/bits/atomic.h: New file.
8992         * sysdeps/s390/pthread_spin_init.c: New file.
8993         * sysdeps/s390/pthread_spin_lock.c: New file.
8994         * sysdeps/s390/pthread_spin_trylock.c: New file.
8995         * sysdeps/s390/pthread_spin_unlock.c: New file.
8996         * sysdeps/s390/pthreaddef.h: New file.
8997         * sysdeps/s390/tcb-offsets.sym: New file.
8998         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8999         * sysdeps/s390/tls.h: New file.
9000         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9001         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9002         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9003         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9004         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9005         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9006         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9007         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9008         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9009         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9010         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9011         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9012         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9013         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9014         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9015         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9016         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9017         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9018         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9019         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9020         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9021         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9022         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9024 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9026         * atomic.h: Add a couple more default implementations.
9027         (atomic_compare_and_exchange_acq): Use
9028         __arch_compare_and_exchange_32_acq in return value definition.  It
9029         always exists.
9030         (atomic_bit_set): Renamed from atomic_set_bit.
9031         Add missing atomic_ prefixes.
9033         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9034         thread library is available, use correct value to mark initialized
9035         once variable.
9037 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9039         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9040         __sysconf to determine pagesize.
9042         * pthread_create.c: Include <atomic.h>.
9043         * allocatestack.c (allocate_stack): Implement coloring of the
9044         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9045         size minus one.  Adjust users.
9046         * sysdeps/i386/i686/Makefile: New file.
9048 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9050         * allocatestack.c: Improve comment throughout the file.
9052         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9053         (__lll_lock_wait): Add branch prediction.
9054         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9055         (__lll_lock_wait): Likewise.
9056         (lll_unlock_wake_cb): Removed.
9058 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9060         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9061         _POSIX_THREAD_PRIORITY_SCHEDULING.
9063 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9065         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9066         Fix return type of ptr___pthread_getspecific.
9068 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9070         * Makefile (tests): Add tst-umask1.
9071         (tst-umask1-ARGS): Define.
9072         * tst-umask1.c: New file.
9074 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9076         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9077         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9078         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9079         pthread_rwlock_unlock.
9080         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9081         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9082         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9083         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9084         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9085         New file.
9086         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9087         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9088         New file.
9089         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9090         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9091         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9092         New file.
9093         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9094         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9095         New file.
9096         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9097         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9098         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9099         New file.
9100         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9101         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9102         New file.
9103         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9105         * Makefile (libpthread-routines): Remove lowlevelcond and
9106         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9107         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9108         and pthread_cond_broadcast.
9109         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9110         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9111         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9112         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9113         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9114         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9115         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9116         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9117         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9118         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9119         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9120         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9122         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9123         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9124         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9125         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9126         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9127         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9128         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9129         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9130         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9131         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9132         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9133         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9134         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9135         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9136         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9137         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9138         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9139         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9141         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9142         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9143         of the code is moved to ...
9144         * sysdeps/pthread/createthread.c: ...here.  New file.
9146 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9148         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9149         (__new_sem_post): Clear %eax before returning.
9150         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9152         * Makefile (tests): Add tst-cleanup2.
9153         * tst-cleanup2.c: New file.
9155         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9156         Interpret first parameter correctly.
9158 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9160         * Makefile (headers): Add bits/semaphore.h.
9162 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9164         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9165         if not SHARED.
9167 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9169         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9170         must be used and mapping failed.
9171         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9173         * Makefile (CFLAGS-pthread_self.os): Define this, not
9174         CFLAGS-pthread_self.c.
9176 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9178         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9179         lll_unlock_wake_cb.
9181         * Makefile (libpthread-routines): Add version.  Add rules to build
9182         version.os and banner.h.
9183         * version.c: New file.
9185 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9187         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9188         the alias unconditional.
9189         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9191 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9193         * Makefile (CFLAGS-pthread_self.c): New definition.
9195 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9197         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9198         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9199         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9200         * init.c (__pthread_initialize_minimal_internal): Likewise.
9202 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9204         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9206         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9207         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9208         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9209         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9210         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9211         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9213 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9215         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9216         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9217         * tst-cancel-wrappers.sh: Remove all exceptions.
9219 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9221         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9222         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9224         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9225         Use __libc_pthread_functions array if SHARED.
9227         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9228         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9230         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9231         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9232         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9233         __libc_ptf_call instead of __libc_maybe_call.
9234         (PTF): New #define.
9235         (__libc_cleanup_region_start): Wrap function name with PTF call.
9236         (__libc_cleanup_region_end): Likewise.
9237         (__libc_cleanup_end): Likewise.
9239         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9240         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9241         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9242         * pthreadP.h: Add prototypes.
9244         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9245         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9246         __pthread_rwlock_unlock aliases.
9247         * pthreadP.h: Add prototypes for new aliases.
9249         * pthreadP.h (struct pthead_functions): Moved to...
9250         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9251         * init.c (pthread_functions): Add initializers for new elements.
9253         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9254         __pthread_cleanup_pop_restore aliases.
9255         * pthreadP.h: Add prototypes.
9257         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9258         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9259         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9260         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9261         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9262         * pthreadP.h: Adjust prototypes and callers.
9264 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9266         * Makefile (tests): Add tst-cancel7.
9267         (tst-cancel7-ARGS): New variable.
9268         * tst-cancel7.c: New file.
9270         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9271         around gcc defficiencies.
9272         * old_pthread_cond_signal.c: Likewise.
9273         * old_pthread_cond_timedwait.c: Likewise.
9274         * old_pthread_cond_wait.c: Likewise.
9276         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9278 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9280         * Makefile (tests): Add tst-cond7.
9281         * tst-cond7.c: New file.
9283         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9284         (condvar_cleanup): Get condvar address from the right place.
9286         * atomic.h: Correct definitions of atomic_full_barrier,
9287         atomic_read_barrier, atomic_write_barrier.
9289         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9290         race-free.
9291         * old_pthread_cond_signal.c: Likewise.
9292         * old_pthread_cond_timedwait.c: Likewise.
9293         * old_pthread_cond_wait.c: Likewise.
9295 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9297         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9299 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9301         * pthreadP.h (pthread_cond_2_0_t): New type.
9302         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9303         Use new type for the 2.0 condvar function prototypes.
9304         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9305         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9306         parameter.
9307         * old_pthread_cond_destroy.c: Likewise.
9308         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9309         * old_pthread_cond_signal.c: Likewise.
9310         * old_pthread_cond_timedwait.c: Likewise.
9311         * old_pthread_cond_wait.c: Likewise.
9313         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9314         (__pthread_cond_wait): Don't save cancellation mode and seq value
9315         in same location.
9317         * herrno.c (__h_errno_location): Don't define as weak.
9319 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9321         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9322         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9323         and pthread_cond_wait.
9324         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9325         Renamed to...
9326         (__pthread_cond_broadcast_2_0): ... this.
9327         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9328         Renamed to...
9329         (__pthread_cond_destroy_2_0): ... this.
9330         * old_pthread_cond_init.c (__old_pthread_cond_init):
9331         Renamed to...
9332         (__pthread_cond_init_2_0): ... this.
9333         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9334         Renamed to...
9335         (__pthread_cond_signal_2_0): ... this.
9336         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9337         Renamed to...
9338         (__pthread_cond_wait_2_0): ... this.
9339         * pthread_cond_destroy.c: Include shlib-compat.h.
9340         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9341         * pthread_cond_init.c: Include shlib-compat.h.
9342         (pthread_cond_init): Change strong_alias into versioned_symbol.
9343         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9344         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9345         fields.
9346         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9347         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9348         __pthread_cond_wait_2_0): New prototypes.
9349         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9350         __old_pthread_cond_init, __old_pthread_cond_signal,
9351         __old_pthread_cond_wait): Removed.
9352         * init.c: Include shlib-compat.h.
9353         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9354         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9355         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9356         ptr___pthread_cond_*_2_0 fields.
9357         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9358         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9360         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9361         LIBC_SIGACTION was not yet defined.
9362         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9363         [!defined LIBC_SIGACTION] (__sigaction): New function and
9364         libc_hidden_weak.
9365         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9366         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9368 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9370         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9372 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9374         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9375         New, larger type definition.
9376         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9377         implementation.
9378         * Versions [libpthread]: Add definitions for new pthread_cond_*
9379         interfaces for version GLIBC_2.3.2.
9380         * pthread_cond_init.c: Update initialization for new type definition.
9381         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9382         pthread_cond_timedwait, pthread_cond_signal, and
9383         pthread_cond_broadcast.  Add old_pthread_cond_init,
9384         old_pthread_cond_destroy, old_pthread_cond_wait,
9385         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9386         old_pthread_cond_broadcast.
9387         * old_pthread_cond_broadcast.c: New file.
9388         * old_pthread_cond_destroy.c: New file.
9389         * old_pthread_cond_init.c: New file.
9390         * old_pthread_cond_signal.c: New file.
9391         * old_pthread_cond_timedwait.c: New file.
9392         * old_pthread_cond_wait.c: New file.
9393         * pthreadP.h: Add prototypes for the compatibility interfaces.
9395         * pthread_cond_destroy.c: Don't include <errno.h>.
9397 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9399         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9400         unnecessary zero offset when addressing MUTEX.
9402 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9404         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9405         __register_atfork.
9406         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9407         for __register_atfork.
9409 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9411         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9412         instead of ASSEMBLER test macro.
9414         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9415         __libc_current_sigrtmax): Add libc_hidden_def.
9417         * sysdeps/pthread/list.h: Remove assert.h include.
9419 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9421         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9422         __pthread_initialize_minimal_internal not
9423         __pthread_initialize_minimal.
9425 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9427         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9428         __pthread_initialize_minimal as hidden.
9430         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9431         constructor.
9433 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9435         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9436         $(common-objpfx)format.lds, include that into the output script.
9437         Fix comment.
9438         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9440 2002-12-28  Andreas Jaeger  <aj@suse.de>
9442         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9443         nsec resolution changes.
9444         (xstat64_conv): Likewise.
9445         (xstat32_conv): Likewise.
9446         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9447         struct kernel_stat.
9448         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9449         structs stat and stat64.
9450         * time/time.h (__timespec_defined): Define for __USE_MISC.
9451         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9453 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9455         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9456         argument.
9457         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9458         (pthread_exit): Use strong_alias to avoid warnings.
9459         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9460         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9461         ptr___pthread_attr_init_2_*.
9462         * init.c (pthread_functions): Adjust.
9464 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9466         * forward.c: Make all functions available by default again.  It
9467         caused too much trouble.
9469         * pt-siglongjmp.c: Removed.
9471 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9473         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9474         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9475         * sysdeps/i386/Makefile: New file.
9476         * sysdeps/i386/tcb-offsets.sym: New file.
9477         * sysdeps/pthread/tcb-offsets.h: New file.
9478         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9479         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9481         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9482         __register_atfork...
9483         (GLIBC_2.3.2): ...here.
9485 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9487         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9488         pthread_attr_setstackaddr with __attribute_deprecated__.
9490 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9492         * pt-system.c (system): Remove cancellation handling.
9493         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9494         cancellation routines.
9496 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9498         * descr.h: Include <dl-sysdep.h>.
9499         (struct pthread): Move header.data.list to the back of the struct.
9500         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9501         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9502         (SYSINFO_OFFSEET): Likewise.
9504 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9506         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9507         Define.
9508         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9509         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9510         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9511         (USE_DL_SYSINFO): Undef.
9513 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9515         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9516         $(common-objpfx)libc.so.
9517         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9518         it is bigger than pipe buffer size even on arches with bigger
9519         page size.
9520         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9522 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9524         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9525         correct errno access for case that USE___THREAD is not defined.
9527 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9529         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9530         Patch by Marijn Ros <marijn@mad.scientist.com>.
9532 2002-12-22  Roland McGrath  <roland@redhat.com>
9534         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9536 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9538         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9540 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9542         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9543         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9544         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9546         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9547         of int $0x80.
9548         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9549         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9550         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9551         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9552         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9553         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9554         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9555         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9557         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9558         sysenter.
9559         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9561         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9563         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9564         in new TCB.
9565         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9566         that sysinfo is properly initialized.
9567         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9568         to 1 only for ld.so.
9570         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9571         RTLD_CORRECT_DYNAMIC_WEAK.
9573 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9575         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9576         Use return 0 as 6th argument to FORWARD4.
9577         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9579 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9581         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9582         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9583         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9584         (INIT_SYSINFO): New #define.
9585         (TLS_TP_INIT): Use INIT_SYSINFO.
9586         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9587         At test to make sure SYSINFO_OFFSET value is correct.
9588         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9590 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9592         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9593         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9594         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9595         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9596         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9597         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9598         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9600 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9602         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9603         macro instead of using int $0x80 directly.
9605         * sysdeps/pthread/bits/stdio-lock.h: New file.
9606         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9607         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9608         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9609         * Makefile (routines): Add libc-lowlevelmutex.
9611         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9612         __i686.get_pc_thunk.dx.
9614 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9616         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9617         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9618         ($(objpfx)tst-cancel-wrappers.out): New rule.
9619         * tst-cancel-wrappers.sh: New test.
9620         * tst-locale1.c: Include signal.h.
9621         (uselocale): Test static linking of __libc_current_sigrt*.
9623 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9625         * Makefile (tests): Add tst-cancel6.
9626         * tst-cancel6.c: New file
9628 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9630         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9631         Define meaningfully for assembler as well.
9632         * pthreadP.h (struct pthread_functions): Remove
9633         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9634         and ptr_pthread_attr_init_2_1 fields.
9635         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9636         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9637         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9638         (FORWARD3): Define using FORWARD4.
9639         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9640         versions.
9641         * pt-system.c: Remove duplicate stdlib.h include.
9643 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9645         * sem_init.c: Define sem_init@GLIBC_2.0.
9646         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9647         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9649         * flockfile.c: Moved to...
9650         * sysdeps/pthread/flockfile.c: ...here.  New file.
9651         * funlockfile.c: Moved to...
9652         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9653         * ftrylockfile.c: Moved to...
9654         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9656 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9658         * libc-cancellation.c: Guard both function with
9659         #if !defined NOT_IN_libc.
9660         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9661         automatically provided pthread wrappers.
9662         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9663         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9664         nor in libpthread.
9665         * pt-open.c: Removed.
9666         * pt-fcntl.c: Removed.
9667         * pt-fsync.c: Removed.
9668         * pt-lseek.c: Removed.
9669         * pt-msgrcv.c: Removed.
9670         * pt-msgsnd.c: Removed.
9671         * pt-msync.c: Removed.
9672         * pt-nanosleep.c: Removed.
9673         * pt-open64.c: Removed.
9674         * pt-pause.c: Removed.
9675         * pt-pread.c: Removed.
9676         * pt-pread64.c: Removed.
9677         * pt-pwrite.c: Removed.
9678         * pt-pwrite64.c: Removed.
9679         * pt-read.c: Removed.
9680         * pt-recv.c: Removed.
9681         * pt-recvfrom.c: Removed.
9682         * pt-recvmsg.c: Removed.
9683         * pt-send.c: Removed.
9684         * pt-sendto.c: Removed.
9685         * pt-sigtimedwait.c: Removed.
9686         * pt-sigwait.c: Removed.
9687         * pt-wait.c: Removed.
9688         * pt-waitpid.c: Removed.
9689         * pt-write.c: Removed.
9690         * pt-accept.c: Removed.
9691         * pt-close.c: Removed.
9692         * pt-connect.c: Removed.
9693         * pt-lseek64.c: Removed.
9694         * pt-sendmsg.c: Removed.
9695         * pt-tcdrain.c: Removed.
9697 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9699         * init.c (__pthread_initialize_minimal_internal): Renamed from
9700         __pthread_initialize_minimal.  Make old name an alias.  This
9701         converts a normal relocation into a relative relocation.
9703         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9705         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9706         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9707         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9708         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9709         pt-sigwaitinfo, pt-waitid, and pt-writev.
9710         * pt-creat.c: Removed.
9711         * pt-poll.c: Removed.
9712         * pt-pselect.c: Removed.
9713         * pt-readv.c: Removed.
9714         * pt-select.c: Removed.
9715         * pt-sigpause.c: Removed.
9716         * pt-sigsuspend.c: Removed.
9717         * pt-sigwaitinfo.c: Removed.
9718         * pt-waitid.c: Removed.
9719         * pt-writev.c: Removed.
9721         * init.c (pthread_functions): New variable.
9722         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9723         (or NULL) to __libc_pthread_init.
9724         * forward.c: Rewrite to use __libc:pthread_functions array to get
9725         function addresses.
9726         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9727         prototype.
9728         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9729         Take new parameter.  Copy content of variable pointed to by it
9730         to __libc_pthread_init.
9732         * pthreadP.h (struct pthread_functions): New type.
9733         (__libc_pthread_init): Declare.
9735         * pthread_attr_destroy.c: Add namespace protected alias.
9736         * pthread_attr_getdetachstate.c: Likewise.
9737         * pthread_attr_getinheritsched.c: Likewise.
9738         * pthread_attr_getschedparam.c: Likewise.
9739         * pthread_attr_getschedpolicy.c: Likewise.
9740         * pthread_attr_getscope.c: Likewise.
9741         * pthread_attr_setdetachstate.c: Likewise.
9742         * pthread_attr_setinheritsched.c: Likewise.
9743         * pthread_attr_setschedparam.c: Likewise.
9744         * pthread_attr_setschedpolicy.c: Likewise.
9745         * pthread_attr_setscope.c: Likewise.
9746         * pthread_cond_broadcast.c: Likewise.
9747         * pthread_cond_destroy.c: Likewise.
9748         * pthread_cond_init.c: Likewise.
9749         * pthread_cond_signal.c: Likewise.
9750         * pthread_cond_wait.c: Likewise.
9751         * pthread_condattr_destroy.c: Likewise.
9752         * pthread_condattr_init.c: Likewise.
9753         * pthread_equal.c: Likewise.
9754         * pthread_exit.c: Likewise.
9755         * pthread_getschedparam.c: Likewise.
9756         * pthread_self.c: Likewise.
9757         * pthread_setcancelstate.c: Likewise.
9758         * pthread_setschedparam.c: Likewise.
9759         * pthread_mutex_destroy.c: Likewise.
9760         * pthread_mutex_init.c: Likewise.
9761         * pthreadP.h: Add prototypes for the aliases.
9763         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9764         multiple_threads member in correct TCB to 1.
9766         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9767         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9768         member of thread decriptor, otherwise return unconditionally 1.
9770 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9772         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9773         regular Linux version.  Remove file.
9774         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9775         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9776         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9777         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9778         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9779         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9780         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9781         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9782         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9783         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9784         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9785         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9786         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9787         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9788         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9789         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9790         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9791         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9792         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9793         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9794         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9795         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9796         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9797         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9798         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9799         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9800         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9801         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9802         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9803         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9805 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9807         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9808         * sysdeps/unix/sysv/linux/open.c: Removed.
9809         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9810         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9811         * sysdeps/unix/sysv/linux/msync.c: Removed.
9812         * sysdeps/unix/sysv/linux/read.c: Removed.
9813         * sysdeps/unix/sysv/linux/close.c: Removed.
9814         * sysdeps/unix/sysv/linux/creat.c: Removed.
9815         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9816         * sysdeps/unix/sysv/linux/pause.c: Removed.
9817         * sysdeps/unix/sysv/linux/select.c: Removed.
9818         * sysdeps/unix/sysv/linux/write.c: Removed.
9820 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9822         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9823         element in TCB to see whether locking is needed.
9825         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9826         MULTIPLE_THREADS_OFFSET value is correct.
9828         * sysdeps/unix/sysv/linux/close.c: New file.
9829         * sysdeps/unix/sysv/linux/connect.S: New file.
9830         * sysdeps/unix/sysv/linux/creat.c: New file.
9831         * sysdeps/unix/sysv/linux/fsync.c: New file.
9832         * sysdeps/unix/sysv/linux/llseek.c: New file.
9833         * sysdeps/unix/sysv/linux/lseek.c: New file.
9834         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9835         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9836         * sysdeps/unix/sysv/linux/msync.c: New file.
9837         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9838         * sysdeps/unix/sysv/linux/open.c: New file.
9839         * sysdeps/unix/sysv/linux/open64.c: New file.
9840         * sysdeps/unix/sysv/linux/pause.c: New file.
9841         * sysdeps/unix/sysv/linux/poll.c: New file.
9842         * sysdeps/unix/sysv/linux/pread.c: New file.
9843         * sysdeps/unix/sysv/linux/pread64.c: New file.
9844         * sysdeps/unix/sysv/linux/pselect.c: New file.
9845         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9846         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9847         * sysdeps/unix/sysv/linux/readv.c: New file.
9848         * sysdeps/unix/sysv/linux/recv.S: New file.
9849         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9850         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9851         * sysdeps/unix/sysv/linux/select.c: New file.
9852         * sysdeps/unix/sysv/linux/send.S: New file.
9853         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9854         * sysdeps/unix/sysv/linux/sendto.S: New file.
9855         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9856         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9857         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9858         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9859         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9860         * sysdeps/unix/sysv/linux/system.c: New file.
9861         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9862         * sysdeps/unix/sysv/linux/wait.c: New file.
9863         * sysdeps/unix/sysv/linux/waitid.c: New file.
9864         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9865         * sysdeps/unix/sysv/linux/writev.c: New file.
9866         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9868         * pt-readv.c: Fix comment.
9870 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9872         * tst-cleanup1.c: Include stdlib.h.
9874         * tst-cancel5.c: New test.
9875         * Makefile (tests): Add tst-cancel5.
9876         (tst-cancel5): Link against libc.so libpthread.so in that order.
9878 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9880         * forward.c (test_loaded): Prevent recursive calls.
9882         * Makefile (routines): Add libc-cancellation.
9883         * libc-cancellation.c: New file.
9884         * descr.h (struct pthread): Add multiple_threads field.
9885         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9886         new thread descriptor to 1.
9887         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9888         Initialize multiple_thread field after successful thread creation.
9889         * cancellation.c (__do_cancel): Move to pthreadP.h.
9890         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9891         (__pthread_disable_asynccancel): Add internal_function attribute.
9892         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9893         * pthread_setcancelstate.c: Likewise.
9894         * pthread_setcanceltype.c: Likewise.
9895         * pthread_exit.c: Likewise.
9896         * pthreadP.h (CANCELLATION_P): Likewise.
9897         (__do_cancel): Define as static inline.
9898         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9899         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9900         declarations.
9901         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9902         fields.  Define MULTIPLE_THREADS_OFFSET.
9903         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9904         declaration.
9905         * sysdeps/unix/sysv/linux/accept.S: New file.
9906         * sysdeps/unix/sysv/linux/read.c: New file.
9907         * sysdeps/unix/sysv/linux/write.c: New file.
9908         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9909         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9910         initialization of __libc_locking_needed.
9911         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9912         __libc_locking_needed, use multiple_threads field in TCB.
9913         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9915 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9917         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9918         version.
9919         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9921         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9922         access to __libc_locking_needed for PIC.
9924 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9926         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9927         declare for libc.so.
9928         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9929         expression.
9930         (__libc_lock_lock): Put into statement expression.
9931         (__libc_lock_unlock): Remove trailing semicolon.
9932         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9934 2002-12-12  Roland McGrath  <roland@redhat.com>
9936         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9937         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9939 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9941         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9942         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9943         Initialize __libc_locking_needed.
9944         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9945         instead of __register_pthread_fork_handler.
9946         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9947         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9948         fork-gen with libc_pthread_init.
9949         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9950         of __register_pthread_fork_handler.
9951         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9952         of __register_pthread_fork_handler.
9953         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9954         __libc_locking_needed to determine whether lock prefix can be avoided.
9955         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9957 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9959         * Makefile (tests): Add tst-cleanup1.
9960         * tst-cleanup1.c: New file.
9961         * cancellation.c (__cleanup_thread): Removed.
9962         (__do_cancel): Remove call to __cleanup_thread.
9963         * pthreadP.h: Remove __cleanup_thread prorotype.
9965         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9966         Remember function and argument even if cancellation handler
9967         function is not available.
9968         (__libc_cleanup_region_end): Execute registered function directly if
9969         pthread functions are not available.
9970         (__libc_cleanup_end): Likewise.
9972         * init.c (__pthread_initialize_minimal): Fix initialization in
9973         static lib by preventing gcc from being too clever.
9975 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9977         * init.c (__pthread_initialize_minimal): Remove unneccesary
9978         sigaddset call.
9980         * Makefile (tests): We can run tst-locale2 now.
9982 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9984         * Versions: Remove duplicated sigwait entry.
9986 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9988         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9989         inside libpthread.
9991         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9993         * pthreadP.h: Declare __pthread_enable_asynccancel and
9994         __pthread_disable_asynccancel.
9995         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9996         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9997         * cancellation.c (__pthread_enable_asynccancel): New function.
9998         (__pthread_disable_asynccancel): New function.
9999         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10000         * pt-close.c: Likewise.
10001         * pt-connect.c: Likewise.
10002         * pt-creat.c: Likewise.
10003         * pt-fcntl.c: Likewise.
10004         * pt-fsync.c: Likewise.
10005         * pt-lseek.c: Likewise.
10006         * pt-lseek64.c: Likewise.
10007         * pt-msgrcv.c: Likewise.
10008         * pt-msgsnd.c: Likewise.
10009         * pt-msync.c: Likewise.
10010         * pt-nanosleep.c: Likewise.
10011         * pt-open.c: Likewise.
10012         * pt-open64.c: Likewise.
10013         * pt-pause.c: Likewise.
10014         * pt-poll.c: Likewise.
10015         * pt-pread.c: Likewise.
10016         * pt-pread64.c: Likewise.
10017         * pt-pselect.c: Likewise.
10018         * pt-pwrite.c: Likewise.
10019         * pt-pwrite64.c: Likewise.
10020         * pt-read.c: Likewise.
10021         * pt-readv.c: Likewise.
10022         * pt-recv.c: Likewise.
10023         * pt-recvfrom.c: Likewise.
10024         * pt-recvmsg.c: Likewise.
10025         * pt-select.c: Likewise.
10026         * pt-send.c: Likewise.
10027         * pt-sendmsg.c: Likewise.
10028         * pt-sendto.c: Likewise.
10029         * pt-sigpause.c: Likewise.
10030         * pt-sigsuspend.c: Likewise.
10031         * pt-sigtimedwait.c: Likewise.
10032         * pt-sigwait.c: Likewise.
10033         * pt-sigwaitinfo.c: Likewise.
10034         * pt-system.c: Likewise.
10035         * pt-tcdrain.c: Likewise.
10036         * pt-wait.c: Likewise.
10037         * pt-waitid.c: Likewise.
10038         * pt-waitpid.c: Likewise.
10039         * pt-write.c: Likewise.
10040         * pt-writev.c: Likewise.
10041         * pthread_join.c: Likewise.
10042         * pthread_timedjoin.c: Likewise.
10044         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10045         (__xpg_sigpause): New function.
10046         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10048 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10050         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10052         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10053         _GI_pthread_cleanup_pop to pthreadP.h.
10055         * ftrylockfile.c: Use _IO_lock_trylock instead of
10056         pthread_mutex_trylock.
10058         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10059         (CANCEL_RESET): Likewise.
10060         (__pthread_setcanceltype_): Declare.
10061         (__pthread_mutex_lock_internal): Declare.
10062         (__pthread_mutex_unlock_internal): Declare.
10063         (__pthread_once_internal): Declare.
10064         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10065         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10067         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10068         and pthread_mutex_unlock.
10069         * pthread_cond_wait.c: Likewise.
10070         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10071         * pthread_mutex_unlock.c: Likewise.
10073         * pthread_setcanceltype.c: Add additional alias
10074         __pthread_setcanceltype.
10076         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10077         * sem_open.c (sem_open): Likewise.
10078         Use __libc_open, __libc_write, and __libc_close instead of
10079         open, write, and close respectively.
10081         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10082         Rewrite as statement expression since it must return a value.
10084         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10085         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10086         __pthread_kill.
10088         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10089         alias __pthread_once_internal.
10091         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10093 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10095         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10096         * tst-stdio1.c: New file.
10097         * tst-stdio2.c: New file.
10099         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10101         * Makefile (tests): Comment out tst-locale2 for now.
10102         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10104         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10105         -D_IO_MTSAFE_IO.
10106         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10107         Use _IO_lock_init instead of explicit assignment.
10109         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10110         Define __libc_lock_* and __libc_lock_recursive macros with
10111         lowlevellock macros, not pthread mutexes.
10113         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10114         of pthread_mutex_lock.
10115         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10116         instead of pthread_mutex_unlock.
10118 2002-12-06  Roland McGrath  <roland@redhat.com>
10120         * allocatestack.c (__stack_user): Use uninitialized defn.
10121         * init.c (__pthread_initialize_minimal): Initialize it here.
10123 2002-12-05  Roland McGrath  <roland@redhat.com>
10125         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10126         string.
10127         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10129         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10130         missing & here too.
10132 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10134         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10135         lowlevellock.
10136         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10137         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10138         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10139         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10140         for __libc_lock_* macros.
10141         * Makefile (routines): Add libc-lowlevellock.
10143 2002-10-09  Roland McGrath  <roland@redhat.com>
10145         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10146         Under [__PIC__], call the function via the pointer fetched for
10147         comparison rather than a call by name that uses the PLT.
10148         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10149         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10150         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10151         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10152         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10154 2002-12-04  Roland McGrath  <roland@redhat.com>
10156         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10158         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10159         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10161         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10163 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10165         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10166         a completely opaque, non-integer type.
10167         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10169 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10171         * sysdeps/i386/tls.h: Include stdlib.h.
10172         * sysdeps/x86_64/tls.h: Likewise.
10174 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10176         * Makefile (tests): Add tst-locale2.
10177         (tests-static): Likewise.
10178         * tst-locale2.c: New file.
10180         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10181         volatile and add memory clobbers to lock operations.
10183 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10185         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10186         * sysdeps/i386/i486/bits/atomic.h: New file.
10187         * sysdeps/i386/i586/bits/atomic.h: New file.
10188         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10189         include i486 version.
10190         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10191         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10192         Patch by Marijn Ros <marijn@mad.scientist.com>.
10194         * allocatestack.c (get_cached_stack): Don't crash if we first
10195         found a stack with a larger size then needed.
10196         Reported by Hui Huang <hui.huang@sun.com>.
10198         * Makefile (tests): Add tst-sysconf.
10199         * tst-sysconf.c: New file.
10201         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10202         PTHREAD_THREADS_MAX.
10204 2002-12-02  Roland McGrath  <roland@redhat.com>
10206         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10207         Declare using hidden_proto instead of attribute_hidden, so there are
10208         non-.hidden static symbols for gdb to find.
10209         (__pthread_keys): Likewise.
10210         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10211         * allocatestack.c (__stack_user): Likewise.
10212         * pthread_create.c (__pthread_keys): Likewise.
10213         (__nptl_threads_events, __nptl_last_event): Make these static instead
10214         of hidden.
10215         * pthread_key_create.c (__pthread_pthread_keys_max,
10216         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10218 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10220         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10221         statically.
10222         * tst-locale1.c: New file.
10224         * pthread_cond_timedwait.c: Include <stdlib.h>.
10226         * Makefile (tests): Add tst-fork2 and tst-fork3.
10227         * tst-fork2.c: New file.
10228         * tst-fork3.c: New file.
10230 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10232         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10234         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10235         require it to 200112L.
10237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10238         instruction only if HAVE_CMOV is defined.
10239         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10241         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10243         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10245         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10247         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10249 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10251         * sysdeps/x86_64/bits/atomic.h: New file.
10253         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10254         16-bit operations.
10256         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10257         possible since gettid cannot fail.
10259         * sysdeps/x86_64/pthreaddef.h: New file.
10261         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10263         * sysdeps/x86_64/pthread_spin_init.c: New file.
10264         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10265         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10266         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10268         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10269         Add missing lock prefix.  Minute optimization.
10271         * tst-spin2.c (main): Also check successful trylock call.
10273         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10274         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10276         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10277         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10279         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10280         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10281         value in case of an error.  Add support for INTERNAL_SYSCALL.
10283         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10284         value in case of an error.
10286         * sysdeps/x86_64/tls.h: New file.
10288 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10290         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10291         takes the array member name and the index as parameters.
10292         (THREAD_SETMEM_NC): Likewise.
10293         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10294         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10295         interfaces.
10297         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10298         to decide which code to use.
10299         (THREAD_SETMEM_NC): Likewise.
10301         * allocatestack.c (queue_stack): Don't remove stack from list here.
10302         Do it in the caller.  Correct condition to prematurely terminate
10303         loop to free stacks.
10304         (__deallocate_stack): Remove stack from list here.
10306 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10308         * Makefile (tests): Add tst-stack1.
10309         * tst-stack1.c: New file.
10311         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10312         provided stack.
10314         * pthread_attr_getstack.c: Return bottom of the thread area.
10316 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10318         * Makefile (libpthread-routines): Add pt-allocrtsig and
10319         pthread_kill_other_threads.
10320         * pt-allocrtsig.c: New file.
10321         * pthread_kill_other_threads.c: New file.
10322         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10323         all three functions.
10324         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10325         allocrtsig.
10326         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10327         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10328         and __libc_allocate_rtsig_private.
10329         * Versions (libpthread): Export pthread_kill_other_threads_np,
10330         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10332 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10334         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10335         the end of the stack.  Adjust computations.
10336         When mprotect call fails dequeue stack and free it.
10337         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10338         attribute.
10339         * pthread_getattr_np.c: Likewise.
10341         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10342         surprises.
10344 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10346         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10347         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10349 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10351         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10352         * pthread_setspecific.c: Likewise.
10354 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10356         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10357         definitions.  Get them from the official place.
10358         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10360         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10361         Use new CLONE_ flags in clone() calls.
10363         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10364         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10366         * Versions: Add pthread_* functions for libc.
10367         * forward.c: New file.
10369         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10370         errno-loc.
10371         * herrno.c: New file.
10372         * res.c: New file.
10374         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10375         sem_trywait, and sem_timedwait.  Add herrno and res.
10376         * sem_init.c: Don't initialize lock and waiters members.
10377         * sem_open.c: Likewise.
10378         * sem_post.c: Removed.
10379         * sem_wait.c: Removed.
10380         * sem_trywait.c: Removed.
10381         * sem_timedwait.c: Removed.
10382         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10383         Includes full implementations of sem_post, sem_wait, sem_trywait,
10384         and sem_timedwait.
10385         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10386         for new implementation.
10387         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10388         and waiters fields.
10390         * tst-sem3.c: Improve error message.
10391         * tst-signal3.c: Likewise.
10393         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10394         to tell the kernel about the termination futex and to initialize tid
10395         member.  Don't initialize main_thread.
10396         * descr.h (struct pthread): Remove main_thread member.
10397         * cancelllation.c (__do_cancel): Remove code handling main thread.
10398         The main thread is not special anymore.
10400         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10401         size of the stacks to stack_cache_actsize.
10403         * pt-readv.c: Add missing "defined".
10404         * pt-sigwait.c: Likewise.
10405         * pt-writev.c: Likewise.
10407 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10409         * Versions: Export __connect from libpthread.
10410         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10412         * Makefile (libpthread-routines): Add pt-raise.
10413         * sysdeps/unix/sysv/linux/raise.c: New file.
10414         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10415         * sysdeps/generic/pt-raise.c: New file.
10417         * pthread_cond_init.c: Initialize all data elements of the condvar
10418         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10420         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10421         * pthread_create.c: Likewise.
10423         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10424         * tst-key1.c: New file.
10425         * tst-key2.c: New file.
10426         * tst-key3.c: New file.
10428         * Versions: Export pthread_detach for version GLIBC_2.0.
10429         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10431 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10433         * pthread_key_create.c: Terminate search after an unused key was found.
10434         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10436         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10437         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10439 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10441         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10442         dynamic lookup for errno in PIC.
10444         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10445         release the stack lock as soon as possible.
10446         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10447         the static TLS block.
10448         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10450         * cancellation.c: Renamed from cancelation.c.
10451         * Makefile: Adjust accordingly.
10452         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10453         * cleanup_defer.c: Use CANCELLATION_P.
10454         * pthread_testcancel.c: Likewise.
10455         * descr.h: Fix spelling in comments.
10456         * init.c: Likewise.
10457         * pthread_getattr_np.c: Likewise.
10458         * pthread_getschedparam.c: Likewise.
10459         * pthread_setschedparam.c: Likewise.
10460         * Versions: Likewise.
10462         * pt-pselect.c: New file.
10463         * Makefile (libpthread-routines): Add pt-pselect.
10464         * Versions: Add pselect.
10466         * tst-cancel4.c: New file.
10467         * Makefile (tests): Add tst-cancel4.
10469 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10471         * pthread_mutex_lock.c: Always record lock ownership.
10472         * pthread_mutex_timedlock.c: Likewise.
10473         * pthread_mutex_trylock.c: Likewise.
10475         * pt-readv.c: New file.
10476         * pt-writev.c: New file.
10477         * pt-creat.c: New file.
10478         * pt-msgrcv.c: New file.
10479         * pt-msgsnd.c: New file.
10480         * pt-poll.c: New file.
10481         * pt-select.c: New file.
10482         * pt-sigpause.c: New file.
10483         * pt-sigsuspend.c: New file.
10484         * pt-sigwait.c: New file.
10485         * pt-sigwaitinfo.c: New file.
10486         * pt-waitid.c: New file.
10487         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10488         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10489         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10490         * Versions: Add all the new functions.
10492         * tst-exit1.c: New file.
10493         * Makefile (tests): Add tst-exit1.
10495         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10497 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10499         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10501         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10502         call.  pthread_join is an official cancellation point.
10503         * pthread_timedjoin.c: Likewise.
10505         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10506         and the condvar's mutex are retrieved.
10507         * pthread_cond_timedwait.c: Likewise.
10508         Reported by dice@saros.East.Sun.COM.
10510 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10512         * pthreadP.h: Cut out all type definitions and move them...
10513         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10514         * pthreadP.h: Include <internaltypes.h>.
10516         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10517         performance tweaks.
10519         * sem_trywait.c: Shuffle #includes around to get right order.
10520         * sem_timedwait.c: Likewise.
10521         * sem_post.c: Likewise.
10522         * sem_wait.c: Likewise.
10524         * nptl 0.3 released.
10526         * Makefile (tests): Add tst-signal3.
10527         * tst-signal3.c: New file.
10529 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10531         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10532         the asms modify the sem object.
10533         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10535         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10536         the actual members.
10537         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10538         * semaphoreP.h: Include pthreadP.h.
10539         * sem_getvalue.c: Adjust to sem_t change.
10540         * sem_init.c: Likewise.
10541         * sem_open.c: Likewise.
10542         * sem_post.c: Likewise.
10543         * sem_timedwait.c: Likewise.
10544         * sem_trywait.c: Likewise.
10545         * sem_wait.c: Likewise.
10547 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10549         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10550         * tst-basic2.c: New file.
10551         * tst-exec1.c: New file.
10552         * tst-exec2.c: New file.
10553         * tst-exec3.c: New file.
10555         * tst-fork1.c: Remove extra */.
10557         * nptl 0.2 released.  The API for IA-32 is complete.