[BZ #6955]
[glibc.git] / nptl / ChangeLog
blobbc87e2b4d7e0538c51a58af5aecd18453f556308
1 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
3         [BZ #6955]
4         * pthread_mutex_lock.c: Add support for private PI mutexes.
5         * pthread_mutex_timedlock.c: Likewise.
6         * pthread_mutex_trylock.c: Likewise.
7         * pthread_mutex_unlock.c: Likewise.
8         Patch mostly by Ben Jackson <ben@ben.com>.
10 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
12         [BZ #6843]
13         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
14         Increase stack size for helper thread.
16 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
18         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
19         assembly with a clobber list for access registers a0 and a1.
21 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
23         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
24         to force runp->refcntr to be read from memory.
26 2008-09-08  Richard Guenther  <rguenther@suse.de>
28         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
29         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
30         lll_timedlock, lll_robust_timedlock, lll_unlock,
31         lll_robust_unlock): Promote private to int.
33 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
35         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
36         ARCH_RETRY_MMAP definitions.
37         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
38         Define MAP_STACK when not defined.
39         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
40         handling of ARCH_RETRY_MMAP.
42 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
44         * tst-align2.c (f): Print message that f is reached.
46 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
48         [BZ #6740]
49         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
50         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
52 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
54         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
55         SOCK_CLOEXEC if possible.
57 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
59         * Makefile (tests): Add tst-rwlock2a.
60         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
61         * tst-rwlock2a.c: New file.
63 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
65         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
67 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
69         * sysdeps/pthread/pthread.h: Fix typo in comment.
71 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
73         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
74         of CPU set to the kernel.
76 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
78         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
79         cfi directives.
80         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
81         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
82         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
83         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
84         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
85         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
87 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
89         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
90         cfi directives.
91         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
92         Likewise.
93         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
94         Likewise.
95         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
96         Likewise.
98 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
100         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
102 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
104         David S. Miller  <davem@davemloft.net>
106         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
108 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
110         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
111         __pshared correctly.
112         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
113         Likewise.
114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
115         Likewise.
116         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
117         Likewise.
118         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
119         Likewise.
120         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
122 2008-04-14  David S. Miller  <davem@davemloft.net>
124         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
125         (__old_sem_wait): Fix argument to lll_futex_wait().
127 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
129         * pthread_create.c: Require pthread_mutex_trylock and
130         pthread_key_delete for libgcc.
132 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
134         [BZ #6020]
135         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
136         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
137         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
139 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
141         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
142         <linux/limits.h> has defined it.
143         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
144         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
145         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
146         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
148 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
150         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
151         of ASSEMBLER.
152         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
153         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
155 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
157         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
158         HAVE_DL_DISCOVER_OSVERSION.
159         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
160         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
162 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
164         [BZ #5778]
165         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
166         _POSIX_CHOWN_RESTRICTED value to zero.
168 2008-01-31  Roland McGrath  <roland@redhat.com>
170         * Makefile (omit-deps): Variable removed.
172 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
174         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
175         unnecessary addr32 prefix.
177 2008-01-29  Roland McGrath  <roland@redhat.com>
179         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
181 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
183         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
185 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
187         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
188         a scratch register.
189         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
190         (__lll_lock_wait_private): Fix typo.
191         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
192         (pthread_barrier_wait): Likewise.  Adjust XADD use.
193         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
194         Adjust XADD use.
195         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
196         (pthread_rwlock_timedrdlock): Return correct return value.
197         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
198         (pthread_rwlock_timedwrlock): Likewise.
200 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
202         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
203         thread returns the program exits with an error code.
205 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
207         * pthread-errnos.sym: Add EOVERFLOW.
208         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
209         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
210         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
211         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
213 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
215         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
216         parameter.  Passed it as permission to mmap.
217         * allocatestack.c (allocate_stack): Pass prot as second parameter
218         to ARCH_RETRY_MMAP.
220 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
222         * tst-basic7.c: Allocate memory for the stack.
224         [BZ #5465]
225         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
226         (__pthread_cond_timedwait): Don't use VDSO.
227         Patch by Michal Januszewski.
229 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
231         [BZ #5455]
232         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
233         Allow label before pthread_cleanup_pop.
234         (pthread_cleanup_pop_restore_np): Likewise.
236 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
238         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
239         Store 2 before returning ETIMEDOUT.
241 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
243         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
244         Store 2 before returning ETIMEDOUT.
245         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
246         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
247         (__lll_lock_wait_private): Optimize.
248         (__lll_lock_wait): Likewise.
250 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
252         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
253         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
254         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
256 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
258         [BZ #5240]
259         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
260         If we time out, try one last time to lock the futex to avoid
261         losing a wakeup signal.
262         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
263         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
265         [BZ #5245]
266         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
267         if necessary.
269 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
271         [BZ #5245]
272         * allocatestack.c (allocate_stack): Change ENOMEM error in case
273         mmap failed to EAGAIN.
274         * Makefile (tests): Add tst-basic7.
275         * tst-basic7.c: New file.
277 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
279         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
280         Use __linkin_atfork.
282 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
284         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
285         missing line continuations.
286         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
287         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
289 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
291         [BZ #5220]
292         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
293         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
294         (struct timer): Add next element.
295         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
296         enqueue timer structure into __active_timer_sigev_thread list.
297         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
298         remove timer struct from __active_timer_sigev_thread.
299         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
300         Before using timer structure make sure it is still on the
301         __active_timer_sigev_thread list.  Keep lock until done.
302         Define __active_timer_sigev_thread and
303         __active_timer_sigev_thread_lock.
305 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
307         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
308         Redefine thread_atfork for use of ATFORK_MEM.
309         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
310         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
311         function.
312         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
313         Use atomic operation when removing first element of list.
315 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
317         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
318         routine instead of an alias to __new_sem_post.
320 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
322         * init.c (__pthread_initialize_minimal): Initialize word to appease
323         valgrind.
325 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
327         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
328         libc.so just clear NAME.
329         (__libc_rwlock_fini): Nop inside of libc.so.
330         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
331         all zeros.
333 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
335         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
336         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
337         unlocking failed.
338         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
340 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
342         [BZ #4938]
343         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
344         reclaimed stack if necessary.
345         * Makefile (tests): Add tst-tsd6.
346         * tst-tsd6.c: New file.
348 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
350         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
351         Add private argument.
353 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
355         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
356         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
358 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
360         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
361         (__lll_robust_timedlock): Pass private as last argument to
362         __lll_robust_timedlock_wait.
363         (__lll_unlock): Fix a pasto.
365 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
367         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
368         sparc_old_sem): New structs.
369         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
370         (__sem_wait_cleanup): New function.
371         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
372         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
373         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
374         lll_futex_wait.
375         (__old_sem_wait): New function.
376         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
377         nptl/sysdeps/unix/sysv/linux/sparc version.
378         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
379         Likewise.
380         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
381         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
382         (__new_sem_trywait): Use sparc_old_sem structure.
383         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
384         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
385         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
386         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
387         lll_futex_timed_wait.
388         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
389         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
390         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
391         lll_futex_wake.
392         (__old_sem_post): New function.
393         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
394         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
395         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
396         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
397         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
398         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
400 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
402         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
403         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
404         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
405         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
406         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
407         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
408         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
409         Use FUTEX_WAKE_OP.
410         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
411         kernel-features.h and tcb-offsets.h.
412         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
413         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
414         process private.
415         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
416         tcb-offsets.h.
417         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
418         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
419         process private.
420         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
421         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
425         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
428 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
430         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
431         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
432         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
433         lll_futex_timed_wait.
435         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
436         __lll_robust_unlock): Rewrite as macros instead of inline functions.
437         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
438         __lll_robust_unlock, __lll_wait_tid): Likewise.
440 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
442         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
443         Fix a pasto.
444         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
445         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
446         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
447         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
449         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
450         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
452         kernel-features.h.
453         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
454         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
455         process private.  Switch DW_CFA_advance_loc1 and some
456         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
458         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
459         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
460         process private.  Switch DW_CFA_advance_loc{1,2} and some
461         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
462         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
463         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
464         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
465         Likewise.
466         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
467         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
468         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
469         Likewise.
470         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
471         (__pthread_cond_broadcast): Compare %r8 instead of
472         dep_mutex-cond_*(%rdi) with $-1.
473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
474         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
475         of oring.
477 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
479         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
481 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
483         * allocatestack.c: Include kernel-features.h.
484         * pthread_create.c: Likewise.
485         * pthread_mutex_init.c: Likewise.
486         * init.c: Likewise.
487         * pthread_cond_timedwait.c: Likewise.
488         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
489         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
490         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
491         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
492         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
494         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
495         Likewise.
496         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
497         Likewise.
498         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
499         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
500         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
501         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
503 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
505         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
506         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
507         byte elements.  One of them is the new __shared element.
508         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
509         adjust names of other padding elements.
510         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
511         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
512         byte elements.  One of them is the new __shared element.
513         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
514         adjust names of other padding elements.
515         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
516         Renamed __pad1 element to __shared, adjust names of other padding
517         elements.
518         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
519         (pthread_rwlock_t): Likewise.
520         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
521         typo.
523 2007-08-09  Anton Blanchard  <anton@samba.org>
525         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
527 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
529         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
530         <kernel-features.h>.
531         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
533 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
535         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
536         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
537         dealing with robust mutexes.
538         * pthread_mutex_timedlock.c: Likewise.
539         * pthread_mutex_trylock.c: Likewise.
540         * pthread_mutex_unlock.c: Likewise.
541         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
543 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
545         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
546         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
547         (PTHREAD_MUTEX_PSHARED): Define.
548         * pthread_mutex_init.c (__pthread_mutex_init): Set
549         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
550         mutexes.
551         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
552         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
553         as second argument to lll_lock.
554         (LLL_MUTEX_TRYLOCK): Take mutex as argument
555         instead of its __data.__lock field.
556         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
557         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
558         to lll_robust_lock.
559         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
560         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
561         instead of mutex->__data.__kind directly, pass
562         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
563         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
564         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
565         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
566         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
567         to lll_timedlock, lll_robust_timedlock, lll_unlock and
568         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
569         of mutex->__data.__kind directly.
570         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
571         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
572         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
573         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
574         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
575         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
576         and lll_futex_wake.
577         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
578         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
579         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
580         directly.
581         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
582         Take mutex as argument instead of its __data.__lock field, pass
583         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
584         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
585         __data.__lock field.
586         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
587         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
588         to lll_robust_cond_lock.
589         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
590         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
591         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
592         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
593         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
594         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
595         lll_futex_wait.
596         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
597         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
598         lll_futex_wake.
599         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
600         pshared variable, pass it to lll_lock, lll_unlock,
601         lll_futex_timedwait and lll_futex_wake.
602         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
603         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
604         and lll_futex_wake.
605         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
606         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
607         macro.
608         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
609         lll_futex_wake_unlock): Likewise.
610         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
611         Likewise.
612         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
613         lll_futex_wake_unlock): Likewise.
614         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
615         Likewise.
616         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
617         lll_futex_wake_unlock): Likewise.
618         (lll_futex_wake): Fix a typo.
619         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
620         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
621         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
622         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
623         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
624         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
625         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
626         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
627         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
628         (__pthread_cond_timedwait): Likewise.
629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
630         (__condvar_cleanup, __pthread_cond_wait): Likewise.
632 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
634         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
635         Don't use CGOTSETUP and CGOTRESTORE macros.
636         (CGOTSETUP, CGOTRESTORE): Remove.
637         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
638         @local symbol.
640 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
642         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
643         definitions for private futexes.
644         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
645         kernel-features.h and lowlevellock.h.  Use private futexes if
646         they are available.
647         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
648         (__lll_mutex_lock_wait): Rename to
649         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
650         (__lll_mutex_timedlock_wait): Rename to ...
651         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
652         Don't compile in for libc.so.
653         (__lll_mutex_unlock_wake): Rename to ...
654         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
655         (__lll_timedwait_tid): Use __NR_gettimeofday.
656         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
657         the header from assembler.  Renamed all lll_mutex_* resp.
658         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
659         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
660         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
661         Define.
662         (__lll_lock_wait_private): Add prototype.
663         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
664         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
665         __lll_unlock_wake): Likewise.
666         (lll_lock): Add private argument.  Call __lll_lock_wait_private
667         if private is constant LLL_PRIVATE.
668         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
669         lll_timedlock, lll_robust_timedlock): Add private argument.
670         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
671         if private is constant LLL_PRIVATE.
672         (lll_robust_unlock, lll_robust_dead): Add private argument.
673         (lll_lock_t): Remove.
674         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
675         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
676         lll_cond_wake, lll_cond_broadcast): Remove.
677         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
678         kernel-features.h and lowlevellock.h.
679         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
680         (LOAD_FUTEX_WAIT): Define.
681         (__lll_robust_mutex_lock_wait): Rename to ...
682         (__lll_robust_lock_wait): ... this.  Add private argument.
683         Use LOAD_FUTEX_WAIT macro.
684         (__lll_robust_mutex_timedlock_wait): Rename to ...
685         (__lll_robust_timedlock_wait): ... this.    Add private argument.
686         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
687         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
688         lowlevellock.h.
689         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
690         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
691         __lll_mutex_{lock,unlock}_*.
692         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
693         lowlevellock.h and pthread-errnos.h.
694         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
695         FUTEX_CMP_REQUEUE, EINVAL): Remove.
696         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
697         __lll_mutex_{lock,unlock}_*.
698         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
699         lowlevellock.h and pthread-errnos.h.
700         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
701         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
702         __lll_mutex_{lock,unlock}_*.
703         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
704         lowlevellock.h.
705         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
706         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
707         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
708         (__condvar_tw_cleanup): Likewise.
709         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
710         lowlevellock.h.
711         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
712         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
713         __lll_mutex_{lock,unlock}_*.
714         ( __condvar_w_cleanup): Likewise.
715         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
716         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
717         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
718         lowlevellock.h.
719         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
720         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
721         __lll_mutex_{lock,unlock}_*.
722         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
723         lowlevellock.h.
724         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
725         FUTEX_PRIVATE_FLAG): Remove.
726         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
727         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
728         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
729         lowlevellock.h.
730         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
731         FUTEX_PRIVATE_FLAG): Remove.
732         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
733         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
734         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
735         lowlevellock.h.
736         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
737         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
738         __lll_mutex_{lock,unlock}_*.
739         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
740         lowlevellock.h.
741         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
742         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
743         __lll_mutex_{lock,unlock}_*.
744         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
745         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
746         (__new_sem_post): Use standard initial exec code sequences.
747         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
748         lowlevellock.h.
749         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
750         FUTEX_PRIVATE_FLAG): Remove.
751         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
752         exec code sequences.
753         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
754         (__new_sem_trywait): Use standard initial exec code sequences.
755         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
756         (__new_sem_wait): Use standard initial exec code sequences.
758 2007-07-31  Anton Blanchard  <anton@samba.org>
760         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
761         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
762         atomic_full_barrier.
764 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
766         * allocatestack.c (stack_cache_lock): Change type to int.
767         (get_cached_stack, allocate_stack, __deallocate_stack,
768         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
769         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
770         as second argument to lll_lock and lll_unlock macros on
771         stack_cache_lock.
772         * pthread_create.c (__find_in_stack_list): Likewise.
773         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
774         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
775         as second argument.
776         * descr.h (struct pthread): Change lock and setxid_futex field
777         type to int.
778         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
779         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
780         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
781         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
782         Likewise.
783         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
784         * pthread_cond_init.c (__pthread_cond_init): Likewise.
785         * pthreadP.h (__attr_list_lock): Change type to int.
786         * pthread_attr_init.c (__attr_list_lock): Likewise.
787         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
788         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
789         lll_{,un}lock.
790         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
791         also for lll_futex_{wake,wait}.
792         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
793         a pointer to const.
794         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
795         LLL_SHARED as second argument to lll_{,un}lock.
796         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
797         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
798         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
799         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
800         Likewise.
801         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
802         as second argument to lll_{,un}lock macros on pd->lock.
803         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
804         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
805         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
806         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
807         Likewise.
808         * sysdeps/pthread/createthread.c (do_clone, create_thread):
809         Likewise.
810         * pthread_once.c (once_lock): Change type to int.
811         (__pthread_once): Pass LLL_PRIVATE as second argument to
812         lll_{,un}lock macros on once_lock.
813         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
814         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
815         rwlock->__data.__shared as second argument to them and similarly
816         for lll_futex_w*.
817         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
818         Likewise.
819         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
820         Likewise.
821         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
822         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
823         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
824         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
825         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
826         to lll_{,un}lock macros on __sem_mappings_lock.
827         * sem_open.c (check_add_mapping): Likewise.
828         (__sem_mappings_lock): Change type to int.
829         * semaphoreP.h (__sem_mappings_lock): Likewise.
830         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
831         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
832         instead of lll_*mutex_*, pass LLL_SHARED as last
833         argument.
834         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
835         pass LLL_SHARED as last argument.
836         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
837         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
838         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
839         pass LLL_SHARED as last argument.
840         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
841         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
842         LLL_SHARED as last argument.
843         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
844         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
845         Similarly.
846         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
847         __libc_lock_lock_recursive, __libc_lock_unlock,
848         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
849         argument to lll_{,un}lock.
850         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
851         _IO_lock_unlock): Likewise.
852         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
853         compound literal.
854         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
855         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
856         __fork_lock.
857         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
858         free_mem): Likewise.
859         (__fork_lock): Change type to int.
860         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
861         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
862         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
863         lll_futex_wake.
864         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
865         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
866         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
867         New function.
868         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
869         pass it through to lll_futex_*wait, only compile in when
870         IS_IN_libpthread.
871         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
872         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
873         argument and pass it through to lll_futex_*wait.
874         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
875         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
876         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
877         inline functions to __lll_* resp. __lll_robust_*.
878         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
879         (lll_mutex_dead): Add private argument.
880         (__lll_lock_wait_private): New prototype.
881         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
882         __lll_robust_lock_timedwait): Add private argument to prototypes.
883         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
884         call __lll_lock_wait_private, otherwise pass private to
885         __lll_lock_wait.
886         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
887         __lll_robust_timedlock): Add private argument, pass it to
888         __lll_*wait functions.
889         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
890         call __lll_unlock_wake_private, otherwise pass private to
891         __lll_unlock_wake.
892         (__lll_robust_unlock): Add private argument, pass it to
893         __lll_robust_unlock_wake.
894         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
895         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
896         argument, pass it through to __lll_* inline function.
897         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
898         (lll_lock_t): Remove.
899         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
900         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
901         lll_cond_wake, lll_cond_broadcast): Remove.
902         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
903         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
904         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
905         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
906         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
907         the header from assembler.  Renamed all lll_mutex_* resp.
908         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
909         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
910         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
911         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
912         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
913         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
914         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
915         Remove prototype.
916         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
917         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
918         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
919         (lll_trylock): Likewise, use __lll_trylock_asm, pass
920         MULTIPLE_THREADS_OFFSET as another asm operand.
921         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
922         MULTIPLE_THREADS_OFFSET as last asm operand, call
923         __lll_lock_wait_private if private is constant LLL_PRIVATE,
924         otherwise pass private as another argument to __lll_lock_wait.
925         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
926         lll_timedlock, lll_robust_timedlock): Add private argument, pass
927         private as another argument to __lll_*lock_wait call.
928         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
929         MULTIPLE_THREADS_OFFSET as another asm operand, call
930         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
931         otherwise pass private as another argument to __lll_unlock_wake.
932         (lll_robust_unlock): Add private argument, pass private as another
933         argument to __lll_unlock_wake.
934         (lll_robust_dead): Add private argument, use __lll_private_flag
935         macro.
936         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
937         LLL_MUTEX_LOCK_INITIALIZER.
938         (lll_lock_t): Remove.
939         (LLL_LOCK_INITIALIZER_WAITERS): Define.
940         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
941         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
942         lll_cond_wake, lll_cond_broadcast): Remove.
943         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
944         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
945         2007-05-2{3,9} changes.
946         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
947         kernel-features.h and lowlevellock.h.
948         (LOAD_PRIVATE_FUTEX_WAIT): Define.
949         (LOAD_FUTEX_WAIT): Rewritten.
950         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
951         define.
952         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
953         (__lll_mutex_lock_wait): Rename to ...
954         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
955         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
956         (__lll_mutex_timedlock_wait): Rename to ...
957         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
958         contains private argument.  Don't compile in for libc.so.
959         (__lll_mutex_unlock_wake): Rename to ...
960         (__lll_unlock_wake): ... this.  %ecx contains private argument.
961         Don't compile in for libc.so.
962         (__lll_timedwait_tid): Use __NR_gettimeofday.
963         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
964         kernel-features.h and lowlevellock.h.
965         (LOAD_FUTEX_WAIT): Define.
966         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
967         define.
968         (__lll_robust_mutex_lock_wait): Rename to ...
969         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
970         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
971         macro.
972         (__lll_robust_mutex_timedlock_wait): Rename to ...
973         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
974         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
975         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
976         lowlevellock.h.
977         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
978         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
979         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
980         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
981         to __lll_lock_wait in %edx.
982         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
983         Include lowlevellock.h and pthread-errnos.h.
984         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
985         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
986         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
987         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
988         pass LLL_SHARED in %ecx to both __lll_lock_wait and
989         __lll_unlock_wake.
990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
991         Include lowlevellock.h and pthread-errnos.h.
992         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
993         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
994         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
995         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
996         pass LLL_SHARED in %ecx to both __lll_lock_wait and
997         __lll_unlock_wake.
998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
999         Include lowlevellock.h.
1000         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1001         Don't define.
1002         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1003         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1004         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1005         __lll_unlock_wake.  Use __NR_gettimeofday.
1006         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1007         Include lowlevellock.h.
1008         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1009         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1010         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1011         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1012         and __lll_unlock_wake.
1013         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1014         Include lowlevellock.h.
1015         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1016         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1017         MUTEX(%ebx) address in %edx rather than %ecx to
1018         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1019         and __lll_unlock_wake.  Move return value from %ecx to %edx
1020         register.
1021         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.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_timedwrlock.S:
1031         Include lowlevellock.h.
1032         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1033         Don't define.
1034         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1035         MUTEX(%ebp) address in %edx rather than %ecx to
1036         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1037         and __lll_unlock_wake.  Move return value from %ecx to %edx
1038         register.  Use __NR_gettimeofday.
1039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1040         Include lowlevellock.h.
1041         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1042         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1043         MUTEX(%edi) address in %edx rather than %ecx to
1044         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1045         and __lll_unlock_wake.
1046         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1047         Include lowlevellock.h.
1048         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1049         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1050         MUTEX(%ebx) address in %edx rather than %ecx to
1051         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1052         and __lll_unlock_wake.  Move return value from %ecx to %edx
1053         register.
1054         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1055         lowlevellock.h.
1056         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1057         define.
1058         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1059         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1060         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1061         lowlevellock.h.
1062         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1063         (sem_timedwait): Use __NR_gettimeofday.
1064         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1065         lowlevellock.h.
1066         (LOCK): Don't define.
1067         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1068         lowlevellock.h.
1069         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1070         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1071         are waiters.
1072         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1073         2007-05-2{3,9} changes.
1074         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1075         kernel-features.h and lowlevellock.h.
1076         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1077         (LOAD_FUTEX_WAIT): Rewritten.
1078         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1079         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1080         (__lll_mutex_lock_wait): Rename to ...
1081         (__lll_lock_wait): ... this.  %esi is now private argument.
1082         Don't compile in for libc.so.
1083         (__lll_mutex_timedlock_wait): Rename to ...
1084         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1085         Don't compile in for libc.so.
1086         (__lll_mutex_unlock_wake): Rename to ...
1087         (__lll_unlock_wake): ... this.  %esi contains private argument.
1088         Don't compile in for libc.so.
1089         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1090         kernel-features.h and lowlevellock.h.
1091         (LOAD_FUTEX_WAIT): Define.
1092         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1093         (__lll_robust_mutex_lock_wait): Rename to ...
1094         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1095         Use LOAD_FUTEX_WAIT macro.
1096         (__lll_robust_mutex_timedlock_wait): Rename to ...
1097         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1098         private, use LOAD_FUTEX_WAIT macro.
1099         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1100         lowlevellock.h.
1101         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1102         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1103         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1104         __lll_lock_wait and __lll_unlock_wake.
1105         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1106         Include lowlevellock.h and pthread-errnos.h.
1107         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1108         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1109         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1110         pass LLL_SHARED in %esi to both __lll_lock_wait and
1111         __lll_unlock_wake.
1112         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1113         Include lowlevellock.h and pthread-errnos.h.
1114         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1115         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1116         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1117         pass LLL_SHARED in %esi to both __lll_lock_wait and
1118         __lll_unlock_wake.
1119         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1120         Include lowlevellock.h.
1121         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1122         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1123         pass LLL_SHARED in %esi to both __lll_lock_wait and
1124         __lll_unlock_wake.
1125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1126         Include lowlevellock.h.
1127         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1128         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1129         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1130         and __lll_unlock_wake.
1131         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1132         Include lowlevellock.h.
1133         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1134         Don't define.
1135         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1136         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1137         and __lll_unlock_wake.
1138         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1139         Include lowlevellock.h.
1140         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1141         Don't define.
1142         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1143         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1144         and __lll_unlock_wake.
1145         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1146         Include lowlevellock.h.
1147         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1148         Don't define.
1149         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1150         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1151         and __lll_unlock_wake.
1152         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1153         Include lowlevellock.h.
1154         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1155         Don't define.
1156         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1157         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1158         and __lll_unlock_wake.
1159         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1160         Include lowlevellock.h.
1161         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1162         Don't define.
1163         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1164         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1165         and __lll_unlock_wake.
1166         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1167         lowlevellock.h.
1168         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1169         define.
1170         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1171         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1172         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1173         lowlevellock.h.
1174         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1175         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1176         lowlevellock.h.
1177         (LOCK): Don't define.
1178         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1179         lowlevellock.h.
1180         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1181         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1182         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1183         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1184         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1185         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1186         (__lll_lock_wait_private): New function.
1187         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1188         it to lll_futex_*wait.  Don't compile in for libc.so.
1189         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1190         Remove.
1191         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1192         (struct sparc_pthread_barrier): Remove.
1193         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1194         struct sparc_pthread_barrier.  Pass
1195         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1196         and lll_futex_wait macros.
1197         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1198         Remove.
1199         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1200         Include sparc pthread_barrier_wait.c instead of generic one.
1202 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1204         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1206         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1207         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1208         %ecx.
1209         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1210         (pthread_rwlock_timedwrlock): Likewise.
1211         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1212         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1214 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1216         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1218 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1220         * tst-locale2.c (useless): Add return statement.
1222 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1224         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1225         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1226         * pthread_create.c (start_thread): Likewise.
1227         * init.c (sighandler_setxid): Likewise.
1228         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1229         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1230         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1231         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1232         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1233         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1234         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1235         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1236         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1237         Likewise.
1238         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1239         Likewise.
1240         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1241         Likewise.
1242         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1243         __rtld_notify): Likewise.
1244         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1245         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1246         __pthread_once): Likewise.
1247         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1248         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1249         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1250         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1251         (lll_futex_wait): Add private argument, define as wrapper around
1252         lll_futex_timed_wait.
1253         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1254         use __lll_private_flag macro.
1255         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1256         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1257         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1258         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1259         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1260         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1261         (lll_futex_wait): Add private argument, define as wrapper around
1262         lll_futex_timed_wait.
1263         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1264         use __lll_private_flag macro.
1265         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1266         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1267         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1268         Define.
1269         (lll_futex_timed_wait, lll_futex_wake): Use it.
1270         (lll_private_futex_wait, lll_private_futex_timed_wait,
1271         lll_private_futex_wake): Removed.
1272         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1273         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1274         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1275         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1276         (lll_futex_wait): Add private argument, define as wrapper around
1277         lll_futex_timed_wait.
1278         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1279         use __lll_private_flag macro.
1280         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1281         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1282         to lll_futex_*.
1283         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1284         (lll_private_futex_wait, lll_private_futex_timed_wait,
1285         lll_private_futex_wake): Removed.
1286         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1287         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1288         (lll_private_futex_wait, lll_private_futex_timed_wait,
1289         lll_private_futex_wake): Removed.
1290         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1291         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1292         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1293         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1294         (lll_futex_wait): Add private argument, define as wrapper around
1295         lll_futex_timed_wait.
1296         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1297         use __lll_private_flag macro.
1298         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1299         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1300         to lll_futex_*.
1301         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1302         Define.
1303         (lll_futex_timed_wait, lll_futex_wake): Use it.
1304         (lll_private_futex_wait, lll_private_futex_timed_wait,
1305         lll_private_futex_wake): Removed.
1307 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1309         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1310         of the structure for sparc32.
1312 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1314         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1316 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1318         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1319         code used when private futexes are assumed.
1320         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1321         Likewise.
1323 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1325         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1326         (__lll_private_flag): Define.
1327         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1328         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1329         __lll_private_flag.
1330         (lll_private_futex_wait, lll_private_futex_timedwait,
1331         lll_private_futex_wake): Define as wrapper around non-_private
1332         macros.
1333         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1334         (__lll_private_flag): Define.
1335         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1336         (lll_private_futex_wait, lll_private_futex_timedwait,
1337         lll_private_futex_wake): Define as wrapper around non-_private
1338         macros.
1340 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1342         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1343         parameter to lll_futex_wait call.
1344         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1346         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1347         Replace lll_futex_wait with lll_private_futex_wait.
1348         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1349         Add LLL_SHARED parameter to lll_futex_wake().
1351         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1352         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1353         lll_private_futex_wake.
1354         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1355         bit from private parm before syscall.
1356         (lll_futex_timed_wait): Likewise.
1357         (lll_futex_wake): Likewise.
1358         (lll_futex_wake_unlock): Likewise.
1359         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1360         (lll_robust_mutex_unlock): Likewise.
1361         (lll_mutex_unlock_force): Likewise.
1362         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1364 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1366         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1367         compilation when unconditionally using private futexes.
1368         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1369         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1370         Likewise.
1371         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1372         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1374 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1376         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1377         Define.
1379 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1381         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1382         kernel-features.h.
1384 2007-05-16  Roland McGrath  <roland@redhat.com>
1386         * init.c (__nptl_initial_report_events): New variable.
1387         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1388         to that.
1390 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1392         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1393         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1395 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1397         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1398         implementation.
1400 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1402         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1403         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1404         * pthread_mutex_timedlock.c: Likewise.
1405         * pthread_mutex_trylock.c: Likewise.
1406         * pthread_mutex_unlock.c: Likewise.
1408 2007-06-17  Andreas Schwab  <schwab@suse.de>
1410         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1411         sections.
1413 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1415         * allocatestack.c (allocate_stack): Make code compile if
1416         __ASSUME_PRIVATE_FUTEX is set.
1418 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1421         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1423         (__pthread_rwlock_wrlock): Likewise.
1424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1425         (pthread_rwlock_timedrdlock): Likewise.
1426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1427         (pthread_rwlock_timedwrlock): Likewise.
1428         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1429         (__pthread_rwlock_unlock): Likewise.
1431 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1433         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1434         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1435         Split __flags into __flags, __shared, __pad1 and __pad2.
1436         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1437         futexes if they are available.
1438         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1439         in libc-lowlevellock.S allow using private futexes.
1440         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1441         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1442         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1443         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1444         lll_private_futex_timed_wait and lll_private_futex_wake.
1445         (lll_robust_mutex_unlock): Fix typo.
1446         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1447         field in futex command setup.
1448         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1449         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1450         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1451         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1452         if they are available.  Remove clear_once_control.
1453         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1454         futexes if they are available.
1455         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1456         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1457         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1458         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1459         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1460         Wake only when there are waiters.
1461         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1462         support.  Indicate that there are waiters.  Remove unnecessary
1463         extra cancellation test.
1464         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1465         left-over duplication of __sem_wait_cleanup.
1467 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1469         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1470         parameter to lll_futex_wait, lll_futex_timed_wait, and
1471         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1472         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1473         lll_private_futex_wake.
1474         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1475         * allocatestack.c: Adjust use of lll_futex_* macros.
1476         * init.c: Likewise.
1477         * lowlevellock.h: Likewise.
1478         * pthread_barrier_wait.c: Likewise.
1479         * pthread_cond_broadcast.c: Likewise.
1480         * pthread_cond_destroy.c: Likewise.
1481         * pthread_cond_signal.c: Likewise.
1482         * pthread_cond_timedwait.c: Likewise.
1483         * pthread_cond_wait.c: Likewise.
1484         * pthread_create.c: Likewise.
1485         * pthread_mutex_lock.c: Likewise.
1486         * pthread_mutex_setprioceiling.c: Likewise.
1487         * pthread_mutex_timedlock.c: Likewise.
1488         * pthread_mutex_unlock.c: Likewise.
1489         * pthread_rwlock_timedrdlock.c: Likewise.
1490         * pthread_rwlock_timedwrlock.c: Likewise.
1491         * pthread_rwlock_unlock.c: Likewise.
1492         * sysdeps/alpha/tls.h: Likewise.
1493         * sysdeps/i386/tls.h: Likewise.
1494         * sysdeps/ia64/tls.h: Likewise.
1495         * sysdeps/powerpc/tls.h: Likewise.
1496         * sysdeps/pthread/aio_misc.h: Likewise.
1497         * sysdeps/pthread/gai_misc.h: Likewise.
1498         * sysdeps/s390/tls.h: Likewise.
1499         * sysdeps/sh/tls.h: Likewise.
1500         * sysdeps/sparc/tls.h: Likewise.
1501         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1502         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1503         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1504         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1505         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1506         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1507         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1508         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1509         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1510         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1511         Likewise.
1512         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1513         * sysdeps/x86_64/tls.h: Likewise.
1515 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1517         * pthread_getattr_np.c: No need to install a cancellation handler,
1518         this is no cancellation point.
1519         * pthread_getschedparam.c: Likewise.
1520         * pthread_setschedparam.c: Likewise.
1521         * pthread_setschedprio.c: Likewise.
1522         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1523         lll_unlock_wake_cb.
1524         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1525         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1526         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1527         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1528         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1529         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1530         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1531         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1532         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1533         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1534         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1535         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1537         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1538         whether there are more than one thread makes no sense here since
1539         we only call the slow path if the locks are taken.
1540         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1542         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1543         COND_NWAITERS_SHIFT.
1544         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1545         COND_CLOCK_BITS.
1546         * pthread_cond_init.c: Likewise.
1547         * pthread_cond_timedwait.c: Likewise.
1548         * pthread_cond_wait.c: Likewise.
1549         * pthread_condattr_getclock.c: Likewise.
1550         * pthread_condattr_setclock.c: Likewise.
1551         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1552         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1553         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1554         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1555         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1557 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1559         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1560         unistd.h.
1562         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1563         insn suffix.
1564         (THREAD_GSCOPE_GET_FLAG): Remove.
1565         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1566         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1567         changes.
1568         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1569         (THREAD_GSCOPE_GET_FLAG): Remove.
1570         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1571         instead of THREAD_GSCOPE_GET_FLAG.
1572         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1573         it.
1574         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1575         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1576         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1577         THREAD_GSCOPE_WAIT): Define.
1578         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1579         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1580         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1581         THREAD_GSCOPE_WAIT): Define.
1582         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1583         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1584         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1585         THREAD_GSCOPE_WAIT): Define.
1586         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1587         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1588         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1589         THREAD_GSCOPE_WAIT): Define.
1591 2007-05-24  Richard Henderson  <rth@redhat.com>
1593         * descr.h (struct pthread): Add header.gscope_flag.
1594         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1595         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1596         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1597         THREAD_GSCOPE_WAIT): Define.
1599 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1601         * init.c: Make it compile with older kernel headers.
1603         * tst-initializers1.c: Show through exit code which test failed.
1605         * pthread_rwlock_init.c: Also initialize __shared field.
1606         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1607         element in rwlock structure into four byte elements.  One of them is
1608         the new __shared element.
1609         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1610         Likewise.
1611         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1612         __shared, adjust names of other padding elements.
1613         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1614         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1615         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1616         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1617         FUTEX_PRIVATE_FLAG.
1618         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1619         futex to use private operations if possible.
1620         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1621         Likewise.
1622         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1623         Likewise.
1624         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1625         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1626         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1628         Likewise.
1629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1630         Likewise.
1631         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1632         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1634 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1636         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1637         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1638         * pthread_rwlock_timedrdlock.c: Likewise.
1639         * pthread_rwlock_tryrdlock.c: Likewise.
1641         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1642         optimization.
1644         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1645         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1646         duplication of __sem_wait_cleanup.
1648         * allocatestack.c: Revert last change.
1649         * init.c: Likewise.
1650         * sysdeps/i386/tls.h: Likewise.
1651         * sysdeps/x86_64/tls.h: Likewise.
1652         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1653         header structure.
1654         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1656         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1657         Add private field.
1658         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1659         * pthread_barrier_init.c: Set private flag if pshared and private
1660         futexes are supported.
1661         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1662         private field in futex command setup.
1663         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1665 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1667         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1668         support.
1669         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1670         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1671         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1672         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1673         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1675         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1676         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1677         fields in the structure.
1678         (__old_sem_init): New function.
1679         * sem_open.c: Initialize all fields of the structure.
1680         * sem_getvalue.c: Adjust for renamed element.
1681         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1682         (gen-as-const-headers): Add structsem.sym.
1683         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1684         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1685         struct new_sem.  Add struct old_sem.
1686         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1687         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1688         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1689         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1690         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1691         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1692         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1693         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1694         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1695         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1696         * tst-sem10.c: New file.
1697         * tst-sem11.c: New file.
1698         * tst-sem12.c: New file.
1699         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1700         of struct sem.
1702 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1703             Jakub Jelinek  <jakub@redhat.com>
1705         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1706         Move __pthread_enable_asynccancel right before futex syscall.
1707         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1708         Likewise.
1710 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1712         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1713         THREAD_COPY_PRIVATE_FUTEX): Define.
1714         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1715         THREAD_COPY_PRIVATE_FUTEX): Define.
1716         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1717         * init.c (__pthread_initialize_minimal_internal): Use
1718         THREAD_SET_PRIVATE_FUTEX.
1720         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1721         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1722         THREAD_GSCOPE_FLAG_WAIT): Define.
1723         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1724         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1725         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1726         PTR_DEMANGLE.
1727         (THREAD_GSCOPE_GET_FLAG): Define.
1728         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1729         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1730         instead of ->header.gscope_flag directly.
1732 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1734         * init.c (__pthread_initialize_minimal_internal): Check whether
1735         private futexes are available.
1736         * allocatestack.c (allocate_stack): Copy private_futex field from
1737         current thread into the new stack.
1738         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1739         futexes if they are available.
1740         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1741         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1742         in libc-lowlevellock.S allow using private futexes.
1743         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1744         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1745         FUTEX_PRIVATE_FLAG.
1746         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1747         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1748         if they are available.
1749         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1750         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1751         * sysdeps/i386/tcb-offsets.sym: Likewise.
1752         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1753         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1755 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1757         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1758         Remove ptr_wait_lookup_done again.
1759         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1760         (__pthread_initialize_minimal_internal): Initialize
1761         _dl_wait_lookup_done pointer in _rtld_global directly.
1762         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1763         Remove code to code _dl_wait_lookup_done.
1764         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1765         encrypted for now.
1767 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1769         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1770         pthread_mutex_init failed with ENOTSUP.
1772 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1774         * allocatestack.c (__wait_lookup_done): New function.
1775         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1776         Add ptr_wait_lookup_done.
1777         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1778         * pthreadP.h: Declare __wait_lookup_done.
1779         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1780         Define macros to implement reference handling of global scope.
1781         * sysdeps/x86_64/tls.h: Likewise.
1782         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1783         Initialize GL(dl_wait_lookup_done).
1785 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1787         [BZ #4512]
1788         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1789         is detected.
1790         * pthread_mutex_timedlock.c: Likewise.
1791         * pthread_mutex_trylock.c: Likewise.
1792         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1794         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1795         * tst-robust9.c: New file.
1796         * tst-robustpi9.c: New file.
1798         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1799         unnecessary extra cancellation test.
1801 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1803         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1804         extra cancellation test.
1805         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1807 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1809         * descr.h (struct pthread): Rearrange members to fill hole in
1810         64-bit layout.
1812         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1813         (__pthread_setaffinity_new): If syscall was successful and
1814         RESET_VGETCPU_CACHE is defined, use it before returning.
1815         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1817 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1819         [BZ #4455]
1820         * tst-align2.c: Include stackinfo.h.
1821         * tst-getpid1.c: Likewise.
1823 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1825         [BZ #4455]
1826         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1827         * tst-getpid1.c (do_test): Likewise.
1829         [BZ #4456]
1830         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1831         (allocate_stack): Likewise.
1833 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1835         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1836         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1837         (__lll_robust_timedlock_wait): Likewise.
1838         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1840 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1842         [BZ #4465]
1843         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1844         * tst-cancel4.c (tf_fdatasync): New test.
1846 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1848         [BZ #4392]
1849         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1850         check mutexes like normal mutexes.
1852         [BZ #4306]
1853         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1854         Initialize the whole sigevent structure to appease valgrind.
1856 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1858         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1859         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1861 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1863         * tst-locale1.c: Avoid warnings.
1864         * tst-locale2.c: Likewise.
1866 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1868         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1869         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1871 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1873         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1874         __extern_always_inline where appropriate.
1875         * sysdeps/pthread/pthread.h: Likewise.
1877 2007-03-13  Richard Henderson  <rth@redhat.com>
1879         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1880         separate cfi regions for the two subsections.
1882 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1884         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1885         new thread, don't just decrement it.
1886         Patch by Suzuki K P <suzuki@in.ibm.com>.
1888 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1890         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1891         PTHFCT_CALL definition.
1893 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1895         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1896         available, don't use it.
1898 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1900         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1901         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1902         call into the kernel to delay.
1904 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1906         * tst-initializers1.c: We want to test the initializers as seen
1907         outside of libc, so undefined _LIBC.
1909         * pthread_join.c (cleanup): Avoid warning.
1911 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1913         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1914         (__lll_timedwait_tid): Add unwind info.
1916         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1917         function table, mangle the pointers.
1918         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1919         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1920         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1921         demangle pointers before use.
1922         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1923         demangle pointer.
1924         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1925         * sysdeps/pthread/setxid.h: Likewise.
1927 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1929         * tst-rwlock7.c: Show some more information in case of correct
1930         behavior.
1932 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1934         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1935         (lll_futex_timed_wait): Undo part of last change, don't negate
1936         return value.
1938 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1940         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1941         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1943 2006-12-28  David S. Miller  <davem@davemloft.net>
1945         * shlib-versions: Fix sparc64 linux target specification.
1947 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1949         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1950         Adjust include path for pthread_barrier_wait.c move.
1952 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1954         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1955         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1957 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1959         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1960         6 argument cancellable syscalls.
1961         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1962         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1963         6 argument cancellable syscalls.
1964         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1966 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1968         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1969         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1971 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1973         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1974         __sync_lock_release instead of __sync_lock_release_si.
1976 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1978         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1979         Define.
1980         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1981         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1982         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1983         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1984         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1985         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1986         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1987         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1988         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1989         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1990         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1992 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1994         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1995         * pthread_barrier_wait.c: ...here.
1996         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1997         * pthread_cond_broadcast.c: ...here.
1998         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1999         * pthread_cond_signal.c: ...here.
2000         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2001         * pthread_cond_timedwait.c: ...here.
2002         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2003         * pthread_cond_wait.c: ...here.
2004         * sysdeps/pthread/pthread_once.c: Move to...
2005         * pthread_once.c: ...here.
2006         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2007         * pthread_rwlock_rdlock.c: ...here.
2008         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2009         * pthread_rwlock_timedrdlock.c: ...here.
2010         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2011         * pthread_rwlock_timedwrlock.c: ...here.
2012         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2013         * pthread_rwlock_unlock.c: ...here.
2014         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2015         * pthread_rwlock_wrlock.c: ...here.
2016         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2017         * pthread_spin_destroy.c: ...here.
2018         * sysdeps/pthread/pthread_spin_init.c: Move to...
2019         * pthread_spin_init.c: ...here.
2020         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2021         * pthread_spin_unlock.c: ...here.
2022         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2023         * pthread_getcpuclockid.c: ...here.
2025         * init.c: USE_TLS support is now always enabled.
2026         * tst-tls5.h: Likewise.
2027         * sysdeps/alpha/tls.h: Likewise.
2028         * sysdeps/i386/tls.h: Likewise.
2029         * sysdeps/ia64/tls.h: Likewise.
2030         * sysdeps/powerpc/tls.h: Likewise.
2031         * sysdeps/s390/tls.h: Likewise.
2032         * sysdeps/sh/tls.h: Likewise.
2033         * sysdeps/sparc/tls.h: Likewise.
2034         * sysdeps/x86_64/tls.h: Likewise.
2036 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2038         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2039         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2040         failed.
2042         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2043         Define to THREAD_SELF->header.multiple_threads.
2044         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2045         Likewise.
2046         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2047         Likewise.
2048         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2049         (SINGLE_THREAD_P): Likewise.
2050         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2051         (SINGLE_THREAD_P): Likewise.
2052         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2053         (SINGLE_THREAD_P): Likewise.
2054         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2055         (SINGLE_THREAD_P): Likewise.
2056         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2057         Likewise.
2058         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2059         (SINGLE_THREAD_P): Likewise.
2060         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2061         (SINGLE_THREAD_P): Likewise.
2062         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2063         Likewise.
2065 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2067         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2068         by default rather than 2_3_3.
2070 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2072         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2073         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2074         atomic_* instead of catomic_* macros.
2076 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2078         [BZ #3285]
2079         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2080         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2081         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2082         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2083         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2084         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2085         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2086         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2087         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2088         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2089         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2090         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2091         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2093 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2095         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2096         cancelable syscalls with six parameters.
2098         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2099         operations instead of atomic_*.
2101 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2103         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2105 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2107         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2108         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2109         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2110         New file.
2111         * pthread_attr_setstack.c: Allow overwriting the version number of the
2112         new symbol.
2113         * pthread_attr_setstacksize.c: Likewise.
2114         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2115         it.
2116         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2117         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2119 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2121         [BZ #3251]
2122         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2123         Patch by Petr Baudis.
2125 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2127         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2129         * tst-cancel2.c (tf): Loop as long as something was written.
2131 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2133         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2134         mutexes wake all mutexes.
2135         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2136         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2137         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2139 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2141         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2142         to guarantee the thread is always canceled.
2144 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2146         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2147         Include stdlib.h.
2148         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2149         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
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.
2154 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2156         [BZ #3123]
2157         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2158         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2160         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2162         * Makefile (tests): Add tst-cond22.
2163         * tst-cond22.c: New file.
2165 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2167         [BZ #3124]
2168         * descr.h (struct pthread): Add parent_cancelhandling.
2169         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2170         cancelhandling value to child.
2171         * pthread_create.c (start_thread): If parent thread was canceled
2172         reset the SIGCANCEL mask.
2173         * Makefile (tests): Add tst-cancel25.
2174         * tst-cancel25.c: New file.
2176 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2177             Ulrich Drepper  <drepper@redhat.com>
2179         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2180         counterp if it is already zero.
2181         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2183 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2184             Roland McGrath  <roland@redhat.com>
2186         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2187         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2188         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2189         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2190         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2191         lll_robust_mutex_timedlock, lll_mutex_unlock,
2192         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2193         Add _L_*_ symbols around the subsection.
2194         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2195         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2197 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2198             Roland McGrath  <roland@redhat.com>
2200         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2201         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2202         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2203         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2204         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2205         lll_robust_mutex_timedlock, lll_mutex_unlock,
2206         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2207         Add _L_*_ symbols around the subsection.
2208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2209         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2211 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2213         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2214         change because it can disturb too much existing code.  If real hard
2215         reader preference is needed we'll introduce another type.
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-30  Ulrich Drepper  <drepper@redhat.com>
2223         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2224         reader preference.
2225         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2226         (pthread_rwlock_timedwrlock): Likewise.
2227         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2228         Likewise.
2230 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2232         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2233         Only define ifdef SHARED.
2235 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2237         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2238         (free_stacks): ...here.
2239         (__free_stack_cache): New function.
2240         * pthreadP.h: Declare __free_stack_cache.
2241         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2242         ptr_freeres.
2243         * init.c (pthread_functions): Initialize ptr_freeres.
2244         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2245         New freeres function.
2247 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2249         [BZ #3018]
2250         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2252 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2254         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2255         _XOPEN_REALTIME_THREADS.
2257 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2259         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2260         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2261         HAVE_CLOCK_GETTIME_VSYSCALL.
2262         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2264 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2266         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2267         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2268         * descr.h (struct priority_protection_data): New type.
2269         (struct pthread): Add tpp field.
2270         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2271         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2272         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2273         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2274         TPP mutexes.
2275         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2276         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2277         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2278         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2279         * tpp.c: New file.
2280         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2281         boosted by TPP.
2282         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2283         * pthread_mutexattr_getprioceiling.c
2284         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2285         in the SCHED_FIFO priority range.
2286         * pthread_mutexattr_setprioceiling.c
2287         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2288         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2289         if mutex is not TPP.  Ceiling is now in __data.__lock.
2290         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2291         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2292         is now in __data.__lock.  Add locking.
2293         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2294         * Makefile (libpthread-routines): Add tpp.
2295         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2296         * tst-tpp.h: New file.
2297         * tst-mutexpp1.c: New file.
2298         * tst-mutexpp6.c: New file.
2299         * tst-mutexpp10.c: New file.
2300         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2301         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2303 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2305         [BZ #2843]
2306         * pthread_join.c (pthread_join): Account for self being canceled
2307         when checking for deadlocks.
2308         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2309         (tf1): Don't print anything after pthread_join returns, this would be
2310         another cancellation point.
2311         (tf2): Likewise.
2312         * tst-join6.c: New file.
2313         * Makefile (tests): Add tst-join6.
2315 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2317         [BZ #2892]
2318         * pthread_setspecific.c (__pthread_setspecific): Check
2319         out-of-range index before checking for unused key.
2321         * sysdeps/pthread/gai_misc.h: New file.
2323 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2325         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2326         file.  Don't use sysctl.
2327         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2328         overwrite the file if this is likely not true.
2330 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2332         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2333         * Makefile (tests): Add tst-getpid3.
2334         * tst-getpid3.c: New file.
2336 2006-07-30  Roland McGrath  <roland@redhat.com>
2338         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2340         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2341         (pause_not_cancel): New macro.
2342         (nanosleep_not_cancel): New macro.
2343         (sigsuspend_not_cancel): New macro.
2344         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2345         nanosleep_not_cancel macro from <not-cancel.h>.
2346         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2347         macro from <not-cancel.h>.
2349 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2350             Jakub Jelinek  <jakub@redhat.com>
2352         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2353         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2354         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2355         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2356         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2357         * pthread_mutex_lock.c: Likewise.
2358         * pthread_mutex_timedlock.c: Likewise.
2359         * pthread_mutex_trylock.c: Likewise.
2360         * pthread_mutex_unlock.c: Likewise.
2361         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2362         all mutexes.
2363         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2364         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2365         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2366         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2367         pthread-pi-defines.sym.
2368         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2369         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2370         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2371         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2372         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2373         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2374         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2375         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2376         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2377         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2378         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2379         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2380         * tst-mutex2.c: Likewise.
2381         * tst-mutex3.c: Likewise.
2382         * tst-mutex4.c: Likewise.
2383         * tst-mutex5.c: Likewise.
2384         * tst-mutex6.c: Likewise.
2385         * tst-mutex7.c: Likewise.
2386         * tst-mutex7a.c: Likewise.
2387         * tst-mutex8.c: Likewise.
2388         * tst-mutex9.c: Likewise.
2389         * tst-robust1.c: Likewise.
2390         * tst-robust7.c: Likewise.
2391         * tst-robust8.c: Likewise.
2392         * tst-mutexpi1.c: New file.
2393         * tst-mutexpi2.c: New file.
2394         * tst-mutexpi3.c: New file.
2395         * tst-mutexpi4.c: New file.
2396         * tst-mutexpi5.c: New file.
2397         * tst-mutexpi6.c: New file.
2398         * tst-mutexpi7.c: New file.
2399         * tst-mutexpi7a.c: New file.
2400         * tst-mutexpi8.c: New file.
2401         * tst-mutexpi9.c: New file.
2402         * tst-robust1.c: New file.
2403         * tst-robust2.c: New file.
2404         * tst-robust3.c: New file.
2405         * tst-robust4.c: New file.
2406         * tst-robust5.c: New file.
2407         * tst-robust6.c: New file.
2408         * tst-robust7.c: New file.
2409         * tst-robust8.c: New file.
2410         * Makefile (tests): Add the new tests.
2412         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2413         * pthread_mutex_destroy.c: Remove unneeded label.
2415 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2417         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2418         computations to compile time.
2420 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2422         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2424 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2426         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2428 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2430         * pthread_key_create.c (__pthread_key_create): Do away with
2431         __pthread_keys_lock.
2433         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2434         (__kernel_cpumask_size): Mark as hidden.
2435         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2437         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2438         * semaphoreP.h (__sem_mappings_lock): Likewise.
2440 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2442         * pthread_atfork.c: Mark __dso_handle as hidden.
2444 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2446         [BZ #2644]
2447         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2448         the reload problem.  Change the one path in pthread_cancel_init
2449         which causes the problem.  Force gcc to reload.  Simplify callers.
2450         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2451         (_Unwind_GetBSP): Undo last patch.
2453 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2455         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2456         function pointer is reloaded after pthread_cancel_init calls.
2458         [BZ #2644]
2459         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2460         pointers are reloaded after pthread_cancel_init calls.
2462 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2464         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2465         __always_inline.
2467 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2469         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2470         Allocate new object which is passed to timer_sigev_thread so that
2471         the timer can be deleted before the new thread is scheduled.
2473 2006-04-26  Roland McGrath  <roland@redhat.com>
2475         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2477 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2479         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2480         suffix for conditional jumps.
2481         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2482         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2483         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2484         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2485         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2486         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2488         * init.c (sigcancel_handler): Compare with correct PID even if the
2489         thread is in the middle of a fork call.
2490         (sighandler_setxid): Likewise.
2491         Reported by Suzuki K P <suzuki@in.ibm.com> .
2493 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2495         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2497 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2499         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2500         fails [Coverity CID 105].
2502 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2504         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2506 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2508         [BZ #2505]
2509         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2510         Define __lll_rel_instr using lwsync.
2512 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2514         * allocatestack.c (allocate_stack): Always initialize robust_head.
2515         * descr.h: Define struct robust_list_head.
2516         (struct pthread): Use robust_list_head in robust mutex list definition.
2517         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2518         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2519         (__pthread_initialize_minimal_internal): Register robust_list with
2520         the kernel.
2521         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2522         Declare __set_robust_list_avail.
2523         * pthread_create.c (start_thread): Register robust_list of new thread.
2524         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2525         waiters.
2526         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2527         number of users, it's unreliable.
2528         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2529         set_robust_list syscall is available.
2530         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2531         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2532         Set robust_head.list_op_pending before trying to lock a robust mutex.
2533         * pthread_mutex_timedlock.c: Likewise.
2534         * pthread_mutex_trylock.c: Likewise.
2535         * pthread_mutex_unlock.c: Likewise for unlocking.
2536         * Makefile (tests): Add tst-robust8.
2537         * tst-robust8.c: New file.
2539 2006-03-08  Andreas Schwab  <schwab@suse.de>
2541         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2542         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2544 2006-03-05  Roland McGrath  <roland@redhat.com>
2546         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2547         and $config_os doesn't match *linux*.
2549 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2551         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2552         Use __syscall_error.
2553         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2554         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2555         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2556         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2557         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2558         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2560 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2562         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2564 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2566         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2567         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2568         mutex.
2569         (__lll_robust_timedlock_wait): Likewise.
2570         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2571         (__lll_robust_lock_wait): Likewise.
2572         (__lll_robust_timedlock_wait): Likewise.
2573         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2574         (__lll_robust_lock_wait): Likewise.
2575         (__lll_robust_timedlock_wait): Likewise.
2577 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2579         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2580         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2581         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2582         lll_robust_mutex_unlock): Define.
2583         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2585 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2587         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2588         instead of <clone.S>.
2590 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2592         * Makefile (libpthread-routines): Add
2593         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2594         and pthread_mutex_[sg]etprioceiling.
2595         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2596         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2597         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2598         pthread_mutex_setprioceiling.
2599         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2600         PTHREAD_PRIO_PROTECT): New enum values.
2601         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2602         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2603         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2604         prototypes.
2605         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2606         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2607         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2608         Define.
2609         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2610         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2611         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2612         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2613         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2614         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2615         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2616         protocol mutexes.
2617         * pthread_mutex_getprioceiling.c: New file.
2618         * pthread_mutex_setprioceiling.c: New file.
2619         * pthread_mutexattr_getprioceiling.c: New file.
2620         * pthread_mutexattr_setprioceiling.c: New file.
2621         * pthread_mutexattr_getprotocol.c: New file.
2622         * pthread_mutexattr_setprotocol.c: New file.
2624 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2626         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2628 2006-02-27  Roland McGrath  <roland@redhat.com>
2630         * sysdeps/pthread/Subdirs: List nptl here too.
2631         * configure (libc_add_on_canonical): New variable.
2633         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2635         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2636         self to get main source tree's file.
2637         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2638         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2639         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2640         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2641         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2642         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2643         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2644         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2645         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2646         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2647         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2648         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2649         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2651         * Makefile: Use $(sysdirs) in vpath directive.
2653         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2654         (CPPFLAGS-timer_routines.c): Likewise.
2656         * Makeconfig (includes): Variable removed.
2658 2006-02-26  Roland McGrath  <roland@redhat.com>
2660         * sysdeps/generic/pt-raise.c: Moved to ...
2661         * pt-raise.c: ... here.
2662         * sysdeps/generic/lowlevellock.h: Moved to ...
2663         * lowlevellock.h: ... here.
2665 2006-02-23  Roland McGrath  <roland@redhat.com>
2667         * descr.h (struct pthread): Add final member `end_padding'.
2668         (PTHREAD_STRUCT_END_PADDING): Use it.
2670 2006-02-20  Roland McGrath  <roland@redhat.com>
2672         * sysdeps/mips: Directory removed, saved in ports repository.
2673         * sysdeps/unix/sysv/linux/mips: Likewise.
2675 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2677         * tst-robust1.c: Add second mutex to check that the mutex list is
2678         handled correctly.
2680 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2682         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2683         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2684         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2685         lll_robust_mutex_unlock): New macros.
2686         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2687         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2688         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2689         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2690         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2692 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2694         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2695         definitions.
2696         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2698 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2701         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2702         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2703         (lll_robust_mutex_unlock): Likewise.
2705 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2707         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2708         Set robust_list.__next rather than robust_list.
2709         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2710         (__pthread_list_t): New typedef.
2711         (pthread_mutex_t): Replace __next and __prev fields with __list.
2712         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2713         (__pthread_list_t): New typedef.
2714         (pthread_mutex_t): Replace __next and __prev fields with __list.
2715         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2716         (__pthread_list_t, __pthread_slist_t): New typedefs.
2717         (pthread_mutex_t): Replace __next and __prev fields with __list.
2718         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2719         (__pthread_list_t, __pthread_slist_t): New typedefs.
2720         (pthread_mutex_t): Replace __next and __prev fields with __list.
2721         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2722         (__pthread_list_t, __pthread_slist_t): New typedefs.
2723         (pthread_mutex_t): Replace __next and __prev fields with __list.
2724         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2725         (__pthread_slist_t): New typedef.
2726         (pthread_mutex_t): Replace __next field with __list.
2728 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2730         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2731         PTHREAD_MUTEX_OWNERDEAD.
2732         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2733         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2734         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2735         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2736         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2737         to PTHREAD_MUTEX_INCONSISTENT.
2738         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2739         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2740         * pthread_mutex_trylock.c: Likewise.
2741         * pthread_mutex_timedlock.c: Likewise.
2742         * pthread_mutex_unlock.c: Likewise.
2743         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2744         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2745         lowlevelrobustlock.sym.
2746         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2747         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2748         definitions.
2749         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2750         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2751         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2752         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2753         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2755 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2757         * allocatestack.c (allocate_stack): Initialize robust_list.
2758         * init.c (__pthread_initialize_minimal_internal): Likewise.
2759         * descr.h (struct xid_command): Pretty printing.
2760         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2761         robust_list.  Adjust macros.
2762         * pthread_create.c (start_thread): Adjust robust_list handling.
2763         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2764         but the owner for all robust mutex types.
2765         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2766         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2767         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2768         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2770         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2771         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2773 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2775         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2776         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2778 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2780         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2781         Return status.
2782         (lll_futex_timed_wait): Define.
2784 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2786         * tst-cancel4.c: Test ppoll.
2788 2006-01-18  Andreas Jaeger  <aj@suse.de>
2790         [BZ #2167]
2791         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2792         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2793         by Jim Gifford <patches@jg555.com>.
2795 2006-01-13  Richard Henderson  <rth@redhat.com>
2797         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2799 2006-01-10  Roland McGrath  <roland@redhat.com>
2801         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2802         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2803         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2804         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2805         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2806         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2807         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2808         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2809         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2810         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2812 2006-01-09  Roland McGrath  <roland@redhat.com>
2814         * tst-initializers1-c89.c: New file.
2815         * tst-initializers1-c99.c: New file.
2816         * tst-initializers1-gnu89.c: New file.
2817         * tst-initializers1-gnu99.c: New file.
2818         * Makefile (tests): Add them.
2819         (CFLAGS-tst-initializers1-c89.c): New variable.
2820         (CFLAGS-tst-initializers1-c99.c): New variable.
2821         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2822         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2824         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2825         Use __extension__ on anonymous union definition.
2826         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2827         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2828         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2829         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2830         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2832 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2834         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2835         Don't give the union a name because it changes the mangled name.
2836         Instead name the struct for __data.
2837         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2838         Likewise.
2839         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2840         Likewise.
2842 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2844         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2845         stack bias to mc_ftp field.
2847 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2849         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2850         being too clever and reloading the futex value where it shouldn't.
2852 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2854         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2855         correct type.
2857 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2859         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2860         Add cfi directives.
2862 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2864         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2865         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2866         rename in tcbhead_t.
2868         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2869         Don't give the union a name because it changes the mangled name.
2870         Instead name the struct for __data.
2871         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2872         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2873         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2874         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2875         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2876         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2878 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2880         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2881         Return status.
2882         (lll_futex_timed_wait): Define.
2883         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2884         * sysdeps/pthread/aio_misc.h: New file.
2886 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2888         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2890 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2892         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2893         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2894         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2896 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2898         * tst-cancel24.cc: Use C headers instead of C++ headers.
2900 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2902         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2903         sparc-linux configured glibc.
2904         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2905         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2906         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2907         atomic_compare_and_exchange_val_24_acq instead of
2908         atomic_compare_and_exchange_val_acq.
2909         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2910         instead of atomic_exchange_rel.
2911         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2912         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2913         file.
2914         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2915         file.
2916         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2917         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2918         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2919         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2920         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2921         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2922         New file.
2923         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2924         New file.
2925         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2926         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2927         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2928         file.
2929         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2930         file.
2931         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2933 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2935         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2936         mutex initializers.
2938 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2940         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2941         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2942         THREAD_COPY_POINTER_GUARD): Define.
2943         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2944         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2946 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2948         * version.c: Update copyright year.
2950 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2952         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2953         .eh_frame section, use cfi_* directives.
2954         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2956 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2958         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2959         now.
2961 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2963         * sysdeps/pthread/sigaction.c: Removed.
2964         * sigaction.c: New file.
2965         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2967 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2969         * Makefile (tests): Add tst-signal7.
2970         * tst-signal7.c: New file.
2972 2005-12-27  Roland McGrath  <roland@redhat.com>
2974         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2975         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2976         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2977         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2978         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2979         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2980         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2981         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2982         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2983         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2984         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2986 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2988         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2989         and __prev field to pthread_mutex_t.
2990         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2991         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2992         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2993         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2994         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2995         to pthread_mutex_t.
2997 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2999         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3000         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3001         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3002         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3003         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3004         and PTHREAD_MUTEXATTR_FLAG_BITS.
3005         * descr.h (struct pthread): Add robust_list field and define
3006         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3007         * pthread_mutexattr_getrobust.c: New file.
3008         * pthread_mutexattr_setrobust.c: New file.
3009         * pthread_mutex_consistent.c: New file.
3010         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3011         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3012         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3013         Adjust pthread_mutex_t initializers.
3014         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3015         field to pthread_mutex_t.
3016         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3017         and __prev field to pthread_mutex_t.
3018         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3019         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3020         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3021         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3022         * pthread_mutexattr_gettype.c: Likewise.
3023         * pthread_mutexattr_setpshared.c: Likewise.
3024         * pthread_mutexattr_settype.c: Likewise.
3025         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3026         Initialize mutex kind according to robust flag.
3027         * pthread_mutex_lock.c: Implement local robust mutex.
3028         * pthread_mutex_timedlock.c: Likewise.
3029         * pthread_mutex_trylock.c: Likewise.
3030         * pthread_mutex_unlock.c: Likewise.
3031         * pthread_create.c (start_thread): Mark robust mutexes which remained
3032         locked as dead.
3033         * tst-robust1.c: New file.
3034         * tst-robust2.c: New file.
3035         * tst-robust3.c: New file.
3036         * tst-robust4.c: New file.
3037         * tst-robust5.c: New file.
3038         * tst-robust6.c: New file.
3039         * tst-robust7.c: New file.
3040         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3041         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3042         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3043         tst-robust5, tst-robust6, and tst-robust7.
3045         * tst-typesizes.c: New file.
3046         * Makefile (tests): Add tst-typesizes.
3048         * tst-once3.c: More debug output.
3050 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3052         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3053         missing after last change.
3055         * version.c: Update copyright year.
3057 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3059         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3060         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3061         * pthread_mutex_trylock.c: Likewise.
3062         * pthread_mutex_timedlock.c: Likewise.
3063         * pthread_mutex_unlock.c: Likewise.
3065 2005-12-22  Roland McGrath  <roland@redhat.com>
3067         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3068         so that #include_next's search location is not reset to the -I..
3069         directory where <nptl/...> can be found.
3071 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3073         [BZ #1913]
3074         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3075         Fix unwind info.  Remove useless branch prediction prefix.
3076         * tst-cancel24.cc: New file.
3077         * Makefile: Add rules to build and run tst-cancel24.
3079 2005-12-21  Roland McGrath  <roland@redhat.com>
3081         * libc-cancellation.c: Use <> rather than "" #includes.
3082         * pt-cleanup.c: Likewise.
3083         * pthread_create.c: Likewise.
3084         * pthread_join.c: Likewise.
3085         * pthread_timedjoin.c: Likewise.
3086         * pthread_tryjoin.c: Likewise.
3087         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3088         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3089         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3090         * unwind.c: Likewise.
3092 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3094         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3095         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3096         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3097         THREAD_COPY_POINTER_GUARD): Define.
3099 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3101         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3102         rather than one.
3103         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3104         THREAD_COPY_POINTER_GUARD): Define.
3105         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3106         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3107         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3108         THREAD_COPY_POINTER_GUARD): Define.
3109         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3110         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3111         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3112         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3113         Use PTR_DEMANGLE for B0 if defined.
3115 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3117         * pthread_create.c (__pthread_create_2_1): Use
3118         THREAD_COPY_POINTER_GUARD if available.
3119         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3120         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3121         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3122         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3123         * sysdeps/x86_64/tls.h: Likewise.
3125 2005-12-15  Roland McGrath  <roland@redhat.com>
3127         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3129 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3131         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3132         sysdeps/generic.
3133         * errno-loc.c: New file.
3135 2005-12-12  Roland McGrath  <roland@redhat.com>
3137         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3138         adjustments before choosing stack size.  Update minimum stack size
3139         calculation to match allocate_stack change.
3141 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3143         * allocatestack.c (allocate_stack): Don't demand that there is an
3144         additional full page available on the stack beside guard, TLS, the
3145         minimum stack.
3147 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3149         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3150         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3152         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3153         compiling 32-bit code we must define __cleanup_fct_attribute.
3155 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3157         [BZ #1920]
3158         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3159         __attribute__ instead of __attribute.
3160         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3161         (__cleanup_fct_attribute): Likewise.
3163 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3165         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3166         a write barrier before writing libgcc_s_getcfa.
3168 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3170         * sysdeps/unix/sysv/linux/configure: Removed.
3172 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3174         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3175         optional init_array/fini_array support.
3177 2005-10-24  Roland McGrath  <roland@redhat.com>
3179         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3180         versioned_symbol use.
3182 2005-10-16  Roland McGrath  <roland@redhat.com>
3184         * init.c (__pthread_initialize_minimal_internal): Even when using a
3185         compile-time default stack size, apply the minimum that allocate_stack
3186         will require, and round up to page size.
3188 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3190         * Makefile ($(test-modules)): Remove static pattern rule.
3192 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3193             Ulrich Drepper  <drepper@redhat.com>
3195         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3196         alignment in callback function.
3197         * Makefile: Add rules to build and run tst-align3.
3198         * tst-align3.c: New file.
3200 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3202         * allocatestack.c (setxid_signal_thread): Add
3203         INTERNAL_SYSCALL_DECL (err).
3205 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3207         * allocatestack.c (setxid_signal_thread): Need to use
3208         atomic_compare_and_exchange_bool_acq.
3210 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3211             Jakub Jelinek  <jakub@redhat.com>
3213         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3214         CANCEL_RESTMASK.
3215         (struct pthread): Move specific_used field to avoid padding.
3216         Add setxid_futex field.
3217         * init.c (sighandler_setxid): Reset setxid flag and release the
3218         setxid futex.
3219         * allocatestack.c (setxid_signal_thread): New function.  Broken
3220         out of the bodies of the two loops in __nptl_setxid.  For undetached
3221         threads check whether they are exiting and if yes, don't send a signal.
3222         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3223         * pthread_create.c (start_thread): For undetached threads, check
3224         whether setxid bit is set.  If yes, wait until signal has been
3225         processed.
3227         * allocatestack.c (STACK_VARIABLES): Initialize them.
3228         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3230 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3232         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3233         waiters, awake all waiters on the associated mutex.
3235 2005-09-22  Roland McGrath  <roland@redhat.com>
3237         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3238         ../sysdeps/x86_64/hp-timing.h).
3240 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3242         * sysdeps/unix/sysv/linux/powerpc/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/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3246         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3247         (lll_futex_wake_unlock): Define.
3248         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3249         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3250         (lll_futex_wake_unlock): Define.
3251         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3252         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3253         (lll_futex_wake_unlock): Define.
3254         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3255         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3256         (lll_futex_wake_unlock): Define.
3257         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3258         lll_futex_wake_unlock.
3259         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3260         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3261         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3262         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3263         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3264         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3266 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3268         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3269         Fix typo in register name.
3271 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3273         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3274         Use __sigfillset.  Document that sigfillset does the right thing wrt
3275         to SIGSETXID.
3277 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3279         [BZ #1102]
3280         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3281         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3282         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3283         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3284         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3285         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3286         in the structure.
3287         * Makefile (tests): Add tst-initializers1.
3288         (CFLAGS-tst-initializers1.c): Set.
3289         * tst-initializers1.c: New test.
3291 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3293         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3294         Make sure __flags are located at offset 48 from the start of the
3295         structure.
3297 2005-07-02  Roland McGrath  <roland@redhat.com>
3299         * Makeconfig: Comment fix.
3301 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3303         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3304         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3305         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3306         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3307         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3308         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3309         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3310         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3311         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3312         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3314 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3316         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3317         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3318         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3319         fields.
3320         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3321         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3322         field.  Put in sysinfo field unconditionally.
3323         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3324         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3325         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3326         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3327         fields.
3328         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3329         * pthread_create.c (__pthread_create_2_1): Use
3330         THREAD_COPY_STACK_GUARD macro.
3331         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3332         tests.
3333         * tst-stackguard1.c: New file.
3334         * tst-stackguard1-static.c: New file.
3336 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3338         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3339         Invoke CGOTSETUP and CGOTRESTORE.
3340         (CGOTSETUP, CGOTRESTORE): Define.
3342 2005-05-29  Richard Henderson  <rth@redhat.com>
3344         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3345         (tf_write, tf_writev): Use it.
3346         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3347         the system minimum.
3349 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3351         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3352         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3353         __librt_*_asynccancel@local.
3355 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3357         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3358         all occurrences of JUMPTARGET.  Instead append @local to labels.
3360 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3362         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3363         size/alignment of struct pthread rather than tcbhead_t.
3364         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3365         Likewise.
3366         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3367         Likewise.
3368         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3369         Likewise.
3371 2005-05-19  Richard Henderson  <rth@redhat.com>
3373         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3374         __sync_val_compare_and_swap, not explicit _si variant.
3375         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3377 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3379         [BZ #915]
3380         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3382 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3384         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3385         .eh_frame section, use cfi_* directives.
3387 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3389         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3390         of "" includes.
3392 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3394         [BZ #1075]
3395         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3396         aio_write blocks.
3398 2005-04-27  Roland McGrath  <roland@redhat.com>
3400         * Makefile (tests): Remove tst-clock2.
3402         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3403         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3404         translating to the kernel clockid_t for our own process/thread clock.
3406         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3408 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3410         * old_pthread_cond_init.c: Include <errno.h>.
3411         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3412         process shared or uses clock other than CLOCK_REALTIME.
3413         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3415 2005-04-13  David S. Miller  <davem@davemloft.net>
3417         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3418         * sysdeps/sparc/sparc64/clone.S: New file.
3420 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3422         [BZ #1102]
3423         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3424         __inline instead of inline.
3425         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3427 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3429         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3430         functionally equivalent, but shorter instructions.
3431         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3432         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3433         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3434         Likewise.
3435         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3436         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3437         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3438         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3440         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3441         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3442         Likewise.
3443         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3444         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3445         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3446         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3447         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3449 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3451         * sysdeps/mips/Makefile: New file.
3452         * sysdeps/mips/nptl-sysdep.S: New file.
3453         * sysdeps/mips/tcb-offsets.sym: New file.
3454         * sysdeps/mips/pthread_spin_lock.S: New file.
3455         * sysdeps/mips/pthread_spin_trylock.S: New file.
3456         * sysdeps/mips/pthreaddef.h: New file.
3457         * sysdeps/mips/tls.h: New file.
3458         * sysdeps/mips/jmpbuf-unwind.h: New file.
3459         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3460         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3461         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3462         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3463         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3464         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3465         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3466         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3467         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3468         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3470 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3472         [BZ #1112]
3473         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3474         variable to scerr.
3476 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3478         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3480 2005-02-25  Roland McGrath  <roland@redhat.com>
3482         * alloca_cutoff.c: Correct license text.
3483         * tst-unload.c: Likewise.
3484         * sysdeps/pthread/allocalim.h: Likewise.
3485         * sysdeps/pthread/pt-initfini.c: Likewise.
3486         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3487         * sysdeps/pthread/bits/sigthread.h: Likewise.
3488         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3489         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3491 2005-02-16  Roland McGrath  <roland@redhat.com>
3493         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3494         Use unsigned int * for ptr_nthreads.
3496 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3498         [BZ #721]
3499         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3500         gcc4.
3502 2005-02-07  Richard Henderson  <rth@redhat.com>
3504         [BZ #787]
3505         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3506         argument.
3508 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3510         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3511         order of arguments in invocation of atomic_add_zero.
3513 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3515         [BZ #737]
3516         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3517         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3518         at least gotntpoff relocation and addition.
3519         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3520         Likewise.
3521         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3522         Likewise.
3523         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3524         Likewise.
3526 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3528         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3529         entry for static tls deallocation fix.
3530         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3531         also contains information whether the memory pointed to is static
3532         TLS or not.
3533         * sysdeps/i386/tls.h: Likewise.
3534         * sysdeps/ia64/tls.h: Likewise.
3535         * sysdeps/powerpc/tls.h: Likewise.
3536         * sysdeps/s390/tls.h: Likewise.
3537         * sysdeps/sh/tls.h: Likewise.
3538         * sysdeps/sparc/tls.h: Likewise.
3539         * sysdeps/x86_64/tls.h: Likewise.
3541 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3543         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3545 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3547         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3548         %esp.
3549         * Makefile (tests): Add tst-align2.
3550         * tst-align2.c: New test.
3551         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3552         -mpreferred-stack-boundary=4.
3554 2004-12-18  Roland McGrath  <roland@redhat.com>
3556         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3557         New file removed withdrawn for the moment.
3559 2004-12-17  Richard Henderson  <rth@redhat.com>
3561         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3562         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3564 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3566         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3567         Increased PTHREAD_STACK_MIN.
3569         * tst-context1.c (stacks): Use bigger stack size.
3571 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3573         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3574         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3576 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3578         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3579         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3580         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3582 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3584         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3586 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3588         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3589         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3591         * tst-getpid1.c: If child crashes, report this first.  Print which
3592         signal.
3594 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3596         * init.c (__pthread_initialize_minimal_internal): Also unblock
3597         SIGSETXID.
3599 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3601         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3602         _POSIX_THREAD_CPUTIME): Define to 0.
3603         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3604         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3605         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3606         __timer_signal_thread_tclk): Remove.
3607         (init_module): Remove their initialization.
3608         (thread_cleanup): Remove their cleanup assertions.
3609         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3610         __timer_signal_thread_tclk): Remove.
3611         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3612         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3613         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3615 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3617         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3618         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3620         * Makefile (tests): Add tst-getpid2.
3621         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3622         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3623         * tst-getpid2.c: New test.
3625 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3627         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3629 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3631         * Makefile (tests): Add tst-getpid1.
3632         * tst-getpid1.c: New file.
3633         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3634         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3636 2004-12-02  Roland McGrath  <roland@redhat.com>
3638         * Makefile (libpthread-nonshared): Variable removed.
3639         ($(objpfx)libpthread_nonshared.a): Target removed.
3640         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3641         These are now handled by generic magic from
3642         libpthread-static-only-routines being set.
3644 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3646         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3647         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3648         _POSIX_THREAD_PRIO_PROTECT): Define.
3649         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3650         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3651         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3653 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3655         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3656         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3657         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3658         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3659         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3660         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3661         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3663 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3665         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3667         * Makefile (libpthread-routines): Add pthread_setschedprio.
3668         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3669         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3670         * pthread_setschedprio.c: New file.
3672 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3674         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3675         * pthread_cancel.c (pthread_create): Likewise.
3677         * Makefile (libpthread-routines): Add vars.
3678         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3679         * init.c (__default_stacksize, __is_smp): Remove.
3680         * vars.c: New file.
3681         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3682         and define a wrapper macro.
3683         (PTHREAD_STATIC_FN_REQUIRE): Define.
3684         * allocatestack.c (__find_thread_by_id): Undefine.
3685         * pthread_create (__pthread_keys): Remove.
3686         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3687         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3688         PTHREAD_STATIC_FN_REQUIRE.
3690 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3692         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3693         parameter to REGISTER macro.
3695 2004-11-17  Roland McGrath  <roland@redhat.com>
3697         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3698         Make sure SIGCANCEL is blocked as well.
3700 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3702         * sysdeps/pthread/setxid.h: New file.
3703         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3704         (struct xid_command): Add forward decl.
3705         (struct pthread_functions): Change return type of __nptl_setxid hook
3706         to int.
3707         * pthreadP.h (__nptl_setxid): Change return type to int.
3708         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3709         calling thread, return its return value and set errno on failure.
3710         * descr.h (struct xid_command): Change id type to long array.
3712         * Makefile: Add rules to build and test tst-setuid1 and
3713         tst-setuid1-static.
3714         * tst-setuid1.c: New test.
3715         * tst-setuid1-static.c: New test.
3717 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3719         * Makefile (tests): Add tst-exit3.
3720         * tst-exit3.c: New test.
3722 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3724         * Makefile (tests): Add tst-exit2.
3725         * tst-exit2.c: New file.
3727 2004-11-09  Roland McGrath  <roland@redhat.com>
3729         [BZ #530]
3730         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3731         here, before calling clone.
3732         * pthread_create.c (start_thread): Don't do it here.
3734 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3736         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3738 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3740         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3741         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3742         assembler warning.
3744 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3746         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3747         if sched_priority is not between minprio and maxprio.
3749 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3751         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3752         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3754         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3755         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3757 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3759         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3760         not-cancelable I/O functions.
3762 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3764         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3765         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3766         make sure 2 is stored in the futex and we looked at the old value.
3767         Fix a few other problems to return the correct value.
3769 2004-10-14  Richard Henderson  <rth@redhat.com>
3771         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3772         make gcc4 happy.
3774 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3776         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3777         of pthread-functions.h and pthreaddef.h.
3778         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3780         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3781         Change __data.__nwaiters from int to unsigned int.
3783         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3784         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3786         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3787         before return type.
3789         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3790         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3792 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3794         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3795         test fails, remove message queue.
3796         (tf_msgsnd): Likewise.
3798 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3800         * tst-clock1.c: Change #ifdef to #if defined.
3801         * tst-clock2.c: Likewise.
3802         * tst-cond11.c: Likewise.
3804         * sysdeps/pthread/timer_create.c (timer_create): Use
3805         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3806         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3807         THREAD_CPUTIME.
3809 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3811         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3812         _POSIX_THREAD_CPUTIME): Define to 0.
3814 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3816         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3817         and _POSIX_THREAD_CPUTIME to zero.
3818         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3819         * tst-barrier2.c: Fix testing for POSIX feature.
3820         * tst-clock1.c: Likewise.
3821         * tst-clock2.c: Likewise.
3822         * tst-cond11.c: Likewise.
3823         * tst-cond4.c: Likewise.
3824         * tst-cond6.c: Likewise.
3825         * tst-flock2.c: Likewise.
3826         * tst-mutex4.c: Likewise.
3827         * tst-mutex9.c: Likewise.
3828         * tst-rwlock12.c: Likewise.
3829         * tst-rwlock4.c: Likewise.
3830         * tst-signal1.c: Likewise.
3831         * tst-spin2.c: Likewise.
3832         * sysdeps/pthread/posix-timer.h: Likewise.
3833         * sysdeps/pthread/timer_create.c: Likewise.
3834         * sysdeps/pthread/timer_routines.c: Likewise.
3836 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3839         (__lll_mutex_timedlock_wait): Address futex correctly.
3841         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3842         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3843         make sure 2 is stored in the futex and we looked at the old value.
3844         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3845         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3846         which might very well made the code not working at all before.
3847         [BZ #417]
3849 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3851         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3852         allow SIGSETXID to be sent.
3853         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3854         for SIGSETXID to be defined.
3855         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3856         SIGSETXID cannot be blocked.
3858         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3859         Add __extension__ to long long types.
3860         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3861         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3862         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3863         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3864         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3865         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3866         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3868 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3870         * descr.h (struct pthread): Add stopped_start field.
3871         * sysdeps/pthread/createthread.c (create_thread): Set
3872         start_stopped flag in descriptor for new thread appropriately.
3873         * pthread_create.c (start_thread): Only take lock to be stopped on
3874         startup if stopped_start flag says so.
3876 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3878         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3879         is created detached and if yes, do not try to free the stack in case
3880         the thread creation failed.
3881         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3882         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3883         case there has been no error.  [BZ #405]
3885         * pthread_create.c (start_thread): Don't wait for scheduler data
3886         etc to be set at the beginning of the function.  The cancellation
3887         infrastructure must have been set up.  And enable async
3888         cancellation before potentially going to sleep.  [BZ #401]
3890 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3892         * Versions: Remove exports for pthread_set*id_np functions.
3893         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3894         for now.
3895         * Makefile: Don't build pthread_set*id code for now.
3897 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3899         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3900         internal use.
3901         * allocatestack.c (__nptl_setxid): New function.
3902         * descr.h (struct xid_command): Define type.
3903         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3904         (sighandler_setxid): New function.
3905         (__pthread_initialize_minimal): Register sighandler_setxid for
3906         SIGCANCEL.
3907         * pt-allocrtsig.c: Update comment.
3908         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3909         Declare __nptl_setxid.
3910         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3911         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3912         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3913         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3914         and pthread_setresuid_np.
3915         * pthread_setgid_np.c: New file.
3916         * pthread_setuid_np.c: New file.
3917         * pthread_setegid_np.c: New file.
3918         * pthread_seteuid_np.c: New file.
3919         * pthread_setregid_np.c: New file.
3920         * pthread_setreuid_np.c: New file.
3921         * pthread_setresgid_np.c: New file.
3922         * pthread_setresuid_np.c: New file.
3923         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3924         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3925         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3926         and pthread_setresuid_np.
3927         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3928         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3929         pthread_setregid, and pthread_setresgid.
3931 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3933         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3934         ENOMEM when out of memory.
3936 2004-09-10  Roland McGrath  <roland@redhat.com>
3938         [BZ #379]
3939         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3940         code, since we don't try to use the broken CLONE_STOPPED any more.
3941         * pthread_create.c (start_thread): Likewise.
3943 2004-09-15  Richard Henderson  <rth@redhat.com>
3945         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3947 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3949         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3950         (__libc_unwind_longjmp): Delete macro and declare as function.
3951         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3952         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3953         nptl directory.
3954         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3955         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3956         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3958 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3960         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3961         for __USE_XOPEN2K.
3962         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3963         types also for __USE_XOPEN2K.
3964         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3965         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3966         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3967         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3968         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3969         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3970         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3971         [BZ #320]
3973 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3975         * sysdeps/pthread/pthread.h
3976         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3977         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3978         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3979         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3980         [BZ #375]
3982 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3985         PSEUDO to be used with . prefix.
3987         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3988         Use atomic_increment instead of atomic_exchange_and_add.
3989         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3990         Likewise.
3991         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3992         Likewise.
3993         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3994         Likewise.
3996         * allocatestack.c (allocate_stack): Use atomic_increment_val
3997         instead of atomic_exchange_and_add.
3998         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3999         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4000         Likewise.
4001         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4002         Likewise.
4004         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4005         the initialization function might throw.
4007 2005-09-05  Richard Henderson  <rth@redhat.com>
4009         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4010         Move definition inside libpthread, libc, librt check.  Provide
4011         definition for rtld.
4013 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4015         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4016         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4017         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4018         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4019         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4020         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4021         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4022         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4023         * unwind.c: Use it.
4025         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4026         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4027         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4028         Likewise.
4029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4030         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4031         this is the last waiter, signal pthread_cond_destroy caller and
4032         avoid using the pthread_cond_t structure after unlock.
4033         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4034         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4035         Read clock type from the least significant bits of __nwaiters instead
4036         of __clock.
4037         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4038         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4040 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4042         [BZ #342]
4043         * Makefile (tests): Add tst-cond20 and tst-cond21.
4044         * tst-cond20.c: New test.
4045         * tst-cond21.c: New test.
4046         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4047         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4048         it unsigned int.
4049         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4050         Likewise.
4051         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4052         (pthread_cond_t): Likewise.
4053         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4054         Likewise.
4055         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4056         Likewise.
4057         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4058         Likewise.
4059         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4060         (cond_nwaiters): New.
4061         (clock_bits): New.
4062         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4063         if there are waiters not signalled yet.
4064         Wait until all already signalled waiters wake up.
4065         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4066         __nwaiters.  If pthread_cond_destroy has been called and this is the
4067         last waiter, signal pthread_cond_destroy caller and avoid using
4068         the pthread_cond_t structure after unlock.
4069         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4070         decrement it when leaving.  If pthread_cond_destroy has been called
4071         and this is the last waiter, signal pthread_cond_destroy caller.
4072         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4073         Likewise.  Read clock type from the least significant bits of
4074         __nwaiters instead of __clock.
4075         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4076         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4077         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4078         clock type just from the last COND_CLOCK_BITS bits of value.
4079         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4080         instead of __clock, just from second bit of condattr's value.
4082 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4084         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4085         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4086         != 64.
4087         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4089 2004-08-15  Roland McGrath  <roland@frob.com>
4091         * pthread_atfork.c: Update copyright terms including special exception
4092         for these trivial files, which are statically linked into executables
4093         that use dynamic linking for the significant library code.
4095 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4097         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4098         pthread_rwlock_rdlock.
4099         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4100         Decrease __nr_readers_queued after reacquiring lock.
4101         * sysdeps/pthread/pthread_rwlock_timedrdlock
4102         (pthread_rwlock_timedrdlock): Likewise.
4103         Reported by Bob Cook <bobcook47@hotmail.com>.
4105 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4107         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4108         before pthread_barrier_wait.
4110 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4112         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4113         Remove unnecessary exception handling data.
4115 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4117         [BZ #284]
4118         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4119         instead of clockid_t.
4121 2004-07-21  Roland McGrath  <roland@redhat.com>
4123         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4125 2004-07-19  Roland McGrath  <roland@redhat.com>
4127         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4129 2004-07-02  Roland McGrath  <roland@redhat.com>
4131         * configure: Don't exit.
4133 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4135         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4136         (__pthread_cond_timedwait): Check for invalid nanosecond in
4137         timeout value.
4139 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4141         * Makefile: Add rules to build and run tst-fini1.
4142         * tst-fini1.c: New file.
4143         * tst-fini1mod.c: New file.
4145 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4147         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4148         if no cancellation support is needed.
4149         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4150         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4151         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4152         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4153         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4154         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4155         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4156         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4157         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4159         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4160         only if not already defined.
4162 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4164         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4165         constraint "m" instead of "0" for futex.
4167         * shlib-versions: Add powerpc64-.*-linux.*.
4169 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4171         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4172         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4173         for valid tv_nsec.
4174         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4175         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4176         bits.
4178 2004-06-29  Roland McGrath  <roland@redhat.com>
4180         * Banner: NPTL no longer has its own version number.
4181         * Makefile (nptl-version): Variable removed.
4182         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4183         using $(version), the glibc version number.
4185 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4187         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4188         Fix branch offset for a PLT entry.
4189         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4190         Likewise.
4191         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4192         Likewise.
4193         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4194         Likewise.
4195         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4196         Likewise.
4198 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4200         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4201         unconditionally.
4203 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4205         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4206         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4207         instead of tv_sec.
4208         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4209         (pthread_rwlock_timedrdlock): Likewise.
4211 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4213         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4214         Set __r7 to val, not mutex.
4216 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4218         * Makefile: Add rules to build tst-rwlock14.
4219         * tst-rwlock14.c: New file.
4221 2004-06-24  Boris Hu  <boris.hu@intel.com>
4223         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4224         check.
4225         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4227 2004-06-19  Andreas Jaeger  <aj@suse.de>
4229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4230         assembler in last patch.
4232 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4234         * sysdeps/pthread/pthread_cond_timedwait.c
4235         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4236         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4237         (__pthread_cond_timedwait): Check for invalid nanosecond in
4238         timeout value.
4239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4240         * tst-cond19.c: New file.
4241         * Makefile: Add rules to build and run tst-cond19.
4243 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4245         * tst-context1.c (GUARD_PATTERN): Defined.
4246         (tst_context_t): Define struct containing ucontext_t & guard words.
4247         (ctx): Declare as an array of tst_context_t.
4248         (fct): Verify uc_link & guard words are still valid.
4249         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4251 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4253         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4254         Add __data.__futex field, reshuffle __data.__clock.
4255         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4256         (__pthread_cond_signal): Increment __futex at the same time as
4257         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4258         address of low 32-bits of __wakeup_seq to futex syscall.
4259         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4260         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4261         releasing internal lock to FUTEX_WAIT.
4262         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4263         (__pthread_cond_timedwait): Likewise.
4264         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4265         (FUTEX_CMP_REQUEUE): Define.
4266         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4267         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4268         Pass __futex value from before the unlock and __futex address instead
4269         of address of low 32-bits of __wakeup_seq to futex syscall.
4270         Fallback to FUTEX_WAKE all on any errors.
4272 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4274         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4275         comment typo.
4276         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4277         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4278         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4279         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4280         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4282 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4284         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4285         Add memory clobber to inline assembly.
4286         (__lll_mutex_trylock): Likewise.
4287         (__lll_mutex_cond_trylock): Likewise.
4289 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4291         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4292         Pass val argument as 6th system call argument in %r7.
4294 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4296         * Makefile (tests): Add tst-cond16.
4297         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4298         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4299         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4300         Add __data.__futex field, reshuffle __data.__clock.
4301         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4302         (__pthread_cond_signal): Increment __futex at the same time as
4303         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4304         address of low 32-bits of __wakeup_seq to futex syscall.
4305         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4306         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4307         releasing internal lock to FUTEX_WAIT.
4308         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4309         (__pthread_cond_timedwait): Likewise.
4310         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4311         (FUTEX_CMP_REQUEUE): Define.
4312         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4313         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4314         Pass __futex value from before the unlock and __futex address instead
4315         of address of low 32-bits of __wakeup_seq to futex syscall.
4316         Fallback to FUTEX_WAKE all on any errors.
4317         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4318         Define.
4319         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4320         internally.  Return non-zero if error, zero if success.
4321         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4322         Add __data.__futex field, reshuffle __data.__clock.
4323         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4324         Define.
4325         (lll_futex_requeue): Add val argument, return 1 unconditionally
4326         for the time being.
4327         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4328         Add __data.__futex field, reshuffle __data.__clock.
4329         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4330         Define.
4331         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4332         internally.  Return non-zero if error, zero if success.
4333         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4334         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4335         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4336         Define.
4337         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4338         internally.  Return non-zero if error, zero if success.
4339         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4340         Add __data.__futex field, reshuffle __data.__clock.
4341         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4342         Define.
4343         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4344         internally.  Return non-zero if error, zero if success.
4345         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4346         Add __data.__futex field, reshuffle __data.__clock.
4347         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4348         Add __data.__futex field, reshuffle __data.__clock.
4349         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4350         Increment __futex at the same time as __wakeup_seq or __total_seq.
4351         Pass address of __futex instead of address of low 32-bits of
4352         __wakeup_seq to futex syscall.
4353         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4354         Pass __futex value from before releasing internal lock
4355         to FUTEX_WAIT.
4356         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4357         Likewise.  Avoid unnecessary shadowing of variables.
4358         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4359         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4360         unlock and __futex address instead of address of low 32-bits of
4361         __wakeup_seq to futex_requeue macro, adjust for new return value
4362         meaning.
4363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4364         (__pthread_cond_signal): Increment __futex at the same time as
4365         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4366         address of low 32-bits of __wakeup_seq to futex syscall.
4367         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4368         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4369         releasing internal lock to FUTEX_WAIT.
4370         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4371         (__pthread_cond_timedwait): Likewise.
4372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4373         (FUTEX_CMP_REQUEUE): Define.
4374         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4375         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4376         Pass __futex value from before the unlock and __futex address instead
4377         of address of low 32-bits of __wakeup_seq to futex syscall.
4378         Fallback to FUTEX_WAKE all on any errors.
4380 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4382         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4383         Add nop to align the end of critical section.
4384         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4386 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4388         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4389         Add __broadcast_seq field.
4390         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4391         all waiters as woken with woken_seq and bump broadcast counter.
4392         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4393         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4394         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4395         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4397 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4400         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4401         Reported by Kaz Kojima.
4403 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4405         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4407 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4409         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4410         __broadcast_seq with bc_seq after acquiring internal lock instead of
4411         before it.
4413 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4415         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4416         compilation.
4417         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4418         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4419         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4420         (pthread_cond_t): Add __data.__broadcast_seq field.
4421         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4422         (FRAME_SIZE): Define.
4423         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4424         Comment typo fixes.
4425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4426         Define.
4427         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4428         typo fixes.
4429         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4430         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4431         fixes.
4433 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4435         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4436         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4437         Add __broadcast_seq field.
4438         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4439         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4440         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4441         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4442         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4443         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4444         all waiters as woken with woken_seq and bump broadcast counter.
4445         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4447         __broadcast_seq field.
4448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4449         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4450         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4451         * pthread_cond_init.c: Initialize __broadcast_seq field.
4452         * Makefile (tests): Add tst-cond17 and tst-cond18.
4453         Add .NOTPARALLEL goal.
4454         * tst-cond16.c: New file.  From Jakub.
4455         * tst-cond17.c: New file.  From Jakub.
4456         * tst-cond18.c: New file.  From Jakub.
4458 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4460         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4461         unwind info.
4463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4464         Parametrize frame size.  Correct some unwind info.
4465         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4467 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4469         * tst-stack3.c: Note testing functionality beyond POSIX.
4471 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4473         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4474         Change conditional from ifdef to if.
4476 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4478         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4479         SYSDEP_CANCEL_ERROR): Define.
4480         (PSEUDO): Use it.
4482 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4484         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4486 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4488         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4490 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4492         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4493         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4494         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4495         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4497 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4499         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4500         thread has all signals blocked.
4502 2004-04-18  Andreas Jaeger  <aj@suse.de>
4504         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4505         (SEM_VALUE_MAX): Add missing brace.
4507 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4509         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4510         in rt subdir.
4511         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4512         * sysdeps/pthread/tst-mqueue8x.c: New test.
4513         * tst-cancel4.c: Update comment about message queues.
4515         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4516         return it_value { 0, 0 }.
4517         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4518         like SIGEV_SIGNAL.
4519         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4520         assertion for SIGEV_NONE.
4521         (thread_attr_compare): Compare all attributes, not just a partial
4522         subset.
4524 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4526         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4528 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4530         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4531         Just use a plain number.
4532         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4533         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4534         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4535         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4536         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4537         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4538         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4540 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4542         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4543         frame info.
4544         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4546 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4548         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4549         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4550         of calling sigwaitinfo.
4552 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4554         * allocatestack.c (allocate_stack): Set reported_guardsize
4555         unconditionally.
4556         * pthread_getattr_np.c (pthread_getattr_np): Use
4557         reported_guardsize instead of guardsize.
4558         * descr.h (struct pthread): Add reported_guardsize field.
4560 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4562         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4564 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4566         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4568 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4570         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4571         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4572         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4573         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4574         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4575         Define.
4576         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4577         (_POSIX_MESSAGE_PASSING): Define.
4578         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4579         (_POSIX_MESSAGE_PASSING): Define.
4580         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4581         (_POSIX_MESSAGE_PASSING): Define.
4583 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4585         * tst-context1.c (fct): Check whether correct stack is used.
4587 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4590         matching constraints for asm mem parameters.
4592         * tst-clock2.c (tf): Don't define unless needed.
4594 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4596         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4597         $(gnulib).
4599 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4601         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4602         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4603         * pthreadP.h: Declare __nptl_deallocate_tsd.
4604         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4605         Adjust caller.
4607         * Makefile (tests): Add tst-tsd5.
4608         * tst-tsd5.c: New file.
4610 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4612         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4613         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4614         is SHLIB_COMPAT check.
4615         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4616         (__pthread_attr_getaffinity_old): Likewise.
4617         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4618         (__pthread_getaffinity_old): Likewise.
4619         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4620         (__pthread_setaffinity_old): Likewise.
4622 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4624         * allocatestack.c (_make_stacks_executable): Call
4625         _dl_make_stack_executable first.
4627 2004-03-24  Roland McGrath  <roland@redhat.com>
4629         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4630         constraint instead of "0".
4632 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4634         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4635         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4637         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4638         code to avoid warning.
4640 2004-03-24  Andreas Jaeger  <aj@suse.de>
4642         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4643         (__pthread_attr_setaffinity_old): Remove const.
4645 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4647         * sysdeps/unix/sysv/linux/smp.h: New file.
4648         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4649         * init.c: Define __is_smp.
4650         (__pthread_initialize_minimal_internal): Call is_smp_system to
4651         initialize __is_smp.
4652         * pthreadP.h: Declare __is_smp.
4653         Define MAX_ADAPTIVE_COUNT is necessary.
4654         * pthread_mutex_init.c: Add comment regarding __spins field.
4655         * pthread_mutex_lock.c: Implement adaptive mutex type.
4656         * pthread_mutex_timedlock.c: Likewise.
4657         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4658         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4659         Add __spins field.
4660         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4661         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4662         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4663         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4664         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4665         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4666         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4667         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4668         lll_mutex_cond_trylock.
4669         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4670         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4671         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4672         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4673         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4674         Define BUSY_WAIT_NOP.
4675         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4676         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4678         * tst-mutex5.c: Add support for testing adaptive mutexes.
4679         * tst-mutex7.c: Likewise.
4680         * tst-mutex5a.c: New file.
4681         * tst-mutex7a.c: New file.
4682         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4684         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4685         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4686         vgettimeofday call might destroy the content.
4688         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4689         @pause in the loop.
4691         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4692         No need to restrict type of ret.  Make it int.  Add comment.
4694         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4695         Remove unnecessary setne instruction.
4697 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4699         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4700         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4701         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4702         If realloc fails, break out of the loop.
4704 2004-03-20  Andreas Jaeger  <aj@suse.de>
4706         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4707         (__pthread_setaffinity_old): Fix interface.
4708         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4709         (__pthread_getaffinity_old): Likewise.
4711         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4712         (__pthread_setaffinity_new): Remove duplicate declaration.
4714 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4716         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4717         the return value to a safe register.
4718         (CDISABLE): Set the function argument correctly.
4720 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4722         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4723         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4724         Rewrite so that only one locked memory operation per round is needed.
4725         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4726         (pthread_barrier_wait): After wakeup, release lock only when the
4727         last thread stopped using the barrier object.
4728         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4729         (__pthread_cond_wait): Don't store mutex address if the current
4730         value is ~0l.  Add correct cleanup support and unwind info.
4731         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4732         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4733         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4734         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4735         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4736         Add correct cleanup support and unwind info.
4737         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4738         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4739         information for syscall wrappers.
4741 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4743         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4744         cpusetsize field, remove next.
4745         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4746         parameter for size of the CPU set.
4747         (pthread_setaffinity_np): Likewise.
4748         (pthread_attr_getaffinity_np): Likewise.
4749         (pthread_attr_setaffinity_np): Likewise.
4750         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4751         interface change, keep compatibility code.
4752         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4753         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4754         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4755         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4756         __pthread_getaffinity_np.
4757         * Versions: Add version for changed interfaces.
4758         * tst-attr3.c: Adjust test for interface change.
4759         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4760         increasing buffer sizes.
4761         * pthread_attr_destroy.c: Remove unused list handling.
4762         * pthread_attr_init.c: Likewise.
4764 2004-03-17  Roland McGrath  <roland@redhat.com>
4766         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4767         first argument to clock_getres so we ever enable kernel timers.
4769 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4771         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4773 2004-03-12  Richard Henderson  <rth@redhat.com>
4775         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4776         oldvalue from CENABLE to CDISABLE.
4778 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4780         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4781         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4782         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4783         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4785 2004-03-11  Richard Henderson  <rth@redhat.com>
4787         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4788         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4789         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4791 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4793         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4794         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4795         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4797 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4799         * forward.c (__pthread_cond_broadcast_2_0,
4800         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4801         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4802         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4804 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4806         * sysdeps/sh/tcb-offsets.sym: Add PID.
4807         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4808         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4810 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4812         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4813         include <sysdep-cancel.h>, vfork is no cancellation point.
4814         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4815         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4816         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4818 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4820         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4821         libc_hidden_def.
4822         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4823         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4824         Likewise.
4825         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4826         Likewise.
4827         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4828         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4829         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4830         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4831         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4833         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4834         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4835         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4836         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4837         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4838         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4840         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4841         a local register for saving old PID.  Negate PID in parent upon exit.
4843         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4844         tcb-offsets.h.
4845         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4846         before syscall, set to the old value in the parent afterwards.
4847         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4848         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4849         tcb-offsets.h.
4850         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4851         before syscall, set to the old value in the parent afterwards.
4852         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4853         * sysdeps/s390/tcb-offsets.sym: Add PID.
4855         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4856         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4857         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4858         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4859         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4860         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4862 2004-03-10  Andreas Schwab  <schwab@suse.de>
4864         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4865         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4866         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4868 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4870         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4871         * tst-cancel21.c (do_one_test): Likewise.
4872         Reported by Gordon Jin <gordon.jin@intel.com>.
4874 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4876         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4877         if non-zero and set to INT_MIN if zero.
4878         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4879         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4880         (SAVE_PID, RESTORE_PID): Define.
4881         (__vfork): Use it.
4882         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4883         Use relative path to avoid including NPTL i386/vfork.S.
4884         (SAVE_PID, RESTORE_PID): Define.
4885         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4886         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4887         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4888         tst-vfork2x.
4889         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4890         * tst-vfork1.c: New test.
4891         * tst-vfork2.c: New test.
4892         * tst-vfork1x.c: New test.
4893         * tst-vfork2x.c: New test.
4895 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4897         * sysdeps/i386/tcb-offsets.sym: Add PID.
4898         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4899         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4900         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4902 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4904         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4906 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4908         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4909         _rtld_global_ro.
4911 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4913         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4914         _rtld_global_ro.
4916         * tst-once4.c: Remove unnecessary macro definition.
4918         * tst-mutex7.c (do_test): Limit thread stack size.
4919         * tst-once2.c (do_test): Likewise.
4920         * tst-tls3.c (do_test): Likewise.
4921         * tst-tls1.c (do_test): Likewise.
4922         * tst-signal3.c (do_test): Likewise.
4923         * tst-kill6.c (do_test): Likewise.
4924         * tst-key4.c (do_test): Likewise.
4925         * tst-join4.c (do_test): Likewise.
4926         * tst-fork1.c (do_test): Likewise.
4927         * tst-context1.c (do_test): Likewise.
4928         * tst-cond2.c (do_test): Likewise.
4929         * tst-cond10.c (do_test): Likewise.
4930         * tst-clock2.c (do_test): Likewise.
4931         * tst-cancel10.c (do_test): Likewise.
4932         * tst-basic2.c (do_test): Likewise.
4933         * tst-barrier4.c (do_test): Likewise.
4935 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4937         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4939 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4941         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4942         (__pthread_cond_timedwait): Optimize wakeup test.
4943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4944         (__pthread_cond_wait): Likewise.
4945         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4946         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4947         Likewise.
4949 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4951         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4952         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4953         the atomic instruction needed.
4954         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4955         (__lll_mutex_lock_wait): Likewise.
4957 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4959         * Makefile (tests): Add tst-cond14 and tst-cond15.
4960         * tst-cond14.c: New file.
4961         * tst-cond15.c: New file.
4963 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4965         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4966         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4967         needs to be implemented differently to be useful.
4969 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4971         * pthread_attr_setschedparam.c: Don't test priority against limits
4972         here.  Set ATTR_FLAG_SCHED_SET flag.
4973         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4974         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4975         from parent thread to child.  If attribute is used and scheduling
4976         parameters are not inherited, copy parameters from attribute or
4977         compute them.  Check priority value.
4978         * pthread_getschedparam.c: If the parameters aren't known yet get
4979         them from the kernel.
4980         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4981         ATTR_FLAG_POLICY_SET flag for thread.
4982         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4983         and ATTR_FLAG_POLICY_SET.
4985         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4987         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4988         fail if stack address hasn't been set.  Just return 0.
4990 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4992         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4993         libpthread for the files in this list.
4994         (CFLAGS-tst-unload): Removed.
4995         * tst-unload.c (do_test): Don't use complete path for
4996         LIBPHREAD_SO.
4998         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4999         tst-_res1mod2.
5001 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5003         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5004         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5005         operation per round is needed.
5006         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5007         (__lll_mutex_lock_wait): Likewise.
5009 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5011         * tst-cancel9.c (cleanup): Don't print to stderr.
5013 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5015         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5017 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5019         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5020         (__syscall_error_handler2): Call CDISABLE.
5021         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5022         (__syscall_error_handler2): Call CDISABLE.
5024         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5025         Release lock before the loop, don't reacquire it.
5027         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5029 2004-02-19  Andreas Schwab  <schwab@suse.de>
5031         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5032         Fix last change.
5034 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5036         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5037         (pthread_barrier_wait): After wakeup, release lock only when the
5038         last thread stopped using the barrier object.
5039         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5040         (pthread_barrier_wait): Likewise.
5041         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5042         Likewise.
5043         * Makefile (tests): Add tst-barrier4.
5044         * tst-barrier4.c: New file.
5046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5047         (__pthread_cond_timedwait): Perform timeout test while holding
5048         internal lock to prevent wakeup race.
5049         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5050         * sysdeps/pthread/pthread_cond_timedwait.c
5051         (__pthread_cond_timedwait): Likewise.
5052         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5053         (__pthread_cond_timedwait): Likewise.
5055 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5057         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5058         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5059         * Makefile (tests): Add tst-rwlock13.
5060         * tst-rwlock13.c: New test.
5062 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5064         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5065         (__condvar_tw_cleanup): Little optimization.
5066         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5068 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5070         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5071         libpthread as "lib" parameter to SHLIB_COMPAT.
5072         (__novmx_siglongjmp): Fix typo in function name.
5073         (__novmx_longjmp): Fix typo in function name.
5075 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5077         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5078         __builtin_expect.
5080         * sysdeps/generic/pt-longjmp.c: Moved to...
5081         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5083 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5085         * Makefile (libpthread-routines): Add pt-cleanup.
5086         * pt-longjmp.c: Removed.
5087         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5088         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5089         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5090         Version longjmp, siglongjmp for GLIBC_2.3.4.
5091         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5093 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5095         * sysdeps/pthread/pthread_cond_timedwait.c
5096         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5097         Reuse code.  Add __builtin_expects.
5099         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5100         (__pthread_cond_timedwait): Get internal lock in case timeout has
5101         passed before the futex syscall.
5102         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5104 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5106         * allocatestack.c: Pretty printing.
5108         * sysdeps/pthread/createthread.c (create_thread): Don't add
5109         CLONE_DETACHED bit if it is not necessary.
5111 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5113         * pthread_getattr_np.c: Include ldsodefs.h.
5115 2004-01-16  Richard Henderson  <rth@redhat.com>
5117         * allocatestack.c: Don't declare __libc_stack_end.
5118         * init.c (__pthread_initialize_minimal_internal): Likewise.
5119         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5121 2004-01-15  Richard Henderson  <rth@redhat.com>
5123         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5124         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5125         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5126         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5127         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5128         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5129         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5130         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5132 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5134         * init.c (pthread_functions): Make array const.
5136 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5138         * allocatestack.c (__make_stacks_executable): Change interface.
5139         Check parameters.  Pass parameter on to libc counterpart.
5140         * pthreadP.h: Change declaration.
5142 2004-01-13  Richard Henderson  <rth@redhat.com>
5144         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5145         prototype form.
5146         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5147         Likewise.
5149         * sysdeps/alpha/Makefile: New file.
5150         * sysdeps/alpha/tcb-offsets.sym: New file.
5151         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5152         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5154         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5155         on powerpc version.
5157 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5159         * Makefile (tests): Add tst-backtrace1.
5160         * tst-backtrace1.c: New test.
5162 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5164         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5165         register as second parameter to the REGISTER macro.
5166         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5167         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5168         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5169         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5170         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5171         of thread register as second parameter to REGISTER macro in 64 case.
5173 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5175         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5176         (CFLAGS-getpid.o): Defined.
5177         (CFLAGS-getpid.os): Defined.
5179 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5181         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5182         returned for main thread does not overlap with any other VMA.
5183         Patch by Jakub Jelinek.
5185 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5187         * tst-raise1.c: Include stdio.h.
5189 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5191         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5192         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5193         If pid is 0, set it to selftid.
5194         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5195         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5196         != 0, return self->tid without doing a syscall.
5197         * descr.h (struct pthread): Move pid field after tid.
5199         * Makefile (tests): Add tst-raise1.
5200         * tst-raise1.c: New file.
5202 2003-12-23  Roland McGrath  <roland@redhat.com>
5204         * tst-oddstacklimit.c: New file.
5205         * Makefile (tests): Add it.
5206         (tst-oddstacklimit-ENV): New variable.
5208         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5209         value up to page size for __default_stacksize.
5211 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5213         * Makefile (tests): Add tst-eintr5.
5214         * tst-eintr5.c: New file.
5216         * eintr.c (eintr_source): Prevent sending signal to self.
5218         * tst-eintr2.c (tf1): Improve error message.
5220 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5222         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5223         * sysdeps/unix/sysv/linux/getpid.c: New file.
5224         * pthread_cancel.c: Add comment explaining use of PID field.
5225         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5226         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5227         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5228         temporarily to signal the field must not be relied on and updated
5229         by getpid().
5230         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5231         temporarily negative.
5232         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5234 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5236         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5237         (eintr_source): If ARG != NULL, use pthread_kill.
5238         * tst-eintr1.c: Adjust for this change.
5239         * tst-eintr2.c: Likewise.
5240         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5241         * tst-eintr3.c: New file.
5242         * tst-eintr4.c: New file.
5244 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5246         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5247         if CANCELSTATE_BITMASK is set.
5248         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5249         Likewise.
5251         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5252         (tests-reverse): Add tst-cancel23.
5253         * tst-cancel22.c: New test.
5254         * tst-cancel23.c: New test.
5256 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5258         * tst-eintr1.c: Better error messages.
5260         * Makefile (tests): Add tst-eintr2.
5261         * tst-eintr2.c: New file.
5263 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5265         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5266         (CFLAGS-tst-cancelx21.c): Set.
5267         * tst-cancel21.c: New test.
5268         * tst-cancelx21.c: New test.
5270         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5271         comparison operand.
5272         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5273         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5274         * pt-longjmp.c: Include jmpbuf-unwind.h.
5275         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5276         _JMPBUF_UNWINDS.  Adjust compared pointers.
5277         * init.c (__pthread_initialize_minimal_internal): Initialize
5278         pd->stackblock_size.
5279         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5280         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5281         * sysdeps/i386/jmpbuf-unwind.h: New file.
5282         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5283         * sysdeps/s390/jmpbuf-unwind.h: New file.
5284         * sysdeps/sh/jmpbuf-unwind.h: New file.
5285         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5286         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5287         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5288         (_JMPBUF_CFA_UNWINDS): Remove.
5289         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5291 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5293         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5294         (CFLAGS-tst-cancelx20.c): Set.
5295         * tst-cancel20.c: New test.
5296         * tst-cancelx20.c: New test.
5298 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5300         * init.c (__pthread_initialize_minimal_internal): Don't treat
5301         architectures with separate register stack special here when
5302         computing default stack size.
5304 2003-12-17  Roland McGrath  <roland@redhat.com>
5306         * Makefile (tst-cancelx7-ARGS): New variable.
5307         Reportd by Greg Schafer <gschafer@zip.com.au>.
5309 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5311         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5312         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5313         (tst-stack3-ENV): Set.
5314         ($(objpfx)tst-stack3-mem): New.
5315         * tst-stack3.c: New test.
5317 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5319         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5320         Add unwind directives.  Drop unused .regstk directive.
5321         (_fini_EPILOG_BEGINS): Add unwind directives.
5323 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5325         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5326         Assume parameter is a pointer.
5327         (lll_futex_wake): Likewise.
5328         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5329         Likewise.
5330         (lll_futex_wake): Likewise.
5331         Reported by Boris Hu.
5332         * sysdeps/unix/sysv/linux/unregister-atfork.c
5333         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5335         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5337 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5339         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5340         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5341         __rtld_lock_initialize for ld.so lock.
5342         Patch in part by Adam Li <adam.li@intel.com>.
5344 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5346         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5347         in $(gnulib).  Also, remove stale comment.
5349 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5351         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5352         advantage of new syscall stub and optimize accordingly.
5354         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5355         from SYS_futex, to match expectations of
5356         sysdep.h:DO_INLINE_SYSCALL.
5357         (lll_futex_clobbers): Remove.
5358         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5359         (lll_futex_wake): Likewise.
5360         (lll_futex_requeue): Likewise.
5361         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5362         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5363         Jelinek).
5364         (__lll_mutex_lock): Likewise.
5365         (__lll_mutex_cond_lock): Likewise.
5366         (__lll_mutex_timed_lock): Likewise.
5367         (__lll_mutex_unlock): Likewise.
5368         (__lll_mutex_unlock_force): Likewise.
5370         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5371         comes before the include of <sysdep.h>.
5372         (THREAD_SELF_SYSINFO): New macro.
5373         (THREAD_SYSINFO): Likewise.
5374         (INIT_SYSINFO): New macro.
5375         (TLS_INIT_TP): Call INIT_SYSINFO.
5377         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5379         * sysdeps/pthread/createthread.c (create_thread): Use
5380         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5381         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5382         THREAD_SELF_SYSINFO instead of open code.
5383         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5384         (THREAD_SYSINFO): Likewise.
5386         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5388         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5390 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5392         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5393         instead of .init.  Patch by David Mosberger.
5395 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5397         * sysdeps/pthread/configure.in: Remove broken declaration in C
5398         cleanup handling check.
5400 2003-11-30  Andreas Jaeger  <aj@suse.de>
5402         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5403         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5404         Likewise.
5406 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5408         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5409         * pthread_attr_destroy.c: Include shlib-compat.h.
5410         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5411         is set in iattr->flags.
5412         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5414 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5416         * Makefile (distribute): Add tst-cleanup4aux.c.
5418         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5419         include.
5421 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5423         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5424         pthread_cond_signal.
5426         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5427         store mutex address if the current value is ~0l.
5428         * sysdeps/pthread/pthread_cond_timedwait.c
5429         (__pthread_cond_timedwait): Likewise.
5430         * sysdeps/pthread/pthread_cond_broadcast.c
5431         (__pthread_cond_broadcast): Don't use requeue for pshared
5432         condvars.
5434         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5435         (__pthread_cond_wait): Don't store mutex address if the current
5436         value is ~0l.
5437         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5438         (__pthread_cond_timedwait): Likewise.
5439         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5440         (__pthread_cond_broadcast): Don't use requeue for pshared
5441         condvars.
5443         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5444         element with ~0l for pshared condvars, with NULL otherwise.
5446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5447         (__pthread_cond_wait): Don't store mutex address if the current
5448         value is ~0l.
5449         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5450         (__pthread_cond_timedwait): Likewise.
5451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5452         (__pthread_cond_broadcast): Don't use requeue for pshared
5453         condvars.
5455         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5456         * tst-cond12.c: New file.
5457         * tst-cond13.c: New file.
5459 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5461         * sysdeps/pthread/configure.in: Make missing forced unwind support
5462         fatal.
5464 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5466         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5468 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5470         * Makefile: Add magic to clean up correctly.
5472 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5474         * unwind.c (FRAME_LEFT): Define.
5475         (unwind_stop): Handle old style cleanups here.
5476         (__pthread_unwind): Handle old style cleanups only if
5477         !HAVE_FORCED_UNWIND.
5478         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5479         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5480         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5481         ($(objpfx)tst-cleanupx4): Likewise.
5482         * tst-cleanup4.c: New test.
5483         * tst-cleanup4aux.c: New.
5484         * tst-cleanupx4.c: New test.
5486 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5488         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5489         lll_mutex_*lock macros to skip atomic operations on some archs.
5491 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5493         * sysdeps/pthread/tst-timer.c (main): Initialize
5494         sigev2.sigev_value as well.
5496 2003-10-15  Roland McGrath  <roland@redhat.com>
5498         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5499         is missing.
5500         * sysdeps/pthread/configure: Regenerated.
5502 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5504         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5505         locking macros.  No distinction between normal and mutex locking
5506         anymore.
5507         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5508         Merge bits from lowlevelmutex.S we still need.
5509         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5510         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5511         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5512         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5513         new mutex implementation.
5514         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5515         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5516         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5517         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5518         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5519         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5520         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5521         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5522         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5523         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5524         symbol for entry point to avoid cancellation.
5526 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5528         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5529         changes.
5530         (SAVE_OLDTYPE_0): Fix a typo.
5532 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5534         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5535         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5537 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5539         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5540         correct offset.
5542 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5544         * Makefile (tests): Add tst-cancel19.
5545         * tst-cancel19.c: New test.
5547 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5549         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5550         restoring of the old cancellation type.
5552 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5554         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5556 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5558         * sysdeps/pthread/malloc-machine.h: New file
5560 2003-09-24  Roland McGrath  <roland@redhat.com>
5562         * allocatestack.c (__make_stacks_executable): Don't ignore return
5563         value from _dl_make_stack_executable.
5565 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5567         * allocatestack.c (__make_stacks_executable): Also change
5568         permission of the currently unused stacks.
5570         * allocatestack.c (change_stack_perm): Split out from
5571         __make_stacks_executable.
5572         (allocate_stack): If the required permission changed between the time
5573         we started preparing the stack and queueing it, change the permission.
5574         (__make_stacks_executable): Call change_stack_perm.
5576         * Makefile: Build tst-execstack-mod locally.
5577         * tst-execstack-mod.c: New file.
5579 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5581         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5583 2003-09-23  Roland McGrath  <roland@redhat.com>
5585         * tst-execstack.c: New file.
5586         * Makefile (tests): Add it.
5587         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5588         (LDFLAGS-tst-execstack): New variable.
5590         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5591         whether to use PROT_EXEC for stack mmap.
5592         (__make_stacks_executable): New function.
5593         * pthreadP.h: Declare it.
5594         * init.c (__pthread_initialize_minimal_internal): Set
5595         GL(dl_make_stack_executable_hook) to that.
5597 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5599         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5600         recommendation from AMD re avoidance of lock prefix.
5602 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5604         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5605         lll_futex_timed_wait instead of lll_futex_wait.
5606         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5607         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5608         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5609         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5610         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5611         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5612         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5613         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5614         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5615         Completely revamp the locking macros.  No distinction between
5616         normal and mutex locking anymore.
5617         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5618         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5619         __lll_lock_timedwait): Fix prototypes.
5620         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5621         __lll_lock_timedwait): Likewise.
5622         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5623         macros, add __builtin_expect.
5624         (lll_mutex_timedlock): Likewise.  Fix return value.
5625         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5626         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5627         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5628         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5629         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5630         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5631         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5632         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5634 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5636         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5637         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5638         operation if possible.
5640         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5641         like jumping over the lock prefix.
5643 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5645         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5646         locking macros.  No distinction between normal and mutex locking
5647         anymore.
5648         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5649         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5650         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5651         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5652         locking.  Merge bits from lowlevelmutex.S we still need.
5653         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5654         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5655         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5656         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5657         * Makefile (routines): Remove libc-lowlevelmutex.
5658         (libpthread-rountines): Remove lowlevelmutex.
5659         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5660         for new mutex implementation.
5661         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5663         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5664         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5665         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5666         Likewise.
5667         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5668         Likewise.
5669         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5670         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5671         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5672         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5673         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5675         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5676         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5677         Likewise.
5678         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5679         Likewise.
5680         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5681         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5682         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5683         Don't use requeue.
5684         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5685         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5687 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5689         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5690         in parameters of asm with output parameters.
5692         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5693         type of DECR parameter to int.
5694         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5696 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5698         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5699         guardsize for each thread.
5701 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5703         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5704         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5705         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5707         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5708         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5709         NULL.
5710         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5711         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5712         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5713         (pthread_getaffinity_np): Add hidden_def.
5715         * Makefile (tests): Add tst-attr3.
5716         * tst-attr3.c: New test.
5718         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5720 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5722         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5723         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5725 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5727         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5728         * tst-align.c: Include tst-stack-align.h.
5729         (tf, do_test): Use TEST_STACK_ALIGN macro.
5731 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5733         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5734         variable.
5736 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5738         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5739         stack-related values for the initial thread.
5741 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5743         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5745 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5747         * pthread_mutex_lock.c: Minor code rearrangements.
5749 2003-09-05  Roland McGrath  <roland@redhat.com>
5751         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5752         Instead, include ../nptl_db/db_info.c to do its magic.
5753         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5754         (__pthread_pthread_key_2ndlevel_size): Likewise.
5755         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5756         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5757         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5758         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5759         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5760         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5761         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5762         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5763         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5764         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5765         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5766         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5767         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5768         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5769         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5770         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5771         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5773 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5775         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5776         of pthread_t to be compatible with LT.
5777         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5778         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5779         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5780         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5781         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5782         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5783         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5785 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5787         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5789 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5791         * unwind-forcedunwind.c: Move to...
5792         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5793         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5794         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5795         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5796         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5797         * unwind.c: Include jmpbuf-unwind.h.
5798         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5800 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5802         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5803         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5804         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5805         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5806         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5807         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5808         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5809         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5810         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5811         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5812         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5813         function.
5814         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5815         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5816         * Makefile (tests): Add tst-stack2.
5817         * tst-stack2.c: New test.
5818         * tst-stack1.c: Include limits.h and sys/param.h.
5819         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5821         * pthread_condattr_setpshared.c: Include errno.h.
5822         (pthread_condattr_setpshared): Return EINVAL if pshared
5823         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5825         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5826         defined symbol for entry point to avoid cancellation.
5827         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5828         Likewise.
5829         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5830         Likewise.
5831         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5832         Likewise.
5833         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5834         Likewise.
5835         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5836         Likewise.
5837         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5838         __close_nocancel, __read_nocancel, __write_nocancel,
5839         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5840         libpthread.so or librt.so, define to corresponding function
5841         without _nocancel suffix.
5842         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5843         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5844         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5846         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5848 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5850         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5851         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5853         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5854         in subsections has a symbol associated with it.
5856         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5857         defined symbol for entry point to avoid cancellation.
5858         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5860 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5862         * Makefile (tests): Add tst-tls5.
5863         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5864         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5865         ($(objpfx)tst-tls5): New.
5866         ($(objpfx)tst-tls6.out): Likewise.
5867         (tests): Depend on $(objpfx)tst-tls6.out.
5868         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5869         (do_test): Check pthread_self () return value alignment.
5870         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5871         (tf): Check pthread_self () return value alignment.
5872         * tst-tls5.c: New test.
5873         * tst-tls5.h: New.
5874         * tst-tls5mod.c: New.
5875         * tst-tls5moda.c: New.
5876         * tst-tls5modb.c: New.
5877         * tst-tls5modc.c: New.
5878         * tst-tls5modd.c: New.
5879         * tst-tls5mode.c: New.
5880         * tst-tls5modf.c: New.
5881         * tst-tls6.sh: New test.
5883         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5884         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5885         * init.c (pthread_functions): Initialize them.
5886         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5887         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5888         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5889         pthread_cond_timedwait@@GLIBC_2.3.2.
5891 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5893         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5894         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5895         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5896         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5897         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5898         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5900         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5902         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5903         _POSIX_THREAD_PRIORITY_SCHEDULING.
5904         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5906 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5908         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5909         nested function, use static inline function from libio.h.
5910         Code by Richard Henderson.
5912         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5913         weak.
5915 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5917         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5918         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5919         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5920         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5921         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5922         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5923         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5924         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5925         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5926         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5927         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5928         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5929         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5930         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5931         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5932         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5933         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5934         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5935         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5936         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5937         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5938         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5939         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5940         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5941         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5942         * sysdeps/sparc/tls.h: New file.
5943         * sysdeps/sparc/tcb-offsets.sym: New file.
5944         * sysdeps/sparc/Makefile: New file.
5945         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5946         * init.c [__sparc__] (__NR_set_tid_address): Define.
5948 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5950         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5951         _IO_release_lock): Define.
5953 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5955         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5956         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5958 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5960         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5961         (__pthread_cleanup_class): Add missing return types of member
5962         functions.
5964 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5966         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5967         (lll_mutex_unlock_force): Add memory barrier between store and futex
5968         syscall.
5970 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5972         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5973         tempmsg in first loop.
5975 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5977         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5978         _POSIX_THREAD_PRIORITY_SCHEDULING.
5979         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5981 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5983         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5984         (__rtld_lock_default_lock_recursive,
5985         __rtld_lock_default_unlock_recursive): Define.
5986         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5987         __rtld_lock_unlock_recursive): Define using
5988         GL(_dl_rtld_*lock_recursive).
5989         * init.c (__pthread_initialize_minimal_internal): Initialize
5990         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5991         Lock GL(_dl_load_lock) the same number of times as
5992         GL(_dl_load_lock) using non-mt implementation was nested.
5994         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5995         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5997 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5999         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6000         PIPE_BUF.
6002 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6004         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6006 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6008         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6009         to first syscall error check.  Move syscall error check for tkill
6010         into __ASSUME_CLONE_STOPPED #ifdef.
6012 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6014         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6015         is not defined, do explicit synchronization.
6016         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6017         is not defined also unlock pd->lock for non-debugging case in case
6018         it is necessary.
6019         * pthread_create.c (start_thread): Always get and release pd->lock
6020         if __ASSUME_CLONE_STOPPED is not defined.
6021         (start_thread_debug): Removed.  Adjust users.
6022         * allocatestack.c (allocate_stack): Always initialize lock if
6023         __ASSUME_CLONE_STOPPED is not defined.
6024         * Makefile (tests): Add tst-sched1.
6025         * tst-sched1.c: New file.
6027         * sysdeps/pthread/createthread.c (do_clone): Only use
6028         sched_setschduler and pass correct parameters.
6030 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6032         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6033         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6034         PTHREAD_STACK_MIN in comments.
6036 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6038         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6039         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6040         argument.
6041         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6042         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6043         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6044         (__pthread_cleanup_upto): Fix prototype.
6045         (_longjmp_unwind): Adjust caller.
6046         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6047         Change second argument to const struct pointer.
6048         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6049         * tst-sem9.c (main): Likewise.
6050         * unwind.c: Include string.h for strlen prototype.
6052 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6054         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6055         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6056         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6057         Define HAVE_CMOV.
6058         Patch by Nicholas Miell <nmiell@attbi.com>.
6060 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6062         * init.c (__pthread_initialize_minimal_internal): Initialize
6063         GL(dl_init_static_tls).
6064         * pthreadP.h (__pthread_init_static_tls): New prototype.
6065         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6066         New functions.
6067         * Makefile (tests): Add tst-tls4.
6068         (modules-names): Add tst-tls4moda and tst-tls4modb.
6069         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6070         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6071         tst-tls4modb.so.
6072         * tst-tls4.c: New file.
6073         * tst-tls4moda.c: New file.
6074         * tst-tls4modb.c: New file.
6076 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6078         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6079         before __timer_dealloc.
6080         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6081         Don't call list_unlink.
6083 2003-07-29  Roland McGrath  <roland@redhat.com>
6085         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6087 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6089         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6090         Don't reuse struct aiocb A if it failed.
6091         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6092         not just one byte, as that does not block.
6094 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6096         * sysdeps/pthread/unwind-resume.c: New file.
6097         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6098         unwind-resume in csu subdir.
6099         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6100         exceptions.
6101         (librt-sysdep_routines, librt-shared-only-routines): Add
6102         rt-unwind-resume.
6103         * sysdeps/pthread/rt-unwind-resume.c: New file.
6104         * unwind-forcedunwind.c: New file.
6105         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6106         (libpthread-shared-only-routines): Likewise.
6107         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6108         * pthreadP.h (pthread_cancel_init): New prototype.
6109         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6111         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6112         attr argument const struct pthread_attr *.
6114         * res.c (__res_state): Return __resp.
6115         * descr.h: Include resolv.h.
6116         (struct pthread): Add res field.
6117         * pthread_create.c: Include resolv.h.
6118         (start_thread): Initialize __resp.
6119         * Makefile (tests): Add tst-_res1.
6120         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6121         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6122         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6123         libpthread.
6124         * tst-_res1.c: New file.
6125         * tst-_res1mod1.c: New file.
6126         * tst-_res1mod2.c: New file.
6128 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6130         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6132         * Makefile: Define various *-no-z-defs variables for test DSOs
6133         which has undefined symbols.
6135 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6137         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6138         Retry if the stwcx fails to store once_control.
6140 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6142         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6143         pthread_attr_setaffinity.
6144         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6145         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6146         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6147         * pthread_attr_destroy.c: Free cpuset element if allocated.
6148         * pthread_create.c: Pass iattr as additional parameter to
6149         create_thread.
6150         * sysdeps/pthread/createthread.c: If attribute is provided and
6151         a new thread is created with affinity set or scheduling parameters,
6152         start thread with CLONE_STOPPED.
6153         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6154         pthread_attr_setaffinity.
6155         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6156         cpuset element.
6158 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6160         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6162 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6164         * sysdeps/pthread/configure.in: Require CFI directives also for
6165         ppc and s390.
6167 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6169         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6170         Add cfi directives.
6172 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6174         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6175         CLEANUP_JMP_BUF.
6176         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6177         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6178         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6179         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6180         not self pointer in __writer.  Compare with TID to determine
6181         deadlocks.
6182         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6183         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6184         Likewise.
6185         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6186         Likewise.
6187         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6188         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6189         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6190         macros also when compiling librt.
6192 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6194         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6195         -fasynchronous-unwind-tables.
6196         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6197         (PSEUDO): Add cfi directives.
6198         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6199         Likewise.
6200         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6201         Likewise.
6203 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6205         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6206         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6207         * unwind.c (__pthread_unwind_next): Add hidden_def.
6208         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6209         Likewise.
6210         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6211         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6212         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6213         Likewise.
6214         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6215         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6216         Likewise.
6217         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6218         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6219         __pthread_unregister_cancel and __pthread_unwind_next.
6221 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6223         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6224         different symbol for the cancellation syscall wrapper and
6225         non-cancellation syscall wrapper.
6226         (PSEUDO_END): Define.
6228 2003-07-05  Richard Henderson  <rth@redhat.com>
6230         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6231         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6232         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6233         return actual return value from the syscall, not 0.
6235 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6237         * descr.h (struct pthread): Add pid field.
6238         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6239         (__reclaim_stacks): Likewise.
6240         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6241         also check for PID of the signal source.
6242         (__pthread_initialize_minimal_internal): Also initialize pid field
6243         of initial thread's descriptor.
6244         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6245         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6246         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6247         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6248         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6250 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6252         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6253         Fix use of parameter.
6254         (__libc_cleanup_pop): Likewise.
6256 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6258         * init.c (sigcancel_handler): Change parameters to match handler
6259         for SA_SIGACTION.  Check signal number and code to recognize
6260         invalid invocations.
6262 2003-07-03  Roland McGrath  <roland@redhat.com>
6264         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6265         Apply sizeof (struct pthread) bias to r13 value.
6267 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6269         * sysdeps/pthread/configure.in: Require CFI directives.
6271         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6272         definition.
6273         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6274         libpthread compilation.
6275         * unwind.c (__pthread_unwind): Add hidden_def.
6276         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6278 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6280         * libc-cancellation.c (__libc_cleanup_routine): Define.
6281         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6282         (__pthread_cleanup_pop): Define.
6284 2003-07-01  Richard Henderson  <rth@redhat.com>
6286         * sysdeps/alpha/elf/pt-initfini.c: New file.
6287         * sysdeps/alpha/pthread_spin_lock.S: New file.
6288         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6289         * sysdeps/alpha/pthreaddef.h: New file.
6290         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6291         * sysdeps/alpha/tls.h: New file.
6292         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6293         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6294         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6295         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6296         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6297         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6298         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6299         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6300         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6301         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6303 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6305         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6306         cleanup support and unwind info.
6308 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6310         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6311         Use correct cleanup handler registration.  Add unwind info.
6312         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6313         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6314         * tst-once3.c: Add cleanup handler and check it is called.
6315         * tst-once4.c: Likewise.
6316         * tst-oncex3.c: New file.
6317         * tst-oncex4.c: New file.
6318         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6320 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6322         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6324 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6326         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6327         (tf_msgsnd): Likewise.
6329         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6330         premature returns a bit more.
6332 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6334         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6335         definition to the front.
6337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6338         the cleanup functions to make the names unique.  Fix dwarf opcode
6339         un unwind table.
6340         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6341         functions to make the names unique.  Fix CFA offset for two blocks.
6343 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6345         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6346         missing closing braces.
6347         Patch by Christophe Saout <christophe@saout.de>.
6349 2003-06-24  Roland McGrath  <roland@redhat.com>
6351         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6353 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6355         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6356         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6358         * pthreadP.h: Declare __find_thread_by_id.
6359         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6360         * pthread_clock_gettime.c: Allow using other thread's clock.
6361         * pthread_clock_settime.c: Likewise.
6362         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6363         * Makefile: Add rules to build and run tst-clock2.
6364         * tst-clock2.c: New file.
6366 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6368         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6369         to use exception-based cleanup handler.
6370         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6372         * tst-cond8.c (ch): Announce that we are done.
6374         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6376         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6377         Also test aio_suspend with timeout value.
6379 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6381         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6382         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6383         attribute_hidden.
6385         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6386         (__pthread_mutex_lock_internal): Likewise.
6387         (__pthread_mutex_unlock_internal): Likewise.
6388         (__pthread_mutex_unlock_usercnt): Declare.
6389         * pthread_mutex_destroy.c: Always fail if used in any way.
6390         * pthread_mutex_init.c: Update comment.
6391         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6392         * pthread_mutex_timedlock.c: Adjust __nusers.
6393         * pthread_mutex_trylock.c: Adjust __nusers.
6394         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6395         and public interfaces are wrapper with pass additional parameter.
6396         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6397         parameter zero.
6398         * tst-mutex8.c: New file.
6399         * Makefile (tests): Add tst-mutex8.
6400         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6401         __pthread_mutex_unlock_usercnt.
6402         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6404         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6407         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6408         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6409         Add __nusers.
6410         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6411         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6412         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6413         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6414         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6416         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6417         * pthread_mutex_timedlock.c: Likewise.
6418         * pthread_mutex_trylock.c: Adjust __nusers.
6419         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6420         * tst-mutex9.c: New file.
6421         * Makefile (tests): Add tst-mutex9.
6422         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6423         * sysdeps/ia64/tls.h: Likewise.
6424         * sysdeps/powerpc/tls.h: Likewise.
6425         * sysdeps/s390/tls.h: Likewise.
6426         * sysdeps/sh/tls.h: Likewise.
6427         * sysdeps/x86_64/tls.h: Likewise.
6428         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6429         Change type of __owner.
6430         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6431         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6432         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6433         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6434         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6436 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6438         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6439         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6441         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6442         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6443         instead of nr to lll_futex_wake.  Only set errno and return -1
6444         if err < 0.
6446         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6447         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6448         return actual return value from the syscall, not 0.
6450 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6452         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6453         find a random value.
6454         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6455         errno==EIDRM.
6457         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6458         compat_timer_settime.
6459         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6460         compat_timer_gettime.
6461         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6462         compat_timer_getoverrun.
6463         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6464         compat_timer_delete.
6466         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6467         error-checking mutex detect busy mutexes.
6469 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6471         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6472         Add ax to clobber list.
6473         (lll_mutex_cond_lock): Likewise.
6474         (lll_mutex_unlock): Likewise.
6475         (lll_lock): Likewise.
6476         (lll_unlock): Likewise.
6478         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6479         * tst-cancel18.c: New file.
6480         * tst-cancelx18.c: New file.
6482         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6483         and tcdrain.
6485         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6486         * tst-cancel17.c: New file.
6487         * tst-cancelx17.c: New file.
6489         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6490         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6491         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6493         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6495 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6497         * sysdeps/pthread/createthread.c (create_thread): Set
6498         header.multiple_threads unconditionally.
6499         * allocatestack.c (allocate_stack): Likewise.
6500         * descr.h (struct pthread): Add header.multiple_threads
6501         unconditionally.
6502         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6503         Define for librt.  #error if neither libpthread, libc nor librt.
6504         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6505         Likewise.
6506         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6507         CDISABLE): Likewise.
6508         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6509         CDISABLE): Likewise.
6510         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6511         CDISABLE): Likewise.
6512         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6513         CDISABLE): Likewise.  Access header.multiple_threads outside of
6514         libc and libpthread.
6515         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6516         Likewise.
6517         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6518         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6520 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6522         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6523         Also test early cancellation before the thread reaches the cancellation
6524         point.
6526         * Makefile: Compile forward.c with exceptions.
6528         * sysdeps/unix/sysv/linux/sleep.c: New file.
6530 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6532         * Makefile: Add CFLAGS definition to compile function wrappers
6533         duplicated from libc with exceptions.
6534         * tst-cancel4.c: Also check cancellation handlers.
6536         * Makefile: Add rules to build and run tst-cancel16 and
6537         tst-cancelx16.  Add missing CFLAGS definitions.
6538         * tst-cancel16.c: New file.
6539         * tst-cancelx16.c: New file.
6541 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6543         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6544         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6545         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6546         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6548         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6549         (LIBC_CANCEL_RESET): Likewise.
6550         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6551         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6552         librt-cancellation.
6553         (CFLAGS-libcrt-cancellation.c): Define.
6554         * sysdeps/pthread/librt-cancellation.c: New file.
6555         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6556         macros also when compiling librt.
6557         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6558         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6560         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6561         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6562         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6563         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6565         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6566         compat_timer_create.
6568 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6570         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6572         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6573         __register_atfork.
6574         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6575         Add libc_hidden_def.
6577 2003-06-13  Roland McGrath  <roland@redhat.com>
6579         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6580         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6582 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6584         * allocatestack.c (queue_stack): Always inline.
6585         * ptreadhP.h (__do_cancel): Likewise.
6587 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6589         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6590         a typo.
6592 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6595         (__pthread_cond_signal): Remove incorrect second addition for
6596         cond_lock!=0.
6598 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6601         (__pthread_cond_signal): Use correct futex pointer in
6602         __lll_mutex_lock_wait call.
6604         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6605         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6607 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6609         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6610         cancelable.
6611         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6612         Likewise.
6614         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6615         hand-written CFI generation code.  Since ENTRY/END also initiated
6616         CFI frames this caused two CFI sets to be generated.
6618 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6620         * cleanup_routine.c: New file.
6621         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6622         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6623         cleanup handling.
6624         * Makefile (libpthread-routines): Add cleanup_routine.
6625         Add more CFLAGS variables to compile with exceptions.  Add comments
6626         why which file needs unwind tables.
6627         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6628         tests.
6629         * tst-cancelx1.c: New file.
6630         * tst-cancelx2.c: New file.
6631         * tst-cancelx3.c: New file.
6632         * tst-cancelx4.c: New file.
6633         * tst-cancelx5.c: New file.
6634         * tst-cancelx6.c: New file.
6635         * tst-cancelx7.c: New file.
6636         * tst-cancelx8.c: New file.
6637         * tst-cancelx9.c: New file.
6638         * tst-cancelx10.c: New file.
6639         * tst-cancelx11.c: New file.
6640         * tst-cancelx12.c: New file.
6641         * tst-cancelx13.c: New file.
6642         * tst-cancelx14.c: New file.
6643         * tst-cancelx15.c: New file.
6644         * tst-cleanupx0.c: New file.
6645         * tst-cleanupx0.expect: New file.
6646         * tst-cleanupx1.c: New file.
6647         * tst-cleanupx2.c: New file.
6648         * tst-cleanupx3.c: New file.
6650         * tst-cleanup0.c: Make standard compliant.
6651         * tst-cleanup1.c: Likewise.
6653         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6654         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6655         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6656         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6657         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6658         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6659         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6660         CLEANUP_JMP_BUF.
6661         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6662         * tst-cancel12.c: New file.
6663         * tst-cancel13.c: New file.
6664         * tst-cancel14.c: New file.
6665         * tst-cancel15.c: New file.
6666         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6667         and tst-cancel15.
6669         * tst-cancel1.c: Add some comments.
6671         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6672         timeout correctly.
6674 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6676         * Makefile (CFLAGS-pthread_cancel.c): Define.
6678 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6680         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6681         Change type of __writer element to int.
6682         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6683         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6684         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6685         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6686         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6687         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6688         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6689         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6690         Compare with TID to determine deadlocks.
6691         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6692         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6693         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6694         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6695         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6696         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6697         Likewise.
6698         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6699         Likewise.
6700         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6701         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6702         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6703         Likewise.
6704         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6705         Likewise.
6706         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6707         * Makefile (tests): Add tst-rwlock12.
6708         * tst-rwlock12.c: New file.
6710 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6712         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6713         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6714         Remove bogus hidden_proto.
6715         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6716         Likewise.
6717         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6718         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6719         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6720         ___lll_mutex_timedlock): Likewise.
6722 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6725         (__pthread_cond_signal): Add some code to eventually handle
6726         cond_lock!=0.
6728 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6730         * Makefile (tests): Add tst-exec4.
6731         (tst-exec4-ARGS): Define.
6732         * tst-exec4.c: New file.
6734 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6736         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6737         Also fail if tv_nsec < 0.
6738         (__lll_timedwait_tid): Likewise.
6739         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6740         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6741         Likewise.
6742         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6743         Likewise.
6744         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6745         Likewise.
6746         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6747         Likewise.
6748         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6749         Likewise.
6750         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6751         Likewise.
6753         * Makefile (tests): Add tst-sem8 and tst-sem9.
6754         * tst-sem8.c: New file.
6755         * tst-sem9.c: New file.
6756         * sem_open.c: Fix creation of in_use record if the file exists but
6757         no internal record.
6759         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6760         definitions.
6762         * sysdeps/pthread/timer_create.c (timer_create): In case
6763         evp==NULL, assign timer ID to sival_ptr.
6765         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6766         struct pthread_unwind_buf *.
6767         (struct pthread): Likewise for cleanup_jmp_buf element.
6769         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6770         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6771         * unwind.c (__pthread_unwind_next): Likewise.
6773 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6775         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6776         (lll_futex_timed_wait): Use int for futex value parameter.
6777         (lll_futex_wake): Likewise.
6778         (lll_futex_requeue): Likewise.
6780         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6781         Replace one memory operation with one register operation.
6783         * tst-join4.c (do_test): Fix error message.
6785         * tst-rwlock6.c (do_test): Use correct format specifier.
6787         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6788         (__lll_mutex_lock_wait): Replace one memory operation with one
6789         register operation.
6790         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6791         (__lll_mutex_lock_wait): Likewise.
6793         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6794         (__lll_mutex_cond_lock): Add one to value parameter of
6795         __lll_lock_wait to reflect reality in the futex syscall.
6796         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6797         (lll_mutex_cond_lock): Likewise.
6799 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6801         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6802         New function.
6803         (lll_mutex_cond_lock): Define.
6805 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6807         * Makefile (tests): Add tst-signal6.
6808         * tst-signal6.c: New file.
6810         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6811         (__lll_mutex_unlock_force): New function
6812         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6814         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6815         (__lll_mutex_unlock_force): New function.
6816         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6818         * tst-rwlock7.c (do_test): Use correct format specifier.
6820         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6821         Find break parameter in correct asm argument.
6823 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6825         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6826         Remove out4.
6827         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6828         error occured.
6829         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6830         Add __mutex.
6831         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6832         lll_futex_requeue, lll_mutex_unlock_force): Define.
6834 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6836         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6837         (pthread_cond_t): Add __mutex.
6838         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6839         lll_futex_requeue, lll_mutex_unlock_force): Define.
6841 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6843         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6844         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6845         Add __mutex field.
6846         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6847         Define.
6848         (lll_futex_wait, lll_futex_wake): Define.
6849         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6850         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6851         FUTEX_REQUEUE instead of FUTEX_WAIT.
6852         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6853         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6854         mutex which was used in condvar structure.  Call
6855         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6856         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6858         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6859         include tcb-offsets.h.  Read wakeup value in locked region.
6860         Use the value of gbr register as THREAD_ID.
6861         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6862         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6863         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6865         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6866         macros.
6868 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6870         * sysdeps/pthread/pthread_cond_broadcast.c
6871         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6873 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6875         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6876         typo in register name.
6877         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6878         correctly.  Actually use requeue.  Little optimization.
6879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6880         mutex address early.  Handle cancellation state as 32-bit value.
6881         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6882         Remove unnecessary label.
6884 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6886         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6887         instead of FUTEX_WAIT.
6888         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6891         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6892         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6893         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6894         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6895         of __pthread_mutex_lock_internal.
6896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6897         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6898         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6899         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6900         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6902         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6903         Add pthread_mutex_cond_lock.
6904         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6905         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6906         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6907         lll_mutex_cond_lock.
6908         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6909         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6910         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6911         Add __mutex field.
6912         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6915         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6916         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6918         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6919         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6920         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6921         macro don't define aliases.
6923         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6924         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6925         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6926         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6928         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6929         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6930         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6931         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6933 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6935         * sem_open.c: Fix one endless loop.  Implement correct semantics
6936         wrt opening the same semaphore more then once.
6937         * sem_close.c: Adjust for sem_open change.
6938         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6939         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6940         * Makefile (tests): Add tst-sem7.
6941         * tst-sem7.c: New file.
6943 2003-05-16  Roland McGrath  <roland@redhat.com>
6945         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6946         uninitialized variable braino.
6948 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6950         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6951         test for syscall availability.
6953         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6954         __no_posix_timers to -1 if the syscalls don't exist.
6956         * pthread_join.c (pthread_join): Set tid field of the joined
6957         thread to -1.  This isn't necessary but helps to recognize some
6958         error conditions with almost no cost.
6960         * allocatestack.c (FREE_P): Also negative values indicate an
6961         unused stack.
6963         * unwind.c: Include <unistd.h>.
6965 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6967         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6969 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6971         * Makefile (crti-objs, crtn-objs): New variables.
6972         (omit-deps, extra-objs): Add crtn.
6973         ($(objpfx)libpthread.so): Depend on both crti and crtn
6974         and links to them in multidir.
6975         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6977 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6979         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6980         (lll_mutex_unlock): Use atomic_exchange_rel.
6982 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6984         * cond-perf.c (cons): Add missing locking around setting of alldone.
6986 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6988         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6989         related macros.
6990         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6992 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6994         * tst-sem6.c: New file.
6995         * Makefile (tests): Add tst-sem6.
6997         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6998         Use atomic_exchange_rel instead of atomic_exchange.
6999         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7000         Likewise.
7002         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7003         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7004         vsyscall is possible.
7006         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7007         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7008         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7009         pthread_setaffinity_np.
7010         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7011         and pthread_setaffinity_np.
7012         * Makefile (libpthread-routines): Add pthread_getaffinity and
7013         pthread_setaffinity.
7015         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7016         use it in case mmap to allocate the stack fails.
7017         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7018         ARCH_MAP_FLAGS here.
7019         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7020         ARCH_RETRY_MMAP.
7022 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7024         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7025         handler implementation.  It is now lockless in fork().
7026         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7027         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7028         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7029         declare the __fork_*_lists.
7030         (struct fork_handler): Include pointers to all three functions.
7031         Add next, refcntr and need_signal elements.
7032         (__fork_handlers): New declaration.
7033         (__register_atfork_malloc): Remove declaration.
7034         (HAVE_register_atfork_malloc): Remove definition.
7035         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7036         __pthread_child_handler variable.
7037         (__libc_pthread_init): Use __register_atfork instead of explicitly
7038         adding to the list.
7039         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7040         and lll_futex_wake.
7041         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7043         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7044         function must never be reached.
7046         * cond-perf.c: New file.
7048 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7050         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7052 2003-05-04  Roland McGrath  <roland@redhat.com>
7054         * Makefile ($(objpfx)../libc.so): New target.
7056 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7058         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7059         (pthread_condattr_t): Size is only an int, don't use long for
7060         alignment.
7061         (pthread_mutexattr_t): Likewise.
7062         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7063         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7064         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7066 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7068         * sysdeps/i386/tls.h: Define THREAD_ID.
7069         * sysdeps/ia64/tls.h: Likewise.
7070         * sysdeps/powerpc/tls.h: Likewise.
7071         * sysdeps/s390/tls.h: Likewise.
7072         * sysdeps/sh/tls.h: Likewise.
7073         * sysdeps/x86_64/tls.h: Likewise.
7074         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7075         record ownership.
7076         * pthread_mutex_timedlock.c: Likewise.
7077         * pthread_mutex_trylock.c: Likewise.
7078         * pthread_mutex_unlock.c: Likewise.
7079         * pthread_rwlock_trywrlock.c: Likewise.
7080         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7081         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7082         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7083         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7085         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7086         flag.
7088 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7090         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7091         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7092         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7093         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7094         Make __align long long instead of long.
7095         (pthread_rwlock_t): Formatting.
7096         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7097         (pthread_rwlock_t): Formatting.
7098         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7099         (pthread_cond_t): Make __align long long instead of long.
7100         (pthread_rwlock_t): Move __flags field to the same position as in
7101         linuxthreads.
7103 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7105         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7106         * tst-rwlock7.c (do_test): Likewise.
7108 2003-04-26  Roland McGrath  <roland@redhat.com>
7110         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7112 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7114         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7115         sizeof (struct pthread).
7116         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7117         1 struct pthread.
7118         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7119         to 0.
7120         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7121         struct pthread.
7122         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7123         to 32-bit bytes.
7124         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7125         tcbp.
7126         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7127         unneccessarily.
7128         (NO_TLS_OFFSET): Define.
7129         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7130         add TLS_TCB_SIZE unnecessarily.
7132 2003-04-22  Roland McGrath  <roland@redhat.com>
7134         * Makeconfig (shared-thread-library): Reverse link order to work
7135         around linker bug.
7137 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7139         * semaphore.h: Fix typo in comment.
7141 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7143         * sysdeps/pthread/sigfillset.c: New file.
7145         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7146         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7147         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7148         * sysdeps/pthread/sigaction.c: Likewise.
7149         * sysdeps/pthread/sigprocmask.c: New file.
7150         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7151         __SIGRTMIN+1.
7152         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7153         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7154         in this case.
7156 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7158         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7159         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7161         * sysdeps/unix/sysv/linux/unregister-atfork.c
7162         (__unregister_atfork): Don't free memory not allocated dynamically.
7164         * semaphore.h: Remove __THROW marker from cancellation points.
7165         * nptl/sysdeps/pthread/pthread.h: Likewise.
7167 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7169         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7170         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7171         __THROW.
7173 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7175         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7177 2003-04-15  Roland McGrath  <roland@redhat.com>
7179         * forward.c (__pthread_unwind): Tweak to avoid warning.
7181 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7183         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7185 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7187         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7188         overflow CFA advance instructions.
7189         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7191 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7193         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7194         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7195         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7196         defined.
7198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7199         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7200         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7201         DW_CFA_advance_loc for .Laddl-.Lsubl.
7203 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7205         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7206         position-independent unwind data for static libraries.
7207         Add missing unwind info.  Add comments.
7209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7211         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7212         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7214 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7216         * Makefile: Make sure all cancellation points are compiled with
7217         exception and asynchronous unwind tables.
7219         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7220         which mishandles loading of global object addresses in PIC.
7221         (THREAD_SETMEM_NC): Likewise.
7223 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7225         * pthread.h: Define new data structure for cleanup buffer.  Declare
7226         new cleanup handler interfaces.
7227         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7228         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7229         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7230         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7231         it.  Declare old cleanup handler installation functions.
7232         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7233         handling.
7234         * cleanup_defer.c: Likewise.
7235         * cleanup_compat.c: New file.  Old cleanup code.
7236         * cleanup_def_compat.c: New file.  Old cleanup code.
7237         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7238         if own thread descriptor.
7239         * unwind.c: New file.
7240         * forward.c: Add __pthread_unwind.
7241         * init.c (pthread_functions): Add __pthread_unwind.
7242         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7243         Add ptr___pthread_unwind.
7244         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7245         and unwind function.
7246         * Makefile (libpthread-routines): Add cleanup_compat,
7247         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7248         table generation if necessary.
7249         * version.c: Record whether unwind support is compiled in.
7250         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7251         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7252         handler interfaces.
7253         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7254         complication to generate unwind information for syscall wrappers.
7255         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7256         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7257         __cleanup_fct_attribute.
7259         * Makefile: Add rules to build and run tst-cleanup0.
7260         * tst-cleanup0.c: New file.
7261         * tst-cleanup0.expect: New file.
7263         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7264         caller.  Optimize to avoid often unecessary local variable.
7266 2003-04-11  Roland McGrath  <roland@redhat.com>
7268         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7269         sets variable `multidir'; include that.
7270         (generated): Add it.
7271         ($(objpfx)$(multidir)/crti.o): New target.
7272         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7274 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7276         * tst-attr2.c (do_test): Add cast to avoid warning.
7277         * tst-mutex4.c (do_test): Likewise.
7279 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7281         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7282         in child.
7284 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7286         * Makefile (tests): Add tst-detach1.
7287         * tst-detach1.c: New file.
7289 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7291         * sysdeps/pthread/pthread.h: Remove duplicate
7292         pthread_cleanup_{push,pop} definitions.
7294         * tst-barrier2.c: Eliminate warnings.
7295         * tst-cancel4.c: Likewise.
7296         * tst-cond4.c: Likewise.
7297         * tst-cond6.c: Likewise.
7298         * tst-detach1.c: Likewise.
7299         * tst-rwlock4.c: Likewise.
7300         * tst-rwlock6.c: Likewise.
7301         * tst-rwlock7.c: Likewise.
7302         * tst-sem3.c: Likewise.
7303         * tst-spin2.c: Likewise.
7304         * tst-umask1.c: Likewise.
7306 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7308         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7310 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7312         * descr.h (struct pthread): Move cancelhandling member to the front.
7314 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7316         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7317         malloc_parent, and malloc_child statically.
7318         (__register_atfork_malloc): New function.
7319         (free_mem): Don't free any of the malloc_* variables on the list.
7320         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7321         Define HAVE_register_atfork_malloc.
7323 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7325         * sysdeps/pthread/createthread.c (create_thread): Add some more
7326         comments explaining when to set multiple_threads and when not.
7328         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7329         THREAD_ATOMIC_BIT_SET if not already defined.
7330         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7331         THREAD_ATOMIC_BIT_SET:
7332         * sysdeps/x86_64/tls.h: Likewise.
7333         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7334         THREAD_ATOMIC_CMPXCHG_VAL.
7335         (_pthread_cleanup_pop_restore): Likewise.
7336         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7337         (__pthread_enable_asynccancel_2): Likewise.
7338         (__pthread_disable_asynccancel): Likewise.
7339         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7340         (__libc_disable_asynccancel): Likewise.
7341         * init.c (sigcancel_handler): Likewise.
7342         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7343         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7345 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7347         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7348         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7349         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7350         * Makefile (tests): Add tst-cancel11.
7351         * tst-cancel11.c: New file.
7353 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7355         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7356         round, not the first.  Use specific_used flag instead of local
7357         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7358         (__free_tcb): Don't call deallocate_tsd here.
7359         (start_thread): Call deallocate_tsd here.
7360         * pthread_setspecific.c: Set specific_used flag really only when
7361         needed.
7362         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7363         * tst-tsd3.c: New file.
7364         * tst-tsd4.c: New file.
7366 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7368         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7369         Use atomic_exchange_and_add instead of __lll_add.
7370         (__lll_mutex_timedlock): Likewise.
7371         Patch by Ian Wienand.
7373 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7375         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7376         (SINGLE_THREAD_P): Fix typo.
7377         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7379 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7381         * Makefile (tests): Add tst-align.
7382         * tst-align.c: New file.
7383         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7385         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7386         function correctly.
7388         * tst-tsd2.c: Add casts to avoid warnings.
7390 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7392         * descr.h (struct pthread): Move most often used elements to the front.
7394 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7396         * Makefile (libpthread-routines): Add pthread_atfork.
7397         (libpthread-static-only-routines): Add pthread_atfork.
7399 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7401         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7402         of TLS_DTV_AT_TP.
7403         (INSTALL_DTV): Add parens.
7404         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7405         Use passed descr instead of THREAD_SELF.
7406         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7407         (__lll_mutex_timedlock_wait): Correct expected value after
7408         spurious wakeup.
7409         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7410         Release lock before waking up the waiters.
7411         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7412         criteria.  Reorderstruct passed to cleanup handler.  Fix
7413         handling of cancellation and failung pthread_mutex_unlock call.
7414         Use __pthread_enable_asynccancel_2 instead of
7415         __pthread_enable_asynccancel.
7416         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7417         Return result of lock re-get if it fails.
7418         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7419         for __pthread_cleanup_push.
7420         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7421         completely broken rwlock implementation.
7422         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7423         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7424         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7425         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7426         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7427         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7428         versioned_symbol macro.
7429         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7430         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7432 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7434         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7435         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7436         and __helper_tid.
7437         (struct timer): Remove th and bar field.
7438         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7439         debugging code.  Create only one helper thread.
7440         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7441         helper thread.
7442         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7443         Renamed.  Define statically.  Use thread info from siginfo.
7444         (__helper_once): New variable.
7445         (__helper_tid): New variable.
7446         (__reset_helper_control): New function.
7447         (__start_helper_thread): New function.
7449         * pthread_create.c (start_thread): Don't use setjmp inside
7450         __builtin_expect to work around gcc bug.
7452         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7453         timer_delete syscall fails, but not with ENOSYS, set
7454         __no_posix_timers.
7456         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7457         (timer_settime): Fix typo.
7458         * sysdeps/unix/sysv/linux/timer_getoverr.c
7459         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7461 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7463         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7464         offset of cleanupbuf.__prev.
7466 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7468         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7469         of included file.
7471 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7473         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7474         NULL provide default definition to syscall.
7476 2003-03-25  Roland McGrath  <roland@redhat.com>
7478         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7479         (timer_id2ptr): Fix typo.
7481 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7483         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7484         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7485         * sysdeps/ia64/pthreaddef.h: Likewise.
7486         * sysdeps/powerpc/pthreaddef.h: Likewise.
7487         * sysdeps/s390/pthreaddef.h: Likewise.
7488         * sysdeps/sh/pthreaddef.h: Likewise.
7489         * sysdeps/x86_64/pthreaddef.h: Likewise.
7490         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7491         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7492         being changed.
7493         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7494         SIGTIMER is not unblocked.
7495         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7496         RT signal taken.
7497         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7498         be send.
7499         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7500         pass pointer through as ID.
7501         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7502         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7503         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7504         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7505         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7506         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7507         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7508         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7509         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7510         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7511         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7512         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7513         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7514         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7515         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7516         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7517         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7518         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7519         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7520         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7521         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7522         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7523         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7524         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7525         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7526         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7527         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7528         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7529         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7530         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7531         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7532         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7533         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7535         * pthreadP.h: Remove FRAME_LEFT definition.
7536         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7537         already left frame.  Programs which have this problem are not POSIX
7538         compliant.
7539         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7541 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7543         * sysdeps/pthread/tst-timer.c: Check return values of the
7544         functions we test.
7546 2003-03-23  Roland McGrath  <roland@redhat.com>
7548         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7549         * tst-tls3mod.c: Likewise.
7550         * tst-tls1.c: Likewise.
7551         * tst-tls2.c: Likewise.
7553         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7554         undefined behavior.
7556         * tst-join5.c (tf1, tf2): Add a cast.
7558         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7560         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7561         Don't test anything.
7562         * tst-cond4.c: Likewise.
7563         * tst-cond6.c: Likewise.
7564         * tst-flock2.c: Likewise.
7565         * tst-mutex4.c: Likewise.
7566         * tst-rwlock4.c: Likewise.
7567         * tst-signal1.c: Likewise.
7568         * tst-spin2.c: Likewise.
7569         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7571         * tst-mutex4.c: Use test-skeleton.c.
7572         * tst-spin2.c: Likewise.
7573         * tst-sysconf.c: Likewise.
7574         * tst-barrier2.c: Likewise.
7575         * tst-cond4.c: Likewise.
7576         * tst-cond6.c: Likewise.
7577         * tst-rwlock4.c: Likewise.
7578         * tst-unload.c: Likewise.
7579         * tst-flock2.c (do_test): Use return instead of exit.
7581 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7583         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7585 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7587         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7588         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7589         instead of __lll_compare_and_swap.
7590         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7591         Likewise.
7592         Removed definition if __lll_compare_and_swap.
7594         * cancellation.c: Adjust for new form of compare&exchange macros.
7595         * cleanup_defer.c: Likewise.
7596         * init.c: Likewise.
7597         * libc-cancellation.c: Likewise.
7598         * old_pthread_cond_broadcast.c: Likewise.
7599         * old_pthread_cond_signal.c: Likewise.
7600         * old_pthread_cond_timedwait.c: Likewise.
7601         * old_pthread_cond_wait.c: Likewise.
7602         * pthread_cancel.c: Likewise.
7603         * pthread_create.c: Likewise.
7604         * pthread_detach.c: Likewise.
7605         * pthread_join.c: Likewise.
7606         * pthread_key_delete.c: Likewise.
7607         * pthread_setcancelstate.c: Likewise.
7608         * pthread_setcanceltype.c: Likewise.
7609         * pthread_timedjoin.c: Likewise.
7610         * pthread_tryjoin.c: Likewise.
7611         * sysdeps/pthread/createthread.c: Likewise.
7613 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7615         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7616         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7617         definitions.  Replace uses with calls to atomic_* functions.
7618         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7619         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7620         __lll_test_and_set calls with atomic_exchange_and_add and
7621         atomic_exchange calls respectively.
7622         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7623         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7624         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7625         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7626         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7627         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7628         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7630         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7631         returns the old value.
7633 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7635         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7636         int for variable OLDVAL and correct inline assembler contraint.
7637         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7638         type int for variable OLD.
7640         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7641         only for s390-32.
7642         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7643         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7644         instead of multiple_threads field in the TCB.
7646 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7648         * sysdeps/i386/i686/bits/atomic.h: Removed.
7649         * sysdeps/i386/i586/bits/atomic.h: Removed.
7650         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7651         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7652         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7653         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7654         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7655         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7656         * atomic.h: Removed.  Moved to glibc.
7658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7659         support for clock selection.
7661         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7662         signalling waiters.
7664 2003-03-18  Roland McGrath  <roland@redhat.com>
7666         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7667         Add __lll_rel_instr first.  Add memory clobber.
7668         (lll_mutex_unlock): Use __lll_test_and_set.
7669         From Paul Mackerras <paulus@samba.org>.
7671         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7672         unconditionally.
7673         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7674         (SINGLE_THREAD_P):  Add `header.' prefix.
7675         From Paul Mackerras <paulus@samba.org>.
7677         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7678         pthread_timedjoin_np to ...
7679         (libpthread: GLIBC_2.3.3): ... here.
7680         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7682         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7683         Avoid shadowing VAL variable.
7685         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7686         New macro.
7688 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7690         * Makefile (tests): Add tst-cond11.
7691         * tst-cond11.c: New file.
7693         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7694         struct passed to cleanup handler to eliminate one more
7695         instruction.
7696         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7698         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7699         (pthrad_cond_t): Replace __unused field with __clock.
7701         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7702         waken all waiters in cleanup handler.
7703         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7706         * pthread_condattr_getclock.c: New file.
7707         * pthread_condattr_setclock.c: New file.
7708         * sysdeps/pthread/pthread.h: Declare these new functions.
7709         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7710         * Makefile (libpthread-routines): Add the new functions.
7711         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7712         Renamed field to value.  Document use of the bits.
7713         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7714         change.
7715         * pthread_condattr_setpshared.c: Likewise.
7716         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7717         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7718         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7719         Add __clock field.
7720         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7721         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7722         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7723         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7725         Implement clock selection.
7726         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7727         * pthread-errnos.sym: Add ENOSYS.
7728         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7729         _POSIX_CLOCK_SELECTION.
7730         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7732         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7733         invalid .size directive.
7735 2003-03-17  Roland McGrath  <roland@redhat.com>
7737         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7738         Formatting tweaks.
7740 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7742         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7743         Use __lll_add instead of spelling it out.  Use protected symbol names.
7744         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7745         Use __lll_add.
7746         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7747         Renamed from lll_compare_and_swap.  Use new name where necessary.
7748         (__lll_add): Defined.
7749         (__lll_dec_if_positive): Defined.
7750         (__lll_test_and_set): Defined.
7751         * sysdeps/ia64/pthread_spin_init.c: Removed.
7752         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7753         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7754         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7755         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7756         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7757         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7758         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7759         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7760         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7761         __sync_lock_release_si.
7762         Patch by Jakub Jelinek.
7764         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7765         Fix timeout handling.
7766         (__lll_timedwait_tid): Likewise.
7767         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7768         Patch by Jakub Jelinek.
7770         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7772 2003-03-17  Roland McGrath  <roland@redhat.com>
7774         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7775         * sysdeps/pthread/pthread_spin_init.c: New file.
7776         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7777         * sysdeps/powerpc/Makefile: New file.
7778         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7779         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7780         * sysdeps/powerpc/pthreaddef.h: New file.
7781         * sysdeps/powerpc/tcb-offsets.sym: New file.
7782         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7783         * sysdeps/powerpc/tls.h: New file.
7784         * sysdeps/powerpc/bits/atomic.h: New file.
7785         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7786         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7787         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7789         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7790         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7791         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7792         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7793         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7794         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7795         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7796         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7797         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7798         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7799         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7800         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7801         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7802         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7803         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7805         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7806         not gettimeofday.
7807         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7808         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7809         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7810         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7811         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7813 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7815         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7816         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7817         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7818         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7819         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7821 2003-03-16  Roland McGrath  <roland@redhat.com>
7823         * tst-fork4.c: Include <string.h>.
7824         * tst-signal2.c: Likewise.
7825         * tst-mutex5.c (do_test): exit -> return.
7826         * tst-mutex2.c: Include <stdlib.h>.
7828 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7830         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7831         (__lll_mutex_timedlock_wait): Correct expected value after
7832         spurious wakeup.  Otherwise we would never wait again.
7834         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7835         zone versus inline asm stupidity.  Use correct instructions.
7837         * tst-rwlock6.c: Add some more status output.
7839 2003-03-15  Roland McGrath  <roland@redhat.com>
7841         * sysdeps/pthread/configure.in: New file.
7842         * sysdeps/pthread/configure: New file (generated).
7844 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7846         * allocatestack.c (allocate_stack): Store the exact stack size of
7847         user allocated stacks.
7849 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7851         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7852         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7853         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7854         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7855         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7856         Use `header.' prefix.
7857         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7859 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7861         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7862         __builtin_frame_address, use stack pointer.
7864         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7865         instead of __builtin_frame_pointer.
7867 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7869         * tst-basic1.c (do_test): Add cast to avoid warning.
7870         * tst-basic2.c (do_test): Likewise.
7872         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7873         amount of stack correction.
7875         * tst-fork4.c: Use test-skeleton.c.
7877 2003-03-14  Roland McGrath  <roland@redhat.com>
7879         * init.c: Fix typo "#eli" for "#else".
7881 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7883         * allocatestack.c (__stack_user): Use hidden_data_def.
7884         * pthread_create.c (__pthread_keys): Likewise.
7886         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7888 2003-03-14  Roland McGrath  <roland@redhat.com>
7890         * tst-fork4.c: New file.
7891         * Makefile (tests): Add it.
7893         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7894         we always define the padding space.
7895         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7896         stopped supporting its own extensions fully.
7897         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7898         struct also called `header', so `header.multiple_threads' is the field
7899         name to use on all machines.
7900         * allocatestack.c (allocate_stack): Use `header.' prefix.
7901         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7902         * pthread_create.c (__pthread_create_2_1): Likewise.
7903         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7904         (THREAD_SELF): Likewise.
7905         * sysdeps/x86_64/tls.h: Likewise.
7906         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7907         (SINGLE_THREAD_P): Likewise.
7908         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7909         (SINGLE_THREAD_P): Likewise.
7910         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7911         (SINGLE_THREAD_P): Likewise.
7913         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7914         value directly.
7916 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7918         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7919         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7921         * pthread_create.c (start_thread): setjmp is expected to return 0.
7923         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7924         (THREAD_GETMEM_NC): Likewise.
7926 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7928         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7929         and the size of the stack which must be allocated is a multiple,
7930         allocate one more page.
7931         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7932         MULTI_PAGE_ALIASING.
7934 2003-03-13  Roland McGrath  <roland@redhat.com>
7936         * pthread_create.c (start_thread): Set EXITING_BIT after the
7937         event-reporting (and destructors), not before.
7939 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7941         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7942         lll_futex_wake): Declare register variables as long int instead of
7943         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7944         Make syscall arguments clobbered by the syscall.
7945         (lll_futex_wait): Define using lll_futex_timed_wait.
7947         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7948         to void *.
7950         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7951         PPID if [! NDEBUG].
7953         * allocatestack.c (nptl_ncreated): Only declare if
7954         COLORING_INCREMENT != 0.
7956         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7957         (__libc_enable_asynccancel_2): Remove prototype.
7959         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7960         ctid to match kernel.
7962 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7964         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7965         libc_multiple_threads.
7966         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7967         __libc_multiple_threads to...
7968         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7970         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7971         versioning.
7972         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7973         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7975         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7976         (__pthread_once_internal): Define.
7978         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7979         macros instead of .symver directly.
7980         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7981         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7983         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7984         * sysdeps/x86_64/tcb-offsets.sym: New file.
7985         * sysdeps/x86_64/Makefile: New file.
7987         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7988         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7989         to access own pthread_t in TCB.
7990         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7991         Likewise.
7992         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7993         Likewise.
7994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7996 2003-03-12  Roland McGrath  <roland@redhat.com>
7998         * pthread-errnos.sym: New file.
7999         * Makefile (gen-as-const-headers): New variable, list that file.
8000         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8001         header <pthread-errnos.h> instead of defining errno values here.
8002         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8003         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8004         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8006         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8007         Likewise.
8008         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8009         Likewise.
8010         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8011         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8012         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8013         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8014         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8015         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8016         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8017         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8018         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8019         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8020         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8021         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8022         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8023         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8024         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8025         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8026         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8027         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8028         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8029         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8030         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8031         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8032         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8033         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8034         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8035         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8036         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8038         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8039         CLONE_CHILD_SETTID worked.
8041 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8043         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8044         file.
8045         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8046         file.
8048         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8049         (pthread_cond_t): Add padding.
8051         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8052         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8053         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8055         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8056         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8058         (__pthread_rwlock_timedrdlock): Likewise.
8059         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8060         (__pthread_rwlock_wrlock): Likewise.
8061         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8062         (__pthread_rwlock_rdlock): Likewise.
8064         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8066         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8067         result of lock re-get if it fails.
8069 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8071         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8072         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8073         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8075         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8076         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8077         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8078         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8079         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8080         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8082         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8083         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8085         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8086         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8087         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8088         (create_thread): Likewise.
8089         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8090         * init.c (__pthread_initialize_minimal_internal): Initialize
8091         __libc_multiple_threads_ptr if necessary.
8092         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8093         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8094         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8095         __libc_multiple_threads.
8096         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8097         necessary.
8099         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8100         (THREAD_SETMEM_NC): Likewise.
8102         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8103         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8104         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8105         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8107         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8108         Eliminate one entire instruction.
8110         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8111         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8112         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8113         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8114         instead of __pthread_enable_asynccancel.
8115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8116         (__pthread_cond_wait): Likewise.
8117         * sysdeps/pthread/pthread_cond_timedwait.c
8118         (__pthread_cond_timedwait): Likewise.
8119         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8121         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8122         (__condvar_cleanup): Wake up all waiters in case we got signaled
8123         after being woken up but before disabling asynchronous
8124         cancellation.
8125         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8126         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8127         (__condvar_cleanup): Likewise.
8129         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8130         Make it an error if architecture has no #if case.  Add x86-64.
8132         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8133         pt-initfini.s generation.
8135         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8136         (TLS_INIT_TP): Fix typo.
8138 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8140         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8141         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8143         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8144         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8145         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8146         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8147         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8148         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8149         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8150         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8152 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8154         * sysdeps/pthread/pthread_cond_timedwait.c
8155         (__pthread_cond_timedwait): Return the result of the final
8156         locking.  If it succeeds, the regular function return value.
8158         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8159         Return result of the final locking.
8160         * version.c (__nptl_main): Work around problems with the strange
8161         INTERNAL_SYSCALL macro on ppc32.
8162         * init.c (__pthread_initialize_minimal_internal): Unblock
8163         SIGCANCEL in case the parent blocked it.
8164         Reported by Paul Mackerras <paulus@samba.org>.
8166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8167         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8170 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8172         * sysdeps/pthread/pthread_cond_timedwait.c
8173         (__pthread_cond_timedwait): Unlock and fail if
8174         __pthread_mutex_unlock_internal failed.
8176         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8177         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8178         Use ARCH_CLONE.
8179         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8180         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8181         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8182         ALLOCATE_STACK): New macros.
8183         (TLS_TPADJ): New macro.
8184         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8185         (allocate_stack): Handle TLS_DTV_AT_TP and
8186         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8187         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8188         Don't set PD->self.
8189         * init.c [__ia64__] (__NR_set_tid_address): Define.
8191         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8192         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8193         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8194         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8195         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8196         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8197         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8198         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8199         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8200         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8201         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8202         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8203         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8204         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8205         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8206         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8207         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8208         * sysdeps/ia64/bits/atomic.h: New file.
8209         * sysdeps/ia64/Makefile: New file.
8210         * sysdeps/ia64/pthread_spin_init.c: New file.
8211         * sysdeps/ia64/pthread_spin_lock.c: New file.
8212         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8213         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8214         * sysdeps/ia64/pthreaddef.h: New file.
8215         * sysdeps/ia64/tcb-offsets.sym: New file.
8216         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8217         * sysdeps/ia64/tls.h: New file.
8219         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8220         to syscall instead of no arguments.
8222 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8224         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8225         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8226         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8227         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8229         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8230         unused code.
8232         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8234         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8235         lowlevelbarrier.sym.
8236         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8237         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8238         Include lowlevelbarrier.h and don't define offsets locally.
8239         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8242         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8243         (__lll_mutex_timedlock_wait): Likewise.
8244         (lll_mutex_lock): Adjust asm for that.
8245         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8246         (lll_lock): Adjust asm for operand order change.
8247         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8248         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8251         Reverse order of parameters.
8252         (__lll_timedwait_tid): Remove regparms attribute.
8253         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8254         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8256         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8257         (__lll_timedwait_tid): Remove one unnecessary instruction.
8259         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8260         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8261         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8262         lowlevelmutex.S.
8264         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8265         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8266         for NOT_IN_libc.
8267         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8268         lowlevellock.S.
8270         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8271         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8272         for libc.so.
8273         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8274         define LOCK here (if UP is not defined).  The actual code is in
8275         lowlevelmutex.S.
8277         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8278         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8279         __lll_timedwait_tid for libc.so.
8280         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8281         define LOCK here (if UP is not defined).  The actual code is in
8282         lowlevellock.S.
8284         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8285         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8286         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8287         instead of lowlevelsem.h.
8288         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8289         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8290         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8292         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8293         lowlevelrwlock.sym.
8294         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8295         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8296         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8298         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8299         register loading.
8300         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8301         last changed.  D'oh.
8303         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8305         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8306         of __libc_locking_needed.
8307         (lll_trylock): Initialize %eax to zero.
8309         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8310         pthread_cond_t definition.
8312 2003-03-10  Roland McGrath  <roland@redhat.com>
8314         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8315         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8316         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8317         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8318         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8320         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8321         Instead of setting PD->multiple_threads, set globals
8322         __pthread_multiple_threads and __libc_multiple_threads.
8323         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8324         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8325         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8327         * descr.h (struct pthread): Conditionalize first member on
8328         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8329         containing an anonymous tcbhead_t.  Move `list' member out.
8330         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8331         * allocatestack.c: Remove use of `header.data.' prefix.
8332         * pthread_create.c: Likewise.
8333         * init.c (__pthread_initialize_minimal_internal): Likewise.
8334         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8335         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8336         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8337         * sysdeps/x86_64/tls.h: Likewise.
8338         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8339         (SINGLE_THREAD_P): Likewise.
8340         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8341         (SINGLE_THREAD_P): Likewise.
8342         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8343         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8345 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8347         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8349         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8350         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8352         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8353         leftovers from the ia32 code.
8355         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8356         memory load.
8357         (clear_once_control): Don't load %esi.
8359         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8360         handling.
8362         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8364         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8365         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8367         * Makefile (tests): Add tst-cond10.
8368         * tst-cond10.c: New file.
8370 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8372         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8373         * tst-signal3.c (do_test): Likewise.
8374         * tst-sem5.c (do_test): Likewise.
8375         * tst-kill6.c (do_test): Likewise.
8376         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8378         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8379         of inc/dec.
8380         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8381         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8382         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8383         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8384         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8385         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8386         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8387         Likewise.
8388         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8389         Likewise.
8390         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8391         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8392         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8393         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8394         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8395         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8396         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8397         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8399         * allocatestack.c (allocate_stack): If mprotect() fails free the
8400         TLS memory.
8402 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8404         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8406         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8407         lll_wake_tid.  This was used only to work around kernel limits in
8408         the early days.
8409         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8410         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8411         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8412         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8414         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8415         (__pthread_initialize_minimal_internal): Change initialization of
8416         __static_tls_align_m1 appropriately.
8417         * pthreadP.h (__static_tls_align_m1): Renamed from
8418         __static_tls_align.
8419         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8420         instead of __static_tls_align-1.
8422 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8424         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8426         * pthread_create.c: Define __pthread_keys using nocommon
8427         attribute, not by placing it explicitly in bss.
8428         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8430         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8431         Use it in mmap call to allocate stacks.
8433         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8435         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8436         result of the thread function.
8438 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8440         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8441         version is just fine.
8443         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8444         (__pthread_child_handler): Renamed from pthread_child_handler,
8445         exported, and marked hidden.  Change all users.
8446         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8447         free __pthread_child_handler from child list.
8449 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8451         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8453         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8454         Fix handling of cancellation and failing pthread_mutex_unlock call.
8455         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8456         (__pthread_cond_wait): Likewise.
8458         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8459         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8460         lll_futex_timed_wait call.
8461         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8462         (pthread_rwlock_timedwrlock): Likewise.
8464         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8465         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8466         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8468         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8469         check of lll_futex_wake return value.
8471 2003-03-03  Roland McGrath  <roland@redhat.com>
8473         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8475         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8476         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8477         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8479 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8481         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8482         error for CPU clocks.
8484         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8485         _POSIX_MONOTONIC_CLOCK.
8486         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8488         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8489         recent kernels.
8491 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8493         * descr.h (struct pthread): Move cleanup field to the front.
8495 2003-03-01  Roland McGrath  <roland@redhat.com>
8497         * sem_open.c (sem_open): Braino fix.
8499 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8501         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8502         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8503         __pthread_cleanup_pop functionality.
8504         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8506         * descr.h (struct pthread): Move tid field to the front now that
8507         it is often used.
8509         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8510         (__lll_mutex_timedlock_wait): Remove.
8511         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8512         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8513         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8514         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8515         (lll_unlock_wake_cb): Don't save and restore %esi.
8516         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8517         %esi.
8518         (__lll_timedwait_tid): Add alignment.
8519         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8520         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8521         %esi.
8522         (__lll_timedwait_tid): Removed.
8523         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8524         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8525         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8526         (pthread_barrier_wait): Don't save, load, and restore %esi for
8527         last thread.
8528         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8529         (__pthread_cond_signal): Don't save, load, and restore %esi.
8530         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8531         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8532         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8533         Don't save, load, and restore %esi.
8535 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8537         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8538         Release lock before waking up the waiters.
8540         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8542         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8543         (reader_thread): Likewise.
8545         * sysdeps/pthread/pthread_rwlock_unlock.c
8546         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8547         to wake up readers if there are none.
8549         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8550         Release internal lock before wake threads.
8552 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8554         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8555         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8556         predefined.
8557         * tst-rwlock9.c: Likewise.
8558         * tst-rwlock10.c: New file.
8559         * tst-rwlock11.c: New file.
8561         * Makefile (tests): Add tst-dlsym1.
8562         * tst-dlsym1.c: New file.
8564         * init.c (__pthread_initialize_minimal_internal): Set
8565         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8566         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8568 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8570         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8572         * tst-cond2.c: Fix sychronization with child.
8574         * tst-rwlock8.c (reader_thread): Remove unused variable.
8576         * Makefile: Add rules to build and run tst-tls3.
8577         * tst-tls3.c: New file.
8578         * tst-tls3mod.c: New file.
8580         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8581         * tst-rwlock8.c: New file.
8582         * tst-rwlock9.c: New file.
8583         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8584         complete broken rwlock implementation.
8585         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8586         Likewise.
8587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8588         Likewise.
8589         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8590         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8591         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8592         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8593         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8594         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8595         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8597 2003-02-23  Roland McGrath  <roland@redhat.com>
8599         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8601 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8603         * Makefile (tests): Add tst-context1.
8604         * tst-context1.c: New file.
8606         * Makefile (tests): Add tst-tls1 and tst-tls2.
8607         * tst-tls1.c: New file.
8608         * tst-tls2.c: New file.
8610         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8611         for failed cmpxchg.
8613         * pthread_create.c (start_thread): Set EXITING_BIT early.
8615         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8616         (THREAD_GETMEM_NC): Likewise.
8618 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8620         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8621         off 3 more bytes by using offset-less instructions when possible.
8623         * Makefile: Add dependency for $(objpfx)version.d.
8625         * eintr.c (eintr_source): Add unnecessary return but the compiler
8626         insists.
8628         * tst-kill3.c: Include <unistd.h>.
8630 2003-02-21  Roland McGrath  <roland@redhat.com>
8632         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8634 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8636         * Makefile (tests): Add tst-eintr1.
8637         (distribute): Add eintr.c.
8638         * tst-eintr1.c: New file.
8639         * eintr.c: New file.
8641         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8643         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8644         Disallow sending SIGCANCEL.
8646         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8647         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8648         * tst-kill1.c: New file.
8649         * tst-kill2.c: New file.
8650         * tst-kill3.c: New file.
8651         * tst-kill5.c: New file.
8652         * tst-kill6.c: New file.
8653         * tst-basic7.c: Renamed to...
8654         * tst-kill4.c: ...this.
8656 2003-02-21  Roland McGrath  <roland@redhat.com>
8658         * Makefile (install-lib-ldscripts): New variable.
8660 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8662         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8663         * pthread_cancel.c: Use INVALID_TD_P.
8664         * pthread_detach.c: Likewise.
8665         * pthread_getschedparam.c: Likewise.
8666         * pthread_setschedparam.c: Likewise.
8667         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8668         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8669         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8670         * pthread_timedjoin.c: Likewise.
8672         * tst-basic7.c: Include <signal.h>.
8674         * pthread_join.c (pthread_join): Limited checking for invalid
8675         descriptors.
8676         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8678 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8680         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8681         beginning of the loop.  Clear the entire first block of TSD.
8682         * Makefile (tests): Add tst-key4.
8683         * tst-key4.c: New file.
8685 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8687         * Makefile (tests): Add tst-basic7.
8688         * tst-basic7.c: New file.
8690         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8691         Add some more __builtin_expect.
8693         * pthreadP.h: Define dummy version of DEBUGGING_P.
8695 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8697         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8698         _POSIX_THREAD_PRIORITY_SCHEDULING.
8699         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8700         _XOPEN_REALTIME_THREADS.
8701         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8703         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8704         kernel returns EINVAL for PID <= 0, work around it.
8706         * Makefile (tests): Add tst-signal5.
8707         * tst-signal5.c: New file.
8709         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8710         and LOGIN_NAME_MAX.
8712         * tst-cancel1.c (tf): Block all signals.
8714         * Makefile (tests): Add tst-basic6.
8715         * tst-basic6.c: New file.
8717         * tst-basic1.c: Add test for process ID.
8719         * Makefile (tests): Add tst-cancel10.
8720         * tst-cancel10.c: New file.
8722         * Makefile (tests): Add tst-signal4.
8723         * tst-signal4.c: New file.
8725         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8726         __sigismember instead of sigismember.  Add __builtin_expect.
8728 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8730         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8731         pthread_setcancelstate, and pthread_rwlock_setpshared.
8733         * tst-cancel7.c (do_test): Make sure the pid file exists before
8734         canceling the thread.
8736         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8737         pthread_rwlock_timedrdlock tests.
8738         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8739         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8740         Check for invalid tv_nsec field.
8741         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8742         Likewise.
8744         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8745         recursive mutex of overflow.
8747         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8749         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8750         going into an endless loop.
8751         * Makefile (tests): Add tst-cancel9.
8752         * tst-cancel9.c: New file.
8754         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8756 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8758         * tst-mutex5.c (do_test): Add more timedlock tests.
8760         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8761         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8763         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8764         use INLINE_SYSCALL.  Error number is returned, not -1.
8766         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8767         and __deallocate_stack with internal_function.
8768         * pthread_create.c: Adjust definitions appropriately.
8769         * allocatestack.c: Likewise.
8771         * pthread_join.c: Add one more __builtin_expect.
8772         * pthread_timedjoin.c: Likewise.
8774         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8775         not data of sequence number does not match.
8776         Add one __builtin_expect.
8778         * Makefile (tests): Add tst-clock1.
8779         * tst-clock1.c: New file.
8781         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8782         negative arguments.
8783         * Makefile (tests): Add tst-basic5.
8784         * tst-basic5.c: New file.
8786 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8788         * Makefile (tests): Add tst-basic4.
8789         * tst-basic4.c: New file.
8791         * pthreadP.h: Add declaraction for __nptl_nthreads.
8792         * pthread_create.c: Define __nptl_nthreads
8793         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8794         after thread is done.  If then zero, call exit(0).
8795         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8796         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8797         * init.c (pthread_functions): Initialize ptr_nthreads.
8798         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8799         (__reclaim_stacks): Decrement __nptl_nthreads.
8800         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8801         Define.
8802         * Makefile (tests): Add tst-basic3.
8803         * tst-basic3.c: New file.
8805         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8806         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8807         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8808         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8809         if asynchronous canceling is enabled.
8810         * pthread_join.c (pthread_join): When recognizing circular joins,
8811         take into account the other thread might be already canceled.
8812         * Makefile (tests): Add tst-join5.
8813         * tst-join5.c: New file.
8815         * Makefile (tests): Add tst-join4.
8816         * tst-join4.c: New file.
8818 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8820         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8822 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8824         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8825         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8826         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8827         warning.
8828         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8829         to avoid warning.
8830         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8831         error if lll_futex_wake failed.
8833 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8835         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8836         handling of cancellation and failung pthread_mutex_unlock call.
8837         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8838         * Makefile (tests): Add tst-cond8 and tst-cond9.
8839         * tst-cond8.c: New file.
8840         * tst-cond9.c: New file.
8842         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8844         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8845         non-standard initializers with __USE_GNU.
8847         * Makefile (tests): Add tst-cleanup3.
8848         * tst-cleanup3.c: New file.
8850 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8852         * Makefile (tests): Add tst-attr1 and tst-attr2.
8853         * tst-attr1.c: New file.
8854         * tst-attr2.c: New file.
8856         * Makefile: Add rules to build and run tst-atfork2 test.
8857         * tst-atfork2.c: New file.
8858         * tst-atfork2mod.c: New file.
8860         * sysdeps/unix/sysv/linux/unregister-atfork.c
8861         (__unregister_atfork): Free the memory allocated for the handlers
8862         after removing them from the lists.
8864         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8865         cleanup function.
8867         * tst-atfork1.c (do_test): Wait for the child we forked.
8868         Report error in child.
8870         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8872         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8874 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8876         * Makefile (tests): Add tst-cancel8.
8877         * tst-cancel8.c: New file.
8879         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8880         clearing of control variable.
8881         * Makefile (tests): Add tst-once3 and tst-once4.
8882         * tst-once3.c: New file.
8883         * tst-once4.c: New file.
8885 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8887         * sysdeps/sh/Makefile: New file.
8888         * sysdeps/sh/bits/atomic.h: New file.
8889         * sysdeps/sh/pthread_spin_init.c: New file.
8890         * sysdeps/sh/pthread_spin_lock.c: New file.
8891         * sysdeps/sh/pthread_spin_trylock.S: New file.
8892         * sysdeps/sh/pthread_spin_unlock.S: New file.
8893         * sysdeps/sh/pthreaddef.h: New file.
8894         * sysdeps/sh/tcb-offsets.sym: New file.
8895         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8896         * sysdeps/sh/tls.h: New file.
8897         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8898         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8899         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8900         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8901         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8902         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8903         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8904         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8905         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8906         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8907         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8908         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8909         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8910         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8911         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8912         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8913         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8914         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8915         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8916         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8917         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8918         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8919         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8920         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8921         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8922         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8923         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8924         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8925         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8926         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8928 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8930         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8931         according to POSIX.
8933         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8935 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8937         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8938         (TLS_GET_FS): New #define.
8939         (TLS_SET_FS): New #define.
8940         Correct value of __NR_set_thread_area.
8942         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8944 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8946         * Makefile (tests): Add tst-popen1.
8947         * tst-popen1.c: New file.
8949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8950         but inactive generalization.
8951         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8952         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8953         Minor optimization, remove one instruction.
8954         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8956 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8958         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8960 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8962         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8963         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8964         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8965         * sysdeps/pthread/pthread_cond_signal.c: New file.
8966         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8967         * sysdeps/pthread/pthread_cond_wait.c: New file.
8968         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8969         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8970         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8971         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8972         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8973         * sysdeps/s390/Makefile: New file.
8974         * sysdeps/s390/bits/atomic.h: New file.
8975         * sysdeps/s390/pthread_spin_init.c: New file.
8976         * sysdeps/s390/pthread_spin_lock.c: New file.
8977         * sysdeps/s390/pthread_spin_trylock.c: New file.
8978         * sysdeps/s390/pthread_spin_unlock.c: New file.
8979         * sysdeps/s390/pthreaddef.h: New file.
8980         * sysdeps/s390/tcb-offsets.sym: New file.
8981         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8982         * sysdeps/s390/tls.h: New file.
8983         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8984         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8985         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8986         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8987         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8988         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8989         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8990         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8991         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8992         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8993         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8994         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8995         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8996         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8997         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8998         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8999         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9000         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9001         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9002         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9003         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9004         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9005         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9007 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9009         * atomic.h: Add a couple more default implementations.
9010         (atomic_compare_and_exchange_acq): Use
9011         __arch_compare_and_exchange_32_acq in return value definition.  It
9012         always exists.
9013         (atomic_bit_set): Renamed from atomic_set_bit.
9014         Add missing atomic_ prefixes.
9016         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9017         thread library is available, use correct value to mark initialized
9018         once variable.
9020 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9022         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9023         __sysconf to determine pagesize.
9025         * pthread_create.c: Include <atomic.h>.
9026         * allocatestack.c (allocate_stack): Implement coloring of the
9027         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9028         size minus one.  Adjust users.
9029         * sysdeps/i386/i686/Makefile: New file.
9031 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9033         * allocatestack.c: Improve comment throughout the file.
9035         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9036         (__lll_lock_wait): Add branch prediction.
9037         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9038         (__lll_lock_wait): Likewise.
9039         (lll_unlock_wake_cb): Removed.
9041 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9043         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9044         _POSIX_THREAD_PRIORITY_SCHEDULING.
9046 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9048         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9049         Fix return type of ptr___pthread_getspecific.
9051 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9053         * Makefile (tests): Add tst-umask1.
9054         (tst-umask1-ARGS): Define.
9055         * tst-umask1.c: New file.
9057 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9059         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9060         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9061         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9062         pthread_rwlock_unlock.
9063         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9064         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9065         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9066         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9067         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9068         New file.
9069         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9070         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9071         New file.
9072         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9073         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9074         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9075         New file.
9076         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9077         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9078         New file.
9079         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9080         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9081         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9082         New file.
9083         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9084         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9085         New file.
9086         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9088         * Makefile (libpthread-routines): Remove lowlevelcond and
9089         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9090         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9091         and pthread_cond_broadcast.
9092         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9093         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9094         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9095         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9096         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9097         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9098         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9099         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9100         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9101         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9102         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9103         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9104         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9106         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9107         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9108         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9109         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9110         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9111         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9112         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9113         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9114         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9115         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9116         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9117         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9118         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9119         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9120         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9121         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9122         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9124         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9125         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9126         of the code is moved to ...
9127         * sysdeps/pthread/createthread.c: ...here.  New file.
9129 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9131         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9132         (__new_sem_post): Clear %eax before returning.
9133         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9135         * Makefile (tests): Add tst-cleanup2.
9136         * tst-cleanup2.c: New file.
9138         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9139         Interpret first parameter correctly.
9141 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9143         * Makefile (headers): Add bits/semaphore.h.
9145 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9147         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9148         if not SHARED.
9150 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9152         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9153         must be used and mapping failed.
9154         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9156         * Makefile (CFLAGS-pthread_self.os): Define this, not
9157         CFLAGS-pthread_self.c.
9159 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9161         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9162         lll_unlock_wake_cb.
9164         * Makefile (libpthread-routines): Add version.  Add rules to build
9165         version.os and banner.h.
9166         * version.c: New file.
9168 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9170         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9171         the alias unconditional.
9172         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9174 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9176         * Makefile (CFLAGS-pthread_self.c): New definition.
9178 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9180         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9181         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9182         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9183         * init.c (__pthread_initialize_minimal_internal): Likewise.
9185 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9187         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9189         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9190         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9191         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9192         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9193         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9194         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9196 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9198         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9199         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9200         * tst-cancel-wrappers.sh: Remove all exceptions.
9202 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9204         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9205         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9207         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9208         Use __libc_pthread_functions array if SHARED.
9210         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9211         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9213         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9214         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9215         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9216         __libc_ptf_call instead of __libc_maybe_call.
9217         (PTF): New #define.
9218         (__libc_cleanup_region_start): Wrap function name with PTF call.
9219         (__libc_cleanup_region_end): Likewise.
9220         (__libc_cleanup_end): Likewise.
9222         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9223         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9224         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9225         * pthreadP.h: Add prototypes.
9227         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9228         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9229         __pthread_rwlock_unlock aliases.
9230         * pthreadP.h: Add prototypes for new aliases.
9232         * pthreadP.h (struct pthead_functions): Moved to...
9233         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9234         * init.c (pthread_functions): Add initializers for new elements.
9236         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9237         __pthread_cleanup_pop_restore aliases.
9238         * pthreadP.h: Add prototypes.
9240         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9241         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9242         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9243         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9244         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9245         * pthreadP.h: Adjust prototypes and callers.
9247 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9249         * Makefile (tests): Add tst-cancel7.
9250         (tst-cancel7-ARGS): New variable.
9251         * tst-cancel7.c: New file.
9253         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9254         around gcc defficiencies.
9255         * old_pthread_cond_signal.c: Likewise.
9256         * old_pthread_cond_timedwait.c: Likewise.
9257         * old_pthread_cond_wait.c: Likewise.
9259         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9261 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9263         * Makefile (tests): Add tst-cond7.
9264         * tst-cond7.c: New file.
9266         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9267         (condvar_cleanup): Get condvar address from the right place.
9269         * atomic.h: Correct definitions of atomic_full_barrier,
9270         atomic_read_barrier, atomic_write_barrier.
9272         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9273         race-free.
9274         * old_pthread_cond_signal.c: Likewise.
9275         * old_pthread_cond_timedwait.c: Likewise.
9276         * old_pthread_cond_wait.c: Likewise.
9278 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9280         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9282 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9284         * pthreadP.h (pthread_cond_2_0_t): New type.
9285         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9286         Use new type for the 2.0 condvar function prototypes.
9287         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9288         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9289         parameter.
9290         * old_pthread_cond_destroy.c: Likewise.
9291         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9292         * old_pthread_cond_signal.c: Likewise.
9293         * old_pthread_cond_timedwait.c: Likewise.
9294         * old_pthread_cond_wait.c: Likewise.
9296         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9297         (__pthread_cond_wait): Don't save cancellation mode and seq value
9298         in same location.
9300         * herrno.c (__h_errno_location): Don't define as weak.
9302 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9304         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9305         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9306         and pthread_cond_wait.
9307         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9308         Renamed to...
9309         (__pthread_cond_broadcast_2_0): ... this.
9310         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9311         Renamed to...
9312         (__pthread_cond_destroy_2_0): ... this.
9313         * old_pthread_cond_init.c (__old_pthread_cond_init):
9314         Renamed to...
9315         (__pthread_cond_init_2_0): ... this.
9316         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9317         Renamed to...
9318         (__pthread_cond_signal_2_0): ... this.
9319         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9320         Renamed to...
9321         (__pthread_cond_wait_2_0): ... this.
9322         * pthread_cond_destroy.c: Include shlib-compat.h.
9323         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9324         * pthread_cond_init.c: Include shlib-compat.h.
9325         (pthread_cond_init): Change strong_alias into versioned_symbol.
9326         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9327         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9328         fields.
9329         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9330         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9331         __pthread_cond_wait_2_0): New prototypes.
9332         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9333         __old_pthread_cond_init, __old_pthread_cond_signal,
9334         __old_pthread_cond_wait): Removed.
9335         * init.c: Include shlib-compat.h.
9336         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9337         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9338         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9339         ptr___pthread_cond_*_2_0 fields.
9340         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9341         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9343         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9344         LIBC_SIGACTION was not yet defined.
9345         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9346         [!defined LIBC_SIGACTION] (__sigaction): New function and
9347         libc_hidden_weak.
9348         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9349         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9351 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9353         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9355 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9357         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9358         New, larger type definition.
9359         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9360         implementation.
9361         * Versions [libpthread]: Add definitions for new pthread_cond_*
9362         interfaces for version GLIBC_2.3.2.
9363         * pthread_cond_init.c: Update initialization for new type definition.
9364         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9365         pthread_cond_timedwait, pthread_cond_signal, and
9366         pthread_cond_broadcast.  Add old_pthread_cond_init,
9367         old_pthread_cond_destroy, old_pthread_cond_wait,
9368         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9369         old_pthread_cond_broadcast.
9370         * old_pthread_cond_broadcast.c: New file.
9371         * old_pthread_cond_destroy.c: New file.
9372         * old_pthread_cond_init.c: New file.
9373         * old_pthread_cond_signal.c: New file.
9374         * old_pthread_cond_timedwait.c: New file.
9375         * old_pthread_cond_wait.c: New file.
9376         * pthreadP.h: Add prototypes for the compatibility interfaces.
9378         * pthread_cond_destroy.c: Don't include <errno.h>.
9380 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9382         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9383         unnecessary zero offset when addressing MUTEX.
9385 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9387         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9388         __register_atfork.
9389         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9390         for __register_atfork.
9392 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9394         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9395         instead of ASSEMBLER test macro.
9397         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9398         __libc_current_sigrtmax): Add libc_hidden_def.
9400         * sysdeps/pthread/list.h: Remove assert.h include.
9402 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9404         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9405         __pthread_initialize_minimal_internal not
9406         __pthread_initialize_minimal.
9408 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9410         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9411         __pthread_initialize_minimal as hidden.
9413         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9414         constructor.
9416 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9418         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9419         $(common-objpfx)format.lds, include that into the output script.
9420         Fix comment.
9421         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9423 2002-12-28  Andreas Jaeger  <aj@suse.de>
9425         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9426         nsec resolution changes.
9427         (xstat64_conv): Likewise.
9428         (xstat32_conv): Likewise.
9429         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9430         struct kernel_stat.
9431         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9432         structs stat and stat64.
9433         * time/time.h (__timespec_defined): Define for __USE_MISC.
9434         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9436 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9438         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9439         argument.
9440         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9441         (pthread_exit): Use strong_alias to avoid warnings.
9442         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9443         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9444         ptr___pthread_attr_init_2_*.
9445         * init.c (pthread_functions): Adjust.
9447 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9449         * forward.c: Make all functions available by default again.  It
9450         caused too much trouble.
9452         * pt-siglongjmp.c: Removed.
9454 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9456         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9457         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9458         * sysdeps/i386/Makefile: New file.
9459         * sysdeps/i386/tcb-offsets.sym: New file.
9460         * sysdeps/pthread/tcb-offsets.h: New file.
9461         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9462         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9464         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9465         __register_atfork...
9466         (GLIBC_2.3.2): ...here.
9468 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9470         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9471         pthread_attr_setstackaddr with __attribute_deprecated__.
9473 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9475         * pt-system.c (system): Remove cancellation handling.
9476         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9477         cancellation routines.
9479 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9481         * descr.h: Include <dl-sysdep.h>.
9482         (struct pthread): Move header.data.list to the back of the struct.
9483         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9484         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9485         (SYSINFO_OFFSEET): Likewise.
9487 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9489         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9490         Define.
9491         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9492         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9493         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9494         (USE_DL_SYSINFO): Undef.
9496 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9498         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9499         $(common-objpfx)libc.so.
9500         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9501         it is bigger than pipe buffer size even on arches with bigger
9502         page size.
9503         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9505 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9507         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9508         correct errno access for case that USE___THREAD is not defined.
9510 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9512         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9513         Patch by Marijn Ros <marijn@mad.scientist.com>.
9515 2002-12-22  Roland McGrath  <roland@redhat.com>
9517         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9519 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9521         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9523 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9525         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9526         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9527         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9529         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9530         of int $0x80.
9531         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9532         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9533         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9534         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9535         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9536         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9537         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9538         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9540         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9541         sysenter.
9542         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9544         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9546         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9547         in new TCB.
9548         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9549         that sysinfo is properly initialized.
9550         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9551         to 1 only for ld.so.
9553         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9554         RTLD_CORRECT_DYNAMIC_WEAK.
9556 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9558         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9559         Use return 0 as 6th argument to FORWARD4.
9560         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9562 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9564         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9565         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9566         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9567         (INIT_SYSINFO): New #define.
9568         (TLS_TP_INIT): Use INIT_SYSINFO.
9569         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9570         At test to make sure SYSINFO_OFFSET value is correct.
9571         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9573 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9575         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9576         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9577         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9578         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9579         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9580         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9581         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9583 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9585         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9586         macro instead of using int $0x80 directly.
9588         * sysdeps/pthread/bits/stdio-lock.h: New file.
9589         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9590         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9591         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9592         * Makefile (routines): Add libc-lowlevelmutex.
9594         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9595         __i686.get_pc_thunk.dx.
9597 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9599         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9600         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9601         ($(objpfx)tst-cancel-wrappers.out): New rule.
9602         * tst-cancel-wrappers.sh: New test.
9603         * tst-locale1.c: Include signal.h.
9604         (uselocale): Test static linking of __libc_current_sigrt*.
9606 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9608         * Makefile (tests): Add tst-cancel6.
9609         * tst-cancel6.c: New file
9611 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9613         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9614         Define meaningfully for assembler as well.
9615         * pthreadP.h (struct pthread_functions): Remove
9616         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9617         and ptr_pthread_attr_init_2_1 fields.
9618         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9619         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9620         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9621         (FORWARD3): Define using FORWARD4.
9622         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9623         versions.
9624         * pt-system.c: Remove duplicate stdlib.h include.
9626 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9628         * sem_init.c: Define sem_init@GLIBC_2.0.
9629         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9630         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9632         * flockfile.c: Moved to...
9633         * sysdeps/pthread/flockfile.c: ...here.  New file.
9634         * funlockfile.c: Moved to...
9635         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9636         * ftrylockfile.c: Moved to...
9637         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9639 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9641         * libc-cancellation.c: Guard both function with
9642         #if !defined NOT_IN_libc.
9643         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9644         automatically provided pthread wrappers.
9645         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9646         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9647         nor in libpthread.
9648         * pt-open.c: Removed.
9649         * pt-fcntl.c: Removed.
9650         * pt-fsync.c: Removed.
9651         * pt-lseek.c: Removed.
9652         * pt-msgrcv.c: Removed.
9653         * pt-msgsnd.c: Removed.
9654         * pt-msync.c: Removed.
9655         * pt-nanosleep.c: Removed.
9656         * pt-open64.c: Removed.
9657         * pt-pause.c: Removed.
9658         * pt-pread.c: Removed.
9659         * pt-pread64.c: Removed.
9660         * pt-pwrite.c: Removed.
9661         * pt-pwrite64.c: Removed.
9662         * pt-read.c: Removed.
9663         * pt-recv.c: Removed.
9664         * pt-recvfrom.c: Removed.
9665         * pt-recvmsg.c: Removed.
9666         * pt-send.c: Removed.
9667         * pt-sendto.c: Removed.
9668         * pt-sigtimedwait.c: Removed.
9669         * pt-sigwait.c: Removed.
9670         * pt-wait.c: Removed.
9671         * pt-waitpid.c: Removed.
9672         * pt-write.c: Removed.
9673         * pt-accept.c: Removed.
9674         * pt-close.c: Removed.
9675         * pt-connect.c: Removed.
9676         * pt-lseek64.c: Removed.
9677         * pt-sendmsg.c: Removed.
9678         * pt-tcdrain.c: Removed.
9680 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9682         * init.c (__pthread_initialize_minimal_internal): Renamed from
9683         __pthread_initialize_minimal.  Make old name an alias.  This
9684         converts a normal relocation into a relative relocation.
9686         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9688         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9689         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9690         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9691         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9692         pt-sigwaitinfo, pt-waitid, and pt-writev.
9693         * pt-creat.c: Removed.
9694         * pt-poll.c: Removed.
9695         * pt-pselect.c: Removed.
9696         * pt-readv.c: Removed.
9697         * pt-select.c: Removed.
9698         * pt-sigpause.c: Removed.
9699         * pt-sigsuspend.c: Removed.
9700         * pt-sigwaitinfo.c: Removed.
9701         * pt-waitid.c: Removed.
9702         * pt-writev.c: Removed.
9704         * init.c (pthread_functions): New variable.
9705         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9706         (or NULL) to __libc_pthread_init.
9707         * forward.c: Rewrite to use __libc:pthread_functions array to get
9708         function addresses.
9709         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9710         prototype.
9711         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9712         Take new parameter.  Copy content of variable pointed to by it
9713         to __libc_pthread_init.
9715         * pthreadP.h (struct pthread_functions): New type.
9716         (__libc_pthread_init): Declare.
9718         * pthread_attr_destroy.c: Add namespace protected alias.
9719         * pthread_attr_getdetachstate.c: Likewise.
9720         * pthread_attr_getinheritsched.c: Likewise.
9721         * pthread_attr_getschedparam.c: Likewise.
9722         * pthread_attr_getschedpolicy.c: Likewise.
9723         * pthread_attr_getscope.c: Likewise.
9724         * pthread_attr_setdetachstate.c: Likewise.
9725         * pthread_attr_setinheritsched.c: Likewise.
9726         * pthread_attr_setschedparam.c: Likewise.
9727         * pthread_attr_setschedpolicy.c: Likewise.
9728         * pthread_attr_setscope.c: Likewise.
9729         * pthread_cond_broadcast.c: Likewise.
9730         * pthread_cond_destroy.c: Likewise.
9731         * pthread_cond_init.c: Likewise.
9732         * pthread_cond_signal.c: Likewise.
9733         * pthread_cond_wait.c: Likewise.
9734         * pthread_condattr_destroy.c: Likewise.
9735         * pthread_condattr_init.c: Likewise.
9736         * pthread_equal.c: Likewise.
9737         * pthread_exit.c: Likewise.
9738         * pthread_getschedparam.c: Likewise.
9739         * pthread_self.c: Likewise.
9740         * pthread_setcancelstate.c: Likewise.
9741         * pthread_setschedparam.c: Likewise.
9742         * pthread_mutex_destroy.c: Likewise.
9743         * pthread_mutex_init.c: Likewise.
9744         * pthreadP.h: Add prototypes for the aliases.
9746         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9747         multiple_threads member in correct TCB to 1.
9749         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9750         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9751         member of thread decriptor, otherwise return unconditionally 1.
9753 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9755         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9756         regular Linux version.  Remove file.
9757         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9758         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9759         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9760         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9761         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9762         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9763         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9764         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9765         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9766         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9767         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9768         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9769         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9770         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9771         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9772         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9773         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9774         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9775         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9776         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9777         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9778         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9779         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9780         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9781         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9782         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9783         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9784         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9785         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9786         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9788 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9790         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9791         * sysdeps/unix/sysv/linux/open.c: Removed.
9792         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9793         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9794         * sysdeps/unix/sysv/linux/msync.c: Removed.
9795         * sysdeps/unix/sysv/linux/read.c: Removed.
9796         * sysdeps/unix/sysv/linux/close.c: Removed.
9797         * sysdeps/unix/sysv/linux/creat.c: Removed.
9798         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9799         * sysdeps/unix/sysv/linux/pause.c: Removed.
9800         * sysdeps/unix/sysv/linux/select.c: Removed.
9801         * sysdeps/unix/sysv/linux/write.c: Removed.
9803 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9805         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9806         element in TCB to see whether locking is needed.
9808         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9809         MULTIPLE_THREADS_OFFSET value is correct.
9811         * sysdeps/unix/sysv/linux/close.c: New file.
9812         * sysdeps/unix/sysv/linux/connect.S: New file.
9813         * sysdeps/unix/sysv/linux/creat.c: New file.
9814         * sysdeps/unix/sysv/linux/fsync.c: New file.
9815         * sysdeps/unix/sysv/linux/llseek.c: New file.
9816         * sysdeps/unix/sysv/linux/lseek.c: New file.
9817         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9818         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9819         * sysdeps/unix/sysv/linux/msync.c: New file.
9820         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9821         * sysdeps/unix/sysv/linux/open.c: New file.
9822         * sysdeps/unix/sysv/linux/open64.c: New file.
9823         * sysdeps/unix/sysv/linux/pause.c: New file.
9824         * sysdeps/unix/sysv/linux/poll.c: New file.
9825         * sysdeps/unix/sysv/linux/pread.c: New file.
9826         * sysdeps/unix/sysv/linux/pread64.c: New file.
9827         * sysdeps/unix/sysv/linux/pselect.c: New file.
9828         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9829         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9830         * sysdeps/unix/sysv/linux/readv.c: New file.
9831         * sysdeps/unix/sysv/linux/recv.S: New file.
9832         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9833         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9834         * sysdeps/unix/sysv/linux/select.c: New file.
9835         * sysdeps/unix/sysv/linux/send.S: New file.
9836         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9837         * sysdeps/unix/sysv/linux/sendto.S: New file.
9838         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9839         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9840         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9841         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9842         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9843         * sysdeps/unix/sysv/linux/system.c: New file.
9844         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9845         * sysdeps/unix/sysv/linux/wait.c: New file.
9846         * sysdeps/unix/sysv/linux/waitid.c: New file.
9847         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9848         * sysdeps/unix/sysv/linux/writev.c: New file.
9849         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9851         * pt-readv.c: Fix comment.
9853 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9855         * tst-cleanup1.c: Include stdlib.h.
9857         * tst-cancel5.c: New test.
9858         * Makefile (tests): Add tst-cancel5.
9859         (tst-cancel5): Link against libc.so libpthread.so in that order.
9861 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9863         * forward.c (test_loaded): Prevent recursive calls.
9865         * Makefile (routines): Add libc-cancellation.
9866         * libc-cancellation.c: New file.
9867         * descr.h (struct pthread): Add multiple_threads field.
9868         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9869         new thread descriptor to 1.
9870         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9871         Initialize multiple_thread field after successful thread creation.
9872         * cancellation.c (__do_cancel): Move to pthreadP.h.
9873         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9874         (__pthread_disable_asynccancel): Add internal_function attribute.
9875         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9876         * pthread_setcancelstate.c: Likewise.
9877         * pthread_setcanceltype.c: Likewise.
9878         * pthread_exit.c: Likewise.
9879         * pthreadP.h (CANCELLATION_P): Likewise.
9880         (__do_cancel): Define as static inline.
9881         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9882         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9883         declarations.
9884         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9885         fields.  Define MULTIPLE_THREADS_OFFSET.
9886         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9887         declaration.
9888         * sysdeps/unix/sysv/linux/accept.S: New file.
9889         * sysdeps/unix/sysv/linux/read.c: New file.
9890         * sysdeps/unix/sysv/linux/write.c: New file.
9891         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9892         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9893         initialization of __libc_locking_needed.
9894         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9895         __libc_locking_needed, use multiple_threads field in TCB.
9896         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9898 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9900         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9901         version.
9902         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9904         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9905         access to __libc_locking_needed for PIC.
9907 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9909         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9910         declare for libc.so.
9911         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9912         expression.
9913         (__libc_lock_lock): Put into statement expression.
9914         (__libc_lock_unlock): Remove trailing semicolon.
9915         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9917 2002-12-12  Roland McGrath  <roland@redhat.com>
9919         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9920         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9922 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9924         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9925         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9926         Initialize __libc_locking_needed.
9927         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9928         instead of __register_pthread_fork_handler.
9929         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9930         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9931         fork-gen with libc_pthread_init.
9932         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9933         of __register_pthread_fork_handler.
9934         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9935         of __register_pthread_fork_handler.
9936         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9937         __libc_locking_needed to determine whether lock prefix can be avoided.
9938         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9940 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9942         * Makefile (tests): Add tst-cleanup1.
9943         * tst-cleanup1.c: New file.
9944         * cancellation.c (__cleanup_thread): Removed.
9945         (__do_cancel): Remove call to __cleanup_thread.
9946         * pthreadP.h: Remove __cleanup_thread prorotype.
9948         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9949         Remember function and argument even if cancellation handler
9950         function is not available.
9951         (__libc_cleanup_region_end): Execute registered function directly if
9952         pthread functions are not available.
9953         (__libc_cleanup_end): Likewise.
9955         * init.c (__pthread_initialize_minimal): Fix initialization in
9956         static lib by preventing gcc from being too clever.
9958 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9960         * init.c (__pthread_initialize_minimal): Remove unneccesary
9961         sigaddset call.
9963         * Makefile (tests): We can run tst-locale2 now.
9965 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9967         * Versions: Remove duplicated sigwait entry.
9969 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9971         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9972         inside libpthread.
9974         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9976         * pthreadP.h: Declare __pthread_enable_asynccancel and
9977         __pthread_disable_asynccancel.
9978         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9979         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9980         * cancellation.c (__pthread_enable_asynccancel): New function.
9981         (__pthread_disable_asynccancel): New function.
9982         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9983         * pt-close.c: Likewise.
9984         * pt-connect.c: Likewise.
9985         * pt-creat.c: Likewise.
9986         * pt-fcntl.c: Likewise.
9987         * pt-fsync.c: Likewise.
9988         * pt-lseek.c: Likewise.
9989         * pt-lseek64.c: Likewise.
9990         * pt-msgrcv.c: Likewise.
9991         * pt-msgsnd.c: Likewise.
9992         * pt-msync.c: Likewise.
9993         * pt-nanosleep.c: Likewise.
9994         * pt-open.c: Likewise.
9995         * pt-open64.c: Likewise.
9996         * pt-pause.c: Likewise.
9997         * pt-poll.c: Likewise.
9998         * pt-pread.c: Likewise.
9999         * pt-pread64.c: Likewise.
10000         * pt-pselect.c: Likewise.
10001         * pt-pwrite.c: Likewise.
10002         * pt-pwrite64.c: Likewise.
10003         * pt-read.c: Likewise.
10004         * pt-readv.c: Likewise.
10005         * pt-recv.c: Likewise.
10006         * pt-recvfrom.c: Likewise.
10007         * pt-recvmsg.c: Likewise.
10008         * pt-select.c: Likewise.
10009         * pt-send.c: Likewise.
10010         * pt-sendmsg.c: Likewise.
10011         * pt-sendto.c: Likewise.
10012         * pt-sigpause.c: Likewise.
10013         * pt-sigsuspend.c: Likewise.
10014         * pt-sigtimedwait.c: Likewise.
10015         * pt-sigwait.c: Likewise.
10016         * pt-sigwaitinfo.c: Likewise.
10017         * pt-system.c: Likewise.
10018         * pt-tcdrain.c: Likewise.
10019         * pt-wait.c: Likewise.
10020         * pt-waitid.c: Likewise.
10021         * pt-waitpid.c: Likewise.
10022         * pt-write.c: Likewise.
10023         * pt-writev.c: Likewise.
10024         * pthread_join.c: Likewise.
10025         * pthread_timedjoin.c: Likewise.
10027         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10028         (__xpg_sigpause): New function.
10029         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10031 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10033         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10035         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10036         _GI_pthread_cleanup_pop to pthreadP.h.
10038         * ftrylockfile.c: Use _IO_lock_trylock instead of
10039         pthread_mutex_trylock.
10041         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10042         (CANCEL_RESET): Likewise.
10043         (__pthread_setcanceltype_): Declare.
10044         (__pthread_mutex_lock_internal): Declare.
10045         (__pthread_mutex_unlock_internal): Declare.
10046         (__pthread_once_internal): Declare.
10047         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10048         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10050         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10051         and pthread_mutex_unlock.
10052         * pthread_cond_wait.c: Likewise.
10053         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10054         * pthread_mutex_unlock.c: Likewise.
10056         * pthread_setcanceltype.c: Add additional alias
10057         __pthread_setcanceltype.
10059         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10060         * sem_open.c (sem_open): Likewise.
10061         Use __libc_open, __libc_write, and __libc_close instead of
10062         open, write, and close respectively.
10064         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10065         Rewrite as statement expression since it must return a value.
10067         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10068         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10069         __pthread_kill.
10071         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10072         alias __pthread_once_internal.
10074         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10076 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10078         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10079         * tst-stdio1.c: New file.
10080         * tst-stdio2.c: New file.
10082         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10084         * Makefile (tests): Comment out tst-locale2 for now.
10085         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10087         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10088         -D_IO_MTSAFE_IO.
10089         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10090         Use _IO_lock_init instead of explicit assignment.
10092         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10093         Define __libc_lock_* and __libc_lock_recursive macros with
10094         lowlevellock macros, not pthread mutexes.
10096         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10097         of pthread_mutex_lock.
10098         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10099         instead of pthread_mutex_unlock.
10101 2002-12-06  Roland McGrath  <roland@redhat.com>
10103         * allocatestack.c (__stack_user): Use uninitialized defn.
10104         * init.c (__pthread_initialize_minimal): Initialize it here.
10106 2002-12-05  Roland McGrath  <roland@redhat.com>
10108         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10109         string.
10110         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10112         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10113         missing & here too.
10115 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10117         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10118         lowlevellock.
10119         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10120         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10121         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10122         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10123         for __libc_lock_* macros.
10124         * Makefile (routines): Add libc-lowlevellock.
10126 2002-10-09  Roland McGrath  <roland@redhat.com>
10128         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10129         Under [__PIC__], call the function via the pointer fetched for
10130         comparison rather than a call by name that uses the PLT.
10131         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10132         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10133         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10134         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10135         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10137 2002-12-04  Roland McGrath  <roland@redhat.com>
10139         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10141         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10142         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10144         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10146 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10148         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10149         a completely opaque, non-integer type.
10150         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10152 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10154         * sysdeps/i386/tls.h: Include stdlib.h.
10155         * sysdeps/x86_64/tls.h: Likewise.
10157 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10159         * Makefile (tests): Add tst-locale2.
10160         (tests-static): Likewise.
10161         * tst-locale2.c: New file.
10163         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10164         volatile and add memory clobbers to lock operations.
10166 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10168         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10169         * sysdeps/i386/i486/bits/atomic.h: New file.
10170         * sysdeps/i386/i586/bits/atomic.h: New file.
10171         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10172         include i486 version.
10173         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10174         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10175         Patch by Marijn Ros <marijn@mad.scientist.com>.
10177         * allocatestack.c (get_cached_stack): Don't crash if we first
10178         found a stack with a larger size then needed.
10179         Reported by Hui Huang <hui.huang@sun.com>.
10181         * Makefile (tests): Add tst-sysconf.
10182         * tst-sysconf.c: New file.
10184         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10185         PTHREAD_THREADS_MAX.
10187 2002-12-02  Roland McGrath  <roland@redhat.com>
10189         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10190         Declare using hidden_proto instead of attribute_hidden, so there are
10191         non-.hidden static symbols for gdb to find.
10192         (__pthread_keys): Likewise.
10193         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10194         * allocatestack.c (__stack_user): Likewise.
10195         * pthread_create.c (__pthread_keys): Likewise.
10196         (__nptl_threads_events, __nptl_last_event): Make these static instead
10197         of hidden.
10198         * pthread_key_create.c (__pthread_pthread_keys_max,
10199         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10201 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10203         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10204         statically.
10205         * tst-locale1.c: New file.
10207         * pthread_cond_timedwait.c: Include <stdlib.h>.
10209         * Makefile (tests): Add tst-fork2 and tst-fork3.
10210         * tst-fork2.c: New file.
10211         * tst-fork3.c: New file.
10213 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10215         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10217         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10218         require it to 200112L.
10220         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10221         instruction only if HAVE_CMOV is defined.
10222         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10224         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10226         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10228         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10230         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10232 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10234         * sysdeps/x86_64/bits/atomic.h: New file.
10236         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10237         16-bit operations.
10239         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10240         possible since gettid cannot fail.
10242         * sysdeps/x86_64/pthreaddef.h: New file.
10244         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10246         * sysdeps/x86_64/pthread_spin_init.c: New file.
10247         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10248         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10249         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10251         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10252         Add missing lock prefix.  Minute optimization.
10254         * tst-spin2.c (main): Also check successful trylock call.
10256         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10257         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10259         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10260         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10262         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10263         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10264         value in case of an error.  Add support for INTERNAL_SYSCALL.
10266         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10267         value in case of an error.
10269         * sysdeps/x86_64/tls.h: New file.
10271 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10273         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10274         takes the array member name and the index as parameters.
10275         (THREAD_SETMEM_NC): Likewise.
10276         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10277         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10278         interfaces.
10280         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10281         to decide which code to use.
10282         (THREAD_SETMEM_NC): Likewise.
10284         * allocatestack.c (queue_stack): Don't remove stack from list here.
10285         Do it in the caller.  Correct condition to prematurely terminate
10286         loop to free stacks.
10287         (__deallocate_stack): Remove stack from list here.
10289 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10291         * Makefile (tests): Add tst-stack1.
10292         * tst-stack1.c: New file.
10294         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10295         provided stack.
10297         * pthread_attr_getstack.c: Return bottom of the thread area.
10299 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10301         * Makefile (libpthread-routines): Add pt-allocrtsig and
10302         pthread_kill_other_threads.
10303         * pt-allocrtsig.c: New file.
10304         * pthread_kill_other_threads.c: New file.
10305         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10306         all three functions.
10307         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10308         allocrtsig.
10309         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10310         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10311         and __libc_allocate_rtsig_private.
10312         * Versions (libpthread): Export pthread_kill_other_threads_np,
10313         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10315 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10317         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10318         the end of the stack.  Adjust computations.
10319         When mprotect call fails dequeue stack and free it.
10320         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10321         attribute.
10322         * pthread_getattr_np.c: Likewise.
10324         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10325         surprises.
10327 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10329         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10330         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10332 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10334         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10335         * pthread_setspecific.c: Likewise.
10337 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10339         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10340         definitions.  Get them from the official place.
10341         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10343         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10344         Use new CLONE_ flags in clone() calls.
10346         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10347         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10349         * Versions: Add pthread_* functions for libc.
10350         * forward.c: New file.
10352         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10353         errno-loc.
10354         * herrno.c: New file.
10355         * res.c: New file.
10357         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10358         sem_trywait, and sem_timedwait.  Add herrno and res.
10359         * sem_init.c: Don't initialize lock and waiters members.
10360         * sem_open.c: Likewise.
10361         * sem_post.c: Removed.
10362         * sem_wait.c: Removed.
10363         * sem_trywait.c: Removed.
10364         * sem_timedwait.c: Removed.
10365         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10366         Includes full implementations of sem_post, sem_wait, sem_trywait,
10367         and sem_timedwait.
10368         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10369         for new implementation.
10370         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10371         and waiters fields.
10373         * tst-sem3.c: Improve error message.
10374         * tst-signal3.c: Likewise.
10376         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10377         to tell the kernel about the termination futex and to initialize tid
10378         member.  Don't initialize main_thread.
10379         * descr.h (struct pthread): Remove main_thread member.
10380         * cancelllation.c (__do_cancel): Remove code handling main thread.
10381         The main thread is not special anymore.
10383         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10384         size of the stacks to stack_cache_actsize.
10386         * pt-readv.c: Add missing "defined".
10387         * pt-sigwait.c: Likewise.
10388         * pt-writev.c: Likewise.
10390 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10392         * Versions: Export __connect from libpthread.
10393         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10395         * Makefile (libpthread-routines): Add pt-raise.
10396         * sysdeps/unix/sysv/linux/raise.c: New file.
10397         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10398         * sysdeps/generic/pt-raise.c: New file.
10400         * pthread_cond_init.c: Initialize all data elements of the condvar
10401         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10403         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10404         * pthread_create.c: Likewise.
10406         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10407         * tst-key1.c: New file.
10408         * tst-key2.c: New file.
10409         * tst-key3.c: New file.
10411         * Versions: Export pthread_detach for version GLIBC_2.0.
10412         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10414 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10416         * pthread_key_create.c: Terminate search after an unused key was found.
10417         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10419         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10420         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10422 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10424         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10425         dynamic lookup for errno in PIC.
10427         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10428         release the stack lock as soon as possible.
10429         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10430         the static TLS block.
10431         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10433         * cancellation.c: Renamed from cancelation.c.
10434         * Makefile: Adjust accordingly.
10435         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10436         * cleanup_defer.c: Use CANCELLATION_P.
10437         * pthread_testcancel.c: Likewise.
10438         * descr.h: Fix spelling in comments.
10439         * init.c: Likewise.
10440         * pthread_getattr_np.c: Likewise.
10441         * pthread_getschedparam.c: Likewise.
10442         * pthread_setschedparam.c: Likewise.
10443         * Versions: Likewise.
10445         * pt-pselect.c: New file.
10446         * Makefile (libpthread-routines): Add pt-pselect.
10447         * Versions: Add pselect.
10449         * tst-cancel4.c: New file.
10450         * Makefile (tests): Add tst-cancel4.
10452 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10454         * pthread_mutex_lock.c: Always record lock ownership.
10455         * pthread_mutex_timedlock.c: Likewise.
10456         * pthread_mutex_trylock.c: Likewise.
10458         * pt-readv.c: New file.
10459         * pt-writev.c: New file.
10460         * pt-creat.c: New file.
10461         * pt-msgrcv.c: New file.
10462         * pt-msgsnd.c: New file.
10463         * pt-poll.c: New file.
10464         * pt-select.c: New file.
10465         * pt-sigpause.c: New file.
10466         * pt-sigsuspend.c: New file.
10467         * pt-sigwait.c: New file.
10468         * pt-sigwaitinfo.c: New file.
10469         * pt-waitid.c: New file.
10470         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10471         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10472         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10473         * Versions: Add all the new functions.
10475         * tst-exit1.c: New file.
10476         * Makefile (tests): Add tst-exit1.
10478         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10480 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10482         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10484         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10485         call.  pthread_join is an official cancellation point.
10486         * pthread_timedjoin.c: Likewise.
10488         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10489         and the condvar's mutex are retrieved.
10490         * pthread_cond_timedwait.c: Likewise.
10491         Reported by dice@saros.East.Sun.COM.
10493 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10495         * pthreadP.h: Cut out all type definitions and move them...
10496         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10497         * pthreadP.h: Include <internaltypes.h>.
10499         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10500         performance tweaks.
10502         * sem_trywait.c: Shuffle #includes around to get right order.
10503         * sem_timedwait.c: Likewise.
10504         * sem_post.c: Likewise.
10505         * sem_wait.c: Likewise.
10507         * nptl 0.3 released.
10509         * Makefile (tests): Add tst-signal3.
10510         * tst-signal3.c: New file.
10512 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10514         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10515         the asms modify the sem object.
10516         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10518         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10519         the actual members.
10520         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10521         * semaphoreP.h: Include pthreadP.h.
10522         * sem_getvalue.c: Adjust to sem_t change.
10523         * sem_init.c: Likewise.
10524         * sem_open.c: Likewise.
10525         * sem_post.c: Likewise.
10526         * sem_timedwait.c: Likewise.
10527         * sem_trywait.c: Likewise.
10528         * sem_wait.c: Likewise.
10530 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10532         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10533         * tst-basic2.c: New file.
10534         * tst-exec1.c: New file.
10535         * tst-exec2.c: New file.
10536         * tst-exec3.c: New file.
10538         * tst-fork1.c: Remove extra */.
10540         * nptl 0.2 released.  The API for IA-32 is complete.