[BZ #6843]
[glibc.git] / nptl / ChangeLog
blobdf01334d15fe66ff9811d5734bc83c8d0097d75e
1 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
3         [BZ #6843]
4         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
5         Increase stack size for helper thread.
7 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
10         assembly with a clobber list for access registers a0 and a1.
12 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
14         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
15         to force runp->refcntr to be read from memory.
17 2008-09-08  Richard Guenther  <rguenther@suse.de>
19         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
20         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
21         lll_timedlock, lll_robust_timedlock, lll_unlock,
22         lll_robust_unlock): Promote private to int.
24 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
26         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
27         ARCH_RETRY_MMAP definitions.
28         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
29         Define MAP_STACK when not defined.
30         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
31         handling of ARCH_RETRY_MMAP.
33 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
35         * tst-align2.c (f): Print message that f is reached.
37 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
39         [BZ #6740]
40         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
41         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
43 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
45         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
46         SOCK_CLOEXEC if possible.
48 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
50         * Makefile (tests): Add tst-rwlock2a.
51         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
52         * tst-rwlock2a.c: New file.
54 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
56         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
58 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
60         * sysdeps/pthread/pthread.h: Fix typo in comment.
62 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
64         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
65         of CPU set to the kernel.
67 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
69         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
70         cfi directives.
71         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
72         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
73         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
74         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
75         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
76         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
78 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
80         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
81         cfi directives.
82         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
83         Likewise.
84         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
85         Likewise.
86         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
87         Likewise.
89 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
91         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
93 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
95         David S. Miller  <davem@davemloft.net>
97         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
99 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
102         __pshared correctly.
103         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
104         Likewise.
105         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
106         Likewise.
107         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
108         Likewise.
109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
110         Likewise.
111         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
113 2008-04-14  David S. Miller  <davem@davemloft.net>
115         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
116         (__old_sem_wait): Fix argument to lll_futex_wait().
118 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
120         * pthread_create.c: Require pthread_mutex_trylock and
121         pthread_key_delete for libgcc.
123 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
125         [BZ #6020]
126         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
127         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
128         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
130 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
132         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
133         <linux/limits.h> has defined it.
134         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
135         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
136         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
137         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
139 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
141         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
142         of ASSEMBLER.
143         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
144         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
146 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
148         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
149         HAVE_DL_DISCOVER_OSVERSION.
150         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
151         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
153 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
155         [BZ #5778]
156         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
157         _POSIX_CHOWN_RESTRICTED value to zero.
159 2008-01-31  Roland McGrath  <roland@redhat.com>
161         * Makefile (omit-deps): Variable removed.
163 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
165         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
166         unnecessary addr32 prefix.
168 2008-01-29  Roland McGrath  <roland@redhat.com>
170         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
172 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
174         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
176 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
178         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
179         a scratch register.
180         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
181         (__lll_lock_wait_private): Fix typo.
182         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
183         (pthread_barrier_wait): Likewise.  Adjust XADD use.
184         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
185         Adjust XADD use.
186         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
187         (pthread_rwlock_timedrdlock): Return correct return value.
188         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
189         (pthread_rwlock_timedwrlock): Likewise.
191 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
193         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
194         thread returns the program exits with an error code.
196 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
198         * pthread-errnos.sym: Add EOVERFLOW.
199         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
200         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
201         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
202         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
204 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
206         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
207         parameter.  Passed it as permission to mmap.
208         * allocatestack.c (allocate_stack): Pass prot as second parameter
209         to ARCH_RETRY_MMAP.
211 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
213         * tst-basic7.c: Allocate memory for the stack.
215         [BZ #5465]
216         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
217         (__pthread_cond_timedwait): Don't use VDSO.
218         Patch by Michal Januszewski.
220 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
222         [BZ #5455]
223         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
224         Allow label before pthread_cleanup_pop.
225         (pthread_cleanup_pop_restore_np): Likewise.
227 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
229         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
230         Store 2 before returning ETIMEDOUT.
232 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
234         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
235         Store 2 before returning ETIMEDOUT.
236         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
237         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
238         (__lll_lock_wait_private): Optimize.
239         (__lll_lock_wait): Likewise.
241 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
243         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
244         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
245         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
247 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
249         [BZ #5240]
250         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
251         If we time out, try one last time to lock the futex to avoid
252         losing a wakeup signal.
253         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
254         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
256         [BZ #5245]
257         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
258         if necessary.
260 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
262         [BZ #5245]
263         * allocatestack.c (allocate_stack): Change ENOMEM error in case
264         mmap failed to EAGAIN.
265         * Makefile (tests): Add tst-basic7.
266         * tst-basic7.c: New file.
268 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
270         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
271         Use __linkin_atfork.
273 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
275         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
276         missing line continuations.
277         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
278         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
280 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
282         [BZ #5220]
283         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
284         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
285         (struct timer): Add next element.
286         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
287         enqueue timer structure into __active_timer_sigev_thread list.
288         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
289         remove timer struct from __active_timer_sigev_thread.
290         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
291         Before using timer structure make sure it is still on the
292         __active_timer_sigev_thread list.  Keep lock until done.
293         Define __active_timer_sigev_thread and
294         __active_timer_sigev_thread_lock.
296 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
298         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
299         Redefine thread_atfork for use of ATFORK_MEM.
300         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
301         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
302         function.
303         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
304         Use atomic operation when removing first element of list.
306 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
308         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
309         routine instead of an alias to __new_sem_post.
311 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
313         * init.c (__pthread_initialize_minimal): Initialize word to appease
314         valgrind.
316 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
318         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
319         libc.so just clear NAME.
320         (__libc_rwlock_fini): Nop inside of libc.so.
321         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
322         all zeros.
324 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
326         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
327         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
328         unlocking failed.
329         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
331 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
333         [BZ #4938]
334         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
335         reclaimed stack if necessary.
336         * Makefile (tests): Add tst-tsd6.
337         * tst-tsd6.c: New file.
339 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
341         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
342         Add private argument.
344 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
346         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
347         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
349 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
351         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
352         (__lll_robust_timedlock): Pass private as last argument to
353         __lll_robust_timedlock_wait.
354         (__lll_unlock): Fix a pasto.
356 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
358         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
359         sparc_old_sem): New structs.
360         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
361         (__sem_wait_cleanup): New function.
362         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
363         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
364         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
365         lll_futex_wait.
366         (__old_sem_wait): New function.
367         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
368         nptl/sysdeps/unix/sysv/linux/sparc version.
369         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
370         Likewise.
371         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
372         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
373         (__new_sem_trywait): Use sparc_old_sem structure.
374         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
375         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
376         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
377         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
378         lll_futex_timed_wait.
379         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
380         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
381         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
382         lll_futex_wake.
383         (__old_sem_post): New function.
384         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
385         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
386         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
387         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
388         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
389         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
391 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
393         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
394         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
395         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
396         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
397         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
398         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
399         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
400         Use FUTEX_WAKE_OP.
401         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
402         kernel-features.h and tcb-offsets.h.
403         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
404         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
405         process private.
406         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
407         tcb-offsets.h.
408         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
409         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
410         process private.
411         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
412         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
413         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
414         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
415         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
416         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
419 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
421         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
422         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
423         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
424         lll_futex_timed_wait.
426         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
427         __lll_robust_unlock): Rewrite as macros instead of inline functions.
428         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
429         __lll_robust_unlock, __lll_wait_tid): Likewise.
431 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
433         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
434         Fix a pasto.
435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
436         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
437         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
438         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
440         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
441         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
443         kernel-features.h.
444         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
445         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
446         process private.  Switch DW_CFA_advance_loc1 and some
447         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
449         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
450         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
451         process private.  Switch DW_CFA_advance_loc{1,2} and some
452         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
453         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
454         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
455         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
456         Likewise.
457         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
458         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
459         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
460         Likewise.
461         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
462         (__pthread_cond_broadcast): Compare %r8 instead of
463         dep_mutex-cond_*(%rdi) with $-1.
464         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
465         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
466         of oring.
468 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
470         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
472 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
474         * allocatestack.c: Include kernel-features.h.
475         * pthread_create.c: Likewise.
476         * pthread_mutex_init.c: Likewise.
477         * init.c: Likewise.
478         * pthread_cond_timedwait.c: Likewise.
479         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
480         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
481         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
482         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
483         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
484         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
486         Likewise.
487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
488         Likewise.
489         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
490         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
491         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
492         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
494 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
496         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
497         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
498         byte elements.  One of them is the new __shared element.
499         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
500         adjust names of other padding elements.
501         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
502         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
503         byte elements.  One of them is the new __shared element.
504         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
505         adjust names of other padding elements.
506         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
507         Renamed __pad1 element to __shared, adjust names of other padding
508         elements.
509         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
510         (pthread_rwlock_t): Likewise.
511         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
512         typo.
514 2007-08-09  Anton Blanchard  <anton@samba.org>
516         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
518 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
521         <kernel-features.h>.
522         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
524 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
526         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
527         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
528         dealing with robust mutexes.
529         * pthread_mutex_timedlock.c: Likewise.
530         * pthread_mutex_trylock.c: Likewise.
531         * pthread_mutex_unlock.c: Likewise.
532         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
534 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
536         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
537         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
538         (PTHREAD_MUTEX_PSHARED): Define.
539         * pthread_mutex_init.c (__pthread_mutex_init): Set
540         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
541         mutexes.
542         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
543         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
544         as second argument to lll_lock.
545         (LLL_MUTEX_TRYLOCK): Take mutex as argument
546         instead of its __data.__lock field.
547         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
548         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
549         to lll_robust_lock.
550         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
551         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
552         instead of mutex->__data.__kind directly, pass
553         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
554         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
555         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
556         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
557         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
558         to lll_timedlock, lll_robust_timedlock, lll_unlock and
559         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
560         of mutex->__data.__kind directly.
561         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
562         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
563         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
564         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
565         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
566         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
567         and lll_futex_wake.
568         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
569         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
570         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
571         directly.
572         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
573         Take mutex as argument instead of its __data.__lock field, pass
574         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
575         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
576         __data.__lock field.
577         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
578         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
579         to lll_robust_cond_lock.
580         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
581         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
582         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
583         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
584         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
585         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
586         lll_futex_wait.
587         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
588         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
589         lll_futex_wake.
590         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
591         pshared variable, pass it to lll_lock, lll_unlock,
592         lll_futex_timedwait and lll_futex_wake.
593         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
594         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
595         and lll_futex_wake.
596         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
597         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
598         macro.
599         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
600         lll_futex_wake_unlock): Likewise.
601         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
602         Likewise.
603         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
604         lll_futex_wake_unlock): Likewise.
605         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
606         Likewise.
607         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
608         lll_futex_wake_unlock): Likewise.
609         (lll_futex_wake): Fix a typo.
610         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
612         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
613         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
614         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
615         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
616         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
617         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
618         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
619         (__pthread_cond_timedwait): Likewise.
620         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
621         (__condvar_cleanup, __pthread_cond_wait): Likewise.
623 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
625         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
626         Don't use CGOTSETUP and CGOTRESTORE macros.
627         (CGOTSETUP, CGOTRESTORE): Remove.
628         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
629         @local symbol.
631 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
633         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
634         definitions for private futexes.
635         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
636         kernel-features.h and lowlevellock.h.  Use private futexes if
637         they are available.
638         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
639         (__lll_mutex_lock_wait): Rename to
640         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
641         (__lll_mutex_timedlock_wait): Rename to ...
642         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
643         Don't compile in for libc.so.
644         (__lll_mutex_unlock_wake): Rename to ...
645         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
646         (__lll_timedwait_tid): Use __NR_gettimeofday.
647         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
648         the header from assembler.  Renamed all lll_mutex_* resp.
649         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
650         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
651         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
652         Define.
653         (__lll_lock_wait_private): Add prototype.
654         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
655         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
656         __lll_unlock_wake): Likewise.
657         (lll_lock): Add private argument.  Call __lll_lock_wait_private
658         if private is constant LLL_PRIVATE.
659         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
660         lll_timedlock, lll_robust_timedlock): Add private argument.
661         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
662         if private is constant LLL_PRIVATE.
663         (lll_robust_unlock, lll_robust_dead): Add private argument.
664         (lll_lock_t): Remove.
665         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
666         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
667         lll_cond_wake, lll_cond_broadcast): Remove.
668         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
669         kernel-features.h and lowlevellock.h.
670         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
671         (LOAD_FUTEX_WAIT): Define.
672         (__lll_robust_mutex_lock_wait): Rename to ...
673         (__lll_robust_lock_wait): ... this.  Add private argument.
674         Use LOAD_FUTEX_WAIT macro.
675         (__lll_robust_mutex_timedlock_wait): Rename to ...
676         (__lll_robust_timedlock_wait): ... this.    Add private argument.
677         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
678         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
679         lowlevellock.h.
680         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
681         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
682         __lll_mutex_{lock,unlock}_*.
683         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
684         lowlevellock.h and pthread-errnos.h.
685         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
686         FUTEX_CMP_REQUEUE, EINVAL): Remove.
687         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
688         __lll_mutex_{lock,unlock}_*.
689         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
690         lowlevellock.h and pthread-errnos.h.
691         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
692         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
693         __lll_mutex_{lock,unlock}_*.
694         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
695         lowlevellock.h.
696         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
697         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
698         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
699         (__condvar_tw_cleanup): Likewise.
700         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
701         lowlevellock.h.
702         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
703         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
704         __lll_mutex_{lock,unlock}_*.
705         ( __condvar_w_cleanup): Likewise.
706         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
707         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
708         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
709         lowlevellock.h.
710         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
711         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
712         __lll_mutex_{lock,unlock}_*.
713         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
714         lowlevellock.h.
715         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
716         FUTEX_PRIVATE_FLAG): Remove.
717         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
718         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
719         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
720         lowlevellock.h.
721         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
722         FUTEX_PRIVATE_FLAG): Remove.
723         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
724         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
725         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
726         lowlevellock.h.
727         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
728         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
729         __lll_mutex_{lock,unlock}_*.
730         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
731         lowlevellock.h.
732         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
733         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
734         __lll_mutex_{lock,unlock}_*.
735         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
736         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
737         (__new_sem_post): Use standard initial exec code sequences.
738         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
739         lowlevellock.h.
740         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
741         FUTEX_PRIVATE_FLAG): Remove.
742         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
743         exec code sequences.
744         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
745         (__new_sem_trywait): Use standard initial exec code sequences.
746         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
747         (__new_sem_wait): Use standard initial exec code sequences.
749 2007-07-31  Anton Blanchard  <anton@samba.org>
751         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
752         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
753         atomic_full_barrier.
755 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
757         * allocatestack.c (stack_cache_lock): Change type to int.
758         (get_cached_stack, allocate_stack, __deallocate_stack,
759         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
760         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
761         as second argument to lll_lock and lll_unlock macros on
762         stack_cache_lock.
763         * pthread_create.c (__find_in_stack_list): Likewise.
764         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
765         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
766         as second argument.
767         * descr.h (struct pthread): Change lock and setxid_futex field
768         type to int.
769         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
770         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
771         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
772         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
773         Likewise.
774         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
775         * pthread_cond_init.c (__pthread_cond_init): Likewise.
776         * pthreadP.h (__attr_list_lock): Change type to int.
777         * pthread_attr_init.c (__attr_list_lock): Likewise.
778         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
779         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
780         lll_{,un}lock.
781         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
782         also for lll_futex_{wake,wait}.
783         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
784         a pointer to const.
785         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
786         LLL_SHARED as second argument to lll_{,un}lock.
787         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
788         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
789         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
790         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
791         Likewise.
792         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
793         as second argument to lll_{,un}lock macros on pd->lock.
794         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
795         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
796         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
797         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
798         Likewise.
799         * sysdeps/pthread/createthread.c (do_clone, create_thread):
800         Likewise.
801         * pthread_once.c (once_lock): Change type to int.
802         (__pthread_once): Pass LLL_PRIVATE as second argument to
803         lll_{,un}lock macros on once_lock.
804         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
805         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
806         rwlock->__data.__shared as second argument to them and similarly
807         for lll_futex_w*.
808         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
809         Likewise.
810         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
811         Likewise.
812         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
813         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
814         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
815         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
816         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
817         to lll_{,un}lock macros on __sem_mappings_lock.
818         * sem_open.c (check_add_mapping): Likewise.
819         (__sem_mappings_lock): Change type to int.
820         * semaphoreP.h (__sem_mappings_lock): Likewise.
821         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
822         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
823         instead of lll_*mutex_*, pass LLL_SHARED as last
824         argument.
825         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
826         pass LLL_SHARED as last argument.
827         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
828         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
829         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
830         pass LLL_SHARED as last argument.
831         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
832         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
833         LLL_SHARED as last argument.
834         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
835         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
836         Similarly.
837         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
838         __libc_lock_lock_recursive, __libc_lock_unlock,
839         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
840         argument to lll_{,un}lock.
841         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
842         _IO_lock_unlock): Likewise.
843         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
844         compound literal.
845         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
846         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
847         __fork_lock.
848         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
849         free_mem): Likewise.
850         (__fork_lock): Change type to int.
851         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
852         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
853         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
854         lll_futex_wake.
855         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
856         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
857         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
858         New function.
859         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
860         pass it through to lll_futex_*wait, only compile in when
861         IS_IN_libpthread.
862         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
863         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
864         argument and pass it through to lll_futex_*wait.
865         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
866         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
867         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
868         inline functions to __lll_* resp. __lll_robust_*.
869         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
870         (lll_mutex_dead): Add private argument.
871         (__lll_lock_wait_private): New prototype.
872         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
873         __lll_robust_lock_timedwait): Add private argument to prototypes.
874         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
875         call __lll_lock_wait_private, otherwise pass private to
876         __lll_lock_wait.
877         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
878         __lll_robust_timedlock): Add private argument, pass it to
879         __lll_*wait functions.
880         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
881         call __lll_unlock_wake_private, otherwise pass private to
882         __lll_unlock_wake.
883         (__lll_robust_unlock): Add private argument, pass it to
884         __lll_robust_unlock_wake.
885         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
886         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
887         argument, pass it through to __lll_* inline function.
888         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
889         (lll_lock_t): Remove.
890         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
891         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
892         lll_cond_wake, lll_cond_broadcast): Remove.
893         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
894         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
895         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
896         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
897         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
898         the header from assembler.  Renamed all lll_mutex_* resp.
899         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
900         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
901         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
902         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
903         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
904         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
905         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
906         Remove prototype.
907         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
908         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
909         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
910         (lll_trylock): Likewise, use __lll_trylock_asm, pass
911         MULTIPLE_THREADS_OFFSET as another asm operand.
912         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
913         MULTIPLE_THREADS_OFFSET as last asm operand, call
914         __lll_lock_wait_private if private is constant LLL_PRIVATE,
915         otherwise pass private as another argument to __lll_lock_wait.
916         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
917         lll_timedlock, lll_robust_timedlock): Add private argument, pass
918         private as another argument to __lll_*lock_wait call.
919         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
920         MULTIPLE_THREADS_OFFSET as another asm operand, call
921         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
922         otherwise pass private as another argument to __lll_unlock_wake.
923         (lll_robust_unlock): Add private argument, pass private as another
924         argument to __lll_unlock_wake.
925         (lll_robust_dead): Add private argument, use __lll_private_flag
926         macro.
927         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
928         LLL_MUTEX_LOCK_INITIALIZER.
929         (lll_lock_t): Remove.
930         (LLL_LOCK_INITIALIZER_WAITERS): Define.
931         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
932         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
933         lll_cond_wake, lll_cond_broadcast): Remove.
934         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
935         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
936         2007-05-2{3,9} changes.
937         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
938         kernel-features.h and lowlevellock.h.
939         (LOAD_PRIVATE_FUTEX_WAIT): Define.
940         (LOAD_FUTEX_WAIT): Rewritten.
941         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
942         define.
943         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
944         (__lll_mutex_lock_wait): Rename to ...
945         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
946         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
947         (__lll_mutex_timedlock_wait): Rename to ...
948         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
949         contains private argument.  Don't compile in for libc.so.
950         (__lll_mutex_unlock_wake): Rename to ...
951         (__lll_unlock_wake): ... this.  %ecx contains private argument.
952         Don't compile in for libc.so.
953         (__lll_timedwait_tid): Use __NR_gettimeofday.
954         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
955         kernel-features.h and lowlevellock.h.
956         (LOAD_FUTEX_WAIT): Define.
957         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
958         define.
959         (__lll_robust_mutex_lock_wait): Rename to ...
960         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
961         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
962         macro.
963         (__lll_robust_mutex_timedlock_wait): Rename to ...
964         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
965         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
966         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
967         lowlevellock.h.
968         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
969         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
970         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
971         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
972         to __lll_lock_wait in %edx.
973         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
974         Include lowlevellock.h and pthread-errnos.h.
975         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
976         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
977         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
978         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
979         pass LLL_SHARED in %ecx to both __lll_lock_wait and
980         __lll_unlock_wake.
981         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
982         Include lowlevellock.h and pthread-errnos.h.
983         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
984         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
985         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
986         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
987         pass LLL_SHARED in %ecx to both __lll_lock_wait and
988         __lll_unlock_wake.
989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
990         Include lowlevellock.h.
991         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
992         Don't define.
993         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
994         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
995         pass LLL_SHARED in %ecx to both __lll_lock_wait and
996         __lll_unlock_wake.  Use __NR_gettimeofday.
997         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
998         Include lowlevellock.h.
999         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1000         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1001         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1002         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1003         and __lll_unlock_wake.
1004         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1005         Include lowlevellock.h.
1006         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1007         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1008         MUTEX(%ebx) address in %edx rather than %ecx to
1009         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1010         and __lll_unlock_wake.  Move return value from %ecx to %edx
1011         register.
1012         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1013         Include lowlevellock.h.
1014         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1015         Don't define.
1016         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1017         MUTEX(%ebp) address in %edx rather than %ecx to
1018         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1019         and __lll_unlock_wake.  Move return value from %ecx to %edx
1020         register.  Use __NR_gettimeofday.
1021         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1022         Include lowlevellock.h.
1023         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1024         Don't define.
1025         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1026         MUTEX(%ebp) address in %edx rather than %ecx to
1027         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1028         and __lll_unlock_wake.  Move return value from %ecx to %edx
1029         register.  Use __NR_gettimeofday.
1030         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1031         Include lowlevellock.h.
1032         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1033         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1034         MUTEX(%edi) address in %edx rather than %ecx to
1035         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1036         and __lll_unlock_wake.
1037         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1038         Include lowlevellock.h.
1039         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1040         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1041         MUTEX(%ebx) address in %edx rather than %ecx to
1042         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1043         and __lll_unlock_wake.  Move return value from %ecx to %edx
1044         register.
1045         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1046         lowlevellock.h.
1047         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1048         define.
1049         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1050         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1051         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1052         lowlevellock.h.
1053         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1054         (sem_timedwait): Use __NR_gettimeofday.
1055         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1056         lowlevellock.h.
1057         (LOCK): Don't define.
1058         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1059         lowlevellock.h.
1060         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1061         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1062         are waiters.
1063         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1064         2007-05-2{3,9} changes.
1065         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1066         kernel-features.h and lowlevellock.h.
1067         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1068         (LOAD_FUTEX_WAIT): Rewritten.
1069         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1070         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1071         (__lll_mutex_lock_wait): Rename to ...
1072         (__lll_lock_wait): ... this.  %esi is now private argument.
1073         Don't compile in for libc.so.
1074         (__lll_mutex_timedlock_wait): Rename to ...
1075         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1076         Don't compile in for libc.so.
1077         (__lll_mutex_unlock_wake): Rename to ...
1078         (__lll_unlock_wake): ... this.  %esi contains private argument.
1079         Don't compile in for libc.so.
1080         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1081         kernel-features.h and lowlevellock.h.
1082         (LOAD_FUTEX_WAIT): Define.
1083         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1084         (__lll_robust_mutex_lock_wait): Rename to ...
1085         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1086         Use LOAD_FUTEX_WAIT macro.
1087         (__lll_robust_mutex_timedlock_wait): Rename to ...
1088         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1089         private, use LOAD_FUTEX_WAIT macro.
1090         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1091         lowlevellock.h.
1092         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1093         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1094         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1095         __lll_lock_wait and __lll_unlock_wake.
1096         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1097         Include lowlevellock.h and pthread-errnos.h.
1098         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1099         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1100         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1101         pass LLL_SHARED in %esi to both __lll_lock_wait and
1102         __lll_unlock_wake.
1103         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1104         Include lowlevellock.h and pthread-errnos.h.
1105         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1106         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1107         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1108         pass LLL_SHARED in %esi to both __lll_lock_wait and
1109         __lll_unlock_wake.
1110         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1111         Include lowlevellock.h.
1112         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1113         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1114         pass LLL_SHARED in %esi to both __lll_lock_wait and
1115         __lll_unlock_wake.
1116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1117         Include lowlevellock.h.
1118         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1119         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1120         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1121         and __lll_unlock_wake.
1122         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1123         Include lowlevellock.h.
1124         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1125         Don't define.
1126         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1127         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1128         and __lll_unlock_wake.
1129         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1130         Include lowlevellock.h.
1131         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1132         Don't define.
1133         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1134         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1135         and __lll_unlock_wake.
1136         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1137         Include lowlevellock.h.
1138         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1139         Don't define.
1140         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1141         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1142         and __lll_unlock_wake.
1143         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1144         Include lowlevellock.h.
1145         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1146         Don't define.
1147         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1148         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1149         and __lll_unlock_wake.
1150         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1151         Include lowlevellock.h.
1152         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1153         Don't define.
1154         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1155         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1156         and __lll_unlock_wake.
1157         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1158         lowlevellock.h.
1159         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1160         define.
1161         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1162         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1163         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1164         lowlevellock.h.
1165         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1166         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1167         lowlevellock.h.
1168         (LOCK): Don't define.
1169         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1170         lowlevellock.h.
1171         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1172         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1173         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1174         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1175         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1176         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1177         (__lll_lock_wait_private): New function.
1178         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1179         it to lll_futex_*wait.  Don't compile in for libc.so.
1180         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1181         Remove.
1182         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1183         (struct sparc_pthread_barrier): Remove.
1184         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1185         struct sparc_pthread_barrier.  Pass
1186         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1187         and lll_futex_wait macros.
1188         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1189         Remove.
1190         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1191         Include sparc pthread_barrier_wait.c instead of generic one.
1193 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1195         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1197         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1198         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1199         %ecx.
1200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1201         (pthread_rwlock_timedwrlock): Likewise.
1202         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1203         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1205 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1207         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1209 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1211         * tst-locale2.c (useless): Add return statement.
1213 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1215         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1216         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1217         * pthread_create.c (start_thread): Likewise.
1218         * init.c (sighandler_setxid): Likewise.
1219         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1220         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1221         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1222         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1223         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1224         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1225         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1226         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1227         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1228         Likewise.
1229         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1230         Likewise.
1231         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1232         Likewise.
1233         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1234         __rtld_notify): Likewise.
1235         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1236         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1237         __pthread_once): Likewise.
1238         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1239         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1240         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1241         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1242         (lll_futex_wait): Add private argument, define as wrapper around
1243         lll_futex_timed_wait.
1244         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1245         use __lll_private_flag macro.
1246         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1247         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1248         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1249         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1250         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1251         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1252         (lll_futex_wait): Add private argument, define as wrapper around
1253         lll_futex_timed_wait.
1254         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1255         use __lll_private_flag macro.
1256         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1257         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1258         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1259         Define.
1260         (lll_futex_timed_wait, lll_futex_wake): Use it.
1261         (lll_private_futex_wait, lll_private_futex_timed_wait,
1262         lll_private_futex_wake): Removed.
1263         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1264         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1265         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1266         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1267         (lll_futex_wait): Add private argument, define as wrapper around
1268         lll_futex_timed_wait.
1269         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1270         use __lll_private_flag macro.
1271         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1272         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1273         to lll_futex_*.
1274         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1275         (lll_private_futex_wait, lll_private_futex_timed_wait,
1276         lll_private_futex_wake): Removed.
1277         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1278         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1279         (lll_private_futex_wait, lll_private_futex_timed_wait,
1280         lll_private_futex_wake): Removed.
1281         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1282         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1283         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1284         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1285         (lll_futex_wait): Add private argument, define as wrapper around
1286         lll_futex_timed_wait.
1287         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1288         use __lll_private_flag macro.
1289         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1290         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1291         to lll_futex_*.
1292         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1293         Define.
1294         (lll_futex_timed_wait, lll_futex_wake): Use it.
1295         (lll_private_futex_wait, lll_private_futex_timed_wait,
1296         lll_private_futex_wake): Removed.
1298 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1300         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1301         of the structure for sparc32.
1303 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1305         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1307 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1309         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1310         code used when private futexes are assumed.
1311         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1312         Likewise.
1314 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1316         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1317         (__lll_private_flag): Define.
1318         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1319         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1320         __lll_private_flag.
1321         (lll_private_futex_wait, lll_private_futex_timedwait,
1322         lll_private_futex_wake): Define as wrapper around non-_private
1323         macros.
1324         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1325         (__lll_private_flag): Define.
1326         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1327         (lll_private_futex_wait, lll_private_futex_timedwait,
1328         lll_private_futex_wake): Define as wrapper around non-_private
1329         macros.
1331 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1333         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1334         parameter to lll_futex_wait call.
1335         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1337         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1338         Replace lll_futex_wait with lll_private_futex_wait.
1339         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1340         Add LLL_SHARED parameter to lll_futex_wake().
1342         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1343         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1344         lll_private_futex_wake.
1345         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1346         bit from private parm before syscall.
1347         (lll_futex_timed_wait): Likewise.
1348         (lll_futex_wake): Likewise.
1349         (lll_futex_wake_unlock): Likewise.
1350         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1351         (lll_robust_mutex_unlock): Likewise.
1352         (lll_mutex_unlock_force): Likewise.
1353         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1355 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1357         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1358         compilation when unconditionally using private futexes.
1359         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1360         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1361         Likewise.
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1363         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1365 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1367         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1368         Define.
1370 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1372         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1373         kernel-features.h.
1375 2007-05-16  Roland McGrath  <roland@redhat.com>
1377         * init.c (__nptl_initial_report_events): New variable.
1378         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1379         to that.
1381 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1383         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1384         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1386 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1388         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1389         implementation.
1391 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1393         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1394         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1395         * pthread_mutex_timedlock.c: Likewise.
1396         * pthread_mutex_trylock.c: Likewise.
1397         * pthread_mutex_unlock.c: Likewise.
1399 2007-06-17  Andreas Schwab  <schwab@suse.de>
1401         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1402         sections.
1404 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1406         * allocatestack.c (allocate_stack): Make code compile if
1407         __ASSUME_PRIVATE_FUTEX is set.
1409 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1411         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1412         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1413         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1414         (__pthread_rwlock_wrlock): Likewise.
1415         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1416         (pthread_rwlock_timedrdlock): Likewise.
1417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1418         (pthread_rwlock_timedwrlock): Likewise.
1419         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1420         (__pthread_rwlock_unlock): Likewise.
1422 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1424         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1425         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1426         Split __flags into __flags, __shared, __pad1 and __pad2.
1427         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1428         futexes if they are available.
1429         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1430         in libc-lowlevellock.S allow using private futexes.
1431         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1432         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1433         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1434         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1435         lll_private_futex_timed_wait and lll_private_futex_wake.
1436         (lll_robust_mutex_unlock): Fix typo.
1437         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1438         field in futex command setup.
1439         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1440         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1441         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1442         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1443         if they are available.  Remove clear_once_control.
1444         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1445         futexes if they are available.
1446         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1447         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1448         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1449         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1450         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1451         Wake only when there are waiters.
1452         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1453         support.  Indicate that there are waiters.  Remove unnecessary
1454         extra cancellation test.
1455         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1456         left-over duplication of __sem_wait_cleanup.
1458 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1460         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1461         parameter to lll_futex_wait, lll_futex_timed_wait, and
1462         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1463         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1464         lll_private_futex_wake.
1465         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1466         * allocatestack.c: Adjust use of lll_futex_* macros.
1467         * init.c: Likewise.
1468         * lowlevellock.h: Likewise.
1469         * pthread_barrier_wait.c: Likewise.
1470         * pthread_cond_broadcast.c: Likewise.
1471         * pthread_cond_destroy.c: Likewise.
1472         * pthread_cond_signal.c: Likewise.
1473         * pthread_cond_timedwait.c: Likewise.
1474         * pthread_cond_wait.c: Likewise.
1475         * pthread_create.c: Likewise.
1476         * pthread_mutex_lock.c: Likewise.
1477         * pthread_mutex_setprioceiling.c: Likewise.
1478         * pthread_mutex_timedlock.c: Likewise.
1479         * pthread_mutex_unlock.c: Likewise.
1480         * pthread_rwlock_timedrdlock.c: Likewise.
1481         * pthread_rwlock_timedwrlock.c: Likewise.
1482         * pthread_rwlock_unlock.c: Likewise.
1483         * sysdeps/alpha/tls.h: Likewise.
1484         * sysdeps/i386/tls.h: Likewise.
1485         * sysdeps/ia64/tls.h: Likewise.
1486         * sysdeps/powerpc/tls.h: Likewise.
1487         * sysdeps/pthread/aio_misc.h: Likewise.
1488         * sysdeps/pthread/gai_misc.h: Likewise.
1489         * sysdeps/s390/tls.h: Likewise.
1490         * sysdeps/sh/tls.h: Likewise.
1491         * sysdeps/sparc/tls.h: Likewise.
1492         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1493         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1494         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1495         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1496         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1497         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1498         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1499         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1500         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1501         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1502         Likewise.
1503         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1504         * sysdeps/x86_64/tls.h: Likewise.
1506 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1508         * pthread_getattr_np.c: No need to install a cancellation handler,
1509         this is no cancellation point.
1510         * pthread_getschedparam.c: Likewise.
1511         * pthread_setschedparam.c: Likewise.
1512         * pthread_setschedprio.c: Likewise.
1513         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1514         lll_unlock_wake_cb.
1515         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1516         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1517         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1518         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1519         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1520         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1521         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1522         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1523         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1524         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1525         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1526         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1528         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1529         whether there are more than one thread makes no sense here since
1530         we only call the slow path if the locks are taken.
1531         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1533         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1534         COND_NWAITERS_SHIFT.
1535         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1536         COND_CLOCK_BITS.
1537         * pthread_cond_init.c: Likewise.
1538         * pthread_cond_timedwait.c: Likewise.
1539         * pthread_cond_wait.c: Likewise.
1540         * pthread_condattr_getclock.c: Likewise.
1541         * pthread_condattr_setclock.c: Likewise.
1542         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1543         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1545         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1546         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1548 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1550         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1551         unistd.h.
1553         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1554         insn suffix.
1555         (THREAD_GSCOPE_GET_FLAG): Remove.
1556         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1557         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1558         changes.
1559         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1560         (THREAD_GSCOPE_GET_FLAG): Remove.
1561         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1562         instead of THREAD_GSCOPE_GET_FLAG.
1563         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1564         it.
1565         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1566         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1567         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1568         THREAD_GSCOPE_WAIT): Define.
1569         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1570         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1571         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1572         THREAD_GSCOPE_WAIT): Define.
1573         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1574         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1575         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1576         THREAD_GSCOPE_WAIT): Define.
1577         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1578         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1579         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1580         THREAD_GSCOPE_WAIT): Define.
1582 2007-05-24  Richard Henderson  <rth@redhat.com>
1584         * descr.h (struct pthread): Add header.gscope_flag.
1585         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1586         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1587         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1588         THREAD_GSCOPE_WAIT): Define.
1590 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1592         * init.c: Make it compile with older kernel headers.
1594         * tst-initializers1.c: Show through exit code which test failed.
1596         * pthread_rwlock_init.c: Also initialize __shared field.
1597         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1598         element in rwlock structure into four byte elements.  One of them is
1599         the new __shared element.
1600         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1601         Likewise.
1602         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1603         __shared, adjust names of other padding elements.
1604         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1605         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1606         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1607         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1608         FUTEX_PRIVATE_FLAG.
1609         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1610         futex to use private operations if possible.
1611         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1612         Likewise.
1613         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1614         Likewise.
1615         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1617         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1618         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1619         Likewise.
1620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1621         Likewise.
1622         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1623         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1625 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1627         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1628         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1629         * pthread_rwlock_timedrdlock.c: Likewise.
1630         * pthread_rwlock_tryrdlock.c: Likewise.
1632         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1633         optimization.
1635         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1636         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1637         duplication of __sem_wait_cleanup.
1639         * allocatestack.c: Revert last change.
1640         * init.c: Likewise.
1641         * sysdeps/i386/tls.h: Likewise.
1642         * sysdeps/x86_64/tls.h: Likewise.
1643         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1644         header structure.
1645         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1647         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1648         Add private field.
1649         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1650         * pthread_barrier_init.c: Set private flag if pshared and private
1651         futexes are supported.
1652         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1653         private field in futex command setup.
1654         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1656 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1658         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1659         support.
1660         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1661         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1662         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1663         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1664         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1666         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1667         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1668         fields in the structure.
1669         (__old_sem_init): New function.
1670         * sem_open.c: Initialize all fields of the structure.
1671         * sem_getvalue.c: Adjust for renamed element.
1672         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1673         (gen-as-const-headers): Add structsem.sym.
1674         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1675         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1676         struct new_sem.  Add struct old_sem.
1677         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1678         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1679         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1680         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1681         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1682         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1683         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1684         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1685         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1686         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1687         * tst-sem10.c: New file.
1688         * tst-sem11.c: New file.
1689         * tst-sem12.c: New file.
1690         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1691         of struct sem.
1693 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1694             Jakub Jelinek  <jakub@redhat.com>
1696         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1697         Move __pthread_enable_asynccancel right before futex syscall.
1698         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1699         Likewise.
1701 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1703         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1704         THREAD_COPY_PRIVATE_FUTEX): Define.
1705         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1706         THREAD_COPY_PRIVATE_FUTEX): Define.
1707         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1708         * init.c (__pthread_initialize_minimal_internal): Use
1709         THREAD_SET_PRIVATE_FUTEX.
1711         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1712         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1713         THREAD_GSCOPE_FLAG_WAIT): Define.
1714         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1715         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1716         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1717         PTR_DEMANGLE.
1718         (THREAD_GSCOPE_GET_FLAG): Define.
1719         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1720         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1721         instead of ->header.gscope_flag directly.
1723 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1725         * init.c (__pthread_initialize_minimal_internal): Check whether
1726         private futexes are available.
1727         * allocatestack.c (allocate_stack): Copy private_futex field from
1728         current thread into the new stack.
1729         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1730         futexes if they are available.
1731         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1732         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1733         in libc-lowlevellock.S allow using private futexes.
1734         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1735         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1736         FUTEX_PRIVATE_FLAG.
1737         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1738         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1739         if they are available.
1740         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1741         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1742         * sysdeps/i386/tcb-offsets.sym: Likewise.
1743         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1744         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1746 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1748         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1749         Remove ptr_wait_lookup_done again.
1750         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1751         (__pthread_initialize_minimal_internal): Initialize
1752         _dl_wait_lookup_done pointer in _rtld_global directly.
1753         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1754         Remove code to code _dl_wait_lookup_done.
1755         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1756         encrypted for now.
1758 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1760         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1761         pthread_mutex_init failed with ENOTSUP.
1763 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1765         * allocatestack.c (__wait_lookup_done): New function.
1766         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1767         Add ptr_wait_lookup_done.
1768         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1769         * pthreadP.h: Declare __wait_lookup_done.
1770         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1771         Define macros to implement reference handling of global scope.
1772         * sysdeps/x86_64/tls.h: Likewise.
1773         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1774         Initialize GL(dl_wait_lookup_done).
1776 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1778         [BZ #4512]
1779         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1780         is detected.
1781         * pthread_mutex_timedlock.c: Likewise.
1782         * pthread_mutex_trylock.c: Likewise.
1783         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1785         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1786         * tst-robust9.c: New file.
1787         * tst-robustpi9.c: New file.
1789         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1790         unnecessary extra cancellation test.
1792 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1794         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1795         extra cancellation test.
1796         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1798 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1800         * descr.h (struct pthread): Rearrange members to fill hole in
1801         64-bit layout.
1803         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1804         (__pthread_setaffinity_new): If syscall was successful and
1805         RESET_VGETCPU_CACHE is defined, use it before returning.
1806         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1808 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1810         [BZ #4455]
1811         * tst-align2.c: Include stackinfo.h.
1812         * tst-getpid1.c: Likewise.
1814 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1816         [BZ #4455]
1817         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1818         * tst-getpid1.c (do_test): Likewise.
1820         [BZ #4456]
1821         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1822         (allocate_stack): Likewise.
1824 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1826         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1827         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1828         (__lll_robust_timedlock_wait): Likewise.
1829         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1831 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1833         [BZ #4465]
1834         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1835         * tst-cancel4.c (tf_fdatasync): New test.
1837 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1839         [BZ #4392]
1840         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1841         check mutexes like normal mutexes.
1843         [BZ #4306]
1844         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1845         Initialize the whole sigevent structure to appease valgrind.
1847 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1849         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1850         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1852 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1854         * tst-locale1.c: Avoid warnings.
1855         * tst-locale2.c: Likewise.
1857 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1859         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1860         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1862 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1864         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1865         __extern_always_inline where appropriate.
1866         * sysdeps/pthread/pthread.h: Likewise.
1868 2007-03-13  Richard Henderson  <rth@redhat.com>
1870         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1871         separate cfi regions for the two subsections.
1873 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1875         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1876         new thread, don't just decrement it.
1877         Patch by Suzuki K P <suzuki@in.ibm.com>.
1879 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1881         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1882         PTHFCT_CALL definition.
1884 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1886         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1887         available, don't use it.
1889 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1892         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1893         call into the kernel to delay.
1895 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1897         * tst-initializers1.c: We want to test the initializers as seen
1898         outside of libc, so undefined _LIBC.
1900         * pthread_join.c (cleanup): Avoid warning.
1902 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1904         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1905         (__lll_timedwait_tid): Add unwind info.
1907         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1908         function table, mangle the pointers.
1909         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1910         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1911         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1912         demangle pointers before use.
1913         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1914         demangle pointer.
1915         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1916         * sysdeps/pthread/setxid.h: Likewise.
1918 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1920         * tst-rwlock7.c: Show some more information in case of correct
1921         behavior.
1923 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1925         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1926         (lll_futex_timed_wait): Undo part of last change, don't negate
1927         return value.
1929 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1931         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1932         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1934 2006-12-28  David S. Miller  <davem@davemloft.net>
1936         * shlib-versions: Fix sparc64 linux target specification.
1938 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1940         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1941         Adjust include path for pthread_barrier_wait.c move.
1943 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1945         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1946         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1948 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1950         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1951         6 argument cancellable syscalls.
1952         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1953         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1954         6 argument cancellable syscalls.
1955         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1957 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1959         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1960         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1962 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1964         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1965         __sync_lock_release instead of __sync_lock_release_si.
1967 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1969         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1970         Define.
1971         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1972         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1973         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1974         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1975         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1976         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1977         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1978         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1979         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1980         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1981         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1983 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1985         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1986         * pthread_barrier_wait.c: ...here.
1987         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1988         * pthread_cond_broadcast.c: ...here.
1989         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1990         * pthread_cond_signal.c: ...here.
1991         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1992         * pthread_cond_timedwait.c: ...here.
1993         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1994         * pthread_cond_wait.c: ...here.
1995         * sysdeps/pthread/pthread_once.c: Move to...
1996         * pthread_once.c: ...here.
1997         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1998         * pthread_rwlock_rdlock.c: ...here.
1999         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2000         * pthread_rwlock_timedrdlock.c: ...here.
2001         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2002         * pthread_rwlock_timedwrlock.c: ...here.
2003         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2004         * pthread_rwlock_unlock.c: ...here.
2005         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2006         * pthread_rwlock_wrlock.c: ...here.
2007         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2008         * pthread_spin_destroy.c: ...here.
2009         * sysdeps/pthread/pthread_spin_init.c: Move to...
2010         * pthread_spin_init.c: ...here.
2011         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2012         * pthread_spin_unlock.c: ...here.
2013         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2014         * pthread_getcpuclockid.c: ...here.
2016         * init.c: USE_TLS support is now always enabled.
2017         * tst-tls5.h: Likewise.
2018         * sysdeps/alpha/tls.h: Likewise.
2019         * sysdeps/i386/tls.h: Likewise.
2020         * sysdeps/ia64/tls.h: Likewise.
2021         * sysdeps/powerpc/tls.h: Likewise.
2022         * sysdeps/s390/tls.h: Likewise.
2023         * sysdeps/sh/tls.h: Likewise.
2024         * sysdeps/sparc/tls.h: Likewise.
2025         * sysdeps/x86_64/tls.h: Likewise.
2027 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2029         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2030         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2031         failed.
2033         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2034         Define to THREAD_SELF->header.multiple_threads.
2035         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2036         Likewise.
2037         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2038         Likewise.
2039         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2040         (SINGLE_THREAD_P): Likewise.
2041         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2042         (SINGLE_THREAD_P): Likewise.
2043         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2044         (SINGLE_THREAD_P): Likewise.
2045         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2046         (SINGLE_THREAD_P): Likewise.
2047         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2048         Likewise.
2049         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2050         (SINGLE_THREAD_P): Likewise.
2051         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2052         (SINGLE_THREAD_P): Likewise.
2053         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2054         Likewise.
2056 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2058         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2059         by default rather than 2_3_3.
2061 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2063         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2064         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2065         atomic_* instead of catomic_* macros.
2067 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2069         [BZ #3285]
2070         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2071         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2072         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2073         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2074         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2075         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2076         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2077         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2078         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2079         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2080         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2081         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2082         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2084 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2086         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2087         cancelable syscalls with six parameters.
2089         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2090         operations instead of atomic_*.
2092 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2094         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2096 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2098         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2099         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2100         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2101         New file.
2102         * pthread_attr_setstack.c: Allow overwriting the version number of the
2103         new symbol.
2104         * pthread_attr_setstacksize.c: Likewise.
2105         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2106         it.
2107         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2108         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2110 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2112         [BZ #3251]
2113         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2114         Patch by Petr Baudis.
2116 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2118         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2120         * tst-cancel2.c (tf): Loop as long as something was written.
2122 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2124         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2125         mutexes wake all mutexes.
2126         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2127         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2128         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2130 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2132         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2133         to guarantee the thread is always canceled.
2135 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2137         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2138         Include stdlib.h.
2139         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2140         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2142         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2143         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2145 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2147         [BZ #3123]
2148         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2149         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2153         * Makefile (tests): Add tst-cond22.
2154         * tst-cond22.c: New file.
2156 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2158         [BZ #3124]
2159         * descr.h (struct pthread): Add parent_cancelhandling.
2160         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2161         cancelhandling value to child.
2162         * pthread_create.c (start_thread): If parent thread was canceled
2163         reset the SIGCANCEL mask.
2164         * Makefile (tests): Add tst-cancel25.
2165         * tst-cancel25.c: New file.
2167 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2168             Ulrich Drepper  <drepper@redhat.com>
2170         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2171         counterp if it is already zero.
2172         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2174 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2175             Roland McGrath  <roland@redhat.com>
2177         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2178         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2179         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2180         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2181         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2182         lll_robust_mutex_timedlock, lll_mutex_unlock,
2183         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2184         Add _L_*_ symbols around the subsection.
2185         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2186         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2188 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2189             Roland McGrath  <roland@redhat.com>
2191         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2192         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2193         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2194         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2195         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2196         lll_robust_mutex_timedlock, lll_mutex_unlock,
2197         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2198         Add _L_*_ symbols around the subsection.
2199         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2200         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2202 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2204         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2205         change because it can disturb too much existing code.  If real hard
2206         reader preference is needed we'll introduce another type.
2207         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2208         (pthread_rwlock_timedwrlock): Likewise.
2209         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2210         Likewise.
2212 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2214         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2215         reader preference.
2216         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2217         (pthread_rwlock_timedwrlock): Likewise.
2218         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2219         Likewise.
2221 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2223         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2224         Only define ifdef SHARED.
2226 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2228         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2229         (free_stacks): ...here.
2230         (__free_stack_cache): New function.
2231         * pthreadP.h: Declare __free_stack_cache.
2232         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2233         ptr_freeres.
2234         * init.c (pthread_functions): Initialize ptr_freeres.
2235         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2236         New freeres function.
2238 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2240         [BZ #3018]
2241         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2243 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2245         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2246         _XOPEN_REALTIME_THREADS.
2248 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2250         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2251         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2252         HAVE_CLOCK_GETTIME_VSYSCALL.
2253         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2255 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2257         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2258         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2259         * descr.h (struct priority_protection_data): New type.
2260         (struct pthread): Add tpp field.
2261         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2262         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2263         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2264         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2265         TPP mutexes.
2266         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2267         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2268         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2269         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2270         * tpp.c: New file.
2271         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2272         boosted by TPP.
2273         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2274         * pthread_mutexattr_getprioceiling.c
2275         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2276         in the SCHED_FIFO priority range.
2277         * pthread_mutexattr_setprioceiling.c
2278         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2279         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2280         if mutex is not TPP.  Ceiling is now in __data.__lock.
2281         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2282         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2283         is now in __data.__lock.  Add locking.
2284         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2285         * Makefile (libpthread-routines): Add tpp.
2286         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2287         * tst-tpp.h: New file.
2288         * tst-mutexpp1.c: New file.
2289         * tst-mutexpp6.c: New file.
2290         * tst-mutexpp10.c: New file.
2291         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2292         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2294 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2296         [BZ #2843]
2297         * pthread_join.c (pthread_join): Account for self being canceled
2298         when checking for deadlocks.
2299         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2300         (tf1): Don't print anything after pthread_join returns, this would be
2301         another cancellation point.
2302         (tf2): Likewise.
2303         * tst-join6.c: New file.
2304         * Makefile (tests): Add tst-join6.
2306 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2308         [BZ #2892]
2309         * pthread_setspecific.c (__pthread_setspecific): Check
2310         out-of-range index before checking for unused key.
2312         * sysdeps/pthread/gai_misc.h: New file.
2314 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2316         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2317         file.  Don't use sysctl.
2318         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2319         overwrite the file if this is likely not true.
2321 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2323         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2324         * Makefile (tests): Add tst-getpid3.
2325         * tst-getpid3.c: New file.
2327 2006-07-30  Roland McGrath  <roland@redhat.com>
2329         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2331         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2332         (pause_not_cancel): New macro.
2333         (nanosleep_not_cancel): New macro.
2334         (sigsuspend_not_cancel): New macro.
2335         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2336         nanosleep_not_cancel macro from <not-cancel.h>.
2337         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2338         macro from <not-cancel.h>.
2340 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2341             Jakub Jelinek  <jakub@redhat.com>
2343         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2344         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2345         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2346         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2347         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2348         * pthread_mutex_lock.c: Likewise.
2349         * pthread_mutex_timedlock.c: Likewise.
2350         * pthread_mutex_trylock.c: Likewise.
2351         * pthread_mutex_unlock.c: Likewise.
2352         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2353         all mutexes.
2354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2356         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2357         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2358         pthread-pi-defines.sym.
2359         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2360         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2361         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2362         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2363         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2364         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2365         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2366         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2367         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2368         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2369         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2370         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2371         * tst-mutex2.c: Likewise.
2372         * tst-mutex3.c: Likewise.
2373         * tst-mutex4.c: Likewise.
2374         * tst-mutex5.c: Likewise.
2375         * tst-mutex6.c: Likewise.
2376         * tst-mutex7.c: Likewise.
2377         * tst-mutex7a.c: Likewise.
2378         * tst-mutex8.c: Likewise.
2379         * tst-mutex9.c: Likewise.
2380         * tst-robust1.c: Likewise.
2381         * tst-robust7.c: Likewise.
2382         * tst-robust8.c: Likewise.
2383         * tst-mutexpi1.c: New file.
2384         * tst-mutexpi2.c: New file.
2385         * tst-mutexpi3.c: New file.
2386         * tst-mutexpi4.c: New file.
2387         * tst-mutexpi5.c: New file.
2388         * tst-mutexpi6.c: New file.
2389         * tst-mutexpi7.c: New file.
2390         * tst-mutexpi7a.c: New file.
2391         * tst-mutexpi8.c: New file.
2392         * tst-mutexpi9.c: New file.
2393         * tst-robust1.c: New file.
2394         * tst-robust2.c: New file.
2395         * tst-robust3.c: New file.
2396         * tst-robust4.c: New file.
2397         * tst-robust5.c: New file.
2398         * tst-robust6.c: New file.
2399         * tst-robust7.c: New file.
2400         * tst-robust8.c: New file.
2401         * Makefile (tests): Add the new tests.
2403         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2404         * pthread_mutex_destroy.c: Remove unneeded label.
2406 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2408         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2409         computations to compile time.
2411 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2413         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2415 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2417         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2419 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2421         * pthread_key_create.c (__pthread_key_create): Do away with
2422         __pthread_keys_lock.
2424         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2425         (__kernel_cpumask_size): Mark as hidden.
2426         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2428         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2429         * semaphoreP.h (__sem_mappings_lock): Likewise.
2431 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2433         * pthread_atfork.c: Mark __dso_handle as hidden.
2435 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2437         [BZ #2644]
2438         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2439         the reload problem.  Change the one path in pthread_cancel_init
2440         which causes the problem.  Force gcc to reload.  Simplify callers.
2441         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2442         (_Unwind_GetBSP): Undo last patch.
2444 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2446         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2447         function pointer is reloaded after pthread_cancel_init calls.
2449         [BZ #2644]
2450         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2451         pointers are reloaded after pthread_cancel_init calls.
2453 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2455         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2456         __always_inline.
2458 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2460         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2461         Allocate new object which is passed to timer_sigev_thread so that
2462         the timer can be deleted before the new thread is scheduled.
2464 2006-04-26  Roland McGrath  <roland@redhat.com>
2466         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2468 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2470         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2471         suffix for conditional jumps.
2472         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2473         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2474         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2475         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2476         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2477         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2479         * init.c (sigcancel_handler): Compare with correct PID even if the
2480         thread is in the middle of a fork call.
2481         (sighandler_setxid): Likewise.
2482         Reported by Suzuki K P <suzuki@in.ibm.com> .
2484 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2486         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2488 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2490         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2491         fails [Coverity CID 105].
2493 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2495         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2497 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2499         [BZ #2505]
2500         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2501         Define __lll_rel_instr using lwsync.
2503 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2505         * allocatestack.c (allocate_stack): Always initialize robust_head.
2506         * descr.h: Define struct robust_list_head.
2507         (struct pthread): Use robust_list_head in robust mutex list definition.
2508         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2509         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2510         (__pthread_initialize_minimal_internal): Register robust_list with
2511         the kernel.
2512         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2513         Declare __set_robust_list_avail.
2514         * pthread_create.c (start_thread): Register robust_list of new thread.
2515         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2516         waiters.
2517         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2518         number of users, it's unreliable.
2519         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2520         set_robust_list syscall is available.
2521         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2522         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2523         Set robust_head.list_op_pending before trying to lock a robust mutex.
2524         * pthread_mutex_timedlock.c: Likewise.
2525         * pthread_mutex_trylock.c: Likewise.
2526         * pthread_mutex_unlock.c: Likewise for unlocking.
2527         * Makefile (tests): Add tst-robust8.
2528         * tst-robust8.c: New file.
2530 2006-03-08  Andreas Schwab  <schwab@suse.de>
2532         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2533         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2535 2006-03-05  Roland McGrath  <roland@redhat.com>
2537         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2538         and $config_os doesn't match *linux*.
2540 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2542         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2543         Use __syscall_error.
2544         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2545         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2546         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2547         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2548         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2549         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2551 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2553         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2555 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2557         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2558         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2559         mutex.
2560         (__lll_robust_timedlock_wait): Likewise.
2561         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2562         (__lll_robust_lock_wait): Likewise.
2563         (__lll_robust_timedlock_wait): Likewise.
2564         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2565         (__lll_robust_lock_wait): Likewise.
2566         (__lll_robust_timedlock_wait): Likewise.
2568 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2570         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2571         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2572         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2573         lll_robust_mutex_unlock): Define.
2574         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2576 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2578         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2579         instead of <clone.S>.
2581 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2583         * Makefile (libpthread-routines): Add
2584         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2585         and pthread_mutex_[sg]etprioceiling.
2586         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2587         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2588         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2589         pthread_mutex_setprioceiling.
2590         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2591         PTHREAD_PRIO_PROTECT): New enum values.
2592         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2593         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2594         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2595         prototypes.
2596         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2597         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2598         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2599         Define.
2600         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2601         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2602         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2603         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2604         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2605         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2606         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2607         protocol mutexes.
2608         * pthread_mutex_getprioceiling.c: New file.
2609         * pthread_mutex_setprioceiling.c: New file.
2610         * pthread_mutexattr_getprioceiling.c: New file.
2611         * pthread_mutexattr_setprioceiling.c: New file.
2612         * pthread_mutexattr_getprotocol.c: New file.
2613         * pthread_mutexattr_setprotocol.c: New file.
2615 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2617         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2619 2006-02-27  Roland McGrath  <roland@redhat.com>
2621         * sysdeps/pthread/Subdirs: List nptl here too.
2622         * configure (libc_add_on_canonical): New variable.
2624         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2626         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2627         self to get main source tree's file.
2628         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2629         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2630         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2631         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2632         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2633         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2634         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2635         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2636         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2637         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2638         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2639         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2640         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2642         * Makefile: Use $(sysdirs) in vpath directive.
2644         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2645         (CPPFLAGS-timer_routines.c): Likewise.
2647         * Makeconfig (includes): Variable removed.
2649 2006-02-26  Roland McGrath  <roland@redhat.com>
2651         * sysdeps/generic/pt-raise.c: Moved to ...
2652         * pt-raise.c: ... here.
2653         * sysdeps/generic/lowlevellock.h: Moved to ...
2654         * lowlevellock.h: ... here.
2656 2006-02-23  Roland McGrath  <roland@redhat.com>
2658         * descr.h (struct pthread): Add final member `end_padding'.
2659         (PTHREAD_STRUCT_END_PADDING): Use it.
2661 2006-02-20  Roland McGrath  <roland@redhat.com>
2663         * sysdeps/mips: Directory removed, saved in ports repository.
2664         * sysdeps/unix/sysv/linux/mips: Likewise.
2666 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2668         * tst-robust1.c: Add second mutex to check that the mutex list is
2669         handled correctly.
2671 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2673         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2674         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2675         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2676         lll_robust_mutex_unlock): New macros.
2677         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2678         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2679         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2680         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2681         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2683 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2685         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2686         definitions.
2687         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2689 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2691         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2692         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2693         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2694         (lll_robust_mutex_unlock): Likewise.
2696 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2698         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2699         Set robust_list.__next rather than robust_list.
2700         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2701         (__pthread_list_t): New typedef.
2702         (pthread_mutex_t): Replace __next and __prev fields with __list.
2703         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2704         (__pthread_list_t): New typedef.
2705         (pthread_mutex_t): Replace __next and __prev fields with __list.
2706         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2707         (__pthread_list_t, __pthread_slist_t): New typedefs.
2708         (pthread_mutex_t): Replace __next and __prev fields with __list.
2709         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2710         (__pthread_list_t, __pthread_slist_t): New typedefs.
2711         (pthread_mutex_t): Replace __next and __prev fields with __list.
2712         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2713         (__pthread_list_t, __pthread_slist_t): New typedefs.
2714         (pthread_mutex_t): Replace __next and __prev fields with __list.
2715         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2716         (__pthread_slist_t): New typedef.
2717         (pthread_mutex_t): Replace __next field with __list.
2719 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2721         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2722         PTHREAD_MUTEX_OWNERDEAD.
2723         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2724         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2725         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2726         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2727         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2728         to PTHREAD_MUTEX_INCONSISTENT.
2729         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2730         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2731         * pthread_mutex_trylock.c: Likewise.
2732         * pthread_mutex_timedlock.c: Likewise.
2733         * pthread_mutex_unlock.c: Likewise.
2734         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2735         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2736         lowlevelrobustlock.sym.
2737         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2738         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2739         definitions.
2740         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2741         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2742         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2743         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2744         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2746 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2748         * allocatestack.c (allocate_stack): Initialize robust_list.
2749         * init.c (__pthread_initialize_minimal_internal): Likewise.
2750         * descr.h (struct xid_command): Pretty printing.
2751         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2752         robust_list.  Adjust macros.
2753         * pthread_create.c (start_thread): Adjust robust_list handling.
2754         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2755         but the owner for all robust mutex types.
2756         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2757         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2758         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2759         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2761         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2762         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2764 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2766         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2767         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2769 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2771         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2772         Return status.
2773         (lll_futex_timed_wait): Define.
2775 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2777         * tst-cancel4.c: Test ppoll.
2779 2006-01-18  Andreas Jaeger  <aj@suse.de>
2781         [BZ #2167]
2782         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2783         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2784         by Jim Gifford <patches@jg555.com>.
2786 2006-01-13  Richard Henderson  <rth@redhat.com>
2788         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2790 2006-01-10  Roland McGrath  <roland@redhat.com>
2792         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2793         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2794         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2795         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2796         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2797         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2798         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2799         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2800         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2801         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2803 2006-01-09  Roland McGrath  <roland@redhat.com>
2805         * tst-initializers1-c89.c: New file.
2806         * tst-initializers1-c99.c: New file.
2807         * tst-initializers1-gnu89.c: New file.
2808         * tst-initializers1-gnu99.c: New file.
2809         * Makefile (tests): Add them.
2810         (CFLAGS-tst-initializers1-c89.c): New variable.
2811         (CFLAGS-tst-initializers1-c99.c): New variable.
2812         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2813         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2815         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2816         Use __extension__ on anonymous union definition.
2817         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2818         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2819         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2820         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2821         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2823 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2825         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2826         Don't give the union a name because it changes the mangled name.
2827         Instead name the struct for __data.
2828         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2829         Likewise.
2830         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2831         Likewise.
2833 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2835         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2836         stack bias to mc_ftp field.
2838 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2840         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2841         being too clever and reloading the futex value where it shouldn't.
2843 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2845         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2846         correct type.
2848 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2850         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2851         Add cfi directives.
2853 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2855         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2856         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2857         rename in tcbhead_t.
2859         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2860         Don't give the union a name because it changes the mangled name.
2861         Instead name the struct for __data.
2862         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2863         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2864         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2865         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2866         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2867         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2869 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2871         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2872         Return status.
2873         (lll_futex_timed_wait): Define.
2874         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2875         * sysdeps/pthread/aio_misc.h: New file.
2877 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2879         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2881 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2883         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2884         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2885         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2887 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2889         * tst-cancel24.cc: Use C headers instead of C++ headers.
2891 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2893         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2894         sparc-linux configured glibc.
2895         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2896         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2897         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2898         atomic_compare_and_exchange_val_24_acq instead of
2899         atomic_compare_and_exchange_val_acq.
2900         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2901         instead of atomic_exchange_rel.
2902         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2903         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2904         file.
2905         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2906         file.
2907         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2908         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2909         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2910         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2911         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2912         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2913         New file.
2914         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2915         New file.
2916         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2917         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2918         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2919         file.
2920         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2921         file.
2922         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2924 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2926         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2927         mutex initializers.
2929 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2931         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2932         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2933         THREAD_COPY_POINTER_GUARD): Define.
2934         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2935         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2937 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2939         * version.c: Update copyright year.
2941 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2943         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2944         .eh_frame section, use cfi_* directives.
2945         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2947 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2949         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2950         now.
2952 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2954         * sysdeps/pthread/sigaction.c: Removed.
2955         * sigaction.c: New file.
2956         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2958 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2960         * Makefile (tests): Add tst-signal7.
2961         * tst-signal7.c: New file.
2963 2005-12-27  Roland McGrath  <roland@redhat.com>
2965         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2966         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2967         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2968         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2969         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2970         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2971         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2972         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2973         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2974         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2975         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2977 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2979         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2980         and __prev field to pthread_mutex_t.
2981         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2982         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2983         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2984         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2985         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2986         to pthread_mutex_t.
2988 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2990         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2991         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2992         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2993         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2994         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2995         and PTHREAD_MUTEXATTR_FLAG_BITS.
2996         * descr.h (struct pthread): Add robust_list field and define
2997         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2998         * pthread_mutexattr_getrobust.c: New file.
2999         * pthread_mutexattr_setrobust.c: New file.
3000         * pthread_mutex_consistent.c: New file.
3001         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3002         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3003         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3004         Adjust pthread_mutex_t initializers.
3005         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3006         field to pthread_mutex_t.
3007         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3008         and __prev field to pthread_mutex_t.
3009         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3010         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3011         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3012         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3013         * pthread_mutexattr_gettype.c: Likewise.
3014         * pthread_mutexattr_setpshared.c: Likewise.
3015         * pthread_mutexattr_settype.c: Likewise.
3016         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3017         Initialize mutex kind according to robust flag.
3018         * pthread_mutex_lock.c: Implement local robust mutex.
3019         * pthread_mutex_timedlock.c: Likewise.
3020         * pthread_mutex_trylock.c: Likewise.
3021         * pthread_mutex_unlock.c: Likewise.
3022         * pthread_create.c (start_thread): Mark robust mutexes which remained
3023         locked as dead.
3024         * tst-robust1.c: New file.
3025         * tst-robust2.c: New file.
3026         * tst-robust3.c: New file.
3027         * tst-robust4.c: New file.
3028         * tst-robust5.c: New file.
3029         * tst-robust6.c: New file.
3030         * tst-robust7.c: New file.
3031         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3032         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3033         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3034         tst-robust5, tst-robust6, and tst-robust7.
3036         * tst-typesizes.c: New file.
3037         * Makefile (tests): Add tst-typesizes.
3039         * tst-once3.c: More debug output.
3041 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3043         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3044         missing after last change.
3046         * version.c: Update copyright year.
3048 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3050         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3051         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3052         * pthread_mutex_trylock.c: Likewise.
3053         * pthread_mutex_timedlock.c: Likewise.
3054         * pthread_mutex_unlock.c: Likewise.
3056 2005-12-22  Roland McGrath  <roland@redhat.com>
3058         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3059         so that #include_next's search location is not reset to the -I..
3060         directory where <nptl/...> can be found.
3062 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3064         [BZ #1913]
3065         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3066         Fix unwind info.  Remove useless branch prediction prefix.
3067         * tst-cancel24.cc: New file.
3068         * Makefile: Add rules to build and run tst-cancel24.
3070 2005-12-21  Roland McGrath  <roland@redhat.com>
3072         * libc-cancellation.c: Use <> rather than "" #includes.
3073         * pt-cleanup.c: Likewise.
3074         * pthread_create.c: Likewise.
3075         * pthread_join.c: Likewise.
3076         * pthread_timedjoin.c: Likewise.
3077         * pthread_tryjoin.c: Likewise.
3078         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3079         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3080         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3081         * unwind.c: Likewise.
3083 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3085         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3086         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3087         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3088         THREAD_COPY_POINTER_GUARD): Define.
3090 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3092         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3093         rather than one.
3094         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3095         THREAD_COPY_POINTER_GUARD): Define.
3096         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3097         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3098         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3099         THREAD_COPY_POINTER_GUARD): Define.
3100         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3101         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3102         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3103         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3104         Use PTR_DEMANGLE for B0 if defined.
3106 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3108         * pthread_create.c (__pthread_create_2_1): Use
3109         THREAD_COPY_POINTER_GUARD if available.
3110         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3111         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3112         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3113         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3114         * sysdeps/x86_64/tls.h: Likewise.
3116 2005-12-15  Roland McGrath  <roland@redhat.com>
3118         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3120 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3122         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3123         sysdeps/generic.
3124         * errno-loc.c: New file.
3126 2005-12-12  Roland McGrath  <roland@redhat.com>
3128         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3129         adjustments before choosing stack size.  Update minimum stack size
3130         calculation to match allocate_stack change.
3132 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3134         * allocatestack.c (allocate_stack): Don't demand that there is an
3135         additional full page available on the stack beside guard, TLS, the
3136         minimum stack.
3138 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3140         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3141         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3143         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3144         compiling 32-bit code we must define __cleanup_fct_attribute.
3146 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3148         [BZ #1920]
3149         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3150         __attribute__ instead of __attribute.
3151         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3152         (__cleanup_fct_attribute): Likewise.
3154 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3156         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3157         a write barrier before writing libgcc_s_getcfa.
3159 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3161         * sysdeps/unix/sysv/linux/configure: Removed.
3163 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3165         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3166         optional init_array/fini_array support.
3168 2005-10-24  Roland McGrath  <roland@redhat.com>
3170         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3171         versioned_symbol use.
3173 2005-10-16  Roland McGrath  <roland@redhat.com>
3175         * init.c (__pthread_initialize_minimal_internal): Even when using a
3176         compile-time default stack size, apply the minimum that allocate_stack
3177         will require, and round up to page size.
3179 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3181         * Makefile ($(test-modules)): Remove static pattern rule.
3183 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3184             Ulrich Drepper  <drepper@redhat.com>
3186         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3187         alignment in callback function.
3188         * Makefile: Add rules to build and run tst-align3.
3189         * tst-align3.c: New file.
3191 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3193         * allocatestack.c (setxid_signal_thread): Add
3194         INTERNAL_SYSCALL_DECL (err).
3196 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3198         * allocatestack.c (setxid_signal_thread): Need to use
3199         atomic_compare_and_exchange_bool_acq.
3201 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3202             Jakub Jelinek  <jakub@redhat.com>
3204         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3205         CANCEL_RESTMASK.
3206         (struct pthread): Move specific_used field to avoid padding.
3207         Add setxid_futex field.
3208         * init.c (sighandler_setxid): Reset setxid flag and release the
3209         setxid futex.
3210         * allocatestack.c (setxid_signal_thread): New function.  Broken
3211         out of the bodies of the two loops in __nptl_setxid.  For undetached
3212         threads check whether they are exiting and if yes, don't send a signal.
3213         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3214         * pthread_create.c (start_thread): For undetached threads, check
3215         whether setxid bit is set.  If yes, wait until signal has been
3216         processed.
3218         * allocatestack.c (STACK_VARIABLES): Initialize them.
3219         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3221 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3223         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3224         waiters, awake all waiters on the associated mutex.
3226 2005-09-22  Roland McGrath  <roland@redhat.com>
3228         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3229         ../sysdeps/x86_64/hp-timing.h).
3231 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3233         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3234         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3235         (lll_futex_wake_unlock): Define.
3236         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3237         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3238         (lll_futex_wake_unlock): Define.
3239         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3240         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3241         (lll_futex_wake_unlock): Define.
3242         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3243         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3244         (lll_futex_wake_unlock): Define.
3245         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3246         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3247         (lll_futex_wake_unlock): Define.
3248         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3249         lll_futex_wake_unlock.
3250         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3251         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3252         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3253         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3254         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3255         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3257 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3259         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3260         Fix typo in register name.
3262 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3264         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3265         Use __sigfillset.  Document that sigfillset does the right thing wrt
3266         to SIGSETXID.
3268 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3270         [BZ #1102]
3271         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3272         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3273         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3274         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3275         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3276         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3277         in the structure.
3278         * Makefile (tests): Add tst-initializers1.
3279         (CFLAGS-tst-initializers1.c): Set.
3280         * tst-initializers1.c: New test.
3282 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3284         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3285         Make sure __flags are located at offset 48 from the start of the
3286         structure.
3288 2005-07-02  Roland McGrath  <roland@redhat.com>
3290         * Makeconfig: Comment fix.
3292 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3294         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3295         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3296         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3297         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3298         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3299         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3300         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3301         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3302         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3303         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3305 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3307         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3308         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3309         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3310         fields.
3311         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3312         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3313         field.  Put in sysinfo field unconditionally.
3314         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3315         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3316         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3317         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3318         fields.
3319         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3320         * pthread_create.c (__pthread_create_2_1): Use
3321         THREAD_COPY_STACK_GUARD macro.
3322         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3323         tests.
3324         * tst-stackguard1.c: New file.
3325         * tst-stackguard1-static.c: New file.
3327 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3329         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3330         Invoke CGOTSETUP and CGOTRESTORE.
3331         (CGOTSETUP, CGOTRESTORE): Define.
3333 2005-05-29  Richard Henderson  <rth@redhat.com>
3335         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3336         (tf_write, tf_writev): Use it.
3337         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3338         the system minimum.
3340 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3342         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3343         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3344         __librt_*_asynccancel@local.
3346 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3348         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3349         all occurrences of JUMPTARGET.  Instead append @local to labels.
3351 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3353         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3354         size/alignment of struct pthread rather than tcbhead_t.
3355         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3356         Likewise.
3357         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3358         Likewise.
3359         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3360         Likewise.
3362 2005-05-19  Richard Henderson  <rth@redhat.com>
3364         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3365         __sync_val_compare_and_swap, not explicit _si variant.
3366         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3368 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3370         [BZ #915]
3371         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3373 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3375         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3376         .eh_frame section, use cfi_* directives.
3378 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3380         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3381         of "" includes.
3383 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3385         [BZ #1075]
3386         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3387         aio_write blocks.
3389 2005-04-27  Roland McGrath  <roland@redhat.com>
3391         * Makefile (tests): Remove tst-clock2.
3393         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3394         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3395         translating to the kernel clockid_t for our own process/thread clock.
3397         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3399 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3401         * old_pthread_cond_init.c: Include <errno.h>.
3402         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3403         process shared or uses clock other than CLOCK_REALTIME.
3404         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3406 2005-04-13  David S. Miller  <davem@davemloft.net>
3408         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3409         * sysdeps/sparc/sparc64/clone.S: New file.
3411 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3413         [BZ #1102]
3414         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3415         __inline instead of inline.
3416         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3418 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3420         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3421         functionally equivalent, but shorter instructions.
3422         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3423         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3424         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3425         Likewise.
3426         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3427         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3428         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3429         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3431         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3432         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3433         Likewise.
3434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3435         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3436         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3437         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3438         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3440 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3442         * sysdeps/mips/Makefile: New file.
3443         * sysdeps/mips/nptl-sysdep.S: New file.
3444         * sysdeps/mips/tcb-offsets.sym: New file.
3445         * sysdeps/mips/pthread_spin_lock.S: New file.
3446         * sysdeps/mips/pthread_spin_trylock.S: New file.
3447         * sysdeps/mips/pthreaddef.h: New file.
3448         * sysdeps/mips/tls.h: New file.
3449         * sysdeps/mips/jmpbuf-unwind.h: New file.
3450         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3451         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3452         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3453         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3454         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3455         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3456         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3457         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3458         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3459         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3461 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3463         [BZ #1112]
3464         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3465         variable to scerr.
3467 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3469         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3471 2005-02-25  Roland McGrath  <roland@redhat.com>
3473         * alloca_cutoff.c: Correct license text.
3474         * tst-unload.c: Likewise.
3475         * sysdeps/pthread/allocalim.h: Likewise.
3476         * sysdeps/pthread/pt-initfini.c: Likewise.
3477         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3478         * sysdeps/pthread/bits/sigthread.h: Likewise.
3479         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3480         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3482 2005-02-16  Roland McGrath  <roland@redhat.com>
3484         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3485         Use unsigned int * for ptr_nthreads.
3487 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3489         [BZ #721]
3490         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3491         gcc4.
3493 2005-02-07  Richard Henderson  <rth@redhat.com>
3495         [BZ #787]
3496         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3497         argument.
3499 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3501         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3502         order of arguments in invocation of atomic_add_zero.
3504 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3506         [BZ #737]
3507         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3508         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3509         at least gotntpoff relocation and addition.
3510         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3511         Likewise.
3512         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3513         Likewise.
3514         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3515         Likewise.
3517 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3519         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3520         entry for static tls deallocation fix.
3521         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3522         also contains information whether the memory pointed to is static
3523         TLS or not.
3524         * sysdeps/i386/tls.h: Likewise.
3525         * sysdeps/ia64/tls.h: Likewise.
3526         * sysdeps/powerpc/tls.h: Likewise.
3527         * sysdeps/s390/tls.h: Likewise.
3528         * sysdeps/sh/tls.h: Likewise.
3529         * sysdeps/sparc/tls.h: Likewise.
3530         * sysdeps/x86_64/tls.h: Likewise.
3532 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3534         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3536 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3538         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3539         %esp.
3540         * Makefile (tests): Add tst-align2.
3541         * tst-align2.c: New test.
3542         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3543         -mpreferred-stack-boundary=4.
3545 2004-12-18  Roland McGrath  <roland@redhat.com>
3547         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3548         New file removed withdrawn for the moment.
3550 2004-12-17  Richard Henderson  <rth@redhat.com>
3552         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3553         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3555 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3557         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3558         Increased PTHREAD_STACK_MIN.
3560         * tst-context1.c (stacks): Use bigger stack size.
3562 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3564         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3565         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3567 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3569         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3570         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3571         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3573 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3575         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3577 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3579         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3580         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3582         * tst-getpid1.c: If child crashes, report this first.  Print which
3583         signal.
3585 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3587         * init.c (__pthread_initialize_minimal_internal): Also unblock
3588         SIGSETXID.
3590 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3592         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3593         _POSIX_THREAD_CPUTIME): Define to 0.
3594         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3595         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3596         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3597         __timer_signal_thread_tclk): Remove.
3598         (init_module): Remove their initialization.
3599         (thread_cleanup): Remove their cleanup assertions.
3600         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3601         __timer_signal_thread_tclk): Remove.
3602         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3603         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3604         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3606 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3608         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3609         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3611         * Makefile (tests): Add tst-getpid2.
3612         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3613         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3614         * tst-getpid2.c: New test.
3616 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3618         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3620 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3622         * Makefile (tests): Add tst-getpid1.
3623         * tst-getpid1.c: New file.
3624         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3625         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3627 2004-12-02  Roland McGrath  <roland@redhat.com>
3629         * Makefile (libpthread-nonshared): Variable removed.
3630         ($(objpfx)libpthread_nonshared.a): Target removed.
3631         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3632         These are now handled by generic magic from
3633         libpthread-static-only-routines being set.
3635 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3637         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3638         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3639         _POSIX_THREAD_PRIO_PROTECT): Define.
3640         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3641         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3642         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3644 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3646         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3647         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3648         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3649         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3650         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3651         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3652         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3654 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3656         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3658         * Makefile (libpthread-routines): Add pthread_setschedprio.
3659         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3660         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3661         * pthread_setschedprio.c: New file.
3663 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3665         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3666         * pthread_cancel.c (pthread_create): Likewise.
3668         * Makefile (libpthread-routines): Add vars.
3669         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3670         * init.c (__default_stacksize, __is_smp): Remove.
3671         * vars.c: New file.
3672         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3673         and define a wrapper macro.
3674         (PTHREAD_STATIC_FN_REQUIRE): Define.
3675         * allocatestack.c (__find_thread_by_id): Undefine.
3676         * pthread_create (__pthread_keys): Remove.
3677         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3678         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3679         PTHREAD_STATIC_FN_REQUIRE.
3681 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3683         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3684         parameter to REGISTER macro.
3686 2004-11-17  Roland McGrath  <roland@redhat.com>
3688         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3689         Make sure SIGCANCEL is blocked as well.
3691 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3693         * sysdeps/pthread/setxid.h: New file.
3694         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3695         (struct xid_command): Add forward decl.
3696         (struct pthread_functions): Change return type of __nptl_setxid hook
3697         to int.
3698         * pthreadP.h (__nptl_setxid): Change return type to int.
3699         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3700         calling thread, return its return value and set errno on failure.
3701         * descr.h (struct xid_command): Change id type to long array.
3703         * Makefile: Add rules to build and test tst-setuid1 and
3704         tst-setuid1-static.
3705         * tst-setuid1.c: New test.
3706         * tst-setuid1-static.c: New test.
3708 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3710         * Makefile (tests): Add tst-exit3.
3711         * tst-exit3.c: New test.
3713 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3715         * Makefile (tests): Add tst-exit2.
3716         * tst-exit2.c: New file.
3718 2004-11-09  Roland McGrath  <roland@redhat.com>
3720         [BZ #530]
3721         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3722         here, before calling clone.
3723         * pthread_create.c (start_thread): Don't do it here.
3725 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3727         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3729 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3731         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3732         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3733         assembler warning.
3735 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3737         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3738         if sched_priority is not between minprio and maxprio.
3740 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3742         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3743         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3745         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3746         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3748 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3750         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3751         not-cancelable I/O functions.
3753 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3755         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3756         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3757         make sure 2 is stored in the futex and we looked at the old value.
3758         Fix a few other problems to return the correct value.
3760 2004-10-14  Richard Henderson  <rth@redhat.com>
3762         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3763         make gcc4 happy.
3765 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3767         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3768         of pthread-functions.h and pthreaddef.h.
3769         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3771         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3772         Change __data.__nwaiters from int to unsigned int.
3774         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3775         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3777         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3778         before return type.
3780         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3781         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3783 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3785         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3786         test fails, remove message queue.
3787         (tf_msgsnd): Likewise.
3789 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3791         * tst-clock1.c: Change #ifdef to #if defined.
3792         * tst-clock2.c: Likewise.
3793         * tst-cond11.c: Likewise.
3795         * sysdeps/pthread/timer_create.c (timer_create): Use
3796         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3797         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3798         THREAD_CPUTIME.
3800 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3802         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3803         _POSIX_THREAD_CPUTIME): Define to 0.
3805 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3807         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3808         and _POSIX_THREAD_CPUTIME to zero.
3809         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3810         * tst-barrier2.c: Fix testing for POSIX feature.
3811         * tst-clock1.c: Likewise.
3812         * tst-clock2.c: Likewise.
3813         * tst-cond11.c: Likewise.
3814         * tst-cond4.c: Likewise.
3815         * tst-cond6.c: Likewise.
3816         * tst-flock2.c: Likewise.
3817         * tst-mutex4.c: Likewise.
3818         * tst-mutex9.c: Likewise.
3819         * tst-rwlock12.c: Likewise.
3820         * tst-rwlock4.c: Likewise.
3821         * tst-signal1.c: Likewise.
3822         * tst-spin2.c: Likewise.
3823         * sysdeps/pthread/posix-timer.h: Likewise.
3824         * sysdeps/pthread/timer_create.c: Likewise.
3825         * sysdeps/pthread/timer_routines.c: Likewise.
3827 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3829         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3830         (__lll_mutex_timedlock_wait): Address futex correctly.
3832         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3833         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3834         make sure 2 is stored in the futex and we looked at the old value.
3835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3836         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3837         which might very well made the code not working at all before.
3838         [BZ #417]
3840 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3842         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3843         allow SIGSETXID to be sent.
3844         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3845         for SIGSETXID to be defined.
3846         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3847         SIGSETXID cannot be blocked.
3849         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3850         Add __extension__ to long long types.
3851         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3852         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3853         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3854         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3855         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3856         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3857         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3859 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3861         * descr.h (struct pthread): Add stopped_start field.
3862         * sysdeps/pthread/createthread.c (create_thread): Set
3863         start_stopped flag in descriptor for new thread appropriately.
3864         * pthread_create.c (start_thread): Only take lock to be stopped on
3865         startup if stopped_start flag says so.
3867 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3869         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3870         is created detached and if yes, do not try to free the stack in case
3871         the thread creation failed.
3872         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3873         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3874         case there has been no error.  [BZ #405]
3876         * pthread_create.c (start_thread): Don't wait for scheduler data
3877         etc to be set at the beginning of the function.  The cancellation
3878         infrastructure must have been set up.  And enable async
3879         cancellation before potentially going to sleep.  [BZ #401]
3881 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3883         * Versions: Remove exports for pthread_set*id_np functions.
3884         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3885         for now.
3886         * Makefile: Don't build pthread_set*id code for now.
3888 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3890         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3891         internal use.
3892         * allocatestack.c (__nptl_setxid): New function.
3893         * descr.h (struct xid_command): Define type.
3894         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3895         (sighandler_setxid): New function.
3896         (__pthread_initialize_minimal): Register sighandler_setxid for
3897         SIGCANCEL.
3898         * pt-allocrtsig.c: Update comment.
3899         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3900         Declare __nptl_setxid.
3901         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3902         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3903         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3904         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3905         and pthread_setresuid_np.
3906         * pthread_setgid_np.c: New file.
3907         * pthread_setuid_np.c: New file.
3908         * pthread_setegid_np.c: New file.
3909         * pthread_seteuid_np.c: New file.
3910         * pthread_setregid_np.c: New file.
3911         * pthread_setreuid_np.c: New file.
3912         * pthread_setresgid_np.c: New file.
3913         * pthread_setresuid_np.c: New file.
3914         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3915         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3916         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3917         and pthread_setresuid_np.
3918         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3919         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3920         pthread_setregid, and pthread_setresgid.
3922 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3924         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3925         ENOMEM when out of memory.
3927 2004-09-10  Roland McGrath  <roland@redhat.com>
3929         [BZ #379]
3930         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3931         code, since we don't try to use the broken CLONE_STOPPED any more.
3932         * pthread_create.c (start_thread): Likewise.
3934 2004-09-15  Richard Henderson  <rth@redhat.com>
3936         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3938 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3940         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3941         (__libc_unwind_longjmp): Delete macro and declare as function.
3942         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3943         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3944         nptl directory.
3945         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3946         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3947         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3949 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3951         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3952         for __USE_XOPEN2K.
3953         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3954         types also for __USE_XOPEN2K.
3955         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3956         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3957         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3958         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3959         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3960         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3961         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3962         [BZ #320]
3964 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3966         * sysdeps/pthread/pthread.h
3967         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3968         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3969         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3970         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3971         [BZ #375]
3973 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3975         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3976         PSEUDO to be used with . prefix.
3978         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3979         Use atomic_increment instead of atomic_exchange_and_add.
3980         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3981         Likewise.
3982         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3983         Likewise.
3984         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3985         Likewise.
3987         * allocatestack.c (allocate_stack): Use atomic_increment_val
3988         instead of atomic_exchange_and_add.
3989         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3990         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3991         Likewise.
3992         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3993         Likewise.
3995         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3996         the initialization function might throw.
3998 2005-09-05  Richard Henderson  <rth@redhat.com>
4000         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4001         Move definition inside libpthread, libc, librt check.  Provide
4002         definition for rtld.
4004 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4006         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4007         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4008         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4009         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4010         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4011         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4012         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4013         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4014         * unwind.c: Use it.
4016         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4017         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4018         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4019         Likewise.
4020         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4021         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4022         this is the last waiter, signal pthread_cond_destroy caller and
4023         avoid using the pthread_cond_t structure after unlock.
4024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4025         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4026         Read clock type from the least significant bits of __nwaiters instead
4027         of __clock.
4028         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4029         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4031 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4033         [BZ #342]
4034         * Makefile (tests): Add tst-cond20 and tst-cond21.
4035         * tst-cond20.c: New test.
4036         * tst-cond21.c: New test.
4037         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4038         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4039         it unsigned int.
4040         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4041         Likewise.
4042         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4043         (pthread_cond_t): Likewise.
4044         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4045         Likewise.
4046         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4047         Likewise.
4048         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4049         Likewise.
4050         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4051         (cond_nwaiters): New.
4052         (clock_bits): New.
4053         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4054         if there are waiters not signalled yet.
4055         Wait until all already signalled waiters wake up.
4056         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4057         __nwaiters.  If pthread_cond_destroy has been called and this is the
4058         last waiter, signal pthread_cond_destroy caller and avoid using
4059         the pthread_cond_t structure after unlock.
4060         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4061         decrement it when leaving.  If pthread_cond_destroy has been called
4062         and this is the last waiter, signal pthread_cond_destroy caller.
4063         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4064         Likewise.  Read clock type from the least significant bits of
4065         __nwaiters instead of __clock.
4066         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4067         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4068         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4069         clock type just from the last COND_CLOCK_BITS bits of value.
4070         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4071         instead of __clock, just from second bit of condattr's value.
4073 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4075         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4076         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4077         != 64.
4078         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4080 2004-08-15  Roland McGrath  <roland@frob.com>
4082         * pthread_atfork.c: Update copyright terms including special exception
4083         for these trivial files, which are statically linked into executables
4084         that use dynamic linking for the significant library code.
4086 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4088         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4089         pthread_rwlock_rdlock.
4090         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4091         Decrease __nr_readers_queued after reacquiring lock.
4092         * sysdeps/pthread/pthread_rwlock_timedrdlock
4093         (pthread_rwlock_timedrdlock): Likewise.
4094         Reported by Bob Cook <bobcook47@hotmail.com>.
4096 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4098         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4099         before pthread_barrier_wait.
4101 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4104         Remove unnecessary exception handling data.
4106 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4108         [BZ #284]
4109         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4110         instead of clockid_t.
4112 2004-07-21  Roland McGrath  <roland@redhat.com>
4114         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4116 2004-07-19  Roland McGrath  <roland@redhat.com>
4118         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4120 2004-07-02  Roland McGrath  <roland@redhat.com>
4122         * configure: Don't exit.
4124 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4126         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4127         (__pthread_cond_timedwait): Check for invalid nanosecond in
4128         timeout value.
4130 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4132         * Makefile: Add rules to build and run tst-fini1.
4133         * tst-fini1.c: New file.
4134         * tst-fini1mod.c: New file.
4136 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4138         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4139         if no cancellation support is needed.
4140         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4141         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4142         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4143         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4144         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4145         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4146         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4147         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4148         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4150         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4151         only if not already defined.
4153 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4155         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4156         constraint "m" instead of "0" for futex.
4158         * shlib-versions: Add powerpc64-.*-linux.*.
4160 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4162         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4163         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4164         for valid tv_nsec.
4165         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4166         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4167         bits.
4169 2004-06-29  Roland McGrath  <roland@redhat.com>
4171         * Banner: NPTL no longer has its own version number.
4172         * Makefile (nptl-version): Variable removed.
4173         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4174         using $(version), the glibc version number.
4176 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4178         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4179         Fix branch offset for a PLT entry.
4180         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4181         Likewise.
4182         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4183         Likewise.
4184         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4185         Likewise.
4186         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4187         Likewise.
4189 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4191         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4192         unconditionally.
4194 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4196         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4197         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4198         instead of tv_sec.
4199         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4200         (pthread_rwlock_timedrdlock): Likewise.
4202 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4204         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4205         Set __r7 to val, not mutex.
4207 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4209         * Makefile: Add rules to build tst-rwlock14.
4210         * tst-rwlock14.c: New file.
4212 2004-06-24  Boris Hu  <boris.hu@intel.com>
4214         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4215         check.
4216         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4218 2004-06-19  Andreas Jaeger  <aj@suse.de>
4220         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4221         assembler in last patch.
4223 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4225         * sysdeps/pthread/pthread_cond_timedwait.c
4226         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4228         (__pthread_cond_timedwait): Check for invalid nanosecond in
4229         timeout value.
4230         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4231         * tst-cond19.c: New file.
4232         * Makefile: Add rules to build and run tst-cond19.
4234 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4236         * tst-context1.c (GUARD_PATTERN): Defined.
4237         (tst_context_t): Define struct containing ucontext_t & guard words.
4238         (ctx): Declare as an array of tst_context_t.
4239         (fct): Verify uc_link & guard words are still valid.
4240         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4242 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4244         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4245         Add __data.__futex field, reshuffle __data.__clock.
4246         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4247         (__pthread_cond_signal): Increment __futex at the same time as
4248         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4249         address of low 32-bits of __wakeup_seq to futex syscall.
4250         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4251         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4252         releasing internal lock to FUTEX_WAIT.
4253         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4254         (__pthread_cond_timedwait): Likewise.
4255         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4256         (FUTEX_CMP_REQUEUE): Define.
4257         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4258         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4259         Pass __futex value from before the unlock and __futex address instead
4260         of address of low 32-bits of __wakeup_seq to futex syscall.
4261         Fallback to FUTEX_WAKE all on any errors.
4263 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4265         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4266         comment typo.
4267         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4268         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4269         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4270         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4271         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4273 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4275         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4276         Add memory clobber to inline assembly.
4277         (__lll_mutex_trylock): Likewise.
4278         (__lll_mutex_cond_trylock): Likewise.
4280 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4282         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4283         Pass val argument as 6th system call argument in %r7.
4285 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4287         * Makefile (tests): Add tst-cond16.
4288         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4289         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4290         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4291         Add __data.__futex field, reshuffle __data.__clock.
4292         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4293         (__pthread_cond_signal): Increment __futex at the same time as
4294         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4295         address of low 32-bits of __wakeup_seq to futex syscall.
4296         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4297         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4298         releasing internal lock to FUTEX_WAIT.
4299         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4300         (__pthread_cond_timedwait): Likewise.
4301         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4302         (FUTEX_CMP_REQUEUE): Define.
4303         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4304         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4305         Pass __futex value from before the unlock and __futex address instead
4306         of address of low 32-bits of __wakeup_seq to futex syscall.
4307         Fallback to FUTEX_WAKE all on any errors.
4308         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4309         Define.
4310         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4311         internally.  Return non-zero if error, zero if success.
4312         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4313         Add __data.__futex field, reshuffle __data.__clock.
4314         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4315         Define.
4316         (lll_futex_requeue): Add val argument, return 1 unconditionally
4317         for the time being.
4318         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4319         Add __data.__futex field, reshuffle __data.__clock.
4320         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4321         Define.
4322         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4323         internally.  Return non-zero if error, zero if success.
4324         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4325         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4326         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4327         Define.
4328         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4329         internally.  Return non-zero if error, zero if success.
4330         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4331         Add __data.__futex field, reshuffle __data.__clock.
4332         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4333         Define.
4334         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4335         internally.  Return non-zero if error, zero if success.
4336         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4337         Add __data.__futex field, reshuffle __data.__clock.
4338         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4339         Add __data.__futex field, reshuffle __data.__clock.
4340         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4341         Increment __futex at the same time as __wakeup_seq or __total_seq.
4342         Pass address of __futex instead of address of low 32-bits of
4343         __wakeup_seq to futex syscall.
4344         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4345         Pass __futex value from before releasing internal lock
4346         to FUTEX_WAIT.
4347         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4348         Likewise.  Avoid unnecessary shadowing of variables.
4349         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4350         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4351         unlock and __futex address instead of address of low 32-bits of
4352         __wakeup_seq to futex_requeue macro, adjust for new return value
4353         meaning.
4354         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4355         (__pthread_cond_signal): Increment __futex at the same time as
4356         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4357         address of low 32-bits of __wakeup_seq to futex syscall.
4358         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4359         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4360         releasing internal lock to FUTEX_WAIT.
4361         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4362         (__pthread_cond_timedwait): Likewise.
4363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4364         (FUTEX_CMP_REQUEUE): Define.
4365         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4366         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4367         Pass __futex value from before the unlock and __futex address instead
4368         of address of low 32-bits of __wakeup_seq to futex syscall.
4369         Fallback to FUTEX_WAKE all on any errors.
4371 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4373         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4374         Add nop to align the end of critical section.
4375         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4377 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4379         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4380         Add __broadcast_seq field.
4381         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4382         all waiters as woken with woken_seq and bump broadcast counter.
4383         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4384         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4385         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4386         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4388 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4390         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4391         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4392         Reported by Kaz Kojima.
4394 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4396         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4398 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4400         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4401         __broadcast_seq with bc_seq after acquiring internal lock instead of
4402         before it.
4404 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4406         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4407         compilation.
4408         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4409         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4410         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4411         (pthread_cond_t): Add __data.__broadcast_seq field.
4412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4413         (FRAME_SIZE): Define.
4414         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4415         Comment typo fixes.
4416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4417         Define.
4418         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4419         typo fixes.
4420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4421         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4422         fixes.
4424 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4426         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4427         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4428         Add __broadcast_seq field.
4429         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4430         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4431         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4432         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4433         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4434         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4435         all waiters as woken with woken_seq and bump broadcast counter.
4436         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4438         __broadcast_seq field.
4439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4440         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4441         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4442         * pthread_cond_init.c: Initialize __broadcast_seq field.
4443         * Makefile (tests): Add tst-cond17 and tst-cond18.
4444         Add .NOTPARALLEL goal.
4445         * tst-cond16.c: New file.  From Jakub.
4446         * tst-cond17.c: New file.  From Jakub.
4447         * tst-cond18.c: New file.  From Jakub.
4449 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4451         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4452         unwind info.
4454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4455         Parametrize frame size.  Correct some unwind info.
4456         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4458 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4460         * tst-stack3.c: Note testing functionality beyond POSIX.
4462 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4464         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4465         Change conditional from ifdef to if.
4467 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4469         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4470         SYSDEP_CANCEL_ERROR): Define.
4471         (PSEUDO): Use it.
4473 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4475         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4477 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4479         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4481 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4483         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4484         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4485         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4486         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4488 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4490         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4491         thread has all signals blocked.
4493 2004-04-18  Andreas Jaeger  <aj@suse.de>
4495         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4496         (SEM_VALUE_MAX): Add missing brace.
4498 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4500         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4501         in rt subdir.
4502         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4503         * sysdeps/pthread/tst-mqueue8x.c: New test.
4504         * tst-cancel4.c: Update comment about message queues.
4506         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4507         return it_value { 0, 0 }.
4508         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4509         like SIGEV_SIGNAL.
4510         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4511         assertion for SIGEV_NONE.
4512         (thread_attr_compare): Compare all attributes, not just a partial
4513         subset.
4515 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4517         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4519 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4521         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4522         Just use a plain number.
4523         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4524         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4525         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4526         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4527         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4528         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4529         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4531 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4533         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4534         frame info.
4535         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4537 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4539         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4540         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4541         of calling sigwaitinfo.
4543 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4545         * allocatestack.c (allocate_stack): Set reported_guardsize
4546         unconditionally.
4547         * pthread_getattr_np.c (pthread_getattr_np): Use
4548         reported_guardsize instead of guardsize.
4549         * descr.h (struct pthread): Add reported_guardsize field.
4551 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4553         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4555 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4557         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4559 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4561         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4562         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4563         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4564         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4565         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4566         Define.
4567         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4568         (_POSIX_MESSAGE_PASSING): Define.
4569         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4570         (_POSIX_MESSAGE_PASSING): Define.
4571         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4572         (_POSIX_MESSAGE_PASSING): Define.
4574 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4576         * tst-context1.c (fct): Check whether correct stack is used.
4578 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4580         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4581         matching constraints for asm mem parameters.
4583         * tst-clock2.c (tf): Don't define unless needed.
4585 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4587         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4588         $(gnulib).
4590 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4592         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4593         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4594         * pthreadP.h: Declare __nptl_deallocate_tsd.
4595         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4596         Adjust caller.
4598         * Makefile (tests): Add tst-tsd5.
4599         * tst-tsd5.c: New file.
4601 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4603         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4604         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4605         is SHLIB_COMPAT check.
4606         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4607         (__pthread_attr_getaffinity_old): Likewise.
4608         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4609         (__pthread_getaffinity_old): Likewise.
4610         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4611         (__pthread_setaffinity_old): Likewise.
4613 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4615         * allocatestack.c (_make_stacks_executable): Call
4616         _dl_make_stack_executable first.
4618 2004-03-24  Roland McGrath  <roland@redhat.com>
4620         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4621         constraint instead of "0".
4623 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4625         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4626         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4628         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4629         code to avoid warning.
4631 2004-03-24  Andreas Jaeger  <aj@suse.de>
4633         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4634         (__pthread_attr_setaffinity_old): Remove const.
4636 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4638         * sysdeps/unix/sysv/linux/smp.h: New file.
4639         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4640         * init.c: Define __is_smp.
4641         (__pthread_initialize_minimal_internal): Call is_smp_system to
4642         initialize __is_smp.
4643         * pthreadP.h: Declare __is_smp.
4644         Define MAX_ADAPTIVE_COUNT is necessary.
4645         * pthread_mutex_init.c: Add comment regarding __spins field.
4646         * pthread_mutex_lock.c: Implement adaptive mutex type.
4647         * pthread_mutex_timedlock.c: Likewise.
4648         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4649         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4650         Add __spins field.
4651         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4652         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4653         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4654         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4655         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4656         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4657         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4658         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4659         lll_mutex_cond_trylock.
4660         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4661         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4662         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4663         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4664         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4665         Define BUSY_WAIT_NOP.
4666         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4667         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4669         * tst-mutex5.c: Add support for testing adaptive mutexes.
4670         * tst-mutex7.c: Likewise.
4671         * tst-mutex5a.c: New file.
4672         * tst-mutex7a.c: New file.
4673         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4675         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4676         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4677         vgettimeofday call might destroy the content.
4679         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4680         @pause in the loop.
4682         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4683         No need to restrict type of ret.  Make it int.  Add comment.
4685         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4686         Remove unnecessary setne instruction.
4688 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4690         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4691         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4692         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4693         If realloc fails, break out of the loop.
4695 2004-03-20  Andreas Jaeger  <aj@suse.de>
4697         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4698         (__pthread_setaffinity_old): Fix interface.
4699         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4700         (__pthread_getaffinity_old): Likewise.
4702         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4703         (__pthread_setaffinity_new): Remove duplicate declaration.
4705 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4707         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4708         the return value to a safe register.
4709         (CDISABLE): Set the function argument correctly.
4711 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4713         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4714         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4715         Rewrite so that only one locked memory operation per round is needed.
4716         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4717         (pthread_barrier_wait): After wakeup, release lock only when the
4718         last thread stopped using the barrier object.
4719         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4720         (__pthread_cond_wait): Don't store mutex address if the current
4721         value is ~0l.  Add correct cleanup support and unwind info.
4722         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4723         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4724         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4725         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4726         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4727         Add correct cleanup support and unwind info.
4728         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4729         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4730         information for syscall wrappers.
4732 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4734         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4735         cpusetsize field, remove next.
4736         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4737         parameter for size of the CPU set.
4738         (pthread_setaffinity_np): Likewise.
4739         (pthread_attr_getaffinity_np): Likewise.
4740         (pthread_attr_setaffinity_np): Likewise.
4741         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4742         interface change, keep compatibility code.
4743         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4744         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4745         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4746         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4747         __pthread_getaffinity_np.
4748         * Versions: Add version for changed interfaces.
4749         * tst-attr3.c: Adjust test for interface change.
4750         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4751         increasing buffer sizes.
4752         * pthread_attr_destroy.c: Remove unused list handling.
4753         * pthread_attr_init.c: Likewise.
4755 2004-03-17  Roland McGrath  <roland@redhat.com>
4757         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4758         first argument to clock_getres so we ever enable kernel timers.
4760 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4762         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4764 2004-03-12  Richard Henderson  <rth@redhat.com>
4766         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4767         oldvalue from CENABLE to CDISABLE.
4769 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4771         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4772         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4773         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4774         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4776 2004-03-11  Richard Henderson  <rth@redhat.com>
4778         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4779         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4780         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4782 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4784         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4785         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4786         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4788 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4790         * forward.c (__pthread_cond_broadcast_2_0,
4791         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4792         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4793         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4795 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4797         * sysdeps/sh/tcb-offsets.sym: Add PID.
4798         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4799         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4801 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4803         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4804         include <sysdep-cancel.h>, vfork is no cancellation point.
4805         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4806         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4807         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4809 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4811         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4812         libc_hidden_def.
4813         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4814         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4815         Likewise.
4816         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4817         Likewise.
4818         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4819         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4820         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4821         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4822         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4824         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4825         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4826         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4827         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4828         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4829         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4831         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4832         a local register for saving old PID.  Negate PID in parent upon exit.
4834         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4835         tcb-offsets.h.
4836         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4837         before syscall, set to the old value in the parent afterwards.
4838         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4839         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4840         tcb-offsets.h.
4841         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4842         before syscall, set to the old value in the parent afterwards.
4843         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4844         * sysdeps/s390/tcb-offsets.sym: Add PID.
4846         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4847         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4848         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4849         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4850         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4851         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4853 2004-03-10  Andreas Schwab  <schwab@suse.de>
4855         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4856         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4857         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4859 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4861         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4862         * tst-cancel21.c (do_one_test): Likewise.
4863         Reported by Gordon Jin <gordon.jin@intel.com>.
4865 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4867         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4868         if non-zero and set to INT_MIN if zero.
4869         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4870         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4871         (SAVE_PID, RESTORE_PID): Define.
4872         (__vfork): Use it.
4873         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4874         Use relative path to avoid including NPTL i386/vfork.S.
4875         (SAVE_PID, RESTORE_PID): Define.
4876         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4877         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4878         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4879         tst-vfork2x.
4880         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4881         * tst-vfork1.c: New test.
4882         * tst-vfork2.c: New test.
4883         * tst-vfork1x.c: New test.
4884         * tst-vfork2x.c: New test.
4886 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4888         * sysdeps/i386/tcb-offsets.sym: Add PID.
4889         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4890         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4891         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4893 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4895         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4897 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4899         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4900         _rtld_global_ro.
4902 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4904         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4905         _rtld_global_ro.
4907         * tst-once4.c: Remove unnecessary macro definition.
4909         * tst-mutex7.c (do_test): Limit thread stack size.
4910         * tst-once2.c (do_test): Likewise.
4911         * tst-tls3.c (do_test): Likewise.
4912         * tst-tls1.c (do_test): Likewise.
4913         * tst-signal3.c (do_test): Likewise.
4914         * tst-kill6.c (do_test): Likewise.
4915         * tst-key4.c (do_test): Likewise.
4916         * tst-join4.c (do_test): Likewise.
4917         * tst-fork1.c (do_test): Likewise.
4918         * tst-context1.c (do_test): Likewise.
4919         * tst-cond2.c (do_test): Likewise.
4920         * tst-cond10.c (do_test): Likewise.
4921         * tst-clock2.c (do_test): Likewise.
4922         * tst-cancel10.c (do_test): Likewise.
4923         * tst-basic2.c (do_test): Likewise.
4924         * tst-barrier4.c (do_test): Likewise.
4926 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4928         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4930 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4933         (__pthread_cond_timedwait): Optimize wakeup test.
4934         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4935         (__pthread_cond_wait): Likewise.
4936         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4937         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4938         Likewise.
4940 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4942         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4943         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4944         the atomic instruction needed.
4945         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4946         (__lll_mutex_lock_wait): Likewise.
4948 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4950         * Makefile (tests): Add tst-cond14 and tst-cond15.
4951         * tst-cond14.c: New file.
4952         * tst-cond15.c: New file.
4954 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4956         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4957         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4958         needs to be implemented differently to be useful.
4960 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4962         * pthread_attr_setschedparam.c: Don't test priority against limits
4963         here.  Set ATTR_FLAG_SCHED_SET flag.
4964         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4965         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4966         from parent thread to child.  If attribute is used and scheduling
4967         parameters are not inherited, copy parameters from attribute or
4968         compute them.  Check priority value.
4969         * pthread_getschedparam.c: If the parameters aren't known yet get
4970         them from the kernel.
4971         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4972         ATTR_FLAG_POLICY_SET flag for thread.
4973         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4974         and ATTR_FLAG_POLICY_SET.
4976         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4978         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4979         fail if stack address hasn't been set.  Just return 0.
4981 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4983         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4984         libpthread for the files in this list.
4985         (CFLAGS-tst-unload): Removed.
4986         * tst-unload.c (do_test): Don't use complete path for
4987         LIBPHREAD_SO.
4989         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4990         tst-_res1mod2.
4992 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4994         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4995         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4996         operation per round is needed.
4997         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4998         (__lll_mutex_lock_wait): Likewise.
5000 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5002         * tst-cancel9.c (cleanup): Don't print to stderr.
5004 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5006         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5008 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5010         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5011         (__syscall_error_handler2): Call CDISABLE.
5012         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5013         (__syscall_error_handler2): Call CDISABLE.
5015         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5016         Release lock before the loop, don't reacquire it.
5018         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5020 2004-02-19  Andreas Schwab  <schwab@suse.de>
5022         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5023         Fix last change.
5025 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5027         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5028         (pthread_barrier_wait): After wakeup, release lock only when the
5029         last thread stopped using the barrier object.
5030         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5031         (pthread_barrier_wait): Likewise.
5032         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5033         Likewise.
5034         * Makefile (tests): Add tst-barrier4.
5035         * tst-barrier4.c: New file.
5037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5038         (__pthread_cond_timedwait): Perform timeout test while holding
5039         internal lock to prevent wakeup race.
5040         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5041         * sysdeps/pthread/pthread_cond_timedwait.c
5042         (__pthread_cond_timedwait): Likewise.
5043         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5044         (__pthread_cond_timedwait): Likewise.
5046 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5048         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5049         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5050         * Makefile (tests): Add tst-rwlock13.
5051         * tst-rwlock13.c: New test.
5053 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5056         (__condvar_tw_cleanup): Little optimization.
5057         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5059 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5061         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5062         libpthread as "lib" parameter to SHLIB_COMPAT.
5063         (__novmx_siglongjmp): Fix typo in function name.
5064         (__novmx_longjmp): Fix typo in function name.
5066 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5068         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5069         __builtin_expect.
5071         * sysdeps/generic/pt-longjmp.c: Moved to...
5072         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5074 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5076         * Makefile (libpthread-routines): Add pt-cleanup.
5077         * pt-longjmp.c: Removed.
5078         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5079         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5080         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5081         Version longjmp, siglongjmp for GLIBC_2.3.4.
5082         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5084 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5086         * sysdeps/pthread/pthread_cond_timedwait.c
5087         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5088         Reuse code.  Add __builtin_expects.
5090         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5091         (__pthread_cond_timedwait): Get internal lock in case timeout has
5092         passed before the futex syscall.
5093         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5095 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5097         * allocatestack.c: Pretty printing.
5099         * sysdeps/pthread/createthread.c (create_thread): Don't add
5100         CLONE_DETACHED bit if it is not necessary.
5102 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5104         * pthread_getattr_np.c: Include ldsodefs.h.
5106 2004-01-16  Richard Henderson  <rth@redhat.com>
5108         * allocatestack.c: Don't declare __libc_stack_end.
5109         * init.c (__pthread_initialize_minimal_internal): Likewise.
5110         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5112 2004-01-15  Richard Henderson  <rth@redhat.com>
5114         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5115         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5116         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5117         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5118         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5119         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5120         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5121         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5123 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5125         * init.c (pthread_functions): Make array const.
5127 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5129         * allocatestack.c (__make_stacks_executable): Change interface.
5130         Check parameters.  Pass parameter on to libc counterpart.
5131         * pthreadP.h: Change declaration.
5133 2004-01-13  Richard Henderson  <rth@redhat.com>
5135         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5136         prototype form.
5137         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5138         Likewise.
5140         * sysdeps/alpha/Makefile: New file.
5141         * sysdeps/alpha/tcb-offsets.sym: New file.
5142         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5143         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5145         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5146         on powerpc version.
5148 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5150         * Makefile (tests): Add tst-backtrace1.
5151         * tst-backtrace1.c: New test.
5153 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5155         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5156         register as second parameter to the REGISTER macro.
5157         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5158         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5159         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5160         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5161         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5162         of thread register as second parameter to REGISTER macro in 64 case.
5164 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5166         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5167         (CFLAGS-getpid.o): Defined.
5168         (CFLAGS-getpid.os): Defined.
5170 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5172         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5173         returned for main thread does not overlap with any other VMA.
5174         Patch by Jakub Jelinek.
5176 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5178         * tst-raise1.c: Include stdio.h.
5180 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5182         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5183         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5184         If pid is 0, set it to selftid.
5185         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5186         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5187         != 0, return self->tid without doing a syscall.
5188         * descr.h (struct pthread): Move pid field after tid.
5190         * Makefile (tests): Add tst-raise1.
5191         * tst-raise1.c: New file.
5193 2003-12-23  Roland McGrath  <roland@redhat.com>
5195         * tst-oddstacklimit.c: New file.
5196         * Makefile (tests): Add it.
5197         (tst-oddstacklimit-ENV): New variable.
5199         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5200         value up to page size for __default_stacksize.
5202 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5204         * Makefile (tests): Add tst-eintr5.
5205         * tst-eintr5.c: New file.
5207         * eintr.c (eintr_source): Prevent sending signal to self.
5209         * tst-eintr2.c (tf1): Improve error message.
5211 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5213         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5214         * sysdeps/unix/sysv/linux/getpid.c: New file.
5215         * pthread_cancel.c: Add comment explaining use of PID field.
5216         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5217         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5218         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5219         temporarily to signal the field must not be relied on and updated
5220         by getpid().
5221         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5222         temporarily negative.
5223         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5225 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5227         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5228         (eintr_source): If ARG != NULL, use pthread_kill.
5229         * tst-eintr1.c: Adjust for this change.
5230         * tst-eintr2.c: Likewise.
5231         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5232         * tst-eintr3.c: New file.
5233         * tst-eintr4.c: New file.
5235 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5237         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5238         if CANCELSTATE_BITMASK is set.
5239         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5240         Likewise.
5242         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5243         (tests-reverse): Add tst-cancel23.
5244         * tst-cancel22.c: New test.
5245         * tst-cancel23.c: New test.
5247 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5249         * tst-eintr1.c: Better error messages.
5251         * Makefile (tests): Add tst-eintr2.
5252         * tst-eintr2.c: New file.
5254 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5256         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5257         (CFLAGS-tst-cancelx21.c): Set.
5258         * tst-cancel21.c: New test.
5259         * tst-cancelx21.c: New test.
5261         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5262         comparison operand.
5263         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5264         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5265         * pt-longjmp.c: Include jmpbuf-unwind.h.
5266         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5267         _JMPBUF_UNWINDS.  Adjust compared pointers.
5268         * init.c (__pthread_initialize_minimal_internal): Initialize
5269         pd->stackblock_size.
5270         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5271         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5272         * sysdeps/i386/jmpbuf-unwind.h: New file.
5273         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5274         * sysdeps/s390/jmpbuf-unwind.h: New file.
5275         * sysdeps/sh/jmpbuf-unwind.h: New file.
5276         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5277         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5278         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5279         (_JMPBUF_CFA_UNWINDS): Remove.
5280         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5282 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5284         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5285         (CFLAGS-tst-cancelx20.c): Set.
5286         * tst-cancel20.c: New test.
5287         * tst-cancelx20.c: New test.
5289 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5291         * init.c (__pthread_initialize_minimal_internal): Don't treat
5292         architectures with separate register stack special here when
5293         computing default stack size.
5295 2003-12-17  Roland McGrath  <roland@redhat.com>
5297         * Makefile (tst-cancelx7-ARGS): New variable.
5298         Reportd by Greg Schafer <gschafer@zip.com.au>.
5300 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5302         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5303         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5304         (tst-stack3-ENV): Set.
5305         ($(objpfx)tst-stack3-mem): New.
5306         * tst-stack3.c: New test.
5308 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5310         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5311         Add unwind directives.  Drop unused .regstk directive.
5312         (_fini_EPILOG_BEGINS): Add unwind directives.
5314 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5316         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5317         Assume parameter is a pointer.
5318         (lll_futex_wake): Likewise.
5319         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5320         Likewise.
5321         (lll_futex_wake): Likewise.
5322         Reported by Boris Hu.
5323         * sysdeps/unix/sysv/linux/unregister-atfork.c
5324         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5326         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5328 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5330         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5331         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5332         __rtld_lock_initialize for ld.so lock.
5333         Patch in part by Adam Li <adam.li@intel.com>.
5335 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5337         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5338         in $(gnulib).  Also, remove stale comment.
5340 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5342         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5343         advantage of new syscall stub and optimize accordingly.
5345         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5346         from SYS_futex, to match expectations of
5347         sysdep.h:DO_INLINE_SYSCALL.
5348         (lll_futex_clobbers): Remove.
5349         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5350         (lll_futex_wake): Likewise.
5351         (lll_futex_requeue): Likewise.
5352         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5353         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5354         Jelinek).
5355         (__lll_mutex_lock): Likewise.
5356         (__lll_mutex_cond_lock): Likewise.
5357         (__lll_mutex_timed_lock): Likewise.
5358         (__lll_mutex_unlock): Likewise.
5359         (__lll_mutex_unlock_force): Likewise.
5361         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5362         comes before the include of <sysdep.h>.
5363         (THREAD_SELF_SYSINFO): New macro.
5364         (THREAD_SYSINFO): Likewise.
5365         (INIT_SYSINFO): New macro.
5366         (TLS_INIT_TP): Call INIT_SYSINFO.
5368         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5370         * sysdeps/pthread/createthread.c (create_thread): Use
5371         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5372         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5373         THREAD_SELF_SYSINFO instead of open code.
5374         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5375         (THREAD_SYSINFO): Likewise.
5377         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5379         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5381 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5383         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5384         instead of .init.  Patch by David Mosberger.
5386 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5388         * sysdeps/pthread/configure.in: Remove broken declaration in C
5389         cleanup handling check.
5391 2003-11-30  Andreas Jaeger  <aj@suse.de>
5393         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5394         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5395         Likewise.
5397 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5399         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5400         * pthread_attr_destroy.c: Include shlib-compat.h.
5401         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5402         is set in iattr->flags.
5403         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5405 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5407         * Makefile (distribute): Add tst-cleanup4aux.c.
5409         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5410         include.
5412 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5414         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5415         pthread_cond_signal.
5417         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5418         store mutex address if the current value is ~0l.
5419         * sysdeps/pthread/pthread_cond_timedwait.c
5420         (__pthread_cond_timedwait): Likewise.
5421         * sysdeps/pthread/pthread_cond_broadcast.c
5422         (__pthread_cond_broadcast): Don't use requeue for pshared
5423         condvars.
5425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5426         (__pthread_cond_wait): Don't store mutex address if the current
5427         value is ~0l.
5428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5429         (__pthread_cond_timedwait): Likewise.
5430         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5431         (__pthread_cond_broadcast): Don't use requeue for pshared
5432         condvars.
5434         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5435         element with ~0l for pshared condvars, with NULL otherwise.
5437         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5438         (__pthread_cond_wait): Don't store mutex address if the current
5439         value is ~0l.
5440         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5441         (__pthread_cond_timedwait): Likewise.
5442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5443         (__pthread_cond_broadcast): Don't use requeue for pshared
5444         condvars.
5446         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5447         * tst-cond12.c: New file.
5448         * tst-cond13.c: New file.
5450 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5452         * sysdeps/pthread/configure.in: Make missing forced unwind support
5453         fatal.
5455 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5457         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5459 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5461         * Makefile: Add magic to clean up correctly.
5463 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5465         * unwind.c (FRAME_LEFT): Define.
5466         (unwind_stop): Handle old style cleanups here.
5467         (__pthread_unwind): Handle old style cleanups only if
5468         !HAVE_FORCED_UNWIND.
5469         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5470         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5471         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5472         ($(objpfx)tst-cleanupx4): Likewise.
5473         * tst-cleanup4.c: New test.
5474         * tst-cleanup4aux.c: New.
5475         * tst-cleanupx4.c: New test.
5477 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5479         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5480         lll_mutex_*lock macros to skip atomic operations on some archs.
5482 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5484         * sysdeps/pthread/tst-timer.c (main): Initialize
5485         sigev2.sigev_value as well.
5487 2003-10-15  Roland McGrath  <roland@redhat.com>
5489         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5490         is missing.
5491         * sysdeps/pthread/configure: Regenerated.
5493 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5495         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5496         locking macros.  No distinction between normal and mutex locking
5497         anymore.
5498         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5499         Merge bits from lowlevelmutex.S we still need.
5500         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5501         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5502         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5503         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5504         new mutex implementation.
5505         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5506         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5507         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5508         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5509         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5510         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5511         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5512         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5513         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5514         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5515         symbol for entry point to avoid cancellation.
5517 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5519         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5520         changes.
5521         (SAVE_OLDTYPE_0): Fix a typo.
5523 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5525         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5526         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5528 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5530         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5531         correct offset.
5533 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5535         * Makefile (tests): Add tst-cancel19.
5536         * tst-cancel19.c: New test.
5538 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5540         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5541         restoring of the old cancellation type.
5543 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5545         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5547 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5549         * sysdeps/pthread/malloc-machine.h: New file
5551 2003-09-24  Roland McGrath  <roland@redhat.com>
5553         * allocatestack.c (__make_stacks_executable): Don't ignore return
5554         value from _dl_make_stack_executable.
5556 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5558         * allocatestack.c (__make_stacks_executable): Also change
5559         permission of the currently unused stacks.
5561         * allocatestack.c (change_stack_perm): Split out from
5562         __make_stacks_executable.
5563         (allocate_stack): If the required permission changed between the time
5564         we started preparing the stack and queueing it, change the permission.
5565         (__make_stacks_executable): Call change_stack_perm.
5567         * Makefile: Build tst-execstack-mod locally.
5568         * tst-execstack-mod.c: New file.
5570 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5572         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5574 2003-09-23  Roland McGrath  <roland@redhat.com>
5576         * tst-execstack.c: New file.
5577         * Makefile (tests): Add it.
5578         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5579         (LDFLAGS-tst-execstack): New variable.
5581         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5582         whether to use PROT_EXEC for stack mmap.
5583         (__make_stacks_executable): New function.
5584         * pthreadP.h: Declare it.
5585         * init.c (__pthread_initialize_minimal_internal): Set
5586         GL(dl_make_stack_executable_hook) to that.
5588 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5590         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5591         recommendation from AMD re avoidance of lock prefix.
5593 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5595         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5596         lll_futex_timed_wait instead of lll_futex_wait.
5597         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5598         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5599         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5600         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5601         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5602         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5603         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5604         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5605         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5606         Completely revamp the locking macros.  No distinction between
5607         normal and mutex locking anymore.
5608         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5609         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5610         __lll_lock_timedwait): Fix prototypes.
5611         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5612         __lll_lock_timedwait): Likewise.
5613         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5614         macros, add __builtin_expect.
5615         (lll_mutex_timedlock): Likewise.  Fix return value.
5616         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5617         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5618         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5619         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5620         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5621         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5622         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5623         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5625 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5627         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5628         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5629         operation if possible.
5631         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5632         like jumping over the lock prefix.
5634 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5636         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5637         locking macros.  No distinction between normal and mutex locking
5638         anymore.
5639         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5640         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5641         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5642         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5643         locking.  Merge bits from lowlevelmutex.S we still need.
5644         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5645         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5646         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5647         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5648         * Makefile (routines): Remove libc-lowlevelmutex.
5649         (libpthread-rountines): Remove lowlevelmutex.
5650         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5651         for new mutex implementation.
5652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5653         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5654         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5656         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5657         Likewise.
5658         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5659         Likewise.
5660         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5661         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5662         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5663         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5664         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5665         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5666         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5668         Likewise.
5669         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5670         Likewise.
5671         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5672         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5673         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5674         Don't use requeue.
5675         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5676         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5678 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5680         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5681         in parameters of asm with output parameters.
5683         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5684         type of DECR parameter to int.
5685         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5687 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5689         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5690         guardsize for each thread.
5692 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5694         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5695         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5696         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5698         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5699         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5700         NULL.
5701         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5702         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5703         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5704         (pthread_getaffinity_np): Add hidden_def.
5706         * Makefile (tests): Add tst-attr3.
5707         * tst-attr3.c: New test.
5709         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5711 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5713         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5714         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5716 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5718         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5719         * tst-align.c: Include tst-stack-align.h.
5720         (tf, do_test): Use TEST_STACK_ALIGN macro.
5722 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5724         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5725         variable.
5727 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5729         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5730         stack-related values for the initial thread.
5732 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5734         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5736 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5738         * pthread_mutex_lock.c: Minor code rearrangements.
5740 2003-09-05  Roland McGrath  <roland@redhat.com>
5742         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5743         Instead, include ../nptl_db/db_info.c to do its magic.
5744         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5745         (__pthread_pthread_key_2ndlevel_size): Likewise.
5746         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5747         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5748         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5749         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5750         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5751         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5752         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5753         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5754         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5755         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5756         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5757         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5758         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5759         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5760         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5761         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5762         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5764 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5766         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5767         of pthread_t to be compatible with LT.
5768         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5769         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5770         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5771         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5772         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5773         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5774         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5776 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5778         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5780 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5782         * unwind-forcedunwind.c: Move to...
5783         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5784         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5785         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5786         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5787         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5788         * unwind.c: Include jmpbuf-unwind.h.
5789         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5791 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5793         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5794         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5795         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5796         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5797         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5798         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5799         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5800         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5801         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5802         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5803         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5804         function.
5805         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5806         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5807         * Makefile (tests): Add tst-stack2.
5808         * tst-stack2.c: New test.
5809         * tst-stack1.c: Include limits.h and sys/param.h.
5810         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5812         * pthread_condattr_setpshared.c: Include errno.h.
5813         (pthread_condattr_setpshared): Return EINVAL if pshared
5814         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5816         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5817         defined symbol for entry point to avoid cancellation.
5818         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5819         Likewise.
5820         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5821         Likewise.
5822         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5823         Likewise.
5824         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5825         Likewise.
5826         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5827         Likewise.
5828         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5829         __close_nocancel, __read_nocancel, __write_nocancel,
5830         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5831         libpthread.so or librt.so, define to corresponding function
5832         without _nocancel suffix.
5833         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5834         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5835         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5837         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5839 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5841         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5842         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5844         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5845         in subsections has a symbol associated with it.
5847         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5848         defined symbol for entry point to avoid cancellation.
5849         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5851 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5853         * Makefile (tests): Add tst-tls5.
5854         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5855         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5856         ($(objpfx)tst-tls5): New.
5857         ($(objpfx)tst-tls6.out): Likewise.
5858         (tests): Depend on $(objpfx)tst-tls6.out.
5859         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5860         (do_test): Check pthread_self () return value alignment.
5861         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5862         (tf): Check pthread_self () return value alignment.
5863         * tst-tls5.c: New test.
5864         * tst-tls5.h: New.
5865         * tst-tls5mod.c: New.
5866         * tst-tls5moda.c: New.
5867         * tst-tls5modb.c: New.
5868         * tst-tls5modc.c: New.
5869         * tst-tls5modd.c: New.
5870         * tst-tls5mode.c: New.
5871         * tst-tls5modf.c: New.
5872         * tst-tls6.sh: New test.
5874         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5875         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5876         * init.c (pthread_functions): Initialize them.
5877         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5878         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5879         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5880         pthread_cond_timedwait@@GLIBC_2.3.2.
5882 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5884         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5885         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5886         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5887         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5888         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5889         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5891         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5893         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5894         _POSIX_THREAD_PRIORITY_SCHEDULING.
5895         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5897 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5899         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5900         nested function, use static inline function from libio.h.
5901         Code by Richard Henderson.
5903         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5904         weak.
5906 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5908         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5909         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5910         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5911         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5912         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5913         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5914         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5915         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5916         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5917         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5918         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5919         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5920         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5921         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5922         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5923         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5924         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5925         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5926         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5927         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5928         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5929         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5930         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5931         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5932         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5933         * sysdeps/sparc/tls.h: New file.
5934         * sysdeps/sparc/tcb-offsets.sym: New file.
5935         * sysdeps/sparc/Makefile: New file.
5936         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5937         * init.c [__sparc__] (__NR_set_tid_address): Define.
5939 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5941         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5942         _IO_release_lock): Define.
5944 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5946         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5947         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5949 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5951         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5952         (__pthread_cleanup_class): Add missing return types of member
5953         functions.
5955 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5957         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5958         (lll_mutex_unlock_force): Add memory barrier between store and futex
5959         syscall.
5961 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5963         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5964         tempmsg in first loop.
5966 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5968         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5969         _POSIX_THREAD_PRIORITY_SCHEDULING.
5970         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5972 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5974         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5975         (__rtld_lock_default_lock_recursive,
5976         __rtld_lock_default_unlock_recursive): Define.
5977         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5978         __rtld_lock_unlock_recursive): Define using
5979         GL(_dl_rtld_*lock_recursive).
5980         * init.c (__pthread_initialize_minimal_internal): Initialize
5981         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5982         Lock GL(_dl_load_lock) the same number of times as
5983         GL(_dl_load_lock) using non-mt implementation was nested.
5985         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5986         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5988 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5990         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5991         PIPE_BUF.
5993 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5995         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5997 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5999         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6000         to first syscall error check.  Move syscall error check for tkill
6001         into __ASSUME_CLONE_STOPPED #ifdef.
6003 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6005         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6006         is not defined, do explicit synchronization.
6007         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6008         is not defined also unlock pd->lock for non-debugging case in case
6009         it is necessary.
6010         * pthread_create.c (start_thread): Always get and release pd->lock
6011         if __ASSUME_CLONE_STOPPED is not defined.
6012         (start_thread_debug): Removed.  Adjust users.
6013         * allocatestack.c (allocate_stack): Always initialize lock if
6014         __ASSUME_CLONE_STOPPED is not defined.
6015         * Makefile (tests): Add tst-sched1.
6016         * tst-sched1.c: New file.
6018         * sysdeps/pthread/createthread.c (do_clone): Only use
6019         sched_setschduler and pass correct parameters.
6021 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6023         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6024         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6025         PTHREAD_STACK_MIN in comments.
6027 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6029         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6030         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6031         argument.
6032         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6033         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6034         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6035         (__pthread_cleanup_upto): Fix prototype.
6036         (_longjmp_unwind): Adjust caller.
6037         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6038         Change second argument to const struct pointer.
6039         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6040         * tst-sem9.c (main): Likewise.
6041         * unwind.c: Include string.h for strlen prototype.
6043 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6046         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6047         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6048         Define HAVE_CMOV.
6049         Patch by Nicholas Miell <nmiell@attbi.com>.
6051 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6053         * init.c (__pthread_initialize_minimal_internal): Initialize
6054         GL(dl_init_static_tls).
6055         * pthreadP.h (__pthread_init_static_tls): New prototype.
6056         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6057         New functions.
6058         * Makefile (tests): Add tst-tls4.
6059         (modules-names): Add tst-tls4moda and tst-tls4modb.
6060         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6061         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6062         tst-tls4modb.so.
6063         * tst-tls4.c: New file.
6064         * tst-tls4moda.c: New file.
6065         * tst-tls4modb.c: New file.
6067 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6069         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6070         before __timer_dealloc.
6071         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6072         Don't call list_unlink.
6074 2003-07-29  Roland McGrath  <roland@redhat.com>
6076         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6078 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6080         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6081         Don't reuse struct aiocb A if it failed.
6082         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6083         not just one byte, as that does not block.
6085 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6087         * sysdeps/pthread/unwind-resume.c: New file.
6088         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6089         unwind-resume in csu subdir.
6090         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6091         exceptions.
6092         (librt-sysdep_routines, librt-shared-only-routines): Add
6093         rt-unwind-resume.
6094         * sysdeps/pthread/rt-unwind-resume.c: New file.
6095         * unwind-forcedunwind.c: New file.
6096         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6097         (libpthread-shared-only-routines): Likewise.
6098         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6099         * pthreadP.h (pthread_cancel_init): New prototype.
6100         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6102         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6103         attr argument const struct pthread_attr *.
6105         * res.c (__res_state): Return __resp.
6106         * descr.h: Include resolv.h.
6107         (struct pthread): Add res field.
6108         * pthread_create.c: Include resolv.h.
6109         (start_thread): Initialize __resp.
6110         * Makefile (tests): Add tst-_res1.
6111         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6112         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6113         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6114         libpthread.
6115         * tst-_res1.c: New file.
6116         * tst-_res1mod1.c: New file.
6117         * tst-_res1mod2.c: New file.
6119 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6121         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6123         * Makefile: Define various *-no-z-defs variables for test DSOs
6124         which has undefined symbols.
6126 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6128         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6129         Retry if the stwcx fails to store once_control.
6131 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6133         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6134         pthread_attr_setaffinity.
6135         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6136         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6137         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6138         * pthread_attr_destroy.c: Free cpuset element if allocated.
6139         * pthread_create.c: Pass iattr as additional parameter to
6140         create_thread.
6141         * sysdeps/pthread/createthread.c: If attribute is provided and
6142         a new thread is created with affinity set or scheduling parameters,
6143         start thread with CLONE_STOPPED.
6144         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6145         pthread_attr_setaffinity.
6146         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6147         cpuset element.
6149 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6151         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6153 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6155         * sysdeps/pthread/configure.in: Require CFI directives also for
6156         ppc and s390.
6158 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6160         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6161         Add cfi directives.
6163 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6165         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6166         CLEANUP_JMP_BUF.
6167         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6168         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6169         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6170         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6171         not self pointer in __writer.  Compare with TID to determine
6172         deadlocks.
6173         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6174         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6175         Likewise.
6176         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6177         Likewise.
6178         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6179         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6180         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6181         macros also when compiling librt.
6183 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6185         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6186         -fasynchronous-unwind-tables.
6187         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6188         (PSEUDO): Add cfi directives.
6189         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6190         Likewise.
6191         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6192         Likewise.
6194 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6196         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6197         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6198         * unwind.c (__pthread_unwind_next): Add hidden_def.
6199         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6200         Likewise.
6201         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6202         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6203         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6204         Likewise.
6205         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6206         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6207         Likewise.
6208         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6209         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6210         __pthread_unregister_cancel and __pthread_unwind_next.
6212 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6214         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6215         different symbol for the cancellation syscall wrapper and
6216         non-cancellation syscall wrapper.
6217         (PSEUDO_END): Define.
6219 2003-07-05  Richard Henderson  <rth@redhat.com>
6221         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6222         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6223         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6224         return actual return value from the syscall, not 0.
6226 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6228         * descr.h (struct pthread): Add pid field.
6229         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6230         (__reclaim_stacks): Likewise.
6231         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6232         also check for PID of the signal source.
6233         (__pthread_initialize_minimal_internal): Also initialize pid field
6234         of initial thread's descriptor.
6235         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6236         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6237         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6238         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6239         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6241 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6243         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6244         Fix use of parameter.
6245         (__libc_cleanup_pop): Likewise.
6247 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6249         * init.c (sigcancel_handler): Change parameters to match handler
6250         for SA_SIGACTION.  Check signal number and code to recognize
6251         invalid invocations.
6253 2003-07-03  Roland McGrath  <roland@redhat.com>
6255         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6256         Apply sizeof (struct pthread) bias to r13 value.
6258 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/pthread/configure.in: Require CFI directives.
6262         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6263         definition.
6264         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6265         libpthread compilation.
6266         * unwind.c (__pthread_unwind): Add hidden_def.
6267         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6269 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6271         * libc-cancellation.c (__libc_cleanup_routine): Define.
6272         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6273         (__pthread_cleanup_pop): Define.
6275 2003-07-01  Richard Henderson  <rth@redhat.com>
6277         * sysdeps/alpha/elf/pt-initfini.c: New file.
6278         * sysdeps/alpha/pthread_spin_lock.S: New file.
6279         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6280         * sysdeps/alpha/pthreaddef.h: New file.
6281         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6282         * sysdeps/alpha/tls.h: New file.
6283         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6284         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6285         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6286         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6287         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6288         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6289         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6290         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6291         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6292         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6294 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6296         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6297         cleanup support and unwind info.
6299 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6301         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6302         Use correct cleanup handler registration.  Add unwind info.
6303         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6304         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6305         * tst-once3.c: Add cleanup handler and check it is called.
6306         * tst-once4.c: Likewise.
6307         * tst-oncex3.c: New file.
6308         * tst-oncex4.c: New file.
6309         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6311 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6313         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6315 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6317         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6318         (tf_msgsnd): Likewise.
6320         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6321         premature returns a bit more.
6323 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6325         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6326         definition to the front.
6328         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6329         the cleanup functions to make the names unique.  Fix dwarf opcode
6330         un unwind table.
6331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6332         functions to make the names unique.  Fix CFA offset for two blocks.
6334 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6336         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6337         missing closing braces.
6338         Patch by Christophe Saout <christophe@saout.de>.
6340 2003-06-24  Roland McGrath  <roland@redhat.com>
6342         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6344 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6346         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6347         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6349         * pthreadP.h: Declare __find_thread_by_id.
6350         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6351         * pthread_clock_gettime.c: Allow using other thread's clock.
6352         * pthread_clock_settime.c: Likewise.
6353         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6354         * Makefile: Add rules to build and run tst-clock2.
6355         * tst-clock2.c: New file.
6357 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6360         to use exception-based cleanup handler.
6361         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6363         * tst-cond8.c (ch): Announce that we are done.
6365         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6367         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6368         Also test aio_suspend with timeout value.
6370 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6372         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6373         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6374         attribute_hidden.
6376         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6377         (__pthread_mutex_lock_internal): Likewise.
6378         (__pthread_mutex_unlock_internal): Likewise.
6379         (__pthread_mutex_unlock_usercnt): Declare.
6380         * pthread_mutex_destroy.c: Always fail if used in any way.
6381         * pthread_mutex_init.c: Update comment.
6382         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6383         * pthread_mutex_timedlock.c: Adjust __nusers.
6384         * pthread_mutex_trylock.c: Adjust __nusers.
6385         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6386         and public interfaces are wrapper with pass additional parameter.
6387         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6388         parameter zero.
6389         * tst-mutex8.c: New file.
6390         * Makefile (tests): Add tst-mutex8.
6391         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6392         __pthread_mutex_unlock_usercnt.
6393         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6396         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6397         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6398         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6399         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6400         Add __nusers.
6401         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6402         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6403         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6404         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6405         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6407         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6408         * pthread_mutex_timedlock.c: Likewise.
6409         * pthread_mutex_trylock.c: Adjust __nusers.
6410         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6411         * tst-mutex9.c: New file.
6412         * Makefile (tests): Add tst-mutex9.
6413         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6414         * sysdeps/ia64/tls.h: Likewise.
6415         * sysdeps/powerpc/tls.h: Likewise.
6416         * sysdeps/s390/tls.h: Likewise.
6417         * sysdeps/sh/tls.h: Likewise.
6418         * sysdeps/x86_64/tls.h: Likewise.
6419         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6420         Change type of __owner.
6421         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6422         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6423         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6424         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6425         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6427 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6429         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6430         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6432         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6433         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6434         instead of nr to lll_futex_wake.  Only set errno and return -1
6435         if err < 0.
6437         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6438         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6439         return actual return value from the syscall, not 0.
6441 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6443         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6444         find a random value.
6445         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6446         errno==EIDRM.
6448         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6449         compat_timer_settime.
6450         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6451         compat_timer_gettime.
6452         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6453         compat_timer_getoverrun.
6454         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6455         compat_timer_delete.
6457         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6458         error-checking mutex detect busy mutexes.
6460 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6462         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6463         Add ax to clobber list.
6464         (lll_mutex_cond_lock): Likewise.
6465         (lll_mutex_unlock): Likewise.
6466         (lll_lock): Likewise.
6467         (lll_unlock): Likewise.
6469         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6470         * tst-cancel18.c: New file.
6471         * tst-cancelx18.c: New file.
6473         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6474         and tcdrain.
6476         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6477         * tst-cancel17.c: New file.
6478         * tst-cancelx17.c: New file.
6480         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6481         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6482         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6484         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6486 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6488         * sysdeps/pthread/createthread.c (create_thread): Set
6489         header.multiple_threads unconditionally.
6490         * allocatestack.c (allocate_stack): Likewise.
6491         * descr.h (struct pthread): Add header.multiple_threads
6492         unconditionally.
6493         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6494         Define for librt.  #error if neither libpthread, libc nor librt.
6495         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6496         Likewise.
6497         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6498         CDISABLE): Likewise.
6499         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6500         CDISABLE): Likewise.
6501         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6502         CDISABLE): Likewise.
6503         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6504         CDISABLE): Likewise.  Access header.multiple_threads outside of
6505         libc and libpthread.
6506         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6507         Likewise.
6508         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6509         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6511 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6513         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6514         Also test early cancellation before the thread reaches the cancellation
6515         point.
6517         * Makefile: Compile forward.c with exceptions.
6519         * sysdeps/unix/sysv/linux/sleep.c: New file.
6521 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6523         * Makefile: Add CFLAGS definition to compile function wrappers
6524         duplicated from libc with exceptions.
6525         * tst-cancel4.c: Also check cancellation handlers.
6527         * Makefile: Add rules to build and run tst-cancel16 and
6528         tst-cancelx16.  Add missing CFLAGS definitions.
6529         * tst-cancel16.c: New file.
6530         * tst-cancelx16.c: New file.
6532 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6534         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6535         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6536         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6537         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6539         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6540         (LIBC_CANCEL_RESET): Likewise.
6541         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6542         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6543         librt-cancellation.
6544         (CFLAGS-libcrt-cancellation.c): Define.
6545         * sysdeps/pthread/librt-cancellation.c: New file.
6546         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6547         macros also when compiling librt.
6548         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6549         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6550         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6551         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6552         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6553         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6554         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6556         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6557         compat_timer_create.
6559 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6561         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6563         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6564         __register_atfork.
6565         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6566         Add libc_hidden_def.
6568 2003-06-13  Roland McGrath  <roland@redhat.com>
6570         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6571         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6573 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6575         * allocatestack.c (queue_stack): Always inline.
6576         * ptreadhP.h (__do_cancel): Likewise.
6578 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6580         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6581         a typo.
6583 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6585         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6586         (__pthread_cond_signal): Remove incorrect second addition for
6587         cond_lock!=0.
6589 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6591         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6592         (__pthread_cond_signal): Use correct futex pointer in
6593         __lll_mutex_lock_wait call.
6595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6596         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6598 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6600         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6601         cancelable.
6602         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6603         Likewise.
6605         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6606         hand-written CFI generation code.  Since ENTRY/END also initiated
6607         CFI frames this caused two CFI sets to be generated.
6609 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6611         * cleanup_routine.c: New file.
6612         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6613         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6614         cleanup handling.
6615         * Makefile (libpthread-routines): Add cleanup_routine.
6616         Add more CFLAGS variables to compile with exceptions.  Add comments
6617         why which file needs unwind tables.
6618         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6619         tests.
6620         * tst-cancelx1.c: New file.
6621         * tst-cancelx2.c: New file.
6622         * tst-cancelx3.c: New file.
6623         * tst-cancelx4.c: New file.
6624         * tst-cancelx5.c: New file.
6625         * tst-cancelx6.c: New file.
6626         * tst-cancelx7.c: New file.
6627         * tst-cancelx8.c: New file.
6628         * tst-cancelx9.c: New file.
6629         * tst-cancelx10.c: New file.
6630         * tst-cancelx11.c: New file.
6631         * tst-cancelx12.c: New file.
6632         * tst-cancelx13.c: New file.
6633         * tst-cancelx14.c: New file.
6634         * tst-cancelx15.c: New file.
6635         * tst-cleanupx0.c: New file.
6636         * tst-cleanupx0.expect: New file.
6637         * tst-cleanupx1.c: New file.
6638         * tst-cleanupx2.c: New file.
6639         * tst-cleanupx3.c: New file.
6641         * tst-cleanup0.c: Make standard compliant.
6642         * tst-cleanup1.c: Likewise.
6644         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6645         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6646         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6647         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6648         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6649         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6650         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6651         CLEANUP_JMP_BUF.
6652         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6653         * tst-cancel12.c: New file.
6654         * tst-cancel13.c: New file.
6655         * tst-cancel14.c: New file.
6656         * tst-cancel15.c: New file.
6657         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6658         and tst-cancel15.
6660         * tst-cancel1.c: Add some comments.
6662         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6663         timeout correctly.
6665 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6667         * Makefile (CFLAGS-pthread_cancel.c): Define.
6669 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6671         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6672         Change type of __writer element to int.
6673         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6674         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6675         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6676         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6677         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6678         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6679         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6680         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6681         Compare with TID to determine deadlocks.
6682         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6683         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6684         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6685         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6686         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6687         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6688         Likewise.
6689         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6690         Likewise.
6691         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6692         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6693         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6694         Likewise.
6695         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6696         Likewise.
6697         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6698         * Makefile (tests): Add tst-rwlock12.
6699         * tst-rwlock12.c: New file.
6701 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6703         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6704         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6705         Remove bogus hidden_proto.
6706         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6707         Likewise.
6708         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6709         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6710         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6711         ___lll_mutex_timedlock): Likewise.
6713 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6716         (__pthread_cond_signal): Add some code to eventually handle
6717         cond_lock!=0.
6719 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6721         * Makefile (tests): Add tst-exec4.
6722         (tst-exec4-ARGS): Define.
6723         * tst-exec4.c: New file.
6725 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6727         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6728         Also fail if tv_nsec < 0.
6729         (__lll_timedwait_tid): Likewise.
6730         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6731         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6732         Likewise.
6733         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6734         Likewise.
6735         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6736         Likewise.
6737         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6738         Likewise.
6739         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6740         Likewise.
6741         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6742         Likewise.
6744         * Makefile (tests): Add tst-sem8 and tst-sem9.
6745         * tst-sem8.c: New file.
6746         * tst-sem9.c: New file.
6747         * sem_open.c: Fix creation of in_use record if the file exists but
6748         no internal record.
6750         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6751         definitions.
6753         * sysdeps/pthread/timer_create.c (timer_create): In case
6754         evp==NULL, assign timer ID to sival_ptr.
6756         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6757         struct pthread_unwind_buf *.
6758         (struct pthread): Likewise for cleanup_jmp_buf element.
6760         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6761         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6762         * unwind.c (__pthread_unwind_next): Likewise.
6764 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6766         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6767         (lll_futex_timed_wait): Use int for futex value parameter.
6768         (lll_futex_wake): Likewise.
6769         (lll_futex_requeue): Likewise.
6771         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6772         Replace one memory operation with one register operation.
6774         * tst-join4.c (do_test): Fix error message.
6776         * tst-rwlock6.c (do_test): Use correct format specifier.
6778         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6779         (__lll_mutex_lock_wait): Replace one memory operation with one
6780         register operation.
6781         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6782         (__lll_mutex_lock_wait): Likewise.
6784         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6785         (__lll_mutex_cond_lock): Add one to value parameter of
6786         __lll_lock_wait to reflect reality in the futex syscall.
6787         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6788         (lll_mutex_cond_lock): Likewise.
6790 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6792         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6793         New function.
6794         (lll_mutex_cond_lock): Define.
6796 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6798         * Makefile (tests): Add tst-signal6.
6799         * tst-signal6.c: New file.
6801         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6802         (__lll_mutex_unlock_force): New function
6803         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6805         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6806         (__lll_mutex_unlock_force): New function.
6807         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6809         * tst-rwlock7.c (do_test): Use correct format specifier.
6811         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6812         Find break parameter in correct asm argument.
6814 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6816         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6817         Remove out4.
6818         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6819         error occured.
6820         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6821         Add __mutex.
6822         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6823         lll_futex_requeue, lll_mutex_unlock_force): Define.
6825 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6827         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6828         (pthread_cond_t): Add __mutex.
6829         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6830         lll_futex_requeue, lll_mutex_unlock_force): Define.
6832 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6834         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6835         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6836         Add __mutex field.
6837         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6838         Define.
6839         (lll_futex_wait, lll_futex_wake): Define.
6840         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6841         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6842         FUTEX_REQUEUE instead of FUTEX_WAIT.
6843         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6844         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6845         mutex which was used in condvar structure.  Call
6846         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6847         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6849         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6850         include tcb-offsets.h.  Read wakeup value in locked region.
6851         Use the value of gbr register as THREAD_ID.
6852         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6853         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6854         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6856         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6857         macros.
6859 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6861         * sysdeps/pthread/pthread_cond_broadcast.c
6862         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6864 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6867         typo in register name.
6868         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6869         correctly.  Actually use requeue.  Little optimization.
6870         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6871         mutex address early.  Handle cancellation state as 32-bit value.
6872         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6873         Remove unnecessary label.
6875 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6877         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6878         instead of FUTEX_WAIT.
6879         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6880         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6882         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6884         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6885         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6886         of __pthread_mutex_lock_internal.
6887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6888         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6889         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6890         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6891         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6892         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6893         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6894         Add pthread_mutex_cond_lock.
6895         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6896         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6897         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6898         lll_mutex_cond_lock.
6899         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6900         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6901         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6902         Add __mutex field.
6903         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6904         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6906         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6907         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6909         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6910         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6911         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6912         macro don't define aliases.
6914         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6915         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6916         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6917         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6920         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6921         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6924 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6926         * sem_open.c: Fix one endless loop.  Implement correct semantics
6927         wrt opening the same semaphore more then once.
6928         * sem_close.c: Adjust for sem_open change.
6929         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6930         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6931         * Makefile (tests): Add tst-sem7.
6932         * tst-sem7.c: New file.
6934 2003-05-16  Roland McGrath  <roland@redhat.com>
6936         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6937         uninitialized variable braino.
6939 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6941         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6942         test for syscall availability.
6944         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6945         __no_posix_timers to -1 if the syscalls don't exist.
6947         * pthread_join.c (pthread_join): Set tid field of the joined
6948         thread to -1.  This isn't necessary but helps to recognize some
6949         error conditions with almost no cost.
6951         * allocatestack.c (FREE_P): Also negative values indicate an
6952         unused stack.
6954         * unwind.c: Include <unistd.h>.
6956 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6958         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6960 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6962         * Makefile (crti-objs, crtn-objs): New variables.
6963         (omit-deps, extra-objs): Add crtn.
6964         ($(objpfx)libpthread.so): Depend on both crti and crtn
6965         and links to them in multidir.
6966         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6968 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6970         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6971         (lll_mutex_unlock): Use atomic_exchange_rel.
6973 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6975         * cond-perf.c (cons): Add missing locking around setting of alldone.
6977 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6979         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6980         related macros.
6981         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6983 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6985         * tst-sem6.c: New file.
6986         * Makefile (tests): Add tst-sem6.
6988         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6989         Use atomic_exchange_rel instead of atomic_exchange.
6990         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6991         Likewise.
6993         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6994         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6995         vsyscall is possible.
6997         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6998         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6999         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7000         pthread_setaffinity_np.
7001         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7002         and pthread_setaffinity_np.
7003         * Makefile (libpthread-routines): Add pthread_getaffinity and
7004         pthread_setaffinity.
7006         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7007         use it in case mmap to allocate the stack fails.
7008         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7009         ARCH_MAP_FLAGS here.
7010         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7011         ARCH_RETRY_MMAP.
7013 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7015         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7016         handler implementation.  It is now lockless in fork().
7017         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7018         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7019         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7020         declare the __fork_*_lists.
7021         (struct fork_handler): Include pointers to all three functions.
7022         Add next, refcntr and need_signal elements.
7023         (__fork_handlers): New declaration.
7024         (__register_atfork_malloc): Remove declaration.
7025         (HAVE_register_atfork_malloc): Remove definition.
7026         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7027         __pthread_child_handler variable.
7028         (__libc_pthread_init): Use __register_atfork instead of explicitly
7029         adding to the list.
7030         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7031         and lll_futex_wake.
7032         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7034         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7035         function must never be reached.
7037         * cond-perf.c: New file.
7039 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7041         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7043 2003-05-04  Roland McGrath  <roland@redhat.com>
7045         * Makefile ($(objpfx)../libc.so): New target.
7047 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7049         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7050         (pthread_condattr_t): Size is only an int, don't use long for
7051         alignment.
7052         (pthread_mutexattr_t): Likewise.
7053         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7054         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7055         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7057 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7059         * sysdeps/i386/tls.h: Define THREAD_ID.
7060         * sysdeps/ia64/tls.h: Likewise.
7061         * sysdeps/powerpc/tls.h: Likewise.
7062         * sysdeps/s390/tls.h: Likewise.
7063         * sysdeps/sh/tls.h: Likewise.
7064         * sysdeps/x86_64/tls.h: Likewise.
7065         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7066         record ownership.
7067         * pthread_mutex_timedlock.c: Likewise.
7068         * pthread_mutex_trylock.c: Likewise.
7069         * pthread_mutex_unlock.c: Likewise.
7070         * pthread_rwlock_trywrlock.c: Likewise.
7071         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7072         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7073         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7074         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7076         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7077         flag.
7079 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7081         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7082         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7083         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7084         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7085         Make __align long long instead of long.
7086         (pthread_rwlock_t): Formatting.
7087         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7088         (pthread_rwlock_t): Formatting.
7089         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7090         (pthread_cond_t): Make __align long long instead of long.
7091         (pthread_rwlock_t): Move __flags field to the same position as in
7092         linuxthreads.
7094 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7096         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7097         * tst-rwlock7.c (do_test): Likewise.
7099 2003-04-26  Roland McGrath  <roland@redhat.com>
7101         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7103 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7105         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7106         sizeof (struct pthread).
7107         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7108         1 struct pthread.
7109         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7110         to 0.
7111         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7112         struct pthread.
7113         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7114         to 32-bit bytes.
7115         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7116         tcbp.
7117         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7118         unneccessarily.
7119         (NO_TLS_OFFSET): Define.
7120         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7121         add TLS_TCB_SIZE unnecessarily.
7123 2003-04-22  Roland McGrath  <roland@redhat.com>
7125         * Makeconfig (shared-thread-library): Reverse link order to work
7126         around linker bug.
7128 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7130         * semaphore.h: Fix typo in comment.
7132 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7134         * sysdeps/pthread/sigfillset.c: New file.
7136         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7137         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7138         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7139         * sysdeps/pthread/sigaction.c: Likewise.
7140         * sysdeps/pthread/sigprocmask.c: New file.
7141         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7142         __SIGRTMIN+1.
7143         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7144         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7145         in this case.
7147 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7149         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7150         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7152         * sysdeps/unix/sysv/linux/unregister-atfork.c
7153         (__unregister_atfork): Don't free memory not allocated dynamically.
7155         * semaphore.h: Remove __THROW marker from cancellation points.
7156         * nptl/sysdeps/pthread/pthread.h: Likewise.
7158 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7160         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7161         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7162         __THROW.
7164 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7166         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7168 2003-04-15  Roland McGrath  <roland@redhat.com>
7170         * forward.c (__pthread_unwind): Tweak to avoid warning.
7172 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7174         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7176 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7178         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7179         overflow CFA advance instructions.
7180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7182 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7184         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7185         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7186         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7187         defined.
7189         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7190         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7192         DW_CFA_advance_loc for .Laddl-.Lsubl.
7194 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7196         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7197         position-independent unwind data for static libraries.
7198         Add missing unwind info.  Add comments.
7200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7201         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7203         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7205 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7207         * Makefile: Make sure all cancellation points are compiled with
7208         exception and asynchronous unwind tables.
7210         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7211         which mishandles loading of global object addresses in PIC.
7212         (THREAD_SETMEM_NC): Likewise.
7214 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7216         * pthread.h: Define new data structure for cleanup buffer.  Declare
7217         new cleanup handler interfaces.
7218         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7219         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7220         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7221         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7222         it.  Declare old cleanup handler installation functions.
7223         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7224         handling.
7225         * cleanup_defer.c: Likewise.
7226         * cleanup_compat.c: New file.  Old cleanup code.
7227         * cleanup_def_compat.c: New file.  Old cleanup code.
7228         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7229         if own thread descriptor.
7230         * unwind.c: New file.
7231         * forward.c: Add __pthread_unwind.
7232         * init.c (pthread_functions): Add __pthread_unwind.
7233         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7234         Add ptr___pthread_unwind.
7235         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7236         and unwind function.
7237         * Makefile (libpthread-routines): Add cleanup_compat,
7238         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7239         table generation if necessary.
7240         * version.c: Record whether unwind support is compiled in.
7241         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7242         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7243         handler interfaces.
7244         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7245         complication to generate unwind information for syscall wrappers.
7246         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7247         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7248         __cleanup_fct_attribute.
7250         * Makefile: Add rules to build and run tst-cleanup0.
7251         * tst-cleanup0.c: New file.
7252         * tst-cleanup0.expect: New file.
7254         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7255         caller.  Optimize to avoid often unecessary local variable.
7257 2003-04-11  Roland McGrath  <roland@redhat.com>
7259         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7260         sets variable `multidir'; include that.
7261         (generated): Add it.
7262         ($(objpfx)$(multidir)/crti.o): New target.
7263         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7265 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7267         * tst-attr2.c (do_test): Add cast to avoid warning.
7268         * tst-mutex4.c (do_test): Likewise.
7270 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7272         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7273         in child.
7275 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7277         * Makefile (tests): Add tst-detach1.
7278         * tst-detach1.c: New file.
7280 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7282         * sysdeps/pthread/pthread.h: Remove duplicate
7283         pthread_cleanup_{push,pop} definitions.
7285         * tst-barrier2.c: Eliminate warnings.
7286         * tst-cancel4.c: Likewise.
7287         * tst-cond4.c: Likewise.
7288         * tst-cond6.c: Likewise.
7289         * tst-detach1.c: Likewise.
7290         * tst-rwlock4.c: Likewise.
7291         * tst-rwlock6.c: Likewise.
7292         * tst-rwlock7.c: Likewise.
7293         * tst-sem3.c: Likewise.
7294         * tst-spin2.c: Likewise.
7295         * tst-umask1.c: Likewise.
7297 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7299         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7301 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7303         * descr.h (struct pthread): Move cancelhandling member to the front.
7305 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7307         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7308         malloc_parent, and malloc_child statically.
7309         (__register_atfork_malloc): New function.
7310         (free_mem): Don't free any of the malloc_* variables on the list.
7311         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7312         Define HAVE_register_atfork_malloc.
7314 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7316         * sysdeps/pthread/createthread.c (create_thread): Add some more
7317         comments explaining when to set multiple_threads and when not.
7319         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7320         THREAD_ATOMIC_BIT_SET if not already defined.
7321         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7322         THREAD_ATOMIC_BIT_SET:
7323         * sysdeps/x86_64/tls.h: Likewise.
7324         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7325         THREAD_ATOMIC_CMPXCHG_VAL.
7326         (_pthread_cleanup_pop_restore): Likewise.
7327         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7328         (__pthread_enable_asynccancel_2): Likewise.
7329         (__pthread_disable_asynccancel): Likewise.
7330         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7331         (__libc_disable_asynccancel): Likewise.
7332         * init.c (sigcancel_handler): Likewise.
7333         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7334         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7336 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7338         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7339         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7340         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7341         * Makefile (tests): Add tst-cancel11.
7342         * tst-cancel11.c: New file.
7344 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7346         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7347         round, not the first.  Use specific_used flag instead of local
7348         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7349         (__free_tcb): Don't call deallocate_tsd here.
7350         (start_thread): Call deallocate_tsd here.
7351         * pthread_setspecific.c: Set specific_used flag really only when
7352         needed.
7353         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7354         * tst-tsd3.c: New file.
7355         * tst-tsd4.c: New file.
7357 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7359         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7360         Use atomic_exchange_and_add instead of __lll_add.
7361         (__lll_mutex_timedlock): Likewise.
7362         Patch by Ian Wienand.
7364 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7366         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7367         (SINGLE_THREAD_P): Fix typo.
7368         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7370 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7372         * Makefile (tests): Add tst-align.
7373         * tst-align.c: New file.
7374         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7376         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7377         function correctly.
7379         * tst-tsd2.c: Add casts to avoid warnings.
7381 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7383         * descr.h (struct pthread): Move most often used elements to the front.
7385 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7387         * Makefile (libpthread-routines): Add pthread_atfork.
7388         (libpthread-static-only-routines): Add pthread_atfork.
7390 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7392         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7393         of TLS_DTV_AT_TP.
7394         (INSTALL_DTV): Add parens.
7395         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7396         Use passed descr instead of THREAD_SELF.
7397         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7398         (__lll_mutex_timedlock_wait): Correct expected value after
7399         spurious wakeup.
7400         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7401         Release lock before waking up the waiters.
7402         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7403         criteria.  Reorderstruct passed to cleanup handler.  Fix
7404         handling of cancellation and failung pthread_mutex_unlock call.
7405         Use __pthread_enable_asynccancel_2 instead of
7406         __pthread_enable_asynccancel.
7407         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7408         Return result of lock re-get if it fails.
7409         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7410         for __pthread_cleanup_push.
7411         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7412         completely broken rwlock implementation.
7413         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7414         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7415         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7416         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7417         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7418         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7419         versioned_symbol macro.
7420         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7421         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7423 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7425         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7426         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7427         and __helper_tid.
7428         (struct timer): Remove th and bar field.
7429         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7430         debugging code.  Create only one helper thread.
7431         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7432         helper thread.
7433         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7434         Renamed.  Define statically.  Use thread info from siginfo.
7435         (__helper_once): New variable.
7436         (__helper_tid): New variable.
7437         (__reset_helper_control): New function.
7438         (__start_helper_thread): New function.
7440         * pthread_create.c (start_thread): Don't use setjmp inside
7441         __builtin_expect to work around gcc bug.
7443         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7444         timer_delete syscall fails, but not with ENOSYS, set
7445         __no_posix_timers.
7447         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7448         (timer_settime): Fix typo.
7449         * sysdeps/unix/sysv/linux/timer_getoverr.c
7450         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7452 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7454         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7455         offset of cleanupbuf.__prev.
7457 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7459         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7460         of included file.
7462 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7464         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7465         NULL provide default definition to syscall.
7467 2003-03-25  Roland McGrath  <roland@redhat.com>
7469         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7470         (timer_id2ptr): Fix typo.
7472 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7474         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7475         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7476         * sysdeps/ia64/pthreaddef.h: Likewise.
7477         * sysdeps/powerpc/pthreaddef.h: Likewise.
7478         * sysdeps/s390/pthreaddef.h: Likewise.
7479         * sysdeps/sh/pthreaddef.h: Likewise.
7480         * sysdeps/x86_64/pthreaddef.h: Likewise.
7481         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7482         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7483         being changed.
7484         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7485         SIGTIMER is not unblocked.
7486         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7487         RT signal taken.
7488         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7489         be send.
7490         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7491         pass pointer through as ID.
7492         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7493         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7494         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7495         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7496         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7497         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7498         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7499         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7500         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7501         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7502         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7503         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7504         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7505         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7506         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7507         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7508         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7509         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7510         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7511         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7512         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7513         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7514         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7515         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7516         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7517         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7518         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7519         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7520         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7521         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7522         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7523         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7524         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7526         * pthreadP.h: Remove FRAME_LEFT definition.
7527         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7528         already left frame.  Programs which have this problem are not POSIX
7529         compliant.
7530         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7532 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7534         * sysdeps/pthread/tst-timer.c: Check return values of the
7535         functions we test.
7537 2003-03-23  Roland McGrath  <roland@redhat.com>
7539         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7540         * tst-tls3mod.c: Likewise.
7541         * tst-tls1.c: Likewise.
7542         * tst-tls2.c: Likewise.
7544         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7545         undefined behavior.
7547         * tst-join5.c (tf1, tf2): Add a cast.
7549         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7551         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7552         Don't test anything.
7553         * tst-cond4.c: Likewise.
7554         * tst-cond6.c: Likewise.
7555         * tst-flock2.c: Likewise.
7556         * tst-mutex4.c: Likewise.
7557         * tst-rwlock4.c: Likewise.
7558         * tst-signal1.c: Likewise.
7559         * tst-spin2.c: Likewise.
7560         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7562         * tst-mutex4.c: Use test-skeleton.c.
7563         * tst-spin2.c: Likewise.
7564         * tst-sysconf.c: Likewise.
7565         * tst-barrier2.c: Likewise.
7566         * tst-cond4.c: Likewise.
7567         * tst-cond6.c: Likewise.
7568         * tst-rwlock4.c: Likewise.
7569         * tst-unload.c: Likewise.
7570         * tst-flock2.c (do_test): Use return instead of exit.
7572 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7574         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7576 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7578         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7579         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7580         instead of __lll_compare_and_swap.
7581         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7582         Likewise.
7583         Removed definition if __lll_compare_and_swap.
7585         * cancellation.c: Adjust for new form of compare&exchange macros.
7586         * cleanup_defer.c: Likewise.
7587         * init.c: Likewise.
7588         * libc-cancellation.c: Likewise.
7589         * old_pthread_cond_broadcast.c: Likewise.
7590         * old_pthread_cond_signal.c: Likewise.
7591         * old_pthread_cond_timedwait.c: Likewise.
7592         * old_pthread_cond_wait.c: Likewise.
7593         * pthread_cancel.c: Likewise.
7594         * pthread_create.c: Likewise.
7595         * pthread_detach.c: Likewise.
7596         * pthread_join.c: Likewise.
7597         * pthread_key_delete.c: Likewise.
7598         * pthread_setcancelstate.c: Likewise.
7599         * pthread_setcanceltype.c: Likewise.
7600         * pthread_timedjoin.c: Likewise.
7601         * pthread_tryjoin.c: Likewise.
7602         * sysdeps/pthread/createthread.c: Likewise.
7604 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7606         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7607         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7608         definitions.  Replace uses with calls to atomic_* functions.
7609         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7610         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7611         __lll_test_and_set calls with atomic_exchange_and_add and
7612         atomic_exchange calls respectively.
7613         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7614         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7615         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7616         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7617         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7618         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7619         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7621         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7622         returns the old value.
7624 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7626         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7627         int for variable OLDVAL and correct inline assembler contraint.
7628         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7629         type int for variable OLD.
7631         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7632         only for s390-32.
7633         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7634         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7635         instead of multiple_threads field in the TCB.
7637 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7639         * sysdeps/i386/i686/bits/atomic.h: Removed.
7640         * sysdeps/i386/i586/bits/atomic.h: Removed.
7641         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7642         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7643         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7644         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7645         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7646         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7647         * atomic.h: Removed.  Moved to glibc.
7649         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7650         support for clock selection.
7652         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7653         signalling waiters.
7655 2003-03-18  Roland McGrath  <roland@redhat.com>
7657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7658         Add __lll_rel_instr first.  Add memory clobber.
7659         (lll_mutex_unlock): Use __lll_test_and_set.
7660         From Paul Mackerras <paulus@samba.org>.
7662         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7663         unconditionally.
7664         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7665         (SINGLE_THREAD_P):  Add `header.' prefix.
7666         From Paul Mackerras <paulus@samba.org>.
7668         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7669         pthread_timedjoin_np to ...
7670         (libpthread: GLIBC_2.3.3): ... here.
7671         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7673         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7674         Avoid shadowing VAL variable.
7676         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7677         New macro.
7679 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7681         * Makefile (tests): Add tst-cond11.
7682         * tst-cond11.c: New file.
7684         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7685         struct passed to cleanup handler to eliminate one more
7686         instruction.
7687         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7689         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7690         (pthrad_cond_t): Replace __unused field with __clock.
7692         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7693         waken all waiters in cleanup handler.
7694         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7695         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7697         * pthread_condattr_getclock.c: New file.
7698         * pthread_condattr_setclock.c: New file.
7699         * sysdeps/pthread/pthread.h: Declare these new functions.
7700         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7701         * Makefile (libpthread-routines): Add the new functions.
7702         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7703         Renamed field to value.  Document use of the bits.
7704         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7705         change.
7706         * pthread_condattr_setpshared.c: Likewise.
7707         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7708         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7709         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7710         Add __clock field.
7711         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7712         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7713         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7714         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7716         Implement clock selection.
7717         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7718         * pthread-errnos.sym: Add ENOSYS.
7719         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7720         _POSIX_CLOCK_SELECTION.
7721         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7723         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7724         invalid .size directive.
7726 2003-03-17  Roland McGrath  <roland@redhat.com>
7728         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7729         Formatting tweaks.
7731 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7733         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7734         Use __lll_add instead of spelling it out.  Use protected symbol names.
7735         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7736         Use __lll_add.
7737         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7738         Renamed from lll_compare_and_swap.  Use new name where necessary.
7739         (__lll_add): Defined.
7740         (__lll_dec_if_positive): Defined.
7741         (__lll_test_and_set): Defined.
7742         * sysdeps/ia64/pthread_spin_init.c: Removed.
7743         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7744         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7745         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7746         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7747         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7748         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7749         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7750         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7751         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7752         __sync_lock_release_si.
7753         Patch by Jakub Jelinek.
7755         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7756         Fix timeout handling.
7757         (__lll_timedwait_tid): Likewise.
7758         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7759         Patch by Jakub Jelinek.
7761         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7763 2003-03-17  Roland McGrath  <roland@redhat.com>
7765         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7766         * sysdeps/pthread/pthread_spin_init.c: New file.
7767         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7768         * sysdeps/powerpc/Makefile: New file.
7769         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7770         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7771         * sysdeps/powerpc/pthreaddef.h: New file.
7772         * sysdeps/powerpc/tcb-offsets.sym: New file.
7773         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7774         * sysdeps/powerpc/tls.h: New file.
7775         * sysdeps/powerpc/bits/atomic.h: New file.
7776         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7777         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7778         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7780         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7781         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7782         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7783         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7784         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7785         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7786         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7787         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7788         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7789         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7790         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7791         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7792         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7793         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7794         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7796         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7797         not gettimeofday.
7798         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7799         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7800         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7801         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7802         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7804 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7806         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7807         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7808         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7809         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7810         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7812 2003-03-16  Roland McGrath  <roland@redhat.com>
7814         * tst-fork4.c: Include <string.h>.
7815         * tst-signal2.c: Likewise.
7816         * tst-mutex5.c (do_test): exit -> return.
7817         * tst-mutex2.c: Include <stdlib.h>.
7819 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7821         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7822         (__lll_mutex_timedlock_wait): Correct expected value after
7823         spurious wakeup.  Otherwise we would never wait again.
7825         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7826         zone versus inline asm stupidity.  Use correct instructions.
7828         * tst-rwlock6.c: Add some more status output.
7830 2003-03-15  Roland McGrath  <roland@redhat.com>
7832         * sysdeps/pthread/configure.in: New file.
7833         * sysdeps/pthread/configure: New file (generated).
7835 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7837         * allocatestack.c (allocate_stack): Store the exact stack size of
7838         user allocated stacks.
7840 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7842         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7843         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7844         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7845         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7846         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7847         Use `header.' prefix.
7848         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7850 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7852         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7853         __builtin_frame_address, use stack pointer.
7855         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7856         instead of __builtin_frame_pointer.
7858 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7860         * tst-basic1.c (do_test): Add cast to avoid warning.
7861         * tst-basic2.c (do_test): Likewise.
7863         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7864         amount of stack correction.
7866         * tst-fork4.c: Use test-skeleton.c.
7868 2003-03-14  Roland McGrath  <roland@redhat.com>
7870         * init.c: Fix typo "#eli" for "#else".
7872 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7874         * allocatestack.c (__stack_user): Use hidden_data_def.
7875         * pthread_create.c (__pthread_keys): Likewise.
7877         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7879 2003-03-14  Roland McGrath  <roland@redhat.com>
7881         * tst-fork4.c: New file.
7882         * Makefile (tests): Add it.
7884         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7885         we always define the padding space.
7886         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7887         stopped supporting its own extensions fully.
7888         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7889         struct also called `header', so `header.multiple_threads' is the field
7890         name to use on all machines.
7891         * allocatestack.c (allocate_stack): Use `header.' prefix.
7892         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7893         * pthread_create.c (__pthread_create_2_1): Likewise.
7894         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7895         (THREAD_SELF): Likewise.
7896         * sysdeps/x86_64/tls.h: Likewise.
7897         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7898         (SINGLE_THREAD_P): Likewise.
7899         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7900         (SINGLE_THREAD_P): Likewise.
7901         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7902         (SINGLE_THREAD_P): Likewise.
7904         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7905         value directly.
7907 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7909         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7910         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7912         * pthread_create.c (start_thread): setjmp is expected to return 0.
7914         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7915         (THREAD_GETMEM_NC): Likewise.
7917 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7919         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7920         and the size of the stack which must be allocated is a multiple,
7921         allocate one more page.
7922         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7923         MULTI_PAGE_ALIASING.
7925 2003-03-13  Roland McGrath  <roland@redhat.com>
7927         * pthread_create.c (start_thread): Set EXITING_BIT after the
7928         event-reporting (and destructors), not before.
7930 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7932         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7933         lll_futex_wake): Declare register variables as long int instead of
7934         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7935         Make syscall arguments clobbered by the syscall.
7936         (lll_futex_wait): Define using lll_futex_timed_wait.
7938         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7939         to void *.
7941         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7942         PPID if [! NDEBUG].
7944         * allocatestack.c (nptl_ncreated): Only declare if
7945         COLORING_INCREMENT != 0.
7947         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7948         (__libc_enable_asynccancel_2): Remove prototype.
7950         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7951         ctid to match kernel.
7953 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7955         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7956         libc_multiple_threads.
7957         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7958         __libc_multiple_threads to...
7959         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7961         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7962         versioning.
7963         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7964         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7966         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7967         (__pthread_once_internal): Define.
7969         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7970         macros instead of .symver directly.
7971         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7972         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7974         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7975         * sysdeps/x86_64/tcb-offsets.sym: New file.
7976         * sysdeps/x86_64/Makefile: New file.
7978         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7979         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7980         to access own pthread_t in TCB.
7981         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7982         Likewise.
7983         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7984         Likewise.
7985         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7987 2003-03-12  Roland McGrath  <roland@redhat.com>
7989         * pthread-errnos.sym: New file.
7990         * Makefile (gen-as-const-headers): New variable, list that file.
7991         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7992         header <pthread-errnos.h> instead of defining errno values here.
7993         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7994         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7995         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7996         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7998         Likewise.
7999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8000         Likewise.
8001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8003         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8004         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8005         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8006         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8007         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8008         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8009         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8010         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8011         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8012         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8013         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8014         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8015         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8016         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8017         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8018         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8019         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8020         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8021         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8022         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8023         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8024         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8025         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8026         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8027         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8029         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8030         CLONE_CHILD_SETTID worked.
8032 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8034         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8035         file.
8036         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8037         file.
8039         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8040         (pthread_cond_t): Add padding.
8042         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8043         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8044         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8046         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8047         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8048         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8049         (__pthread_rwlock_timedrdlock): Likewise.
8050         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8051         (__pthread_rwlock_wrlock): Likewise.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8053         (__pthread_rwlock_rdlock): Likewise.
8055         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8058         result of lock re-get if it fails.
8060 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8062         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8063         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8064         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8065         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8066         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8067         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8068         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8069         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8070         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8071         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8073         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8074         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8076         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8077         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8078         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8079         (create_thread): Likewise.
8080         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8081         * init.c (__pthread_initialize_minimal_internal): Initialize
8082         __libc_multiple_threads_ptr if necessary.
8083         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8084         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8085         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8086         __libc_multiple_threads.
8087         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8088         necessary.
8090         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8091         (THREAD_SETMEM_NC): Likewise.
8093         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8094         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8095         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8096         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8098         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8099         Eliminate one entire instruction.
8101         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8102         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8104         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8105         instead of __pthread_enable_asynccancel.
8106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8107         (__pthread_cond_wait): Likewise.
8108         * sysdeps/pthread/pthread_cond_timedwait.c
8109         (__pthread_cond_timedwait): Likewise.
8110         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8112         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8113         (__condvar_cleanup): Wake up all waiters in case we got signaled
8114         after being woken up but before disabling asynchronous
8115         cancellation.
8116         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8117         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8118         (__condvar_cleanup): Likewise.
8120         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8121         Make it an error if architecture has no #if case.  Add x86-64.
8123         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8124         pt-initfini.s generation.
8126         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8127         (TLS_INIT_TP): Fix typo.
8129 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8131         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8132         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8134         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8135         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8136         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8137         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8138         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8139         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8140         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8141         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8143 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8145         * sysdeps/pthread/pthread_cond_timedwait.c
8146         (__pthread_cond_timedwait): Return the result of the final
8147         locking.  If it succeeds, the regular function return value.
8149         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8150         Return result of the final locking.
8151         * version.c (__nptl_main): Work around problems with the strange
8152         INTERNAL_SYSCALL macro on ppc32.
8153         * init.c (__pthread_initialize_minimal_internal): Unblock
8154         SIGCANCEL in case the parent blocked it.
8155         Reported by Paul Mackerras <paulus@samba.org>.
8157         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8158         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8159         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8161 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8163         * sysdeps/pthread/pthread_cond_timedwait.c
8164         (__pthread_cond_timedwait): Unlock and fail if
8165         __pthread_mutex_unlock_internal failed.
8167         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8168         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8169         Use ARCH_CLONE.
8170         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8171         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8172         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8173         ALLOCATE_STACK): New macros.
8174         (TLS_TPADJ): New macro.
8175         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8176         (allocate_stack): Handle TLS_DTV_AT_TP and
8177         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8178         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8179         Don't set PD->self.
8180         * init.c [__ia64__] (__NR_set_tid_address): Define.
8182         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8183         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8184         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8185         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8186         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8187         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8188         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8189         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8190         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8191         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8192         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8193         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8194         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8195         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8196         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8197         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8198         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8199         * sysdeps/ia64/bits/atomic.h: New file.
8200         * sysdeps/ia64/Makefile: New file.
8201         * sysdeps/ia64/pthread_spin_init.c: New file.
8202         * sysdeps/ia64/pthread_spin_lock.c: New file.
8203         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8204         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8205         * sysdeps/ia64/pthreaddef.h: New file.
8206         * sysdeps/ia64/tcb-offsets.sym: New file.
8207         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8208         * sysdeps/ia64/tls.h: New file.
8210         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8211         to syscall instead of no arguments.
8213 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8215         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8216         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8217         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8218         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8220         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8221         unused code.
8223         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8225         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8226         lowlevelbarrier.sym.
8227         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8228         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8229         Include lowlevelbarrier.h and don't define offsets locally.
8230         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8232         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8233         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8234         (__lll_mutex_timedlock_wait): Likewise.
8235         (lll_mutex_lock): Adjust asm for that.
8236         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8237         (lll_lock): Adjust asm for operand order change.
8238         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8239         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8242         Reverse order of parameters.
8243         (__lll_timedwait_tid): Remove regparms attribute.
8244         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8245         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8247         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8248         (__lll_timedwait_tid): Remove one unnecessary instruction.
8250         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8251         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8252         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8253         lowlevelmutex.S.
8255         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8256         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8257         for NOT_IN_libc.
8258         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8259         lowlevellock.S.
8261         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8262         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8263         for libc.so.
8264         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8265         define LOCK here (if UP is not defined).  The actual code is in
8266         lowlevelmutex.S.
8268         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8269         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8270         __lll_timedwait_tid for libc.so.
8271         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8272         define LOCK here (if UP is not defined).  The actual code is in
8273         lowlevellock.S.
8275         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8276         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8277         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8278         instead of lowlevelsem.h.
8279         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8280         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8281         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8283         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8284         lowlevelrwlock.sym.
8285         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8286         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8287         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8289         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8290         register loading.
8291         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8292         last changed.  D'oh.
8294         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8296         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8297         of __libc_locking_needed.
8298         (lll_trylock): Initialize %eax to zero.
8300         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8301         pthread_cond_t definition.
8303 2003-03-10  Roland McGrath  <roland@redhat.com>
8305         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8306         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8307         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8308         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8309         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8311         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8312         Instead of setting PD->multiple_threads, set globals
8313         __pthread_multiple_threads and __libc_multiple_threads.
8314         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8315         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8316         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8318         * descr.h (struct pthread): Conditionalize first member on
8319         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8320         containing an anonymous tcbhead_t.  Move `list' member out.
8321         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8322         * allocatestack.c: Remove use of `header.data.' prefix.
8323         * pthread_create.c: Likewise.
8324         * init.c (__pthread_initialize_minimal_internal): Likewise.
8325         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8326         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8327         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8328         * sysdeps/x86_64/tls.h: Likewise.
8329         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8330         (SINGLE_THREAD_P): Likewise.
8331         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8332         (SINGLE_THREAD_P): Likewise.
8333         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8334         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8336 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8338         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8340         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8341         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8343         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8344         leftovers from the ia32 code.
8346         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8347         memory load.
8348         (clear_once_control): Don't load %esi.
8350         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8351         handling.
8353         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8355         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8356         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8358         * Makefile (tests): Add tst-cond10.
8359         * tst-cond10.c: New file.
8361 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8363         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8364         * tst-signal3.c (do_test): Likewise.
8365         * tst-sem5.c (do_test): Likewise.
8366         * tst-kill6.c (do_test): Likewise.
8367         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8369         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8370         of inc/dec.
8371         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8372         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8373         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8374         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8375         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8376         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8377         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8378         Likewise.
8379         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8380         Likewise.
8381         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8383         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8385         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8386         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8387         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8388         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8390         * allocatestack.c (allocate_stack): If mprotect() fails free the
8391         TLS memory.
8393 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8395         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8397         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8398         lll_wake_tid.  This was used only to work around kernel limits in
8399         the early days.
8400         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8401         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8402         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8403         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8405         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8406         (__pthread_initialize_minimal_internal): Change initialization of
8407         __static_tls_align_m1 appropriately.
8408         * pthreadP.h (__static_tls_align_m1): Renamed from
8409         __static_tls_align.
8410         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8411         instead of __static_tls_align-1.
8413 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8415         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8417         * pthread_create.c: Define __pthread_keys using nocommon
8418         attribute, not by placing it explicitly in bss.
8419         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8421         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8422         Use it in mmap call to allocate stacks.
8424         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8426         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8427         result of the thread function.
8429 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8431         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8432         version is just fine.
8434         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8435         (__pthread_child_handler): Renamed from pthread_child_handler,
8436         exported, and marked hidden.  Change all users.
8437         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8438         free __pthread_child_handler from child list.
8440 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8442         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8444         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8445         Fix handling of cancellation and failing pthread_mutex_unlock call.
8446         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8447         (__pthread_cond_wait): Likewise.
8449         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8450         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8451         lll_futex_timed_wait call.
8452         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8453         (pthread_rwlock_timedwrlock): Likewise.
8455         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8456         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8457         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8459         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8460         check of lll_futex_wake return value.
8462 2003-03-03  Roland McGrath  <roland@redhat.com>
8464         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8466         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8467         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8468         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8470 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8472         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8473         error for CPU clocks.
8475         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8476         _POSIX_MONOTONIC_CLOCK.
8477         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8479         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8480         recent kernels.
8482 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8484         * descr.h (struct pthread): Move cleanup field to the front.
8486 2003-03-01  Roland McGrath  <roland@redhat.com>
8488         * sem_open.c (sem_open): Braino fix.
8490 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8492         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8494         __pthread_cleanup_pop functionality.
8495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8497         * descr.h (struct pthread): Move tid field to the front now that
8498         it is often used.
8500         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8501         (__lll_mutex_timedlock_wait): Remove.
8502         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8503         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8504         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8505         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8506         (lll_unlock_wake_cb): Don't save and restore %esi.
8507         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8508         %esi.
8509         (__lll_timedwait_tid): Add alignment.
8510         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8511         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8512         %esi.
8513         (__lll_timedwait_tid): Removed.
8514         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8515         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8516         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8517         (pthread_barrier_wait): Don't save, load, and restore %esi for
8518         last thread.
8519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8520         (__pthread_cond_signal): Don't save, load, and restore %esi.
8521         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8522         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8523         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8524         Don't save, load, and restore %esi.
8526 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8529         Release lock before waking up the waiters.
8531         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8533         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8534         (reader_thread): Likewise.
8536         * sysdeps/pthread/pthread_rwlock_unlock.c
8537         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8538         to wake up readers if there are none.
8540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8541         Release internal lock before wake threads.
8543 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8545         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8546         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8547         predefined.
8548         * tst-rwlock9.c: Likewise.
8549         * tst-rwlock10.c: New file.
8550         * tst-rwlock11.c: New file.
8552         * Makefile (tests): Add tst-dlsym1.
8553         * tst-dlsym1.c: New file.
8555         * init.c (__pthread_initialize_minimal_internal): Set
8556         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8557         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8559 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8561         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8563         * tst-cond2.c: Fix sychronization with child.
8565         * tst-rwlock8.c (reader_thread): Remove unused variable.
8567         * Makefile: Add rules to build and run tst-tls3.
8568         * tst-tls3.c: New file.
8569         * tst-tls3mod.c: New file.
8571         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8572         * tst-rwlock8.c: New file.
8573         * tst-rwlock9.c: New file.
8574         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8575         complete broken rwlock implementation.
8576         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8577         Likewise.
8578         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8579         Likewise.
8580         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8582         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8583         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8584         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8585         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8586         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8588 2003-02-23  Roland McGrath  <roland@redhat.com>
8590         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8592 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8594         * Makefile (tests): Add tst-context1.
8595         * tst-context1.c: New file.
8597         * Makefile (tests): Add tst-tls1 and tst-tls2.
8598         * tst-tls1.c: New file.
8599         * tst-tls2.c: New file.
8601         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8602         for failed cmpxchg.
8604         * pthread_create.c (start_thread): Set EXITING_BIT early.
8606         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8607         (THREAD_GETMEM_NC): Likewise.
8609 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8611         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8612         off 3 more bytes by using offset-less instructions when possible.
8614         * Makefile: Add dependency for $(objpfx)version.d.
8616         * eintr.c (eintr_source): Add unnecessary return but the compiler
8617         insists.
8619         * tst-kill3.c: Include <unistd.h>.
8621 2003-02-21  Roland McGrath  <roland@redhat.com>
8623         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8625 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8627         * Makefile (tests): Add tst-eintr1.
8628         (distribute): Add eintr.c.
8629         * tst-eintr1.c: New file.
8630         * eintr.c: New file.
8632         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8634         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8635         Disallow sending SIGCANCEL.
8637         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8638         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8639         * tst-kill1.c: New file.
8640         * tst-kill2.c: New file.
8641         * tst-kill3.c: New file.
8642         * tst-kill5.c: New file.
8643         * tst-kill6.c: New file.
8644         * tst-basic7.c: Renamed to...
8645         * tst-kill4.c: ...this.
8647 2003-02-21  Roland McGrath  <roland@redhat.com>
8649         * Makefile (install-lib-ldscripts): New variable.
8651 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8653         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8654         * pthread_cancel.c: Use INVALID_TD_P.
8655         * pthread_detach.c: Likewise.
8656         * pthread_getschedparam.c: Likewise.
8657         * pthread_setschedparam.c: Likewise.
8658         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8659         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8660         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8661         * pthread_timedjoin.c: Likewise.
8663         * tst-basic7.c: Include <signal.h>.
8665         * pthread_join.c (pthread_join): Limited checking for invalid
8666         descriptors.
8667         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8669 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8671         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8672         beginning of the loop.  Clear the entire first block of TSD.
8673         * Makefile (tests): Add tst-key4.
8674         * tst-key4.c: New file.
8676 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8678         * Makefile (tests): Add tst-basic7.
8679         * tst-basic7.c: New file.
8681         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8682         Add some more __builtin_expect.
8684         * pthreadP.h: Define dummy version of DEBUGGING_P.
8686 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8688         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8689         _POSIX_THREAD_PRIORITY_SCHEDULING.
8690         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8691         _XOPEN_REALTIME_THREADS.
8692         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8694         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8695         kernel returns EINVAL for PID <= 0, work around it.
8697         * Makefile (tests): Add tst-signal5.
8698         * tst-signal5.c: New file.
8700         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8701         and LOGIN_NAME_MAX.
8703         * tst-cancel1.c (tf): Block all signals.
8705         * Makefile (tests): Add tst-basic6.
8706         * tst-basic6.c: New file.
8708         * tst-basic1.c: Add test for process ID.
8710         * Makefile (tests): Add tst-cancel10.
8711         * tst-cancel10.c: New file.
8713         * Makefile (tests): Add tst-signal4.
8714         * tst-signal4.c: New file.
8716         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8717         __sigismember instead of sigismember.  Add __builtin_expect.
8719 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8721         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8722         pthread_setcancelstate, and pthread_rwlock_setpshared.
8724         * tst-cancel7.c (do_test): Make sure the pid file exists before
8725         canceling the thread.
8727         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8728         pthread_rwlock_timedrdlock tests.
8729         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8730         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8731         Check for invalid tv_nsec field.
8732         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8733         Likewise.
8735         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8736         recursive mutex of overflow.
8738         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8740         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8741         going into an endless loop.
8742         * Makefile (tests): Add tst-cancel9.
8743         * tst-cancel9.c: New file.
8745         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8747 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8749         * tst-mutex5.c (do_test): Add more timedlock tests.
8751         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8752         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8754         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8755         use INLINE_SYSCALL.  Error number is returned, not -1.
8757         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8758         and __deallocate_stack with internal_function.
8759         * pthread_create.c: Adjust definitions appropriately.
8760         * allocatestack.c: Likewise.
8762         * pthread_join.c: Add one more __builtin_expect.
8763         * pthread_timedjoin.c: Likewise.
8765         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8766         not data of sequence number does not match.
8767         Add one __builtin_expect.
8769         * Makefile (tests): Add tst-clock1.
8770         * tst-clock1.c: New file.
8772         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8773         negative arguments.
8774         * Makefile (tests): Add tst-basic5.
8775         * tst-basic5.c: New file.
8777 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8779         * Makefile (tests): Add tst-basic4.
8780         * tst-basic4.c: New file.
8782         * pthreadP.h: Add declaraction for __nptl_nthreads.
8783         * pthread_create.c: Define __nptl_nthreads
8784         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8785         after thread is done.  If then zero, call exit(0).
8786         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8787         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8788         * init.c (pthread_functions): Initialize ptr_nthreads.
8789         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8790         (__reclaim_stacks): Decrement __nptl_nthreads.
8791         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8792         Define.
8793         * Makefile (tests): Add tst-basic3.
8794         * tst-basic3.c: New file.
8796         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8797         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8798         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8799         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8800         if asynchronous canceling is enabled.
8801         * pthread_join.c (pthread_join): When recognizing circular joins,
8802         take into account the other thread might be already canceled.
8803         * Makefile (tests): Add tst-join5.
8804         * tst-join5.c: New file.
8806         * Makefile (tests): Add tst-join4.
8807         * tst-join4.c: New file.
8809 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8811         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8813 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8815         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8816         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8817         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8818         warning.
8819         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8820         to avoid warning.
8821         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8822         error if lll_futex_wake failed.
8824 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8827         handling of cancellation and failung pthread_mutex_unlock call.
8828         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8829         * Makefile (tests): Add tst-cond8 and tst-cond9.
8830         * tst-cond8.c: New file.
8831         * tst-cond9.c: New file.
8833         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8835         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8836         non-standard initializers with __USE_GNU.
8838         * Makefile (tests): Add tst-cleanup3.
8839         * tst-cleanup3.c: New file.
8841 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8843         * Makefile (tests): Add tst-attr1 and tst-attr2.
8844         * tst-attr1.c: New file.
8845         * tst-attr2.c: New file.
8847         * Makefile: Add rules to build and run tst-atfork2 test.
8848         * tst-atfork2.c: New file.
8849         * tst-atfork2mod.c: New file.
8851         * sysdeps/unix/sysv/linux/unregister-atfork.c
8852         (__unregister_atfork): Free the memory allocated for the handlers
8853         after removing them from the lists.
8855         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8856         cleanup function.
8858         * tst-atfork1.c (do_test): Wait for the child we forked.
8859         Report error in child.
8861         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8863         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8865 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8867         * Makefile (tests): Add tst-cancel8.
8868         * tst-cancel8.c: New file.
8870         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8871         clearing of control variable.
8872         * Makefile (tests): Add tst-once3 and tst-once4.
8873         * tst-once3.c: New file.
8874         * tst-once4.c: New file.
8876 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8878         * sysdeps/sh/Makefile: New file.
8879         * sysdeps/sh/bits/atomic.h: New file.
8880         * sysdeps/sh/pthread_spin_init.c: New file.
8881         * sysdeps/sh/pthread_spin_lock.c: New file.
8882         * sysdeps/sh/pthread_spin_trylock.S: New file.
8883         * sysdeps/sh/pthread_spin_unlock.S: New file.
8884         * sysdeps/sh/pthreaddef.h: New file.
8885         * sysdeps/sh/tcb-offsets.sym: New file.
8886         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8887         * sysdeps/sh/tls.h: New file.
8888         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8889         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8890         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8891         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8892         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8893         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8894         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8895         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8896         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8897         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8898         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8899         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8900         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8901         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8902         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8903         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8904         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8905         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8906         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8907         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8908         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8909         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8910         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8911         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8912         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8913         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8914         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8915         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8916         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8917         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8919 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8921         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8922         according to POSIX.
8924         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8926 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8928         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8929         (TLS_GET_FS): New #define.
8930         (TLS_SET_FS): New #define.
8931         Correct value of __NR_set_thread_area.
8933         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8935 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8937         * Makefile (tests): Add tst-popen1.
8938         * tst-popen1.c: New file.
8940         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8941         but inactive generalization.
8942         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8944         Minor optimization, remove one instruction.
8945         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8947 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8949         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8951 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8953         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8954         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8955         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8956         * sysdeps/pthread/pthread_cond_signal.c: New file.
8957         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8958         * sysdeps/pthread/pthread_cond_wait.c: New file.
8959         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8960         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8961         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8962         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8963         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8964         * sysdeps/s390/Makefile: New file.
8965         * sysdeps/s390/bits/atomic.h: New file.
8966         * sysdeps/s390/pthread_spin_init.c: New file.
8967         * sysdeps/s390/pthread_spin_lock.c: New file.
8968         * sysdeps/s390/pthread_spin_trylock.c: New file.
8969         * sysdeps/s390/pthread_spin_unlock.c: New file.
8970         * sysdeps/s390/pthreaddef.h: New file.
8971         * sysdeps/s390/tcb-offsets.sym: New file.
8972         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8973         * sysdeps/s390/tls.h: New file.
8974         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8975         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8976         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8977         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8978         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8979         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8980         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8981         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8982         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8983         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8984         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8985         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8986         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8987         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8988         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8989         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8990         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8991         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8992         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8993         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8994         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8995         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8996         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8998 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9000         * atomic.h: Add a couple more default implementations.
9001         (atomic_compare_and_exchange_acq): Use
9002         __arch_compare_and_exchange_32_acq in return value definition.  It
9003         always exists.
9004         (atomic_bit_set): Renamed from atomic_set_bit.
9005         Add missing atomic_ prefixes.
9007         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9008         thread library is available, use correct value to mark initialized
9009         once variable.
9011 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9013         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9014         __sysconf to determine pagesize.
9016         * pthread_create.c: Include <atomic.h>.
9017         * allocatestack.c (allocate_stack): Implement coloring of the
9018         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9019         size minus one.  Adjust users.
9020         * sysdeps/i386/i686/Makefile: New file.
9022 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9024         * allocatestack.c: Improve comment throughout the file.
9026         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9027         (__lll_lock_wait): Add branch prediction.
9028         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9029         (__lll_lock_wait): Likewise.
9030         (lll_unlock_wake_cb): Removed.
9032 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9034         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9035         _POSIX_THREAD_PRIORITY_SCHEDULING.
9037 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9039         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9040         Fix return type of ptr___pthread_getspecific.
9042 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9044         * Makefile (tests): Add tst-umask1.
9045         (tst-umask1-ARGS): Define.
9046         * tst-umask1.c: New file.
9048 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9050         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9051         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9052         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9053         pthread_rwlock_unlock.
9054         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9055         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9056         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9058         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9059         New file.
9060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9061         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9062         New file.
9063         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9064         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9065         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9066         New file.
9067         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9068         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9069         New file.
9070         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9071         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9072         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9073         New file.
9074         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9075         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9076         New file.
9077         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9079         * Makefile (libpthread-routines): Remove lowlevelcond and
9080         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9081         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9082         and pthread_cond_broadcast.
9083         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9084         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9085         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9086         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9087         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9088         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9089         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9090         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9091         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9092         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9094         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9095         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9097         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9098         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9099         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9100         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9101         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9102         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9103         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9104         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9105         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9106         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9107         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9108         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9109         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9110         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9111         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9112         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9113         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9115         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9116         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9117         of the code is moved to ...
9118         * sysdeps/pthread/createthread.c: ...here.  New file.
9120 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9122         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9123         (__new_sem_post): Clear %eax before returning.
9124         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9126         * Makefile (tests): Add tst-cleanup2.
9127         * tst-cleanup2.c: New file.
9129         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9130         Interpret first parameter correctly.
9132 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9134         * Makefile (headers): Add bits/semaphore.h.
9136 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9138         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9139         if not SHARED.
9141 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9143         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9144         must be used and mapping failed.
9145         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9147         * Makefile (CFLAGS-pthread_self.os): Define this, not
9148         CFLAGS-pthread_self.c.
9150 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9152         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9153         lll_unlock_wake_cb.
9155         * Makefile (libpthread-routines): Add version.  Add rules to build
9156         version.os and banner.h.
9157         * version.c: New file.
9159 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9161         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9162         the alias unconditional.
9163         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9165 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9167         * Makefile (CFLAGS-pthread_self.c): New definition.
9169 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9171         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9172         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9173         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9174         * init.c (__pthread_initialize_minimal_internal): Likewise.
9176 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9178         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9180         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9181         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9182         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9183         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9184         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9185         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9187 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9189         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9190         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9191         * tst-cancel-wrappers.sh: Remove all exceptions.
9193 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9195         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9196         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9198         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9199         Use __libc_pthread_functions array if SHARED.
9201         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9202         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9204         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9205         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9206         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9207         __libc_ptf_call instead of __libc_maybe_call.
9208         (PTF): New #define.
9209         (__libc_cleanup_region_start): Wrap function name with PTF call.
9210         (__libc_cleanup_region_end): Likewise.
9211         (__libc_cleanup_end): Likewise.
9213         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9214         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9215         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9216         * pthreadP.h: Add prototypes.
9218         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9219         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9220         __pthread_rwlock_unlock aliases.
9221         * pthreadP.h: Add prototypes for new aliases.
9223         * pthreadP.h (struct pthead_functions): Moved to...
9224         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9225         * init.c (pthread_functions): Add initializers for new elements.
9227         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9228         __pthread_cleanup_pop_restore aliases.
9229         * pthreadP.h: Add prototypes.
9231         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9232         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9233         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9234         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9235         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9236         * pthreadP.h: Adjust prototypes and callers.
9238 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9240         * Makefile (tests): Add tst-cancel7.
9241         (tst-cancel7-ARGS): New variable.
9242         * tst-cancel7.c: New file.
9244         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9245         around gcc defficiencies.
9246         * old_pthread_cond_signal.c: Likewise.
9247         * old_pthread_cond_timedwait.c: Likewise.
9248         * old_pthread_cond_wait.c: Likewise.
9250         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9252 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9254         * Makefile (tests): Add tst-cond7.
9255         * tst-cond7.c: New file.
9257         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9258         (condvar_cleanup): Get condvar address from the right place.
9260         * atomic.h: Correct definitions of atomic_full_barrier,
9261         atomic_read_barrier, atomic_write_barrier.
9263         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9264         race-free.
9265         * old_pthread_cond_signal.c: Likewise.
9266         * old_pthread_cond_timedwait.c: Likewise.
9267         * old_pthread_cond_wait.c: Likewise.
9269 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9271         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9273 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9275         * pthreadP.h (pthread_cond_2_0_t): New type.
9276         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9277         Use new type for the 2.0 condvar function prototypes.
9278         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9279         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9280         parameter.
9281         * old_pthread_cond_destroy.c: Likewise.
9282         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9283         * old_pthread_cond_signal.c: Likewise.
9284         * old_pthread_cond_timedwait.c: Likewise.
9285         * old_pthread_cond_wait.c: Likewise.
9287         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9288         (__pthread_cond_wait): Don't save cancellation mode and seq value
9289         in same location.
9291         * herrno.c (__h_errno_location): Don't define as weak.
9293 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9295         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9296         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9297         and pthread_cond_wait.
9298         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9299         Renamed to...
9300         (__pthread_cond_broadcast_2_0): ... this.
9301         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9302         Renamed to...
9303         (__pthread_cond_destroy_2_0): ... this.
9304         * old_pthread_cond_init.c (__old_pthread_cond_init):
9305         Renamed to...
9306         (__pthread_cond_init_2_0): ... this.
9307         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9308         Renamed to...
9309         (__pthread_cond_signal_2_0): ... this.
9310         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9311         Renamed to...
9312         (__pthread_cond_wait_2_0): ... this.
9313         * pthread_cond_destroy.c: Include shlib-compat.h.
9314         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9315         * pthread_cond_init.c: Include shlib-compat.h.
9316         (pthread_cond_init): Change strong_alias into versioned_symbol.
9317         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9318         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9319         fields.
9320         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9321         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9322         __pthread_cond_wait_2_0): New prototypes.
9323         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9324         __old_pthread_cond_init, __old_pthread_cond_signal,
9325         __old_pthread_cond_wait): Removed.
9326         * init.c: Include shlib-compat.h.
9327         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9328         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9329         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9330         ptr___pthread_cond_*_2_0 fields.
9331         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9332         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9334         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9335         LIBC_SIGACTION was not yet defined.
9336         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9337         [!defined LIBC_SIGACTION] (__sigaction): New function and
9338         libc_hidden_weak.
9339         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9340         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9342 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9344         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9346 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9348         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9349         New, larger type definition.
9350         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9351         implementation.
9352         * Versions [libpthread]: Add definitions for new pthread_cond_*
9353         interfaces for version GLIBC_2.3.2.
9354         * pthread_cond_init.c: Update initialization for new type definition.
9355         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9356         pthread_cond_timedwait, pthread_cond_signal, and
9357         pthread_cond_broadcast.  Add old_pthread_cond_init,
9358         old_pthread_cond_destroy, old_pthread_cond_wait,
9359         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9360         old_pthread_cond_broadcast.
9361         * old_pthread_cond_broadcast.c: New file.
9362         * old_pthread_cond_destroy.c: New file.
9363         * old_pthread_cond_init.c: New file.
9364         * old_pthread_cond_signal.c: New file.
9365         * old_pthread_cond_timedwait.c: New file.
9366         * old_pthread_cond_wait.c: New file.
9367         * pthreadP.h: Add prototypes for the compatibility interfaces.
9369         * pthread_cond_destroy.c: Don't include <errno.h>.
9371 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9373         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9374         unnecessary zero offset when addressing MUTEX.
9376 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9378         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9379         __register_atfork.
9380         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9381         for __register_atfork.
9383 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9385         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9386         instead of ASSEMBLER test macro.
9388         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9389         __libc_current_sigrtmax): Add libc_hidden_def.
9391         * sysdeps/pthread/list.h: Remove assert.h include.
9393 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9395         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9396         __pthread_initialize_minimal_internal not
9397         __pthread_initialize_minimal.
9399 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9401         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9402         __pthread_initialize_minimal as hidden.
9404         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9405         constructor.
9407 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9409         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9410         $(common-objpfx)format.lds, include that into the output script.
9411         Fix comment.
9412         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9414 2002-12-28  Andreas Jaeger  <aj@suse.de>
9416         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9417         nsec resolution changes.
9418         (xstat64_conv): Likewise.
9419         (xstat32_conv): Likewise.
9420         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9421         struct kernel_stat.
9422         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9423         structs stat and stat64.
9424         * time/time.h (__timespec_defined): Define for __USE_MISC.
9425         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9427 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9429         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9430         argument.
9431         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9432         (pthread_exit): Use strong_alias to avoid warnings.
9433         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9434         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9435         ptr___pthread_attr_init_2_*.
9436         * init.c (pthread_functions): Adjust.
9438 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9440         * forward.c: Make all functions available by default again.  It
9441         caused too much trouble.
9443         * pt-siglongjmp.c: Removed.
9445 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9447         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9448         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9449         * sysdeps/i386/Makefile: New file.
9450         * sysdeps/i386/tcb-offsets.sym: New file.
9451         * sysdeps/pthread/tcb-offsets.h: New file.
9452         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9453         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9455         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9456         __register_atfork...
9457         (GLIBC_2.3.2): ...here.
9459 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9461         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9462         pthread_attr_setstackaddr with __attribute_deprecated__.
9464 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9466         * pt-system.c (system): Remove cancellation handling.
9467         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9468         cancellation routines.
9470 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9472         * descr.h: Include <dl-sysdep.h>.
9473         (struct pthread): Move header.data.list to the back of the struct.
9474         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9475         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9476         (SYSINFO_OFFSEET): Likewise.
9478 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9480         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9481         Define.
9482         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9483         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9484         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9485         (USE_DL_SYSINFO): Undef.
9487 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9489         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9490         $(common-objpfx)libc.so.
9491         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9492         it is bigger than pipe buffer size even on arches with bigger
9493         page size.
9494         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9496 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9498         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9499         correct errno access for case that USE___THREAD is not defined.
9501 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9503         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9504         Patch by Marijn Ros <marijn@mad.scientist.com>.
9506 2002-12-22  Roland McGrath  <roland@redhat.com>
9508         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9510 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9512         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9514 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9516         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9517         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9518         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9520         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9521         of int $0x80.
9522         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9523         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9524         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9525         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9526         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9527         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9528         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9529         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9531         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9532         sysenter.
9533         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9535         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9537         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9538         in new TCB.
9539         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9540         that sysinfo is properly initialized.
9541         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9542         to 1 only for ld.so.
9544         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9545         RTLD_CORRECT_DYNAMIC_WEAK.
9547 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9549         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9550         Use return 0 as 6th argument to FORWARD4.
9551         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9553 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9555         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9556         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9557         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9558         (INIT_SYSINFO): New #define.
9559         (TLS_TP_INIT): Use INIT_SYSINFO.
9560         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9561         At test to make sure SYSINFO_OFFSET value is correct.
9562         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9564 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9566         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9567         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9568         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9569         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9570         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9571         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9572         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9574 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9576         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9577         macro instead of using int $0x80 directly.
9579         * sysdeps/pthread/bits/stdio-lock.h: New file.
9580         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9581         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9582         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9583         * Makefile (routines): Add libc-lowlevelmutex.
9585         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9586         __i686.get_pc_thunk.dx.
9588 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9590         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9591         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9592         ($(objpfx)tst-cancel-wrappers.out): New rule.
9593         * tst-cancel-wrappers.sh: New test.
9594         * tst-locale1.c: Include signal.h.
9595         (uselocale): Test static linking of __libc_current_sigrt*.
9597 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9599         * Makefile (tests): Add tst-cancel6.
9600         * tst-cancel6.c: New file
9602 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9604         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9605         Define meaningfully for assembler as well.
9606         * pthreadP.h (struct pthread_functions): Remove
9607         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9608         and ptr_pthread_attr_init_2_1 fields.
9609         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9610         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9611         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9612         (FORWARD3): Define using FORWARD4.
9613         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9614         versions.
9615         * pt-system.c: Remove duplicate stdlib.h include.
9617 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9619         * sem_init.c: Define sem_init@GLIBC_2.0.
9620         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9621         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9623         * flockfile.c: Moved to...
9624         * sysdeps/pthread/flockfile.c: ...here.  New file.
9625         * funlockfile.c: Moved to...
9626         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9627         * ftrylockfile.c: Moved to...
9628         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9630 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9632         * libc-cancellation.c: Guard both function with
9633         #if !defined NOT_IN_libc.
9634         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9635         automatically provided pthread wrappers.
9636         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9637         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9638         nor in libpthread.
9639         * pt-open.c: Removed.
9640         * pt-fcntl.c: Removed.
9641         * pt-fsync.c: Removed.
9642         * pt-lseek.c: Removed.
9643         * pt-msgrcv.c: Removed.
9644         * pt-msgsnd.c: Removed.
9645         * pt-msync.c: Removed.
9646         * pt-nanosleep.c: Removed.
9647         * pt-open64.c: Removed.
9648         * pt-pause.c: Removed.
9649         * pt-pread.c: Removed.
9650         * pt-pread64.c: Removed.
9651         * pt-pwrite.c: Removed.
9652         * pt-pwrite64.c: Removed.
9653         * pt-read.c: Removed.
9654         * pt-recv.c: Removed.
9655         * pt-recvfrom.c: Removed.
9656         * pt-recvmsg.c: Removed.
9657         * pt-send.c: Removed.
9658         * pt-sendto.c: Removed.
9659         * pt-sigtimedwait.c: Removed.
9660         * pt-sigwait.c: Removed.
9661         * pt-wait.c: Removed.
9662         * pt-waitpid.c: Removed.
9663         * pt-write.c: Removed.
9664         * pt-accept.c: Removed.
9665         * pt-close.c: Removed.
9666         * pt-connect.c: Removed.
9667         * pt-lseek64.c: Removed.
9668         * pt-sendmsg.c: Removed.
9669         * pt-tcdrain.c: Removed.
9671 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9673         * init.c (__pthread_initialize_minimal_internal): Renamed from
9674         __pthread_initialize_minimal.  Make old name an alias.  This
9675         converts a normal relocation into a relative relocation.
9677         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9679         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9680         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9681         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9682         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9683         pt-sigwaitinfo, pt-waitid, and pt-writev.
9684         * pt-creat.c: Removed.
9685         * pt-poll.c: Removed.
9686         * pt-pselect.c: Removed.
9687         * pt-readv.c: Removed.
9688         * pt-select.c: Removed.
9689         * pt-sigpause.c: Removed.
9690         * pt-sigsuspend.c: Removed.
9691         * pt-sigwaitinfo.c: Removed.
9692         * pt-waitid.c: Removed.
9693         * pt-writev.c: Removed.
9695         * init.c (pthread_functions): New variable.
9696         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9697         (or NULL) to __libc_pthread_init.
9698         * forward.c: Rewrite to use __libc:pthread_functions array to get
9699         function addresses.
9700         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9701         prototype.
9702         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9703         Take new parameter.  Copy content of variable pointed to by it
9704         to __libc_pthread_init.
9706         * pthreadP.h (struct pthread_functions): New type.
9707         (__libc_pthread_init): Declare.
9709         * pthread_attr_destroy.c: Add namespace protected alias.
9710         * pthread_attr_getdetachstate.c: Likewise.
9711         * pthread_attr_getinheritsched.c: Likewise.
9712         * pthread_attr_getschedparam.c: Likewise.
9713         * pthread_attr_getschedpolicy.c: Likewise.
9714         * pthread_attr_getscope.c: Likewise.
9715         * pthread_attr_setdetachstate.c: Likewise.
9716         * pthread_attr_setinheritsched.c: Likewise.
9717         * pthread_attr_setschedparam.c: Likewise.
9718         * pthread_attr_setschedpolicy.c: Likewise.
9719         * pthread_attr_setscope.c: Likewise.
9720         * pthread_cond_broadcast.c: Likewise.
9721         * pthread_cond_destroy.c: Likewise.
9722         * pthread_cond_init.c: Likewise.
9723         * pthread_cond_signal.c: Likewise.
9724         * pthread_cond_wait.c: Likewise.
9725         * pthread_condattr_destroy.c: Likewise.
9726         * pthread_condattr_init.c: Likewise.
9727         * pthread_equal.c: Likewise.
9728         * pthread_exit.c: Likewise.
9729         * pthread_getschedparam.c: Likewise.
9730         * pthread_self.c: Likewise.
9731         * pthread_setcancelstate.c: Likewise.
9732         * pthread_setschedparam.c: Likewise.
9733         * pthread_mutex_destroy.c: Likewise.
9734         * pthread_mutex_init.c: Likewise.
9735         * pthreadP.h: Add prototypes for the aliases.
9737         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9738         multiple_threads member in correct TCB to 1.
9740         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9741         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9742         member of thread decriptor, otherwise return unconditionally 1.
9744 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9746         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9747         regular Linux version.  Remove file.
9748         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9749         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9750         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9751         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9752         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9753         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9754         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9755         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9756         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9757         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9758         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9759         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9760         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9761         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9762         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9763         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9764         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9765         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9766         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9767         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9768         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9769         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9770         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9771         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9772         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9773         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9774         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9775         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9776         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9777         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9779 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9781         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9782         * sysdeps/unix/sysv/linux/open.c: Removed.
9783         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9784         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9785         * sysdeps/unix/sysv/linux/msync.c: Removed.
9786         * sysdeps/unix/sysv/linux/read.c: Removed.
9787         * sysdeps/unix/sysv/linux/close.c: Removed.
9788         * sysdeps/unix/sysv/linux/creat.c: Removed.
9789         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9790         * sysdeps/unix/sysv/linux/pause.c: Removed.
9791         * sysdeps/unix/sysv/linux/select.c: Removed.
9792         * sysdeps/unix/sysv/linux/write.c: Removed.
9794 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9796         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9797         element in TCB to see whether locking is needed.
9799         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9800         MULTIPLE_THREADS_OFFSET value is correct.
9802         * sysdeps/unix/sysv/linux/close.c: New file.
9803         * sysdeps/unix/sysv/linux/connect.S: New file.
9804         * sysdeps/unix/sysv/linux/creat.c: New file.
9805         * sysdeps/unix/sysv/linux/fsync.c: New file.
9806         * sysdeps/unix/sysv/linux/llseek.c: New file.
9807         * sysdeps/unix/sysv/linux/lseek.c: New file.
9808         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9809         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9810         * sysdeps/unix/sysv/linux/msync.c: New file.
9811         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9812         * sysdeps/unix/sysv/linux/open.c: New file.
9813         * sysdeps/unix/sysv/linux/open64.c: New file.
9814         * sysdeps/unix/sysv/linux/pause.c: New file.
9815         * sysdeps/unix/sysv/linux/poll.c: New file.
9816         * sysdeps/unix/sysv/linux/pread.c: New file.
9817         * sysdeps/unix/sysv/linux/pread64.c: New file.
9818         * sysdeps/unix/sysv/linux/pselect.c: New file.
9819         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9820         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9821         * sysdeps/unix/sysv/linux/readv.c: New file.
9822         * sysdeps/unix/sysv/linux/recv.S: New file.
9823         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9824         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9825         * sysdeps/unix/sysv/linux/select.c: New file.
9826         * sysdeps/unix/sysv/linux/send.S: New file.
9827         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9828         * sysdeps/unix/sysv/linux/sendto.S: New file.
9829         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9830         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9831         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9832         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9833         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9834         * sysdeps/unix/sysv/linux/system.c: New file.
9835         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9836         * sysdeps/unix/sysv/linux/wait.c: New file.
9837         * sysdeps/unix/sysv/linux/waitid.c: New file.
9838         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9839         * sysdeps/unix/sysv/linux/writev.c: New file.
9840         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9842         * pt-readv.c: Fix comment.
9844 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9846         * tst-cleanup1.c: Include stdlib.h.
9848         * tst-cancel5.c: New test.
9849         * Makefile (tests): Add tst-cancel5.
9850         (tst-cancel5): Link against libc.so libpthread.so in that order.
9852 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9854         * forward.c (test_loaded): Prevent recursive calls.
9856         * Makefile (routines): Add libc-cancellation.
9857         * libc-cancellation.c: New file.
9858         * descr.h (struct pthread): Add multiple_threads field.
9859         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9860         new thread descriptor to 1.
9861         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9862         Initialize multiple_thread field after successful thread creation.
9863         * cancellation.c (__do_cancel): Move to pthreadP.h.
9864         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9865         (__pthread_disable_asynccancel): Add internal_function attribute.
9866         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9867         * pthread_setcancelstate.c: Likewise.
9868         * pthread_setcanceltype.c: Likewise.
9869         * pthread_exit.c: Likewise.
9870         * pthreadP.h (CANCELLATION_P): Likewise.
9871         (__do_cancel): Define as static inline.
9872         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9873         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9874         declarations.
9875         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9876         fields.  Define MULTIPLE_THREADS_OFFSET.
9877         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9878         declaration.
9879         * sysdeps/unix/sysv/linux/accept.S: New file.
9880         * sysdeps/unix/sysv/linux/read.c: New file.
9881         * sysdeps/unix/sysv/linux/write.c: New file.
9882         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9883         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9884         initialization of __libc_locking_needed.
9885         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9886         __libc_locking_needed, use multiple_threads field in TCB.
9887         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9889 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9891         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9892         version.
9893         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9895         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9896         access to __libc_locking_needed for PIC.
9898 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9900         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9901         declare for libc.so.
9902         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9903         expression.
9904         (__libc_lock_lock): Put into statement expression.
9905         (__libc_lock_unlock): Remove trailing semicolon.
9906         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9908 2002-12-12  Roland McGrath  <roland@redhat.com>
9910         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9911         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9913 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9915         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9916         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9917         Initialize __libc_locking_needed.
9918         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9919         instead of __register_pthread_fork_handler.
9920         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9921         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9922         fork-gen with libc_pthread_init.
9923         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9924         of __register_pthread_fork_handler.
9925         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9926         of __register_pthread_fork_handler.
9927         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9928         __libc_locking_needed to determine whether lock prefix can be avoided.
9929         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9931 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9933         * Makefile (tests): Add tst-cleanup1.
9934         * tst-cleanup1.c: New file.
9935         * cancellation.c (__cleanup_thread): Removed.
9936         (__do_cancel): Remove call to __cleanup_thread.
9937         * pthreadP.h: Remove __cleanup_thread prorotype.
9939         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9940         Remember function and argument even if cancellation handler
9941         function is not available.
9942         (__libc_cleanup_region_end): Execute registered function directly if
9943         pthread functions are not available.
9944         (__libc_cleanup_end): Likewise.
9946         * init.c (__pthread_initialize_minimal): Fix initialization in
9947         static lib by preventing gcc from being too clever.
9949 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9951         * init.c (__pthread_initialize_minimal): Remove unneccesary
9952         sigaddset call.
9954         * Makefile (tests): We can run tst-locale2 now.
9956 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9958         * Versions: Remove duplicated sigwait entry.
9960 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9962         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9963         inside libpthread.
9965         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9967         * pthreadP.h: Declare __pthread_enable_asynccancel and
9968         __pthread_disable_asynccancel.
9969         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9970         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9971         * cancellation.c (__pthread_enable_asynccancel): New function.
9972         (__pthread_disable_asynccancel): New function.
9973         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9974         * pt-close.c: Likewise.
9975         * pt-connect.c: Likewise.
9976         * pt-creat.c: Likewise.
9977         * pt-fcntl.c: Likewise.
9978         * pt-fsync.c: Likewise.
9979         * pt-lseek.c: Likewise.
9980         * pt-lseek64.c: Likewise.
9981         * pt-msgrcv.c: Likewise.
9982         * pt-msgsnd.c: Likewise.
9983         * pt-msync.c: Likewise.
9984         * pt-nanosleep.c: Likewise.
9985         * pt-open.c: Likewise.
9986         * pt-open64.c: Likewise.
9987         * pt-pause.c: Likewise.
9988         * pt-poll.c: Likewise.
9989         * pt-pread.c: Likewise.
9990         * pt-pread64.c: Likewise.
9991         * pt-pselect.c: Likewise.
9992         * pt-pwrite.c: Likewise.
9993         * pt-pwrite64.c: Likewise.
9994         * pt-read.c: Likewise.
9995         * pt-readv.c: Likewise.
9996         * pt-recv.c: Likewise.
9997         * pt-recvfrom.c: Likewise.
9998         * pt-recvmsg.c: Likewise.
9999         * pt-select.c: Likewise.
10000         * pt-send.c: Likewise.
10001         * pt-sendmsg.c: Likewise.
10002         * pt-sendto.c: Likewise.
10003         * pt-sigpause.c: Likewise.
10004         * pt-sigsuspend.c: Likewise.
10005         * pt-sigtimedwait.c: Likewise.
10006         * pt-sigwait.c: Likewise.
10007         * pt-sigwaitinfo.c: Likewise.
10008         * pt-system.c: Likewise.
10009         * pt-tcdrain.c: Likewise.
10010         * pt-wait.c: Likewise.
10011         * pt-waitid.c: Likewise.
10012         * pt-waitpid.c: Likewise.
10013         * pt-write.c: Likewise.
10014         * pt-writev.c: Likewise.
10015         * pthread_join.c: Likewise.
10016         * pthread_timedjoin.c: Likewise.
10018         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10019         (__xpg_sigpause): New function.
10020         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10022 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10024         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10026         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10027         _GI_pthread_cleanup_pop to pthreadP.h.
10029         * ftrylockfile.c: Use _IO_lock_trylock instead of
10030         pthread_mutex_trylock.
10032         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10033         (CANCEL_RESET): Likewise.
10034         (__pthread_setcanceltype_): Declare.
10035         (__pthread_mutex_lock_internal): Declare.
10036         (__pthread_mutex_unlock_internal): Declare.
10037         (__pthread_once_internal): Declare.
10038         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10039         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10041         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10042         and pthread_mutex_unlock.
10043         * pthread_cond_wait.c: Likewise.
10044         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10045         * pthread_mutex_unlock.c: Likewise.
10047         * pthread_setcanceltype.c: Add additional alias
10048         __pthread_setcanceltype.
10050         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10051         * sem_open.c (sem_open): Likewise.
10052         Use __libc_open, __libc_write, and __libc_close instead of
10053         open, write, and close respectively.
10055         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10056         Rewrite as statement expression since it must return a value.
10058         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10059         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10060         __pthread_kill.
10062         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10063         alias __pthread_once_internal.
10065         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10067 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10069         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10070         * tst-stdio1.c: New file.
10071         * tst-stdio2.c: New file.
10073         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10075         * Makefile (tests): Comment out tst-locale2 for now.
10076         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10078         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10079         -D_IO_MTSAFE_IO.
10080         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10081         Use _IO_lock_init instead of explicit assignment.
10083         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10084         Define __libc_lock_* and __libc_lock_recursive macros with
10085         lowlevellock macros, not pthread mutexes.
10087         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10088         of pthread_mutex_lock.
10089         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10090         instead of pthread_mutex_unlock.
10092 2002-12-06  Roland McGrath  <roland@redhat.com>
10094         * allocatestack.c (__stack_user): Use uninitialized defn.
10095         * init.c (__pthread_initialize_minimal): Initialize it here.
10097 2002-12-05  Roland McGrath  <roland@redhat.com>
10099         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10100         string.
10101         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10103         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10104         missing & here too.
10106 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10108         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10109         lowlevellock.
10110         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10111         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10112         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10113         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10114         for __libc_lock_* macros.
10115         * Makefile (routines): Add libc-lowlevellock.
10117 2002-10-09  Roland McGrath  <roland@redhat.com>
10119         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10120         Under [__PIC__], call the function via the pointer fetched for
10121         comparison rather than a call by name that uses the PLT.
10122         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10123         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10124         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10125         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10126         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10128 2002-12-04  Roland McGrath  <roland@redhat.com>
10130         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10132         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10133         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10135         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10137 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10139         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10140         a completely opaque, non-integer type.
10141         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10143 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10145         * sysdeps/i386/tls.h: Include stdlib.h.
10146         * sysdeps/x86_64/tls.h: Likewise.
10148 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10150         * Makefile (tests): Add tst-locale2.
10151         (tests-static): Likewise.
10152         * tst-locale2.c: New file.
10154         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10155         volatile and add memory clobbers to lock operations.
10157 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10159         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10160         * sysdeps/i386/i486/bits/atomic.h: New file.
10161         * sysdeps/i386/i586/bits/atomic.h: New file.
10162         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10163         include i486 version.
10164         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10165         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10166         Patch by Marijn Ros <marijn@mad.scientist.com>.
10168         * allocatestack.c (get_cached_stack): Don't crash if we first
10169         found a stack with a larger size then needed.
10170         Reported by Hui Huang <hui.huang@sun.com>.
10172         * Makefile (tests): Add tst-sysconf.
10173         * tst-sysconf.c: New file.
10175         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10176         PTHREAD_THREADS_MAX.
10178 2002-12-02  Roland McGrath  <roland@redhat.com>
10180         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10181         Declare using hidden_proto instead of attribute_hidden, so there are
10182         non-.hidden static symbols for gdb to find.
10183         (__pthread_keys): Likewise.
10184         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10185         * allocatestack.c (__stack_user): Likewise.
10186         * pthread_create.c (__pthread_keys): Likewise.
10187         (__nptl_threads_events, __nptl_last_event): Make these static instead
10188         of hidden.
10189         * pthread_key_create.c (__pthread_pthread_keys_max,
10190         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10192 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10194         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10195         statically.
10196         * tst-locale1.c: New file.
10198         * pthread_cond_timedwait.c: Include <stdlib.h>.
10200         * Makefile (tests): Add tst-fork2 and tst-fork3.
10201         * tst-fork2.c: New file.
10202         * tst-fork3.c: New file.
10204 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10206         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10208         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10209         require it to 200112L.
10211         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10212         instruction only if HAVE_CMOV is defined.
10213         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10215         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10217         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10219         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10221         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10223 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10225         * sysdeps/x86_64/bits/atomic.h: New file.
10227         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10228         16-bit operations.
10230         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10231         possible since gettid cannot fail.
10233         * sysdeps/x86_64/pthreaddef.h: New file.
10235         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10237         * sysdeps/x86_64/pthread_spin_init.c: New file.
10238         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10239         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10240         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10242         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10243         Add missing lock prefix.  Minute optimization.
10245         * tst-spin2.c (main): Also check successful trylock call.
10247         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10248         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10250         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10251         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10253         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10254         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10255         value in case of an error.  Add support for INTERNAL_SYSCALL.
10257         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10258         value in case of an error.
10260         * sysdeps/x86_64/tls.h: New file.
10262 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10264         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10265         takes the array member name and the index as parameters.
10266         (THREAD_SETMEM_NC): Likewise.
10267         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10268         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10269         interfaces.
10271         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10272         to decide which code to use.
10273         (THREAD_SETMEM_NC): Likewise.
10275         * allocatestack.c (queue_stack): Don't remove stack from list here.
10276         Do it in the caller.  Correct condition to prematurely terminate
10277         loop to free stacks.
10278         (__deallocate_stack): Remove stack from list here.
10280 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10282         * Makefile (tests): Add tst-stack1.
10283         * tst-stack1.c: New file.
10285         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10286         provided stack.
10288         * pthread_attr_getstack.c: Return bottom of the thread area.
10290 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10292         * Makefile (libpthread-routines): Add pt-allocrtsig and
10293         pthread_kill_other_threads.
10294         * pt-allocrtsig.c: New file.
10295         * pthread_kill_other_threads.c: New file.
10296         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10297         all three functions.
10298         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10299         allocrtsig.
10300         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10301         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10302         and __libc_allocate_rtsig_private.
10303         * Versions (libpthread): Export pthread_kill_other_threads_np,
10304         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10306 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10308         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10309         the end of the stack.  Adjust computations.
10310         When mprotect call fails dequeue stack and free it.
10311         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10312         attribute.
10313         * pthread_getattr_np.c: Likewise.
10315         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10316         surprises.
10318 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10320         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10321         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10323 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10325         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10326         * pthread_setspecific.c: Likewise.
10328 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10330         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10331         definitions.  Get them from the official place.
10332         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10334         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10335         Use new CLONE_ flags in clone() calls.
10337         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10338         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10340         * Versions: Add pthread_* functions for libc.
10341         * forward.c: New file.
10343         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10344         errno-loc.
10345         * herrno.c: New file.
10346         * res.c: New file.
10348         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10349         sem_trywait, and sem_timedwait.  Add herrno and res.
10350         * sem_init.c: Don't initialize lock and waiters members.
10351         * sem_open.c: Likewise.
10352         * sem_post.c: Removed.
10353         * sem_wait.c: Removed.
10354         * sem_trywait.c: Removed.
10355         * sem_timedwait.c: Removed.
10356         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10357         Includes full implementations of sem_post, sem_wait, sem_trywait,
10358         and sem_timedwait.
10359         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10360         for new implementation.
10361         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10362         and waiters fields.
10364         * tst-sem3.c: Improve error message.
10365         * tst-signal3.c: Likewise.
10367         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10368         to tell the kernel about the termination futex and to initialize tid
10369         member.  Don't initialize main_thread.
10370         * descr.h (struct pthread): Remove main_thread member.
10371         * cancelllation.c (__do_cancel): Remove code handling main thread.
10372         The main thread is not special anymore.
10374         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10375         size of the stacks to stack_cache_actsize.
10377         * pt-readv.c: Add missing "defined".
10378         * pt-sigwait.c: Likewise.
10379         * pt-writev.c: Likewise.
10381 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10383         * Versions: Export __connect from libpthread.
10384         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10386         * Makefile (libpthread-routines): Add pt-raise.
10387         * sysdeps/unix/sysv/linux/raise.c: New file.
10388         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10389         * sysdeps/generic/pt-raise.c: New file.
10391         * pthread_cond_init.c: Initialize all data elements of the condvar
10392         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10394         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10395         * pthread_create.c: Likewise.
10397         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10398         * tst-key1.c: New file.
10399         * tst-key2.c: New file.
10400         * tst-key3.c: New file.
10402         * Versions: Export pthread_detach for version GLIBC_2.0.
10403         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10405 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10407         * pthread_key_create.c: Terminate search after an unused key was found.
10408         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10410         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10411         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10413 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10415         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10416         dynamic lookup for errno in PIC.
10418         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10419         release the stack lock as soon as possible.
10420         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10421         the static TLS block.
10422         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10424         * cancellation.c: Renamed from cancelation.c.
10425         * Makefile: Adjust accordingly.
10426         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10427         * cleanup_defer.c: Use CANCELLATION_P.
10428         * pthread_testcancel.c: Likewise.
10429         * descr.h: Fix spelling in comments.
10430         * init.c: Likewise.
10431         * pthread_getattr_np.c: Likewise.
10432         * pthread_getschedparam.c: Likewise.
10433         * pthread_setschedparam.c: Likewise.
10434         * Versions: Likewise.
10436         * pt-pselect.c: New file.
10437         * Makefile (libpthread-routines): Add pt-pselect.
10438         * Versions: Add pselect.
10440         * tst-cancel4.c: New file.
10441         * Makefile (tests): Add tst-cancel4.
10443 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10445         * pthread_mutex_lock.c: Always record lock ownership.
10446         * pthread_mutex_timedlock.c: Likewise.
10447         * pthread_mutex_trylock.c: Likewise.
10449         * pt-readv.c: New file.
10450         * pt-writev.c: New file.
10451         * pt-creat.c: New file.
10452         * pt-msgrcv.c: New file.
10453         * pt-msgsnd.c: New file.
10454         * pt-poll.c: New file.
10455         * pt-select.c: New file.
10456         * pt-sigpause.c: New file.
10457         * pt-sigsuspend.c: New file.
10458         * pt-sigwait.c: New file.
10459         * pt-sigwaitinfo.c: New file.
10460         * pt-waitid.c: New file.
10461         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10462         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10463         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10464         * Versions: Add all the new functions.
10466         * tst-exit1.c: New file.
10467         * Makefile (tests): Add tst-exit1.
10469         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10471 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10473         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10475         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10476         call.  pthread_join is an official cancellation point.
10477         * pthread_timedjoin.c: Likewise.
10479         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10480         and the condvar's mutex are retrieved.
10481         * pthread_cond_timedwait.c: Likewise.
10482         Reported by dice@saros.East.Sun.COM.
10484 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10486         * pthreadP.h: Cut out all type definitions and move them...
10487         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10488         * pthreadP.h: Include <internaltypes.h>.
10490         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10491         performance tweaks.
10493         * sem_trywait.c: Shuffle #includes around to get right order.
10494         * sem_timedwait.c: Likewise.
10495         * sem_post.c: Likewise.
10496         * sem_wait.c: Likewise.
10498         * nptl 0.3 released.
10500         * Makefile (tests): Add tst-signal3.
10501         * tst-signal3.c: New file.
10503 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10505         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10506         the asms modify the sem object.
10507         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10509         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10510         the actual members.
10511         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10512         * semaphoreP.h: Include pthreadP.h.
10513         * sem_getvalue.c: Adjust to sem_t change.
10514         * sem_init.c: Likewise.
10515         * sem_open.c: Likewise.
10516         * sem_post.c: Likewise.
10517         * sem_timedwait.c: Likewise.
10518         * sem_trywait.c: Likewise.
10519         * sem_wait.c: Likewise.
10521 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10523         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10524         * tst-basic2.c: New file.
10525         * tst-exec1.c: New file.
10526         * tst-exec2.c: New file.
10527         * tst-exec3.c: New file.
10529         * tst-fork1.c: Remove extra */.
10531         * nptl 0.2 released.  The API for IA-32 is complete.