* sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Use LOAD_PIC_REG
[glibc.git] / nptl / ChangeLog
blob925d3b07e7890f126f01579e8733271bd067d69b
1 2008-11-24  Arkadiusz Miƛkiewicz  <arekm@maven.pl>
3         * sysdeps/i386/dl-tlsdesc.S (_dl_tlsdesc_dynamic): Use LOAD_PIC_REG
4         instead of doing things manually.
6 2008-11-26  Chris Steel  <chris.steel.lnx@googlemail.com>
8         * posix/regex_internal.h (build_wcs_upper_buffer):
9         Return type is reg_error_t.
11 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
13         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
14         and FUTEX_WAKE_BITSET.
16 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
18         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
19         and FUTEX_WAKE_BITSET.
20         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
21         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
22         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
23         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
25 2008-11-25  Roland McGrath  <roland@redhat.com>
27         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
28         Subdirectories moved to ports repository as
29         sysdeps/.../nptl subdirectories.
31 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
33         [BZ #7008]
34         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
35         of old value.
36         * pthread_cond_init.c (__pthread_cond_init): Fix
37         cond->__data.__nwaiters initialization.
38         * Makefile (tests): Add tst-cond23.
39         * tst-cond23.c: New test.
41 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
43         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
44         arguments.
45         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
46         arguments.
48 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
50         [BZ #6955]
51         * pthread_mutex_lock.c: Add support for private PI mutexes.
52         * pthread_mutex_timedlock.c: Likewise.
53         * pthread_mutex_trylock.c: Likewise.
54         * pthread_mutex_unlock.c: Likewise.
55         Patch mostly by Ben Jackson <ben@ben.com>.
57 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
59         [BZ #6843]
60         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
61         Increase stack size for helper thread.
63 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
65         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
66         assembly with a clobber list for access registers a0 and a1.
68 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
70         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
71         to force runp->refcntr to be read from memory.
73 2008-09-08  Richard Guenther  <rguenther@suse.de>
75         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
76         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
77         lll_timedlock, lll_robust_timedlock, lll_unlock,
78         lll_robust_unlock): Promote private to int.
80 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
82         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
83         ARCH_RETRY_MMAP definitions.
84         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
85         Define MAP_STACK when not defined.
86         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
87         handling of ARCH_RETRY_MMAP.
89 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
91         * tst-align2.c (f): Print message that f is reached.
93 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
95         [BZ #6740]
96         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
97         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
99 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
101         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
102         SOCK_CLOEXEC if possible.
104 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
106         * Makefile (tests): Add tst-rwlock2a.
107         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
108         * tst-rwlock2a.c: New file.
110 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
112         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
114 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
116         * sysdeps/pthread/pthread.h: Fix typo in comment.
118 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
120         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
121         of CPU set to the kernel.
123 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
125         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
126         cfi directives.
127         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
128         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
129         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
130         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
132         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
134 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
136         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
137         cfi directives.
138         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
139         Likewise.
140         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
141         Likewise.
142         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
143         Likewise.
145 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
147         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
149 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
151         David S. Miller  <davem@davemloft.net>
153         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
155 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
157         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
158         __pshared correctly.
159         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
160         Likewise.
161         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
162         Likewise.
163         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
164         Likewise.
165         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
166         Likewise.
167         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
169 2008-04-14  David S. Miller  <davem@davemloft.net>
171         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
172         (__old_sem_wait): Fix argument to lll_futex_wait().
174 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
176         * pthread_create.c: Require pthread_mutex_trylock and
177         pthread_key_delete for libgcc.
179 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
181         [BZ #6020]
182         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
183         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
184         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
186 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
188         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
189         <linux/limits.h> has defined it.
190         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
191         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
192         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
193         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
195 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
197         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
198         of ASSEMBLER.
199         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
200         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
202 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
204         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
205         HAVE_DL_DISCOVER_OSVERSION.
206         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
207         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
209 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
211         [BZ #5778]
212         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
213         _POSIX_CHOWN_RESTRICTED value to zero.
215 2008-01-31  Roland McGrath  <roland@redhat.com>
217         * Makefile (omit-deps): Variable removed.
219 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
221         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
222         unnecessary addr32 prefix.
224 2008-01-29  Roland McGrath  <roland@redhat.com>
226         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
228 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
230         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
232 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
234         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
235         a scratch register.
236         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
237         (__lll_lock_wait_private): Fix typo.
238         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
239         (pthread_barrier_wait): Likewise.  Adjust XADD use.
240         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
241         Adjust XADD use.
242         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
243         (pthread_rwlock_timedrdlock): Return correct return value.
244         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
245         (pthread_rwlock_timedwrlock): Likewise.
247 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
249         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
250         thread returns the program exits with an error code.
252 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
254         * pthread-errnos.sym: Add EOVERFLOW.
255         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
256         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
257         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
258         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
260 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
262         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
263         parameter.  Passed it as permission to mmap.
264         * allocatestack.c (allocate_stack): Pass prot as second parameter
265         to ARCH_RETRY_MMAP.
267 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
269         * tst-basic7.c: Allocate memory for the stack.
271         [BZ #5465]
272         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
273         (__pthread_cond_timedwait): Don't use VDSO.
274         Patch by Michal Januszewski.
276 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
278         [BZ #5455]
279         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
280         Allow label before pthread_cleanup_pop.
281         (pthread_cleanup_pop_restore_np): Likewise.
283 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
285         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
286         Store 2 before returning ETIMEDOUT.
288 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
290         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
291         Store 2 before returning ETIMEDOUT.
292         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
293         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
294         (__lll_lock_wait_private): Optimize.
295         (__lll_lock_wait): Likewise.
297 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
299         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
300         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
301         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
303 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
305         [BZ #5240]
306         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
307         If we time out, try one last time to lock the futex to avoid
308         losing a wakeup signal.
309         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
310         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
312         [BZ #5245]
313         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
314         if necessary.
316 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
318         [BZ #5245]
319         * allocatestack.c (allocate_stack): Change ENOMEM error in case
320         mmap failed to EAGAIN.
321         * Makefile (tests): Add tst-basic7.
322         * tst-basic7.c: New file.
324 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
326         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
327         Use __linkin_atfork.
329 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
331         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
332         missing line continuations.
333         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
334         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
336 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
338         [BZ #5220]
339         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
340         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
341         (struct timer): Add next element.
342         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
343         enqueue timer structure into __active_timer_sigev_thread list.
344         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
345         remove timer struct from __active_timer_sigev_thread.
346         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
347         Before using timer structure make sure it is still on the
348         __active_timer_sigev_thread list.  Keep lock until done.
349         Define __active_timer_sigev_thread and
350         __active_timer_sigev_thread_lock.
352 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
354         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
355         Redefine thread_atfork for use of ATFORK_MEM.
356         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
357         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
358         function.
359         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
360         Use atomic operation when removing first element of list.
362 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
364         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
365         routine instead of an alias to __new_sem_post.
367 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
369         * init.c (__pthread_initialize_minimal): Initialize word to appease
370         valgrind.
372 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
374         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
375         libc.so just clear NAME.
376         (__libc_rwlock_fini): Nop inside of libc.so.
377         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
378         all zeros.
380 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
382         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
383         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
384         unlocking failed.
385         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
387 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
389         [BZ #4938]
390         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
391         reclaimed stack if necessary.
392         * Makefile (tests): Add tst-tsd6.
393         * tst-tsd6.c: New file.
395 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
397         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
398         Add private argument.
400 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
402         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
403         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
405 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
407         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
408         (__lll_robust_timedlock): Pass private as last argument to
409         __lll_robust_timedlock_wait.
410         (__lll_unlock): Fix a pasto.
412 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
414         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
415         sparc_old_sem): New structs.
416         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
417         (__sem_wait_cleanup): New function.
418         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
419         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
420         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
421         lll_futex_wait.
422         (__old_sem_wait): New function.
423         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
424         nptl/sysdeps/unix/sysv/linux/sparc version.
425         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
426         Likewise.
427         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
428         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
429         (__new_sem_trywait): Use sparc_old_sem structure.
430         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
431         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
432         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
433         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
434         lll_futex_timed_wait.
435         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
436         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
437         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
438         lll_futex_wake.
439         (__old_sem_post): New function.
440         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
441         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
442         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
443         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
444         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
445         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
447 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
449         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
450         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
451         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
452         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
453         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
454         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
455         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
456         Use FUTEX_WAKE_OP.
457         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
458         kernel-features.h and tcb-offsets.h.
459         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
460         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
461         process private.
462         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
463         tcb-offsets.h.
464         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
465         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
466         process private.
467         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
468         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
469         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
471         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
472         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
475 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
477         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
478         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
479         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
480         lll_futex_timed_wait.
482         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
483         __lll_robust_unlock): Rewrite as macros instead of inline functions.
484         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
485         __lll_robust_unlock, __lll_wait_tid): Likewise.
487 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
489         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
490         Fix a pasto.
491         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
492         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
493         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
494         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
496         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
497         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
498         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
499         kernel-features.h.
500         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
501         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
502         process private.  Switch DW_CFA_advance_loc1 and some
503         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
504         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
505         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
506         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
507         process private.  Switch DW_CFA_advance_loc{1,2} and some
508         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
509         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
510         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
512         Likewise.
513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
514         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
516         Likewise.
517         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
518         (__pthread_cond_broadcast): Compare %r8 instead of
519         dep_mutex-cond_*(%rdi) with $-1.
520         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
521         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
522         of oring.
524 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
526         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
528 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
530         * allocatestack.c: Include kernel-features.h.
531         * pthread_create.c: Likewise.
532         * pthread_mutex_init.c: Likewise.
533         * init.c: Likewise.
534         * pthread_cond_timedwait.c: Likewise.
535         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
536         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
537         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
539         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
540         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
541         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
542         Likewise.
543         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
544         Likewise.
545         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
546         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
547         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
548         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
550 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
552         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
553         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
554         byte elements.  One of them is the new __shared element.
555         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
556         adjust names of other padding elements.
557         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
558         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
559         byte elements.  One of them is the new __shared element.
560         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
561         adjust names of other padding elements.
562         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
563         Renamed __pad1 element to __shared, adjust names of other padding
564         elements.
565         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
566         (pthread_rwlock_t): Likewise.
567         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
568         typo.
570 2007-08-09  Anton Blanchard  <anton@samba.org>
572         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
574 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
576         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
577         <kernel-features.h>.
578         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
580 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
582         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
583         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
584         dealing with robust mutexes.
585         * pthread_mutex_timedlock.c: Likewise.
586         * pthread_mutex_trylock.c: Likewise.
587         * pthread_mutex_unlock.c: Likewise.
588         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
590 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
592         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
593         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
594         (PTHREAD_MUTEX_PSHARED): Define.
595         * pthread_mutex_init.c (__pthread_mutex_init): Set
596         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
597         mutexes.
598         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
599         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
600         as second argument to lll_lock.
601         (LLL_MUTEX_TRYLOCK): Take mutex as argument
602         instead of its __data.__lock field.
603         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
604         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
605         to lll_robust_lock.
606         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
607         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
608         instead of mutex->__data.__kind directly, pass
609         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
610         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
611         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
612         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
613         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
614         to lll_timedlock, lll_robust_timedlock, lll_unlock and
615         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
616         of mutex->__data.__kind directly.
617         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
618         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
619         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
620         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
621         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
622         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
623         and lll_futex_wake.
624         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
625         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
626         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
627         directly.
628         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
629         Take mutex as argument instead of its __data.__lock field, pass
630         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
631         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
632         __data.__lock field.
633         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
634         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
635         to lll_robust_cond_lock.
636         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
637         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
638         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
639         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
640         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
641         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
642         lll_futex_wait.
643         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
644         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
645         lll_futex_wake.
646         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
647         pshared variable, pass it to lll_lock, lll_unlock,
648         lll_futex_timedwait and lll_futex_wake.
649         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
650         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
651         and lll_futex_wake.
652         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
653         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
654         macro.
655         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
656         lll_futex_wake_unlock): Likewise.
657         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
658         Likewise.
659         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
660         lll_futex_wake_unlock): Likewise.
661         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
662         Likewise.
663         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
664         lll_futex_wake_unlock): Likewise.
665         (lll_futex_wake): Fix a typo.
666         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
667         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
668         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
669         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
670         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
672         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
673         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
674         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
675         (__pthread_cond_timedwait): Likewise.
676         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
677         (__condvar_cleanup, __pthread_cond_wait): Likewise.
679 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
681         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
682         Don't use CGOTSETUP and CGOTRESTORE macros.
683         (CGOTSETUP, CGOTRESTORE): Remove.
684         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
685         @local symbol.
687 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
689         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
690         definitions for private futexes.
691         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
692         kernel-features.h and lowlevellock.h.  Use private futexes if
693         they are available.
694         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
695         (__lll_mutex_lock_wait): Rename to
696         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
697         (__lll_mutex_timedlock_wait): Rename to ...
698         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
699         Don't compile in for libc.so.
700         (__lll_mutex_unlock_wake): Rename to ...
701         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
702         (__lll_timedwait_tid): Use __NR_gettimeofday.
703         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
704         the header from assembler.  Renamed all lll_mutex_* resp.
705         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
706         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
707         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
708         Define.
709         (__lll_lock_wait_private): Add prototype.
710         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
711         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
712         __lll_unlock_wake): Likewise.
713         (lll_lock): Add private argument.  Call __lll_lock_wait_private
714         if private is constant LLL_PRIVATE.
715         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
716         lll_timedlock, lll_robust_timedlock): Add private argument.
717         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
718         if private is constant LLL_PRIVATE.
719         (lll_robust_unlock, lll_robust_dead): Add private argument.
720         (lll_lock_t): Remove.
721         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
722         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
723         lll_cond_wake, lll_cond_broadcast): Remove.
724         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
725         kernel-features.h and lowlevellock.h.
726         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
727         (LOAD_FUTEX_WAIT): Define.
728         (__lll_robust_mutex_lock_wait): Rename to ...
729         (__lll_robust_lock_wait): ... this.  Add private argument.
730         Use LOAD_FUTEX_WAIT macro.
731         (__lll_robust_mutex_timedlock_wait): Rename to ...
732         (__lll_robust_timedlock_wait): ... this.    Add private argument.
733         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
734         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
735         lowlevellock.h.
736         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
737         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
738         __lll_mutex_{lock,unlock}_*.
739         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
740         lowlevellock.h and pthread-errnos.h.
741         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
742         FUTEX_CMP_REQUEUE, EINVAL): Remove.
743         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
744         __lll_mutex_{lock,unlock}_*.
745         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
746         lowlevellock.h and pthread-errnos.h.
747         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
748         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
749         __lll_mutex_{lock,unlock}_*.
750         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
751         lowlevellock.h.
752         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
753         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
754         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
755         (__condvar_tw_cleanup): Likewise.
756         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
757         lowlevellock.h.
758         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
759         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
760         __lll_mutex_{lock,unlock}_*.
761         ( __condvar_w_cleanup): Likewise.
762         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
763         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
764         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
765         lowlevellock.h.
766         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
767         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
768         __lll_mutex_{lock,unlock}_*.
769         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
770         lowlevellock.h.
771         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
772         FUTEX_PRIVATE_FLAG): Remove.
773         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
774         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
775         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
776         lowlevellock.h.
777         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
778         FUTEX_PRIVATE_FLAG): Remove.
779         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
780         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
781         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
782         lowlevellock.h.
783         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
784         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
785         __lll_mutex_{lock,unlock}_*.
786         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
787         lowlevellock.h.
788         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
789         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
790         __lll_mutex_{lock,unlock}_*.
791         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
792         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
793         (__new_sem_post): Use standard initial exec code sequences.
794         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
795         lowlevellock.h.
796         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
797         FUTEX_PRIVATE_FLAG): Remove.
798         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
799         exec code sequences.
800         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
801         (__new_sem_trywait): Use standard initial exec code sequences.
802         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
803         (__new_sem_wait): Use standard initial exec code sequences.
805 2007-07-31  Anton Blanchard  <anton@samba.org>
807         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
808         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
809         atomic_full_barrier.
811 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
813         * allocatestack.c (stack_cache_lock): Change type to int.
814         (get_cached_stack, allocate_stack, __deallocate_stack,
815         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
816         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
817         as second argument to lll_lock and lll_unlock macros on
818         stack_cache_lock.
819         * pthread_create.c (__find_in_stack_list): Likewise.
820         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
821         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
822         as second argument.
823         * descr.h (struct pthread): Change lock and setxid_futex field
824         type to int.
825         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
826         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
827         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
828         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
829         Likewise.
830         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
831         * pthread_cond_init.c (__pthread_cond_init): Likewise.
832         * pthreadP.h (__attr_list_lock): Change type to int.
833         * pthread_attr_init.c (__attr_list_lock): Likewise.
834         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
835         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
836         lll_{,un}lock.
837         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
838         also for lll_futex_{wake,wait}.
839         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
840         a pointer to const.
841         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
842         LLL_SHARED as second argument to lll_{,un}lock.
843         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
844         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
845         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
846         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
847         Likewise.
848         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
849         as second argument to lll_{,un}lock macros on pd->lock.
850         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
851         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
852         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
853         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
854         Likewise.
855         * sysdeps/pthread/createthread.c (do_clone, create_thread):
856         Likewise.
857         * pthread_once.c (once_lock): Change type to int.
858         (__pthread_once): Pass LLL_PRIVATE as second argument to
859         lll_{,un}lock macros on once_lock.
860         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
861         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
862         rwlock->__data.__shared as second argument to them and similarly
863         for lll_futex_w*.
864         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
865         Likewise.
866         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
867         Likewise.
868         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
869         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
870         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
871         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
872         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
873         to lll_{,un}lock macros on __sem_mappings_lock.
874         * sem_open.c (check_add_mapping): Likewise.
875         (__sem_mappings_lock): Change type to int.
876         * semaphoreP.h (__sem_mappings_lock): Likewise.
877         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
878         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
879         instead of lll_*mutex_*, pass LLL_SHARED as last
880         argument.
881         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
882         pass LLL_SHARED as last argument.
883         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
884         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
885         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
886         pass LLL_SHARED as last argument.
887         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
888         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
889         LLL_SHARED as last argument.
890         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
891         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
892         Similarly.
893         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
894         __libc_lock_lock_recursive, __libc_lock_unlock,
895         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
896         argument to lll_{,un}lock.
897         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
898         _IO_lock_unlock): Likewise.
899         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
900         compound literal.
901         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
902         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
903         __fork_lock.
904         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
905         free_mem): Likewise.
906         (__fork_lock): Change type to int.
907         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
908         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
909         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
910         lll_futex_wake.
911         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
912         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
913         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
914         New function.
915         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
916         pass it through to lll_futex_*wait, only compile in when
917         IS_IN_libpthread.
918         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
919         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
920         argument and pass it through to lll_futex_*wait.
921         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
922         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
923         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
924         inline functions to __lll_* resp. __lll_robust_*.
925         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
926         (lll_mutex_dead): Add private argument.
927         (__lll_lock_wait_private): New prototype.
928         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
929         __lll_robust_lock_timedwait): Add private argument to prototypes.
930         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
931         call __lll_lock_wait_private, otherwise pass private to
932         __lll_lock_wait.
933         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
934         __lll_robust_timedlock): Add private argument, pass it to
935         __lll_*wait functions.
936         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
937         call __lll_unlock_wake_private, otherwise pass private to
938         __lll_unlock_wake.
939         (__lll_robust_unlock): Add private argument, pass it to
940         __lll_robust_unlock_wake.
941         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
942         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
943         argument, pass it through to __lll_* inline function.
944         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
945         (lll_lock_t): Remove.
946         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
947         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
948         lll_cond_wake, lll_cond_broadcast): Remove.
949         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
950         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
951         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
952         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
953         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
954         the header from assembler.  Renamed all lll_mutex_* resp.
955         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
956         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
957         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
958         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
959         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
960         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
961         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
962         Remove prototype.
963         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
964         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
965         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
966         (lll_trylock): Likewise, use __lll_trylock_asm, pass
967         MULTIPLE_THREADS_OFFSET as another asm operand.
968         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
969         MULTIPLE_THREADS_OFFSET as last asm operand, call
970         __lll_lock_wait_private if private is constant LLL_PRIVATE,
971         otherwise pass private as another argument to __lll_lock_wait.
972         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
973         lll_timedlock, lll_robust_timedlock): Add private argument, pass
974         private as another argument to __lll_*lock_wait call.
975         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
976         MULTIPLE_THREADS_OFFSET as another asm operand, call
977         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
978         otherwise pass private as another argument to __lll_unlock_wake.
979         (lll_robust_unlock): Add private argument, pass private as another
980         argument to __lll_unlock_wake.
981         (lll_robust_dead): Add private argument, use __lll_private_flag
982         macro.
983         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
984         LLL_MUTEX_LOCK_INITIALIZER.
985         (lll_lock_t): Remove.
986         (LLL_LOCK_INITIALIZER_WAITERS): Define.
987         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
988         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
989         lll_cond_wake, lll_cond_broadcast): Remove.
990         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
991         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
992         2007-05-2{3,9} changes.
993         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
994         kernel-features.h and lowlevellock.h.
995         (LOAD_PRIVATE_FUTEX_WAIT): Define.
996         (LOAD_FUTEX_WAIT): Rewritten.
997         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
998         define.
999         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1000         (__lll_mutex_lock_wait): Rename to ...
1001         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
1002         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
1003         (__lll_mutex_timedlock_wait): Rename to ...
1004         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1005         contains private argument.  Don't compile in for libc.so.
1006         (__lll_mutex_unlock_wake): Rename to ...
1007         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1008         Don't compile in for libc.so.
1009         (__lll_timedwait_tid): Use __NR_gettimeofday.
1010         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1011         kernel-features.h and lowlevellock.h.
1012         (LOAD_FUTEX_WAIT): Define.
1013         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1014         define.
1015         (__lll_robust_mutex_lock_wait): Rename to ...
1016         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1017         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1018         macro.
1019         (__lll_robust_mutex_timedlock_wait): Rename to ...
1020         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1021         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1022         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1023         lowlevellock.h.
1024         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1025         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1026         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1027         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1028         to __lll_lock_wait in %edx.
1029         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1030         Include lowlevellock.h and pthread-errnos.h.
1031         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1032         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1033         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1034         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1035         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1036         __lll_unlock_wake.
1037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1038         Include lowlevellock.h and pthread-errnos.h.
1039         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1040         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1041         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1042         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1043         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1044         __lll_unlock_wake.
1045         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1046         Include lowlevellock.h.
1047         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1048         Don't define.
1049         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1050         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1051         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1052         __lll_unlock_wake.  Use __NR_gettimeofday.
1053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1054         Include lowlevellock.h.
1055         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1056         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1057         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1058         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1059         and __lll_unlock_wake.
1060         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1061         Include lowlevellock.h.
1062         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1063         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1064         MUTEX(%ebx) address in %edx rather than %ecx to
1065         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1066         and __lll_unlock_wake.  Move return value from %ecx to %edx
1067         register.
1068         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1069         Include lowlevellock.h.
1070         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1071         Don't define.
1072         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1073         MUTEX(%ebp) address in %edx rather than %ecx to
1074         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1075         and __lll_unlock_wake.  Move return value from %ecx to %edx
1076         register.  Use __NR_gettimeofday.
1077         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1078         Include lowlevellock.h.
1079         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1080         Don't define.
1081         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1082         MUTEX(%ebp) address in %edx rather than %ecx to
1083         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1084         and __lll_unlock_wake.  Move return value from %ecx to %edx
1085         register.  Use __NR_gettimeofday.
1086         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1087         Include lowlevellock.h.
1088         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1089         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1090         MUTEX(%edi) address in %edx rather than %ecx to
1091         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1092         and __lll_unlock_wake.
1093         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1094         Include lowlevellock.h.
1095         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1096         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1097         MUTEX(%ebx) address in %edx rather than %ecx to
1098         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1099         and __lll_unlock_wake.  Move return value from %ecx to %edx
1100         register.
1101         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1102         lowlevellock.h.
1103         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1104         define.
1105         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1106         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1107         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1108         lowlevellock.h.
1109         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1110         (sem_timedwait): Use __NR_gettimeofday.
1111         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1112         lowlevellock.h.
1113         (LOCK): Don't define.
1114         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1115         lowlevellock.h.
1116         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1117         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1118         are waiters.
1119         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1120         2007-05-2{3,9} changes.
1121         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1122         kernel-features.h and lowlevellock.h.
1123         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1124         (LOAD_FUTEX_WAIT): Rewritten.
1125         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1126         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1127         (__lll_mutex_lock_wait): Rename to ...
1128         (__lll_lock_wait): ... this.  %esi is now private argument.
1129         Don't compile in for libc.so.
1130         (__lll_mutex_timedlock_wait): Rename to ...
1131         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1132         Don't compile in for libc.so.
1133         (__lll_mutex_unlock_wake): Rename to ...
1134         (__lll_unlock_wake): ... this.  %esi contains private argument.
1135         Don't compile in for libc.so.
1136         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1137         kernel-features.h and lowlevellock.h.
1138         (LOAD_FUTEX_WAIT): Define.
1139         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1140         (__lll_robust_mutex_lock_wait): Rename to ...
1141         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1142         Use LOAD_FUTEX_WAIT macro.
1143         (__lll_robust_mutex_timedlock_wait): Rename to ...
1144         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1145         private, use LOAD_FUTEX_WAIT macro.
1146         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1147         lowlevellock.h.
1148         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1149         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1150         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1151         __lll_lock_wait and __lll_unlock_wake.
1152         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1153         Include lowlevellock.h and pthread-errnos.h.
1154         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1155         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1156         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1157         pass LLL_SHARED in %esi to both __lll_lock_wait and
1158         __lll_unlock_wake.
1159         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1160         Include lowlevellock.h and pthread-errnos.h.
1161         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1162         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1163         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1164         pass LLL_SHARED in %esi to both __lll_lock_wait and
1165         __lll_unlock_wake.
1166         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1167         Include lowlevellock.h.
1168         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1169         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1170         pass LLL_SHARED in %esi to both __lll_lock_wait and
1171         __lll_unlock_wake.
1172         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1173         Include lowlevellock.h.
1174         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1175         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1176         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1177         and __lll_unlock_wake.
1178         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1179         Include lowlevellock.h.
1180         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1181         Don't define.
1182         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1183         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1184         and __lll_unlock_wake.
1185         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1186         Include lowlevellock.h.
1187         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1188         Don't define.
1189         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1190         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1191         and __lll_unlock_wake.
1192         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1193         Include lowlevellock.h.
1194         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1195         Don't define.
1196         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1197         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1198         and __lll_unlock_wake.
1199         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1200         Include lowlevellock.h.
1201         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1202         Don't define.
1203         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1204         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1205         and __lll_unlock_wake.
1206         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1207         Include lowlevellock.h.
1208         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1209         Don't define.
1210         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1211         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1212         and __lll_unlock_wake.
1213         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1214         lowlevellock.h.
1215         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1216         define.
1217         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1218         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1219         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1220         lowlevellock.h.
1221         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1222         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1223         lowlevellock.h.
1224         (LOCK): Don't define.
1225         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1226         lowlevellock.h.
1227         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1228         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1229         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1230         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1231         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1232         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1233         (__lll_lock_wait_private): New function.
1234         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1235         it to lll_futex_*wait.  Don't compile in for libc.so.
1236         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1237         Remove.
1238         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1239         (struct sparc_pthread_barrier): Remove.
1240         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1241         struct sparc_pthread_barrier.  Pass
1242         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1243         and lll_futex_wait macros.
1244         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1245         Remove.
1246         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1247         Include sparc pthread_barrier_wait.c instead of generic one.
1249 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1251         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1254         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1255         %ecx.
1256         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1257         (pthread_rwlock_timedwrlock): Likewise.
1258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1259         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1261 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1263         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1265 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1267         * tst-locale2.c (useless): Add return statement.
1269 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1271         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1272         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1273         * pthread_create.c (start_thread): Likewise.
1274         * init.c (sighandler_setxid): Likewise.
1275         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1276         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1277         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1278         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1279         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1280         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1281         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1282         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1283         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1284         Likewise.
1285         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1286         Likewise.
1287         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1288         Likewise.
1289         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1290         __rtld_notify): Likewise.
1291         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1292         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1293         __pthread_once): Likewise.
1294         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1295         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1296         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1297         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1298         (lll_futex_wait): Add private argument, define as wrapper around
1299         lll_futex_timed_wait.
1300         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1301         use __lll_private_flag macro.
1302         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1303         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1304         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1305         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1306         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1307         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1308         (lll_futex_wait): Add private argument, define as wrapper around
1309         lll_futex_timed_wait.
1310         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1311         use __lll_private_flag macro.
1312         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1313         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1314         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1315         Define.
1316         (lll_futex_timed_wait, lll_futex_wake): Use it.
1317         (lll_private_futex_wait, lll_private_futex_timed_wait,
1318         lll_private_futex_wake): Removed.
1319         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1320         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1321         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1322         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1323         (lll_futex_wait): Add private argument, define as wrapper around
1324         lll_futex_timed_wait.
1325         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1326         use __lll_private_flag macro.
1327         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1328         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1329         to lll_futex_*.
1330         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1331         (lll_private_futex_wait, lll_private_futex_timed_wait,
1332         lll_private_futex_wake): Removed.
1333         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1334         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1335         (lll_private_futex_wait, lll_private_futex_timed_wait,
1336         lll_private_futex_wake): Removed.
1337         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1338         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1339         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1340         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1341         (lll_futex_wait): Add private argument, define as wrapper around
1342         lll_futex_timed_wait.
1343         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1344         use __lll_private_flag macro.
1345         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1346         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1347         to lll_futex_*.
1348         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1349         Define.
1350         (lll_futex_timed_wait, lll_futex_wake): Use it.
1351         (lll_private_futex_wait, lll_private_futex_timed_wait,
1352         lll_private_futex_wake): Removed.
1354 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1356         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1357         of the structure for sparc32.
1359 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1361         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1363 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1365         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1366         code used when private futexes are assumed.
1367         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1368         Likewise.
1370 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1372         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1373         (__lll_private_flag): Define.
1374         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1375         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1376         __lll_private_flag.
1377         (lll_private_futex_wait, lll_private_futex_timedwait,
1378         lll_private_futex_wake): Define as wrapper around non-_private
1379         macros.
1380         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1381         (__lll_private_flag): Define.
1382         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1383         (lll_private_futex_wait, lll_private_futex_timedwait,
1384         lll_private_futex_wake): Define as wrapper around non-_private
1385         macros.
1387 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1389         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1390         parameter to lll_futex_wait call.
1391         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1393         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1394         Replace lll_futex_wait with lll_private_futex_wait.
1395         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1396         Add LLL_SHARED parameter to lll_futex_wake().
1398         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1399         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1400         lll_private_futex_wake.
1401         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1402         bit from private parm before syscall.
1403         (lll_futex_timed_wait): Likewise.
1404         (lll_futex_wake): Likewise.
1405         (lll_futex_wake_unlock): Likewise.
1406         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1407         (lll_robust_mutex_unlock): Likewise.
1408         (lll_mutex_unlock_force): Likewise.
1409         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1411 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1413         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1414         compilation when unconditionally using private futexes.
1415         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1417         Likewise.
1418         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1419         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1421 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1423         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1424         Define.
1426 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1428         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1429         kernel-features.h.
1431 2007-05-16  Roland McGrath  <roland@redhat.com>
1433         * init.c (__nptl_initial_report_events): New variable.
1434         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1435         to that.
1437 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1439         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1440         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1442 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1444         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1445         implementation.
1447 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1449         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1450         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1451         * pthread_mutex_timedlock.c: Likewise.
1452         * pthread_mutex_trylock.c: Likewise.
1453         * pthread_mutex_unlock.c: Likewise.
1455 2007-06-17  Andreas Schwab  <schwab@suse.de>
1457         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1458         sections.
1460 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1462         * allocatestack.c (allocate_stack): Make code compile if
1463         __ASSUME_PRIVATE_FUTEX is set.
1465 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1468         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1469         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1470         (__pthread_rwlock_wrlock): Likewise.
1471         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1472         (pthread_rwlock_timedrdlock): Likewise.
1473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1474         (pthread_rwlock_timedwrlock): Likewise.
1475         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1476         (__pthread_rwlock_unlock): Likewise.
1478 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1480         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1481         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1482         Split __flags into __flags, __shared, __pad1 and __pad2.
1483         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1484         futexes if they are available.
1485         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1486         in libc-lowlevellock.S allow using private futexes.
1487         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1488         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1489         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1490         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1491         lll_private_futex_timed_wait and lll_private_futex_wake.
1492         (lll_robust_mutex_unlock): Fix typo.
1493         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1494         field in futex command setup.
1495         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1496         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1497         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1498         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1499         if they are available.  Remove clear_once_control.
1500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1501         futexes if they are available.
1502         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1503         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1504         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1505         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1506         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1507         Wake only when there are waiters.
1508         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1509         support.  Indicate that there are waiters.  Remove unnecessary
1510         extra cancellation test.
1511         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1512         left-over duplication of __sem_wait_cleanup.
1514 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1516         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1517         parameter to lll_futex_wait, lll_futex_timed_wait, and
1518         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1519         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1520         lll_private_futex_wake.
1521         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1522         * allocatestack.c: Adjust use of lll_futex_* macros.
1523         * init.c: Likewise.
1524         * lowlevellock.h: Likewise.
1525         * pthread_barrier_wait.c: Likewise.
1526         * pthread_cond_broadcast.c: Likewise.
1527         * pthread_cond_destroy.c: Likewise.
1528         * pthread_cond_signal.c: Likewise.
1529         * pthread_cond_timedwait.c: Likewise.
1530         * pthread_cond_wait.c: Likewise.
1531         * pthread_create.c: Likewise.
1532         * pthread_mutex_lock.c: Likewise.
1533         * pthread_mutex_setprioceiling.c: Likewise.
1534         * pthread_mutex_timedlock.c: Likewise.
1535         * pthread_mutex_unlock.c: Likewise.
1536         * pthread_rwlock_timedrdlock.c: Likewise.
1537         * pthread_rwlock_timedwrlock.c: Likewise.
1538         * pthread_rwlock_unlock.c: Likewise.
1539         * sysdeps/alpha/tls.h: Likewise.
1540         * sysdeps/i386/tls.h: Likewise.
1541         * sysdeps/ia64/tls.h: Likewise.
1542         * sysdeps/powerpc/tls.h: Likewise.
1543         * sysdeps/pthread/aio_misc.h: Likewise.
1544         * sysdeps/pthread/gai_misc.h: Likewise.
1545         * sysdeps/s390/tls.h: Likewise.
1546         * sysdeps/sh/tls.h: Likewise.
1547         * sysdeps/sparc/tls.h: Likewise.
1548         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1549         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1550         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1551         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1552         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1553         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1554         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1555         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1556         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1557         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1558         Likewise.
1559         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1560         * sysdeps/x86_64/tls.h: Likewise.
1562 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1564         * pthread_getattr_np.c: No need to install a cancellation handler,
1565         this is no cancellation point.
1566         * pthread_getschedparam.c: Likewise.
1567         * pthread_setschedparam.c: Likewise.
1568         * pthread_setschedprio.c: Likewise.
1569         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1570         lll_unlock_wake_cb.
1571         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1572         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1573         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1574         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1575         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1576         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1577         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1578         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1579         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1580         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1581         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1582         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1584         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1585         whether there are more than one thread makes no sense here since
1586         we only call the slow path if the locks are taken.
1587         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1589         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1590         COND_NWAITERS_SHIFT.
1591         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1592         COND_CLOCK_BITS.
1593         * pthread_cond_init.c: Likewise.
1594         * pthread_cond_timedwait.c: Likewise.
1595         * pthread_cond_wait.c: Likewise.
1596         * pthread_condattr_getclock.c: Likewise.
1597         * pthread_condattr_setclock.c: Likewise.
1598         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1599         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1601         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1602         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1604 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1606         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1607         unistd.h.
1609         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1610         insn suffix.
1611         (THREAD_GSCOPE_GET_FLAG): Remove.
1612         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1613         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1614         changes.
1615         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1616         (THREAD_GSCOPE_GET_FLAG): Remove.
1617         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1618         instead of THREAD_GSCOPE_GET_FLAG.
1619         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1620         it.
1621         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1622         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1623         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1624         THREAD_GSCOPE_WAIT): Define.
1625         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1626         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1627         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1628         THREAD_GSCOPE_WAIT): Define.
1629         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1630         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1631         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1632         THREAD_GSCOPE_WAIT): Define.
1633         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1634         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1635         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1636         THREAD_GSCOPE_WAIT): Define.
1638 2007-05-24  Richard Henderson  <rth@redhat.com>
1640         * descr.h (struct pthread): Add header.gscope_flag.
1641         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1642         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1643         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1644         THREAD_GSCOPE_WAIT): Define.
1646 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1648         * init.c: Make it compile with older kernel headers.
1650         * tst-initializers1.c: Show through exit code which test failed.
1652         * pthread_rwlock_init.c: Also initialize __shared field.
1653         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1654         element in rwlock structure into four byte elements.  One of them is
1655         the new __shared element.
1656         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1657         Likewise.
1658         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1659         __shared, adjust names of other padding elements.
1660         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1661         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1662         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1663         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1664         FUTEX_PRIVATE_FLAG.
1665         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1666         futex to use private operations if possible.
1667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1668         Likewise.
1669         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1670         Likewise.
1671         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1672         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1673         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1674         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1675         Likewise.
1676         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1677         Likewise.
1678         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1679         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1681 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1683         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1684         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1685         * pthread_rwlock_timedrdlock.c: Likewise.
1686         * pthread_rwlock_tryrdlock.c: Likewise.
1688         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1689         optimization.
1691         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1692         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1693         duplication of __sem_wait_cleanup.
1695         * allocatestack.c: Revert last change.
1696         * init.c: Likewise.
1697         * sysdeps/i386/tls.h: Likewise.
1698         * sysdeps/x86_64/tls.h: Likewise.
1699         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1700         header structure.
1701         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1703         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1704         Add private field.
1705         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1706         * pthread_barrier_init.c: Set private flag if pshared and private
1707         futexes are supported.
1708         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1709         private field in futex command setup.
1710         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1712 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1714         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1715         support.
1716         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1717         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1718         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1719         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1720         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1722         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1723         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1724         fields in the structure.
1725         (__old_sem_init): New function.
1726         * sem_open.c: Initialize all fields of the structure.
1727         * sem_getvalue.c: Adjust for renamed element.
1728         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1729         (gen-as-const-headers): Add structsem.sym.
1730         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1731         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1732         struct new_sem.  Add struct old_sem.
1733         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1734         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1735         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1736         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1737         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1738         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1739         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1740         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1741         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1742         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1743         * tst-sem10.c: New file.
1744         * tst-sem11.c: New file.
1745         * tst-sem12.c: New file.
1746         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1747         of struct sem.
1749 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1750             Jakub Jelinek  <jakub@redhat.com>
1752         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1753         Move __pthread_enable_asynccancel right before futex syscall.
1754         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1755         Likewise.
1757 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1759         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1760         THREAD_COPY_PRIVATE_FUTEX): Define.
1761         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1762         THREAD_COPY_PRIVATE_FUTEX): Define.
1763         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1764         * init.c (__pthread_initialize_minimal_internal): Use
1765         THREAD_SET_PRIVATE_FUTEX.
1767         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1768         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1769         THREAD_GSCOPE_FLAG_WAIT): Define.
1770         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1771         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1772         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1773         PTR_DEMANGLE.
1774         (THREAD_GSCOPE_GET_FLAG): Define.
1775         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1776         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1777         instead of ->header.gscope_flag directly.
1779 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1781         * init.c (__pthread_initialize_minimal_internal): Check whether
1782         private futexes are available.
1783         * allocatestack.c (allocate_stack): Copy private_futex field from
1784         current thread into the new stack.
1785         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1786         futexes if they are available.
1787         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1788         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1789         in libc-lowlevellock.S allow using private futexes.
1790         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1792         FUTEX_PRIVATE_FLAG.
1793         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1794         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1795         if they are available.
1796         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1797         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1798         * sysdeps/i386/tcb-offsets.sym: Likewise.
1799         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1800         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1802 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1804         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1805         Remove ptr_wait_lookup_done again.
1806         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1807         (__pthread_initialize_minimal_internal): Initialize
1808         _dl_wait_lookup_done pointer in _rtld_global directly.
1809         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1810         Remove code to code _dl_wait_lookup_done.
1811         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1812         encrypted for now.
1814 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1816         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1817         pthread_mutex_init failed with ENOTSUP.
1819 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1821         * allocatestack.c (__wait_lookup_done): New function.
1822         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1823         Add ptr_wait_lookup_done.
1824         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1825         * pthreadP.h: Declare __wait_lookup_done.
1826         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1827         Define macros to implement reference handling of global scope.
1828         * sysdeps/x86_64/tls.h: Likewise.
1829         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1830         Initialize GL(dl_wait_lookup_done).
1832 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1834         [BZ #4512]
1835         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1836         is detected.
1837         * pthread_mutex_timedlock.c: Likewise.
1838         * pthread_mutex_trylock.c: Likewise.
1839         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1841         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1842         * tst-robust9.c: New file.
1843         * tst-robustpi9.c: New file.
1845         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1846         unnecessary extra cancellation test.
1848 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1850         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1851         extra cancellation test.
1852         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1854 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1856         * descr.h (struct pthread): Rearrange members to fill hole in
1857         64-bit layout.
1859         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1860         (__pthread_setaffinity_new): If syscall was successful and
1861         RESET_VGETCPU_CACHE is defined, use it before returning.
1862         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1864 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1866         [BZ #4455]
1867         * tst-align2.c: Include stackinfo.h.
1868         * tst-getpid1.c: Likewise.
1870 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1872         [BZ #4455]
1873         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1874         * tst-getpid1.c (do_test): Likewise.
1876         [BZ #4456]
1877         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1878         (allocate_stack): Likewise.
1880 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1882         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1883         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1884         (__lll_robust_timedlock_wait): Likewise.
1885         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1887 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1889         [BZ #4465]
1890         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1891         * tst-cancel4.c (tf_fdatasync): New test.
1893 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1895         [BZ #4392]
1896         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1897         check mutexes like normal mutexes.
1899         [BZ #4306]
1900         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1901         Initialize the whole sigevent structure to appease valgrind.
1903 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1905         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1906         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1908 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1910         * tst-locale1.c: Avoid warnings.
1911         * tst-locale2.c: Likewise.
1913 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1915         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1916         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1918 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1920         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1921         __extern_always_inline where appropriate.
1922         * sysdeps/pthread/pthread.h: Likewise.
1924 2007-03-13  Richard Henderson  <rth@redhat.com>
1926         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1927         separate cfi regions for the two subsections.
1929 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1931         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1932         new thread, don't just decrement it.
1933         Patch by Suzuki K P <suzuki@in.ibm.com>.
1935 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1937         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1938         PTHFCT_CALL definition.
1940 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1942         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1943         available, don't use it.
1945 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1947         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1948         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1949         call into the kernel to delay.
1951 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1953         * tst-initializers1.c: We want to test the initializers as seen
1954         outside of libc, so undefined _LIBC.
1956         * pthread_join.c (cleanup): Avoid warning.
1958 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1960         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1961         (__lll_timedwait_tid): Add unwind info.
1963         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1964         function table, mangle the pointers.
1965         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1966         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1967         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1968         demangle pointers before use.
1969         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1970         demangle pointer.
1971         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1972         * sysdeps/pthread/setxid.h: Likewise.
1974 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1976         * tst-rwlock7.c: Show some more information in case of correct
1977         behavior.
1979 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1981         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1982         (lll_futex_timed_wait): Undo part of last change, don't negate
1983         return value.
1985 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1987         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1988         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1990 2006-12-28  David S. Miller  <davem@davemloft.net>
1992         * shlib-versions: Fix sparc64 linux target specification.
1994 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1996         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1997         Adjust include path for pthread_barrier_wait.c move.
1999 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
2001         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
2002         tid isn't reread from pd->tid in between ESRCH test and the syscall.
2004 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2006         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2007         6 argument cancellable syscalls.
2008         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2009         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2010         6 argument cancellable syscalls.
2011         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2013 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2015         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2016         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2018 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2020         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2021         __sync_lock_release instead of __sync_lock_release_si.
2023 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2025         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2026         Define.
2027         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2028         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2029         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2030         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2031         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2032         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2033         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2034         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2035         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2036         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2037         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2039 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2041         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2042         * pthread_barrier_wait.c: ...here.
2043         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2044         * pthread_cond_broadcast.c: ...here.
2045         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2046         * pthread_cond_signal.c: ...here.
2047         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2048         * pthread_cond_timedwait.c: ...here.
2049         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2050         * pthread_cond_wait.c: ...here.
2051         * sysdeps/pthread/pthread_once.c: Move to...
2052         * pthread_once.c: ...here.
2053         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2054         * pthread_rwlock_rdlock.c: ...here.
2055         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2056         * pthread_rwlock_timedrdlock.c: ...here.
2057         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2058         * pthread_rwlock_timedwrlock.c: ...here.
2059         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2060         * pthread_rwlock_unlock.c: ...here.
2061         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2062         * pthread_rwlock_wrlock.c: ...here.
2063         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2064         * pthread_spin_destroy.c: ...here.
2065         * sysdeps/pthread/pthread_spin_init.c: Move to...
2066         * pthread_spin_init.c: ...here.
2067         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2068         * pthread_spin_unlock.c: ...here.
2069         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2070         * pthread_getcpuclockid.c: ...here.
2072         * init.c: USE_TLS support is now always enabled.
2073         * tst-tls5.h: Likewise.
2074         * sysdeps/alpha/tls.h: Likewise.
2075         * sysdeps/i386/tls.h: Likewise.
2076         * sysdeps/ia64/tls.h: Likewise.
2077         * sysdeps/powerpc/tls.h: Likewise.
2078         * sysdeps/s390/tls.h: Likewise.
2079         * sysdeps/sh/tls.h: Likewise.
2080         * sysdeps/sparc/tls.h: Likewise.
2081         * sysdeps/x86_64/tls.h: Likewise.
2083 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2085         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2086         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2087         failed.
2089         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2090         Define to THREAD_SELF->header.multiple_threads.
2091         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2092         Likewise.
2093         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2094         Likewise.
2095         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2096         (SINGLE_THREAD_P): Likewise.
2097         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2098         (SINGLE_THREAD_P): Likewise.
2099         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2100         (SINGLE_THREAD_P): Likewise.
2101         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2102         (SINGLE_THREAD_P): Likewise.
2103         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2104         Likewise.
2105         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2106         (SINGLE_THREAD_P): Likewise.
2107         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2108         (SINGLE_THREAD_P): Likewise.
2109         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2110         Likewise.
2112 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2114         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2115         by default rather than 2_3_3.
2117 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2119         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2120         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2121         atomic_* instead of catomic_* macros.
2123 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2125         [BZ #3285]
2126         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2127         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2128         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2129         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2130         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2131         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2132         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2133         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2134         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2135         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2136         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2137         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2138         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2140 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2142         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2143         cancelable syscalls with six parameters.
2145         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2146         operations instead of atomic_*.
2148 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2150         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2152 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2154         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2155         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2156         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2157         New file.
2158         * pthread_attr_setstack.c: Allow overwriting the version number of the
2159         new symbol.
2160         * pthread_attr_setstacksize.c: Likewise.
2161         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2162         it.
2163         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2164         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2166 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2168         [BZ #3251]
2169         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2170         Patch by Petr Baudis.
2172 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2174         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2176         * tst-cancel2.c (tf): Loop as long as something was written.
2178 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2180         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2181         mutexes wake all mutexes.
2182         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2183         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2184         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2186 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2188         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2189         to guarantee the thread is always canceled.
2191 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2193         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2194         Include stdlib.h.
2195         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2196         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2198         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2199         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2201 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2203         [BZ #3123]
2204         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2205         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2209         * Makefile (tests): Add tst-cond22.
2210         * tst-cond22.c: New file.
2212 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2214         [BZ #3124]
2215         * descr.h (struct pthread): Add parent_cancelhandling.
2216         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2217         cancelhandling value to child.
2218         * pthread_create.c (start_thread): If parent thread was canceled
2219         reset the SIGCANCEL mask.
2220         * Makefile (tests): Add tst-cancel25.
2221         * tst-cancel25.c: New file.
2223 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2224             Ulrich Drepper  <drepper@redhat.com>
2226         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2227         counterp if it is already zero.
2228         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2230 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2231             Roland McGrath  <roland@redhat.com>
2233         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2234         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2235         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2236         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2237         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2238         lll_robust_mutex_timedlock, lll_mutex_unlock,
2239         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2240         Add _L_*_ symbols around the subsection.
2241         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2242         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2244 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2245             Roland McGrath  <roland@redhat.com>
2247         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2248         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2249         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2250         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2251         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2252         lll_robust_mutex_timedlock, lll_mutex_unlock,
2253         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2254         Add _L_*_ symbols around the subsection.
2255         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2256         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2258 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2260         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2261         change because it can disturb too much existing code.  If real hard
2262         reader preference is needed we'll introduce another type.
2263         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2264         (pthread_rwlock_timedwrlock): Likewise.
2265         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2266         Likewise.
2268 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2270         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2271         reader preference.
2272         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2273         (pthread_rwlock_timedwrlock): Likewise.
2274         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2275         Likewise.
2277 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2279         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2280         Only define ifdef SHARED.
2282 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2284         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2285         (free_stacks): ...here.
2286         (__free_stack_cache): New function.
2287         * pthreadP.h: Declare __free_stack_cache.
2288         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2289         ptr_freeres.
2290         * init.c (pthread_functions): Initialize ptr_freeres.
2291         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2292         New freeres function.
2294 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2296         [BZ #3018]
2297         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2299 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2301         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2302         _XOPEN_REALTIME_THREADS.
2304 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2306         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2307         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2308         HAVE_CLOCK_GETTIME_VSYSCALL.
2309         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2311 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2313         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2314         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2315         * descr.h (struct priority_protection_data): New type.
2316         (struct pthread): Add tpp field.
2317         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2318         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2319         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2320         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2321         TPP mutexes.
2322         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2323         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2324         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2325         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2326         * tpp.c: New file.
2327         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2328         boosted by TPP.
2329         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2330         * pthread_mutexattr_getprioceiling.c
2331         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2332         in the SCHED_FIFO priority range.
2333         * pthread_mutexattr_setprioceiling.c
2334         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2335         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2336         if mutex is not TPP.  Ceiling is now in __data.__lock.
2337         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2338         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2339         is now in __data.__lock.  Add locking.
2340         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2341         * Makefile (libpthread-routines): Add tpp.
2342         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2343         * tst-tpp.h: New file.
2344         * tst-mutexpp1.c: New file.
2345         * tst-mutexpp6.c: New file.
2346         * tst-mutexpp10.c: New file.
2347         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2348         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2350 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2352         [BZ #2843]
2353         * pthread_join.c (pthread_join): Account for self being canceled
2354         when checking for deadlocks.
2355         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2356         (tf1): Don't print anything after pthread_join returns, this would be
2357         another cancellation point.
2358         (tf2): Likewise.
2359         * tst-join6.c: New file.
2360         * Makefile (tests): Add tst-join6.
2362 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2364         [BZ #2892]
2365         * pthread_setspecific.c (__pthread_setspecific): Check
2366         out-of-range index before checking for unused key.
2368         * sysdeps/pthread/gai_misc.h: New file.
2370 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2372         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2373         file.  Don't use sysctl.
2374         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2375         overwrite the file if this is likely not true.
2377 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2379         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2380         * Makefile (tests): Add tst-getpid3.
2381         * tst-getpid3.c: New file.
2383 2006-07-30  Roland McGrath  <roland@redhat.com>
2385         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2387         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2388         (pause_not_cancel): New macro.
2389         (nanosleep_not_cancel): New macro.
2390         (sigsuspend_not_cancel): New macro.
2391         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2392         nanosleep_not_cancel macro from <not-cancel.h>.
2393         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2394         macro from <not-cancel.h>.
2396 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2397             Jakub Jelinek  <jakub@redhat.com>
2399         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2400         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2401         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2402         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2403         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2404         * pthread_mutex_lock.c: Likewise.
2405         * pthread_mutex_timedlock.c: Likewise.
2406         * pthread_mutex_trylock.c: Likewise.
2407         * pthread_mutex_unlock.c: Likewise.
2408         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2409         all mutexes.
2410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2412         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2413         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2414         pthread-pi-defines.sym.
2415         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2416         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2417         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2418         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2419         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2420         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2421         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2422         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2423         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2424         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2425         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2426         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2427         * tst-mutex2.c: Likewise.
2428         * tst-mutex3.c: Likewise.
2429         * tst-mutex4.c: Likewise.
2430         * tst-mutex5.c: Likewise.
2431         * tst-mutex6.c: Likewise.
2432         * tst-mutex7.c: Likewise.
2433         * tst-mutex7a.c: Likewise.
2434         * tst-mutex8.c: Likewise.
2435         * tst-mutex9.c: Likewise.
2436         * tst-robust1.c: Likewise.
2437         * tst-robust7.c: Likewise.
2438         * tst-robust8.c: Likewise.
2439         * tst-mutexpi1.c: New file.
2440         * tst-mutexpi2.c: New file.
2441         * tst-mutexpi3.c: New file.
2442         * tst-mutexpi4.c: New file.
2443         * tst-mutexpi5.c: New file.
2444         * tst-mutexpi6.c: New file.
2445         * tst-mutexpi7.c: New file.
2446         * tst-mutexpi7a.c: New file.
2447         * tst-mutexpi8.c: New file.
2448         * tst-mutexpi9.c: New file.
2449         * tst-robust1.c: New file.
2450         * tst-robust2.c: New file.
2451         * tst-robust3.c: New file.
2452         * tst-robust4.c: New file.
2453         * tst-robust5.c: New file.
2454         * tst-robust6.c: New file.
2455         * tst-robust7.c: New file.
2456         * tst-robust8.c: New file.
2457         * Makefile (tests): Add the new tests.
2459         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2460         * pthread_mutex_destroy.c: Remove unneeded label.
2462 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2464         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2465         computations to compile time.
2467 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2469         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2471 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2473         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2475 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2477         * pthread_key_create.c (__pthread_key_create): Do away with
2478         __pthread_keys_lock.
2480         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2481         (__kernel_cpumask_size): Mark as hidden.
2482         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2484         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2485         * semaphoreP.h (__sem_mappings_lock): Likewise.
2487 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2489         * pthread_atfork.c: Mark __dso_handle as hidden.
2491 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2493         [BZ #2644]
2494         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2495         the reload problem.  Change the one path in pthread_cancel_init
2496         which causes the problem.  Force gcc to reload.  Simplify callers.
2497         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2498         (_Unwind_GetBSP): Undo last patch.
2500 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2502         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2503         function pointer is reloaded after pthread_cancel_init calls.
2505         [BZ #2644]
2506         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2507         pointers are reloaded after pthread_cancel_init calls.
2509 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2511         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2512         __always_inline.
2514 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2516         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2517         Allocate new object which is passed to timer_sigev_thread so that
2518         the timer can be deleted before the new thread is scheduled.
2520 2006-04-26  Roland McGrath  <roland@redhat.com>
2522         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2524 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2526         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2527         suffix for conditional jumps.
2528         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2529         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2530         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2531         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2532         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2533         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2535         * init.c (sigcancel_handler): Compare with correct PID even if the
2536         thread is in the middle of a fork call.
2537         (sighandler_setxid): Likewise.
2538         Reported by Suzuki K P <suzuki@in.ibm.com> .
2540 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2542         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2544 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2546         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2547         fails [Coverity CID 105].
2549 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2551         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2553 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2555         [BZ #2505]
2556         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2557         Define __lll_rel_instr using lwsync.
2559 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2561         * allocatestack.c (allocate_stack): Always initialize robust_head.
2562         * descr.h: Define struct robust_list_head.
2563         (struct pthread): Use robust_list_head in robust mutex list definition.
2564         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2565         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2566         (__pthread_initialize_minimal_internal): Register robust_list with
2567         the kernel.
2568         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2569         Declare __set_robust_list_avail.
2570         * pthread_create.c (start_thread): Register robust_list of new thread.
2571         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2572         waiters.
2573         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2574         number of users, it's unreliable.
2575         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2576         set_robust_list syscall is available.
2577         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2578         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2579         Set robust_head.list_op_pending before trying to lock a robust mutex.
2580         * pthread_mutex_timedlock.c: Likewise.
2581         * pthread_mutex_trylock.c: Likewise.
2582         * pthread_mutex_unlock.c: Likewise for unlocking.
2583         * Makefile (tests): Add tst-robust8.
2584         * tst-robust8.c: New file.
2586 2006-03-08  Andreas Schwab  <schwab@suse.de>
2588         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2589         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2591 2006-03-05  Roland McGrath  <roland@redhat.com>
2593         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2594         and $config_os doesn't match *linux*.
2596 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2598         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2599         Use __syscall_error.
2600         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2601         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2602         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2603         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2604         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2605         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2607 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2609         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2611 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2613         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2614         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2615         mutex.
2616         (__lll_robust_timedlock_wait): Likewise.
2617         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2618         (__lll_robust_lock_wait): Likewise.
2619         (__lll_robust_timedlock_wait): Likewise.
2620         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2621         (__lll_robust_lock_wait): Likewise.
2622         (__lll_robust_timedlock_wait): Likewise.
2624 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2626         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2627         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2628         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2629         lll_robust_mutex_unlock): Define.
2630         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2632 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2634         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2635         instead of <clone.S>.
2637 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2639         * Makefile (libpthread-routines): Add
2640         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2641         and pthread_mutex_[sg]etprioceiling.
2642         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2643         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2644         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2645         pthread_mutex_setprioceiling.
2646         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2647         PTHREAD_PRIO_PROTECT): New enum values.
2648         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2649         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2650         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2651         prototypes.
2652         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2653         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2654         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2655         Define.
2656         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2657         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2658         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2659         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2660         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2661         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2662         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2663         protocol mutexes.
2664         * pthread_mutex_getprioceiling.c: New file.
2665         * pthread_mutex_setprioceiling.c: New file.
2666         * pthread_mutexattr_getprioceiling.c: New file.
2667         * pthread_mutexattr_setprioceiling.c: New file.
2668         * pthread_mutexattr_getprotocol.c: New file.
2669         * pthread_mutexattr_setprotocol.c: New file.
2671 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2673         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2675 2006-02-27  Roland McGrath  <roland@redhat.com>
2677         * sysdeps/pthread/Subdirs: List nptl here too.
2678         * configure (libc_add_on_canonical): New variable.
2680         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2682         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2683         self to get main source tree's file.
2684         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2685         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2686         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2687         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2688         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2689         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2690         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2691         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2692         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2693         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2694         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2695         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2696         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2698         * Makefile: Use $(sysdirs) in vpath directive.
2700         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2701         (CPPFLAGS-timer_routines.c): Likewise.
2703         * Makeconfig (includes): Variable removed.
2705 2006-02-26  Roland McGrath  <roland@redhat.com>
2707         * sysdeps/generic/pt-raise.c: Moved to ...
2708         * pt-raise.c: ... here.
2709         * sysdeps/generic/lowlevellock.h: Moved to ...
2710         * lowlevellock.h: ... here.
2712 2006-02-23  Roland McGrath  <roland@redhat.com>
2714         * descr.h (struct pthread): Add final member `end_padding'.
2715         (PTHREAD_STRUCT_END_PADDING): Use it.
2717 2006-02-20  Roland McGrath  <roland@redhat.com>
2719         * sysdeps/mips: Directory removed, saved in ports repository.
2720         * sysdeps/unix/sysv/linux/mips: Likewise.
2722 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2724         * tst-robust1.c: Add second mutex to check that the mutex list is
2725         handled correctly.
2727 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2729         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2730         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2731         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2732         lll_robust_mutex_unlock): New macros.
2733         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2734         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2735         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2736         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2737         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2739 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2741         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2742         definitions.
2743         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2745 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2747         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2748         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2749         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2750         (lll_robust_mutex_unlock): Likewise.
2752 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2754         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2755         Set robust_list.__next rather than robust_list.
2756         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2757         (__pthread_list_t): New typedef.
2758         (pthread_mutex_t): Replace __next and __prev fields with __list.
2759         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2760         (__pthread_list_t): New typedef.
2761         (pthread_mutex_t): Replace __next and __prev fields with __list.
2762         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2763         (__pthread_list_t, __pthread_slist_t): New typedefs.
2764         (pthread_mutex_t): Replace __next and __prev fields with __list.
2765         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2766         (__pthread_list_t, __pthread_slist_t): New typedefs.
2767         (pthread_mutex_t): Replace __next and __prev fields with __list.
2768         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2769         (__pthread_list_t, __pthread_slist_t): New typedefs.
2770         (pthread_mutex_t): Replace __next and __prev fields with __list.
2771         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2772         (__pthread_slist_t): New typedef.
2773         (pthread_mutex_t): Replace __next field with __list.
2775 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2777         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2778         PTHREAD_MUTEX_OWNERDEAD.
2779         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2780         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2781         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2782         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2783         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2784         to PTHREAD_MUTEX_INCONSISTENT.
2785         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2786         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2787         * pthread_mutex_trylock.c: Likewise.
2788         * pthread_mutex_timedlock.c: Likewise.
2789         * pthread_mutex_unlock.c: Likewise.
2790         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2791         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2792         lowlevelrobustlock.sym.
2793         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2794         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2795         definitions.
2796         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2797         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2798         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2799         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2800         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2802 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2804         * allocatestack.c (allocate_stack): Initialize robust_list.
2805         * init.c (__pthread_initialize_minimal_internal): Likewise.
2806         * descr.h (struct xid_command): Pretty printing.
2807         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2808         robust_list.  Adjust macros.
2809         * pthread_create.c (start_thread): Adjust robust_list handling.
2810         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2811         but the owner for all robust mutex types.
2812         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2813         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2814         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2815         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2817         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2818         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2820 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2822         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2823         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2825 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2827         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2828         Return status.
2829         (lll_futex_timed_wait): Define.
2831 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2833         * tst-cancel4.c: Test ppoll.
2835 2006-01-18  Andreas Jaeger  <aj@suse.de>
2837         [BZ #2167]
2838         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2839         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2840         by Jim Gifford <patches@jg555.com>.
2842 2006-01-13  Richard Henderson  <rth@redhat.com>
2844         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2846 2006-01-10  Roland McGrath  <roland@redhat.com>
2848         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2849         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2850         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2851         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2852         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2853         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2854         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2855         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2856         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2857         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2859 2006-01-09  Roland McGrath  <roland@redhat.com>
2861         * tst-initializers1-c89.c: New file.
2862         * tst-initializers1-c99.c: New file.
2863         * tst-initializers1-gnu89.c: New file.
2864         * tst-initializers1-gnu99.c: New file.
2865         * Makefile (tests): Add them.
2866         (CFLAGS-tst-initializers1-c89.c): New variable.
2867         (CFLAGS-tst-initializers1-c99.c): New variable.
2868         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2869         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2871         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2872         Use __extension__ on anonymous union definition.
2873         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2874         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2875         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2876         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2877         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2879 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2881         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2882         Don't give the union a name because it changes the mangled name.
2883         Instead name the struct for __data.
2884         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2885         Likewise.
2886         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2887         Likewise.
2889 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2891         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2892         stack bias to mc_ftp field.
2894 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2896         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2897         being too clever and reloading the futex value where it shouldn't.
2899 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2901         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2902         correct type.
2904 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2906         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2907         Add cfi directives.
2909 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2911         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2912         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2913         rename in tcbhead_t.
2915         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2916         Don't give the union a name because it changes the mangled name.
2917         Instead name the struct for __data.
2918         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2919         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2920         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2921         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2922         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2923         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2925 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2927         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2928         Return status.
2929         (lll_futex_timed_wait): Define.
2930         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2931         * sysdeps/pthread/aio_misc.h: New file.
2933 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2935         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2937 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2939         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2940         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2941         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2943 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2945         * tst-cancel24.cc: Use C headers instead of C++ headers.
2947 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2949         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2950         sparc-linux configured glibc.
2951         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2952         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2953         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2954         atomic_compare_and_exchange_val_24_acq instead of
2955         atomic_compare_and_exchange_val_acq.
2956         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2957         instead of atomic_exchange_rel.
2958         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2959         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2960         file.
2961         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2962         file.
2963         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2964         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2965         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2966         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2967         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2968         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2969         New file.
2970         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2971         New file.
2972         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2973         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2974         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2975         file.
2976         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2977         file.
2978         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2980 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2982         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2983         mutex initializers.
2985 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2987         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2988         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2989         THREAD_COPY_POINTER_GUARD): Define.
2990         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2991         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2993 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2995         * version.c: Update copyright year.
2997 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2999         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
3000         .eh_frame section, use cfi_* directives.
3001         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
3003 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3005         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3006         now.
3008 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3010         * sysdeps/pthread/sigaction.c: Removed.
3011         * sigaction.c: New file.
3012         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3014 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3016         * Makefile (tests): Add tst-signal7.
3017         * tst-signal7.c: New file.
3019 2005-12-27  Roland McGrath  <roland@redhat.com>
3021         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3022         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3023         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3024         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3025         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3026         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3027         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3028         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3029         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3030         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3031         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3033 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3035         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3036         and __prev field to pthread_mutex_t.
3037         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3038         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3039         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3040         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3041         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3042         to pthread_mutex_t.
3044 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3046         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3047         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3048         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3049         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3050         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3051         and PTHREAD_MUTEXATTR_FLAG_BITS.
3052         * descr.h (struct pthread): Add robust_list field and define
3053         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3054         * pthread_mutexattr_getrobust.c: New file.
3055         * pthread_mutexattr_setrobust.c: New file.
3056         * pthread_mutex_consistent.c: New file.
3057         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3058         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3059         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3060         Adjust pthread_mutex_t initializers.
3061         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3062         field to pthread_mutex_t.
3063         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3064         and __prev field to pthread_mutex_t.
3065         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3066         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3067         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3068         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3069         * pthread_mutexattr_gettype.c: Likewise.
3070         * pthread_mutexattr_setpshared.c: Likewise.
3071         * pthread_mutexattr_settype.c: Likewise.
3072         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3073         Initialize mutex kind according to robust flag.
3074         * pthread_mutex_lock.c: Implement local robust mutex.
3075         * pthread_mutex_timedlock.c: Likewise.
3076         * pthread_mutex_trylock.c: Likewise.
3077         * pthread_mutex_unlock.c: Likewise.
3078         * pthread_create.c (start_thread): Mark robust mutexes which remained
3079         locked as dead.
3080         * tst-robust1.c: New file.
3081         * tst-robust2.c: New file.
3082         * tst-robust3.c: New file.
3083         * tst-robust4.c: New file.
3084         * tst-robust5.c: New file.
3085         * tst-robust6.c: New file.
3086         * tst-robust7.c: New file.
3087         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3088         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3089         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3090         tst-robust5, tst-robust6, and tst-robust7.
3092         * tst-typesizes.c: New file.
3093         * Makefile (tests): Add tst-typesizes.
3095         * tst-once3.c: More debug output.
3097 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3099         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3100         missing after last change.
3102         * version.c: Update copyright year.
3104 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3106         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3107         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3108         * pthread_mutex_trylock.c: Likewise.
3109         * pthread_mutex_timedlock.c: Likewise.
3110         * pthread_mutex_unlock.c: Likewise.
3112 2005-12-22  Roland McGrath  <roland@redhat.com>
3114         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3115         so that #include_next's search location is not reset to the -I..
3116         directory where <nptl/...> can be found.
3118 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3120         [BZ #1913]
3121         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3122         Fix unwind info.  Remove useless branch prediction prefix.
3123         * tst-cancel24.cc: New file.
3124         * Makefile: Add rules to build and run tst-cancel24.
3126 2005-12-21  Roland McGrath  <roland@redhat.com>
3128         * libc-cancellation.c: Use <> rather than "" #includes.
3129         * pt-cleanup.c: Likewise.
3130         * pthread_create.c: Likewise.
3131         * pthread_join.c: Likewise.
3132         * pthread_timedjoin.c: Likewise.
3133         * pthread_tryjoin.c: Likewise.
3134         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3135         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3136         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3137         * unwind.c: Likewise.
3139 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3141         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3142         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3143         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3144         THREAD_COPY_POINTER_GUARD): Define.
3146 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3148         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3149         rather than one.
3150         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3151         THREAD_COPY_POINTER_GUARD): Define.
3152         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3153         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3154         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3155         THREAD_COPY_POINTER_GUARD): Define.
3156         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3157         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3158         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3159         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3160         Use PTR_DEMANGLE for B0 if defined.
3162 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3164         * pthread_create.c (__pthread_create_2_1): Use
3165         THREAD_COPY_POINTER_GUARD if available.
3166         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3167         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3168         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3169         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3170         * sysdeps/x86_64/tls.h: Likewise.
3172 2005-12-15  Roland McGrath  <roland@redhat.com>
3174         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3176 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3178         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3179         sysdeps/generic.
3180         * errno-loc.c: New file.
3182 2005-12-12  Roland McGrath  <roland@redhat.com>
3184         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3185         adjustments before choosing stack size.  Update minimum stack size
3186         calculation to match allocate_stack change.
3188 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3190         * allocatestack.c (allocate_stack): Don't demand that there is an
3191         additional full page available on the stack beside guard, TLS, the
3192         minimum stack.
3194 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3196         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3197         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3199         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3200         compiling 32-bit code we must define __cleanup_fct_attribute.
3202 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3204         [BZ #1920]
3205         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3206         __attribute__ instead of __attribute.
3207         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3208         (__cleanup_fct_attribute): Likewise.
3210 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3212         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3213         a write barrier before writing libgcc_s_getcfa.
3215 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3217         * sysdeps/unix/sysv/linux/configure: Removed.
3219 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3221         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3222         optional init_array/fini_array support.
3224 2005-10-24  Roland McGrath  <roland@redhat.com>
3226         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3227         versioned_symbol use.
3229 2005-10-16  Roland McGrath  <roland@redhat.com>
3231         * init.c (__pthread_initialize_minimal_internal): Even when using a
3232         compile-time default stack size, apply the minimum that allocate_stack
3233         will require, and round up to page size.
3235 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3237         * Makefile ($(test-modules)): Remove static pattern rule.
3239 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3240             Ulrich Drepper  <drepper@redhat.com>
3242         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3243         alignment in callback function.
3244         * Makefile: Add rules to build and run tst-align3.
3245         * tst-align3.c: New file.
3247 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3249         * allocatestack.c (setxid_signal_thread): Add
3250         INTERNAL_SYSCALL_DECL (err).
3252 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3254         * allocatestack.c (setxid_signal_thread): Need to use
3255         atomic_compare_and_exchange_bool_acq.
3257 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3258             Jakub Jelinek  <jakub@redhat.com>
3260         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3261         CANCEL_RESTMASK.
3262         (struct pthread): Move specific_used field to avoid padding.
3263         Add setxid_futex field.
3264         * init.c (sighandler_setxid): Reset setxid flag and release the
3265         setxid futex.
3266         * allocatestack.c (setxid_signal_thread): New function.  Broken
3267         out of the bodies of the two loops in __nptl_setxid.  For undetached
3268         threads check whether they are exiting and if yes, don't send a signal.
3269         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3270         * pthread_create.c (start_thread): For undetached threads, check
3271         whether setxid bit is set.  If yes, wait until signal has been
3272         processed.
3274         * allocatestack.c (STACK_VARIABLES): Initialize them.
3275         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3277 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3279         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3280         waiters, awake all waiters on the associated mutex.
3282 2005-09-22  Roland McGrath  <roland@redhat.com>
3284         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3285         ../sysdeps/x86_64/hp-timing.h).
3287 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3289         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3290         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3291         (lll_futex_wake_unlock): Define.
3292         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3293         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3294         (lll_futex_wake_unlock): Define.
3295         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3296         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3297         (lll_futex_wake_unlock): Define.
3298         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3299         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3300         (lll_futex_wake_unlock): Define.
3301         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3302         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3303         (lll_futex_wake_unlock): Define.
3304         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3305         lll_futex_wake_unlock.
3306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3307         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3308         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3309         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3310         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3311         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3313 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3315         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3316         Fix typo in register name.
3318 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3320         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3321         Use __sigfillset.  Document that sigfillset does the right thing wrt
3322         to SIGSETXID.
3324 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3326         [BZ #1102]
3327         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3328         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3329         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3330         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3331         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3332         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3333         in the structure.
3334         * Makefile (tests): Add tst-initializers1.
3335         (CFLAGS-tst-initializers1.c): Set.
3336         * tst-initializers1.c: New test.
3338 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3340         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3341         Make sure __flags are located at offset 48 from the start of the
3342         structure.
3344 2005-07-02  Roland McGrath  <roland@redhat.com>
3346         * Makeconfig: Comment fix.
3348 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3350         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3351         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3352         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3353         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3354         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3355         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3356         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3357         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3358         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3359         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3361 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3363         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3364         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3365         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3366         fields.
3367         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3368         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3369         field.  Put in sysinfo field unconditionally.
3370         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3371         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3372         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3373         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3374         fields.
3375         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3376         * pthread_create.c (__pthread_create_2_1): Use
3377         THREAD_COPY_STACK_GUARD macro.
3378         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3379         tests.
3380         * tst-stackguard1.c: New file.
3381         * tst-stackguard1-static.c: New file.
3383 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3385         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3386         Invoke CGOTSETUP and CGOTRESTORE.
3387         (CGOTSETUP, CGOTRESTORE): Define.
3389 2005-05-29  Richard Henderson  <rth@redhat.com>
3391         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3392         (tf_write, tf_writev): Use it.
3393         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3394         the system minimum.
3396 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3398         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3399         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3400         __librt_*_asynccancel@local.
3402 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3404         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3405         all occurrences of JUMPTARGET.  Instead append @local to labels.
3407 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3409         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3410         size/alignment of struct pthread rather than tcbhead_t.
3411         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3412         Likewise.
3413         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3414         Likewise.
3415         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3416         Likewise.
3418 2005-05-19  Richard Henderson  <rth@redhat.com>
3420         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3421         __sync_val_compare_and_swap, not explicit _si variant.
3422         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3424 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3426         [BZ #915]
3427         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3429 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3431         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3432         .eh_frame section, use cfi_* directives.
3434 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3436         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3437         of "" includes.
3439 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3441         [BZ #1075]
3442         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3443         aio_write blocks.
3445 2005-04-27  Roland McGrath  <roland@redhat.com>
3447         * Makefile (tests): Remove tst-clock2.
3449         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3450         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3451         translating to the kernel clockid_t for our own process/thread clock.
3453         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3455 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3457         * old_pthread_cond_init.c: Include <errno.h>.
3458         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3459         process shared or uses clock other than CLOCK_REALTIME.
3460         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3462 2005-04-13  David S. Miller  <davem@davemloft.net>
3464         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3465         * sysdeps/sparc/sparc64/clone.S: New file.
3467 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3469         [BZ #1102]
3470         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3471         __inline instead of inline.
3472         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3474 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3476         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3477         functionally equivalent, but shorter instructions.
3478         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3479         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3481         Likewise.
3482         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3483         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3484         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3485         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3487         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3488         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3489         Likewise.
3490         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3491         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3493         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3494         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3496 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3498         * sysdeps/mips/Makefile: New file.
3499         * sysdeps/mips/nptl-sysdep.S: New file.
3500         * sysdeps/mips/tcb-offsets.sym: New file.
3501         * sysdeps/mips/pthread_spin_lock.S: New file.
3502         * sysdeps/mips/pthread_spin_trylock.S: New file.
3503         * sysdeps/mips/pthreaddef.h: New file.
3504         * sysdeps/mips/tls.h: New file.
3505         * sysdeps/mips/jmpbuf-unwind.h: New file.
3506         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3507         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3508         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3509         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3510         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3511         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3512         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3513         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3514         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3515         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3517 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3519         [BZ #1112]
3520         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3521         variable to scerr.
3523 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3525         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3527 2005-02-25  Roland McGrath  <roland@redhat.com>
3529         * alloca_cutoff.c: Correct license text.
3530         * tst-unload.c: Likewise.
3531         * sysdeps/pthread/allocalim.h: Likewise.
3532         * sysdeps/pthread/pt-initfini.c: Likewise.
3533         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3534         * sysdeps/pthread/bits/sigthread.h: Likewise.
3535         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3536         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3538 2005-02-16  Roland McGrath  <roland@redhat.com>
3540         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3541         Use unsigned int * for ptr_nthreads.
3543 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3545         [BZ #721]
3546         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3547         gcc4.
3549 2005-02-07  Richard Henderson  <rth@redhat.com>
3551         [BZ #787]
3552         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3553         argument.
3555 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3557         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3558         order of arguments in invocation of atomic_add_zero.
3560 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3562         [BZ #737]
3563         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3564         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3565         at least gotntpoff relocation and addition.
3566         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3567         Likewise.
3568         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3569         Likewise.
3570         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3571         Likewise.
3573 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3575         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3576         entry for static tls deallocation fix.
3577         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3578         also contains information whether the memory pointed to is static
3579         TLS or not.
3580         * sysdeps/i386/tls.h: Likewise.
3581         * sysdeps/ia64/tls.h: Likewise.
3582         * sysdeps/powerpc/tls.h: Likewise.
3583         * sysdeps/s390/tls.h: Likewise.
3584         * sysdeps/sh/tls.h: Likewise.
3585         * sysdeps/sparc/tls.h: Likewise.
3586         * sysdeps/x86_64/tls.h: Likewise.
3588 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3590         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3592 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3594         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3595         %esp.
3596         * Makefile (tests): Add tst-align2.
3597         * tst-align2.c: New test.
3598         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3599         -mpreferred-stack-boundary=4.
3601 2004-12-18  Roland McGrath  <roland@redhat.com>
3603         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3604         New file removed withdrawn for the moment.
3606 2004-12-17  Richard Henderson  <rth@redhat.com>
3608         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3609         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3611 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3613         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3614         Increased PTHREAD_STACK_MIN.
3616         * tst-context1.c (stacks): Use bigger stack size.
3618 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3620         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3621         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3623 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3625         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3626         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3627         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3629 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3631         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3633 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3635         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3636         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3638         * tst-getpid1.c: If child crashes, report this first.  Print which
3639         signal.
3641 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3643         * init.c (__pthread_initialize_minimal_internal): Also unblock
3644         SIGSETXID.
3646 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3648         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3649         _POSIX_THREAD_CPUTIME): Define to 0.
3650         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3651         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3652         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3653         __timer_signal_thread_tclk): Remove.
3654         (init_module): Remove their initialization.
3655         (thread_cleanup): Remove their cleanup assertions.
3656         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3657         __timer_signal_thread_tclk): Remove.
3658         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3659         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3660         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3662 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3664         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3665         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3667         * Makefile (tests): Add tst-getpid2.
3668         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3669         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3670         * tst-getpid2.c: New test.
3672 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3674         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3676 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3678         * Makefile (tests): Add tst-getpid1.
3679         * tst-getpid1.c: New file.
3680         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3681         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3683 2004-12-02  Roland McGrath  <roland@redhat.com>
3685         * Makefile (libpthread-nonshared): Variable removed.
3686         ($(objpfx)libpthread_nonshared.a): Target removed.
3687         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3688         These are now handled by generic magic from
3689         libpthread-static-only-routines being set.
3691 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3693         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3694         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3695         _POSIX_THREAD_PRIO_PROTECT): Define.
3696         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3697         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3698         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3700 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3702         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3703         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3704         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3705         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3706         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3707         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3708         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3710 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3712         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3714         * Makefile (libpthread-routines): Add pthread_setschedprio.
3715         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3716         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3717         * pthread_setschedprio.c: New file.
3719 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3721         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3722         * pthread_cancel.c (pthread_create): Likewise.
3724         * Makefile (libpthread-routines): Add vars.
3725         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3726         * init.c (__default_stacksize, __is_smp): Remove.
3727         * vars.c: New file.
3728         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3729         and define a wrapper macro.
3730         (PTHREAD_STATIC_FN_REQUIRE): Define.
3731         * allocatestack.c (__find_thread_by_id): Undefine.
3732         * pthread_create (__pthread_keys): Remove.
3733         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3734         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3735         PTHREAD_STATIC_FN_REQUIRE.
3737 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3739         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3740         parameter to REGISTER macro.
3742 2004-11-17  Roland McGrath  <roland@redhat.com>
3744         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3745         Make sure SIGCANCEL is blocked as well.
3747 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3749         * sysdeps/pthread/setxid.h: New file.
3750         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3751         (struct xid_command): Add forward decl.
3752         (struct pthread_functions): Change return type of __nptl_setxid hook
3753         to int.
3754         * pthreadP.h (__nptl_setxid): Change return type to int.
3755         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3756         calling thread, return its return value and set errno on failure.
3757         * descr.h (struct xid_command): Change id type to long array.
3759         * Makefile: Add rules to build and test tst-setuid1 and
3760         tst-setuid1-static.
3761         * tst-setuid1.c: New test.
3762         * tst-setuid1-static.c: New test.
3764 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3766         * Makefile (tests): Add tst-exit3.
3767         * tst-exit3.c: New test.
3769 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3771         * Makefile (tests): Add tst-exit2.
3772         * tst-exit2.c: New file.
3774 2004-11-09  Roland McGrath  <roland@redhat.com>
3776         [BZ #530]
3777         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3778         here, before calling clone.
3779         * pthread_create.c (start_thread): Don't do it here.
3781 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3783         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3785 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3787         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3788         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3789         assembler warning.
3791 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3793         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3794         if sched_priority is not between minprio and maxprio.
3796 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3798         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3799         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3801         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3802         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3804 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3806         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3807         not-cancelable I/O functions.
3809 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3811         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3812         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3813         make sure 2 is stored in the futex and we looked at the old value.
3814         Fix a few other problems to return the correct value.
3816 2004-10-14  Richard Henderson  <rth@redhat.com>
3818         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3819         make gcc4 happy.
3821 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3823         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3824         of pthread-functions.h and pthreaddef.h.
3825         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3827         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3828         Change __data.__nwaiters from int to unsigned int.
3830         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3831         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3833         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3834         before return type.
3836         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3837         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3839 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3841         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3842         test fails, remove message queue.
3843         (tf_msgsnd): Likewise.
3845 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3847         * tst-clock1.c: Change #ifdef to #if defined.
3848         * tst-clock2.c: Likewise.
3849         * tst-cond11.c: Likewise.
3851         * sysdeps/pthread/timer_create.c (timer_create): Use
3852         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3853         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3854         THREAD_CPUTIME.
3856 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3858         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3859         _POSIX_THREAD_CPUTIME): Define to 0.
3861 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3863         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3864         and _POSIX_THREAD_CPUTIME to zero.
3865         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3866         * tst-barrier2.c: Fix testing for POSIX feature.
3867         * tst-clock1.c: Likewise.
3868         * tst-clock2.c: Likewise.
3869         * tst-cond11.c: Likewise.
3870         * tst-cond4.c: Likewise.
3871         * tst-cond6.c: Likewise.
3872         * tst-flock2.c: Likewise.
3873         * tst-mutex4.c: Likewise.
3874         * tst-mutex9.c: Likewise.
3875         * tst-rwlock12.c: Likewise.
3876         * tst-rwlock4.c: Likewise.
3877         * tst-signal1.c: Likewise.
3878         * tst-spin2.c: Likewise.
3879         * sysdeps/pthread/posix-timer.h: Likewise.
3880         * sysdeps/pthread/timer_create.c: Likewise.
3881         * sysdeps/pthread/timer_routines.c: Likewise.
3883 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3885         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3886         (__lll_mutex_timedlock_wait): Address futex correctly.
3888         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3889         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3890         make sure 2 is stored in the futex and we looked at the old value.
3891         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3892         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3893         which might very well made the code not working at all before.
3894         [BZ #417]
3896 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3898         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3899         allow SIGSETXID to be sent.
3900         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3901         for SIGSETXID to be defined.
3902         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3903         SIGSETXID cannot be blocked.
3905         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3906         Add __extension__ to long long types.
3907         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3908         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3909         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3910         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3911         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3912         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3913         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3915 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3917         * descr.h (struct pthread): Add stopped_start field.
3918         * sysdeps/pthread/createthread.c (create_thread): Set
3919         start_stopped flag in descriptor for new thread appropriately.
3920         * pthread_create.c (start_thread): Only take lock to be stopped on
3921         startup if stopped_start flag says so.
3923 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3925         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3926         is created detached and if yes, do not try to free the stack in case
3927         the thread creation failed.
3928         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3929         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3930         case there has been no error.  [BZ #405]
3932         * pthread_create.c (start_thread): Don't wait for scheduler data
3933         etc to be set at the beginning of the function.  The cancellation
3934         infrastructure must have been set up.  And enable async
3935         cancellation before potentially going to sleep.  [BZ #401]
3937 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3939         * Versions: Remove exports for pthread_set*id_np functions.
3940         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3941         for now.
3942         * Makefile: Don't build pthread_set*id code for now.
3944 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3946         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3947         internal use.
3948         * allocatestack.c (__nptl_setxid): New function.
3949         * descr.h (struct xid_command): Define type.
3950         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3951         (sighandler_setxid): New function.
3952         (__pthread_initialize_minimal): Register sighandler_setxid for
3953         SIGCANCEL.
3954         * pt-allocrtsig.c: Update comment.
3955         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3956         Declare __nptl_setxid.
3957         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3958         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3959         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3960         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3961         and pthread_setresuid_np.
3962         * pthread_setgid_np.c: New file.
3963         * pthread_setuid_np.c: New file.
3964         * pthread_setegid_np.c: New file.
3965         * pthread_seteuid_np.c: New file.
3966         * pthread_setregid_np.c: New file.
3967         * pthread_setreuid_np.c: New file.
3968         * pthread_setresgid_np.c: New file.
3969         * pthread_setresuid_np.c: New file.
3970         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3971         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3972         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3973         and pthread_setresuid_np.
3974         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3975         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3976         pthread_setregid, and pthread_setresgid.
3978 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3980         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3981         ENOMEM when out of memory.
3983 2004-09-10  Roland McGrath  <roland@redhat.com>
3985         [BZ #379]
3986         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3987         code, since we don't try to use the broken CLONE_STOPPED any more.
3988         * pthread_create.c (start_thread): Likewise.
3990 2004-09-15  Richard Henderson  <rth@redhat.com>
3992         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3994 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3996         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3997         (__libc_unwind_longjmp): Delete macro and declare as function.
3998         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3999         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
4000         nptl directory.
4001         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
4002         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
4003         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4005 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4007         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4008         for __USE_XOPEN2K.
4009         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4010         types also for __USE_XOPEN2K.
4011         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4012         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4013         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4014         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4015         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4016         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4017         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4018         [BZ #320]
4020 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4022         * sysdeps/pthread/pthread.h
4023         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4024         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4025         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4026         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4027         [BZ #375]
4029 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4031         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4032         PSEUDO to be used with . prefix.
4034         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4035         Use atomic_increment instead of atomic_exchange_and_add.
4036         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4037         Likewise.
4038         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4039         Likewise.
4040         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4041         Likewise.
4043         * allocatestack.c (allocate_stack): Use atomic_increment_val
4044         instead of atomic_exchange_and_add.
4045         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4046         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4047         Likewise.
4048         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4049         Likewise.
4051         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4052         the initialization function might throw.
4054 2005-09-05  Richard Henderson  <rth@redhat.com>
4056         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4057         Move definition inside libpthread, libc, librt check.  Provide
4058         definition for rtld.
4060 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4062         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4063         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4064         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4065         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4066         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4067         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4068         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4069         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4070         * unwind.c: Use it.
4072         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4073         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4074         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4075         Likewise.
4076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4077         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4078         this is the last waiter, signal pthread_cond_destroy caller and
4079         avoid using the pthread_cond_t structure after unlock.
4080         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4081         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4082         Read clock type from the least significant bits of __nwaiters instead
4083         of __clock.
4084         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4085         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4087 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4089         [BZ #342]
4090         * Makefile (tests): Add tst-cond20 and tst-cond21.
4091         * tst-cond20.c: New test.
4092         * tst-cond21.c: New test.
4093         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4094         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4095         it unsigned int.
4096         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4097         Likewise.
4098         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4099         (pthread_cond_t): Likewise.
4100         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4101         Likewise.
4102         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4103         Likewise.
4104         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4105         Likewise.
4106         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4107         (cond_nwaiters): New.
4108         (clock_bits): New.
4109         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4110         if there are waiters not signalled yet.
4111         Wait until all already signalled waiters wake up.
4112         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4113         __nwaiters.  If pthread_cond_destroy has been called and this is the
4114         last waiter, signal pthread_cond_destroy caller and avoid using
4115         the pthread_cond_t structure after unlock.
4116         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4117         decrement it when leaving.  If pthread_cond_destroy has been called
4118         and this is the last waiter, signal pthread_cond_destroy caller.
4119         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4120         Likewise.  Read clock type from the least significant bits of
4121         __nwaiters instead of __clock.
4122         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4123         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4124         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4125         clock type just from the last COND_CLOCK_BITS bits of value.
4126         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4127         instead of __clock, just from second bit of condattr's value.
4129 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4131         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4132         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4133         != 64.
4134         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4136 2004-08-15  Roland McGrath  <roland@frob.com>
4138         * pthread_atfork.c: Update copyright terms including special exception
4139         for these trivial files, which are statically linked into executables
4140         that use dynamic linking for the significant library code.
4142 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4144         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4145         pthread_rwlock_rdlock.
4146         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4147         Decrease __nr_readers_queued after reacquiring lock.
4148         * sysdeps/pthread/pthread_rwlock_timedrdlock
4149         (pthread_rwlock_timedrdlock): Likewise.
4150         Reported by Bob Cook <bobcook47@hotmail.com>.
4152 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4154         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4155         before pthread_barrier_wait.
4157 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4160         Remove unnecessary exception handling data.
4162 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4164         [BZ #284]
4165         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4166         instead of clockid_t.
4168 2004-07-21  Roland McGrath  <roland@redhat.com>
4170         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4172 2004-07-19  Roland McGrath  <roland@redhat.com>
4174         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4176 2004-07-02  Roland McGrath  <roland@redhat.com>
4178         * configure: Don't exit.
4180 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4182         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4183         (__pthread_cond_timedwait): Check for invalid nanosecond in
4184         timeout value.
4186 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4188         * Makefile: Add rules to build and run tst-fini1.
4189         * tst-fini1.c: New file.
4190         * tst-fini1mod.c: New file.
4192 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4194         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4195         if no cancellation support is needed.
4196         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4197         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4198         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4199         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4200         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4201         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4202         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4203         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4204         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4206         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4207         only if not already defined.
4209 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4211         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4212         constraint "m" instead of "0" for futex.
4214         * shlib-versions: Add powerpc64-.*-linux.*.
4216 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4218         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4219         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4220         for valid tv_nsec.
4221         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4222         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4223         bits.
4225 2004-06-29  Roland McGrath  <roland@redhat.com>
4227         * Banner: NPTL no longer has its own version number.
4228         * Makefile (nptl-version): Variable removed.
4229         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4230         using $(version), the glibc version number.
4232 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4234         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4235         Fix branch offset for a PLT entry.
4236         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4237         Likewise.
4238         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4239         Likewise.
4240         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4241         Likewise.
4242         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4243         Likewise.
4245 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4247         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4248         unconditionally.
4250 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4252         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4253         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4254         instead of tv_sec.
4255         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4256         (pthread_rwlock_timedrdlock): Likewise.
4258 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4260         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4261         Set __r7 to val, not mutex.
4263 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4265         * Makefile: Add rules to build tst-rwlock14.
4266         * tst-rwlock14.c: New file.
4268 2004-06-24  Boris Hu  <boris.hu@intel.com>
4270         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4271         check.
4272         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4274 2004-06-19  Andreas Jaeger  <aj@suse.de>
4276         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4277         assembler in last patch.
4279 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4281         * sysdeps/pthread/pthread_cond_timedwait.c
4282         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4283         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4284         (__pthread_cond_timedwait): Check for invalid nanosecond in
4285         timeout value.
4286         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4287         * tst-cond19.c: New file.
4288         * Makefile: Add rules to build and run tst-cond19.
4290 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4292         * tst-context1.c (GUARD_PATTERN): Defined.
4293         (tst_context_t): Define struct containing ucontext_t & guard words.
4294         (ctx): Declare as an array of tst_context_t.
4295         (fct): Verify uc_link & guard words are still valid.
4296         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4298 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4300         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4301         Add __data.__futex field, reshuffle __data.__clock.
4302         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4303         (__pthread_cond_signal): Increment __futex at the same time as
4304         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4305         address of low 32-bits of __wakeup_seq to futex syscall.
4306         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4307         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4308         releasing internal lock to FUTEX_WAIT.
4309         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4310         (__pthread_cond_timedwait): Likewise.
4311         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4312         (FUTEX_CMP_REQUEUE): Define.
4313         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4314         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4315         Pass __futex value from before the unlock and __futex address instead
4316         of address of low 32-bits of __wakeup_seq to futex syscall.
4317         Fallback to FUTEX_WAKE all on any errors.
4319 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4321         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4322         comment typo.
4323         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4324         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4325         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4326         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4327         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4329 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4331         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4332         Add memory clobber to inline assembly.
4333         (__lll_mutex_trylock): Likewise.
4334         (__lll_mutex_cond_trylock): Likewise.
4336 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4338         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4339         Pass val argument as 6th system call argument in %r7.
4341 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4343         * Makefile (tests): Add tst-cond16.
4344         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4345         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4346         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4347         Add __data.__futex field, reshuffle __data.__clock.
4348         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4349         (__pthread_cond_signal): Increment __futex at the same time as
4350         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4351         address of low 32-bits of __wakeup_seq to futex syscall.
4352         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4353         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4354         releasing internal lock to FUTEX_WAIT.
4355         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4356         (__pthread_cond_timedwait): Likewise.
4357         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4358         (FUTEX_CMP_REQUEUE): Define.
4359         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4360         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4361         Pass __futex value from before the unlock and __futex address instead
4362         of address of low 32-bits of __wakeup_seq to futex syscall.
4363         Fallback to FUTEX_WAKE all on any errors.
4364         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4365         Define.
4366         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4367         internally.  Return non-zero if error, zero if success.
4368         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4369         Add __data.__futex field, reshuffle __data.__clock.
4370         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4371         Define.
4372         (lll_futex_requeue): Add val argument, return 1 unconditionally
4373         for the time being.
4374         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4375         Add __data.__futex field, reshuffle __data.__clock.
4376         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4377         Define.
4378         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4379         internally.  Return non-zero if error, zero if success.
4380         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4381         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4382         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4383         Define.
4384         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4385         internally.  Return non-zero if error, zero if success.
4386         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4387         Add __data.__futex field, reshuffle __data.__clock.
4388         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4389         Define.
4390         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4391         internally.  Return non-zero if error, zero if success.
4392         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4393         Add __data.__futex field, reshuffle __data.__clock.
4394         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4395         Add __data.__futex field, reshuffle __data.__clock.
4396         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4397         Increment __futex at the same time as __wakeup_seq or __total_seq.
4398         Pass address of __futex instead of address of low 32-bits of
4399         __wakeup_seq to futex syscall.
4400         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4401         Pass __futex value from before releasing internal lock
4402         to FUTEX_WAIT.
4403         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4404         Likewise.  Avoid unnecessary shadowing of variables.
4405         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4406         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4407         unlock and __futex address instead of address of low 32-bits of
4408         __wakeup_seq to futex_requeue macro, adjust for new return value
4409         meaning.
4410         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4411         (__pthread_cond_signal): Increment __futex at the same time as
4412         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4413         address of low 32-bits of __wakeup_seq to futex syscall.
4414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4415         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4416         releasing internal lock to FUTEX_WAIT.
4417         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4418         (__pthread_cond_timedwait): Likewise.
4419         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4420         (FUTEX_CMP_REQUEUE): Define.
4421         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4422         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4423         Pass __futex value from before the unlock and __futex address instead
4424         of address of low 32-bits of __wakeup_seq to futex syscall.
4425         Fallback to FUTEX_WAKE all on any errors.
4427 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4429         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4430         Add nop to align the end of critical section.
4431         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4433 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4435         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4436         Add __broadcast_seq field.
4437         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4438         all waiters as woken with woken_seq and bump broadcast counter.
4439         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4440         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4441         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4442         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4444 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4447         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4448         Reported by Kaz Kojima.
4450 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4452         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4454 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4456         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4457         __broadcast_seq with bc_seq after acquiring internal lock instead of
4458         before it.
4460 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4462         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4463         compilation.
4464         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4465         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4466         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4467         (pthread_cond_t): Add __data.__broadcast_seq field.
4468         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4469         (FRAME_SIZE): Define.
4470         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4471         Comment typo fixes.
4472         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4473         Define.
4474         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4475         typo fixes.
4476         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4477         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4478         fixes.
4480 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4482         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4483         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4484         Add __broadcast_seq field.
4485         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4486         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4487         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4488         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4489         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4491         all waiters as woken with woken_seq and bump broadcast counter.
4492         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4494         __broadcast_seq field.
4495         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4496         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4497         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4498         * pthread_cond_init.c: Initialize __broadcast_seq field.
4499         * Makefile (tests): Add tst-cond17 and tst-cond18.
4500         Add .NOTPARALLEL goal.
4501         * tst-cond16.c: New file.  From Jakub.
4502         * tst-cond17.c: New file.  From Jakub.
4503         * tst-cond18.c: New file.  From Jakub.
4505 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4507         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4508         unwind info.
4510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4511         Parametrize frame size.  Correct some unwind info.
4512         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4514 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4516         * tst-stack3.c: Note testing functionality beyond POSIX.
4518 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4520         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4521         Change conditional from ifdef to if.
4523 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4525         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4526         SYSDEP_CANCEL_ERROR): Define.
4527         (PSEUDO): Use it.
4529 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4531         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4533 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4535         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4537 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4539         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4540         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4541         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4542         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4544 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4546         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4547         thread has all signals blocked.
4549 2004-04-18  Andreas Jaeger  <aj@suse.de>
4551         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4552         (SEM_VALUE_MAX): Add missing brace.
4554 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4556         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4557         in rt subdir.
4558         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4559         * sysdeps/pthread/tst-mqueue8x.c: New test.
4560         * tst-cancel4.c: Update comment about message queues.
4562         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4563         return it_value { 0, 0 }.
4564         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4565         like SIGEV_SIGNAL.
4566         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4567         assertion for SIGEV_NONE.
4568         (thread_attr_compare): Compare all attributes, not just a partial
4569         subset.
4571 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4573         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4575 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4577         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4578         Just use a plain number.
4579         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4580         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4581         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4582         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4583         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4584         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4585         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4587 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4589         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4590         frame info.
4591         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4593 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4595         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4596         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4597         of calling sigwaitinfo.
4599 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4601         * allocatestack.c (allocate_stack): Set reported_guardsize
4602         unconditionally.
4603         * pthread_getattr_np.c (pthread_getattr_np): Use
4604         reported_guardsize instead of guardsize.
4605         * descr.h (struct pthread): Add reported_guardsize field.
4607 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4609         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4611 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4613         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4615 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4617         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4618         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4619         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4620         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4621         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4622         Define.
4623         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4624         (_POSIX_MESSAGE_PASSING): Define.
4625         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4626         (_POSIX_MESSAGE_PASSING): Define.
4627         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4628         (_POSIX_MESSAGE_PASSING): Define.
4630 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4632         * tst-context1.c (fct): Check whether correct stack is used.
4634 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4636         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4637         matching constraints for asm mem parameters.
4639         * tst-clock2.c (tf): Don't define unless needed.
4641 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4643         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4644         $(gnulib).
4646 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4648         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4649         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4650         * pthreadP.h: Declare __nptl_deallocate_tsd.
4651         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4652         Adjust caller.
4654         * Makefile (tests): Add tst-tsd5.
4655         * tst-tsd5.c: New file.
4657 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4659         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4660         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4661         is SHLIB_COMPAT check.
4662         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4663         (__pthread_attr_getaffinity_old): Likewise.
4664         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4665         (__pthread_getaffinity_old): Likewise.
4666         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4667         (__pthread_setaffinity_old): Likewise.
4669 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4671         * allocatestack.c (_make_stacks_executable): Call
4672         _dl_make_stack_executable first.
4674 2004-03-24  Roland McGrath  <roland@redhat.com>
4676         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4677         constraint instead of "0".
4679 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4681         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4682         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4684         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4685         code to avoid warning.
4687 2004-03-24  Andreas Jaeger  <aj@suse.de>
4689         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4690         (__pthread_attr_setaffinity_old): Remove const.
4692 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4694         * sysdeps/unix/sysv/linux/smp.h: New file.
4695         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4696         * init.c: Define __is_smp.
4697         (__pthread_initialize_minimal_internal): Call is_smp_system to
4698         initialize __is_smp.
4699         * pthreadP.h: Declare __is_smp.
4700         Define MAX_ADAPTIVE_COUNT is necessary.
4701         * pthread_mutex_init.c: Add comment regarding __spins field.
4702         * pthread_mutex_lock.c: Implement adaptive mutex type.
4703         * pthread_mutex_timedlock.c: Likewise.
4704         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4705         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4706         Add __spins field.
4707         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4708         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4709         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4710         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4711         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4712         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4713         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4714         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4715         lll_mutex_cond_trylock.
4716         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4717         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4718         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4719         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4720         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4721         Define BUSY_WAIT_NOP.
4722         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4723         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4725         * tst-mutex5.c: Add support for testing adaptive mutexes.
4726         * tst-mutex7.c: Likewise.
4727         * tst-mutex5a.c: New file.
4728         * tst-mutex7a.c: New file.
4729         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4731         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4732         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4733         vgettimeofday call might destroy the content.
4735         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4736         @pause in the loop.
4738         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4739         No need to restrict type of ret.  Make it int.  Add comment.
4741         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4742         Remove unnecessary setne instruction.
4744 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4746         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4747         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4748         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4749         If realloc fails, break out of the loop.
4751 2004-03-20  Andreas Jaeger  <aj@suse.de>
4753         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4754         (__pthread_setaffinity_old): Fix interface.
4755         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4756         (__pthread_getaffinity_old): Likewise.
4758         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4759         (__pthread_setaffinity_new): Remove duplicate declaration.
4761 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4763         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4764         the return value to a safe register.
4765         (CDISABLE): Set the function argument correctly.
4767 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4769         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4770         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4771         Rewrite so that only one locked memory operation per round is needed.
4772         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4773         (pthread_barrier_wait): After wakeup, release lock only when the
4774         last thread stopped using the barrier object.
4775         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4776         (__pthread_cond_wait): Don't store mutex address if the current
4777         value is ~0l.  Add correct cleanup support and unwind info.
4778         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4779         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4780         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4781         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4782         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4783         Add correct cleanup support and unwind info.
4784         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4785         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4786         information for syscall wrappers.
4788 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4790         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4791         cpusetsize field, remove next.
4792         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4793         parameter for size of the CPU set.
4794         (pthread_setaffinity_np): Likewise.
4795         (pthread_attr_getaffinity_np): Likewise.
4796         (pthread_attr_setaffinity_np): Likewise.
4797         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4798         interface change, keep compatibility code.
4799         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4800         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4801         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4802         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4803         __pthread_getaffinity_np.
4804         * Versions: Add version for changed interfaces.
4805         * tst-attr3.c: Adjust test for interface change.
4806         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4807         increasing buffer sizes.
4808         * pthread_attr_destroy.c: Remove unused list handling.
4809         * pthread_attr_init.c: Likewise.
4811 2004-03-17  Roland McGrath  <roland@redhat.com>
4813         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4814         first argument to clock_getres so we ever enable kernel timers.
4816 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4818         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4820 2004-03-12  Richard Henderson  <rth@redhat.com>
4822         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4823         oldvalue from CENABLE to CDISABLE.
4825 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4827         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4828         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4829         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4830         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4832 2004-03-11  Richard Henderson  <rth@redhat.com>
4834         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4835         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4836         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4838 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4840         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4841         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4842         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4844 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4846         * forward.c (__pthread_cond_broadcast_2_0,
4847         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4848         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4849         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4851 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4853         * sysdeps/sh/tcb-offsets.sym: Add PID.
4854         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4855         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4857 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4859         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4860         include <sysdep-cancel.h>, vfork is no cancellation point.
4861         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4862         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4863         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4865 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4867         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4868         libc_hidden_def.
4869         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4870         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4871         Likewise.
4872         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4873         Likewise.
4874         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4875         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4876         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4877         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4878         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4880         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4881         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4882         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4883         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4884         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4885         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4887         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4888         a local register for saving old PID.  Negate PID in parent upon exit.
4890         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4891         tcb-offsets.h.
4892         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4893         before syscall, set to the old value in the parent afterwards.
4894         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4895         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4896         tcb-offsets.h.
4897         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4898         before syscall, set to the old value in the parent afterwards.
4899         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4900         * sysdeps/s390/tcb-offsets.sym: Add PID.
4902         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4903         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4904         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4905         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4906         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4907         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4909 2004-03-10  Andreas Schwab  <schwab@suse.de>
4911         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4912         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4913         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4915 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4917         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4918         * tst-cancel21.c (do_one_test): Likewise.
4919         Reported by Gordon Jin <gordon.jin@intel.com>.
4921 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4923         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4924         if non-zero and set to INT_MIN if zero.
4925         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4926         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4927         (SAVE_PID, RESTORE_PID): Define.
4928         (__vfork): Use it.
4929         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4930         Use relative path to avoid including NPTL i386/vfork.S.
4931         (SAVE_PID, RESTORE_PID): Define.
4932         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4933         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4934         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4935         tst-vfork2x.
4936         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4937         * tst-vfork1.c: New test.
4938         * tst-vfork2.c: New test.
4939         * tst-vfork1x.c: New test.
4940         * tst-vfork2x.c: New test.
4942 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4944         * sysdeps/i386/tcb-offsets.sym: Add PID.
4945         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4946         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4947         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4949 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4951         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4953 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4955         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4956         _rtld_global_ro.
4958 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4960         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4961         _rtld_global_ro.
4963         * tst-once4.c: Remove unnecessary macro definition.
4965         * tst-mutex7.c (do_test): Limit thread stack size.
4966         * tst-once2.c (do_test): Likewise.
4967         * tst-tls3.c (do_test): Likewise.
4968         * tst-tls1.c (do_test): Likewise.
4969         * tst-signal3.c (do_test): Likewise.
4970         * tst-kill6.c (do_test): Likewise.
4971         * tst-key4.c (do_test): Likewise.
4972         * tst-join4.c (do_test): Likewise.
4973         * tst-fork1.c (do_test): Likewise.
4974         * tst-context1.c (do_test): Likewise.
4975         * tst-cond2.c (do_test): Likewise.
4976         * tst-cond10.c (do_test): Likewise.
4977         * tst-clock2.c (do_test): Likewise.
4978         * tst-cancel10.c (do_test): Likewise.
4979         * tst-basic2.c (do_test): Likewise.
4980         * tst-barrier4.c (do_test): Likewise.
4982 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4984         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4986 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4988         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4989         (__pthread_cond_timedwait): Optimize wakeup test.
4990         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4991         (__pthread_cond_wait): Likewise.
4992         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4993         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4994         Likewise.
4996 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4998         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4999         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
5000         the atomic instruction needed.
5001         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5002         (__lll_mutex_lock_wait): Likewise.
5004 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5006         * Makefile (tests): Add tst-cond14 and tst-cond15.
5007         * tst-cond14.c: New file.
5008         * tst-cond15.c: New file.
5010 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5012         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5013         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5014         needs to be implemented differently to be useful.
5016 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5018         * pthread_attr_setschedparam.c: Don't test priority against limits
5019         here.  Set ATTR_FLAG_SCHED_SET flag.
5020         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5021         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5022         from parent thread to child.  If attribute is used and scheduling
5023         parameters are not inherited, copy parameters from attribute or
5024         compute them.  Check priority value.
5025         * pthread_getschedparam.c: If the parameters aren't known yet get
5026         them from the kernel.
5027         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5028         ATTR_FLAG_POLICY_SET flag for thread.
5029         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5030         and ATTR_FLAG_POLICY_SET.
5032         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5034         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5035         fail if stack address hasn't been set.  Just return 0.
5037 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5039         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5040         libpthread for the files in this list.
5041         (CFLAGS-tst-unload): Removed.
5042         * tst-unload.c (do_test): Don't use complete path for
5043         LIBPHREAD_SO.
5045         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5046         tst-_res1mod2.
5048 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5050         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5051         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5052         operation per round is needed.
5053         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5054         (__lll_mutex_lock_wait): Likewise.
5056 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5058         * tst-cancel9.c (cleanup): Don't print to stderr.
5060 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5062         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5064 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5066         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5067         (__syscall_error_handler2): Call CDISABLE.
5068         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5069         (__syscall_error_handler2): Call CDISABLE.
5071         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5072         Release lock before the loop, don't reacquire it.
5074         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5076 2004-02-19  Andreas Schwab  <schwab@suse.de>
5078         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5079         Fix last change.
5081 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5083         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5084         (pthread_barrier_wait): After wakeup, release lock only when the
5085         last thread stopped using the barrier object.
5086         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5087         (pthread_barrier_wait): Likewise.
5088         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5089         Likewise.
5090         * Makefile (tests): Add tst-barrier4.
5091         * tst-barrier4.c: New file.
5093         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5094         (__pthread_cond_timedwait): Perform timeout test while holding
5095         internal lock to prevent wakeup race.
5096         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5097         * sysdeps/pthread/pthread_cond_timedwait.c
5098         (__pthread_cond_timedwait): Likewise.
5099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5100         (__pthread_cond_timedwait): Likewise.
5102 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5104         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5105         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5106         * Makefile (tests): Add tst-rwlock13.
5107         * tst-rwlock13.c: New test.
5109 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5111         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5112         (__condvar_tw_cleanup): Little optimization.
5113         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5115 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5117         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5118         libpthread as "lib" parameter to SHLIB_COMPAT.
5119         (__novmx_siglongjmp): Fix typo in function name.
5120         (__novmx_longjmp): Fix typo in function name.
5122 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5124         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5125         __builtin_expect.
5127         * sysdeps/generic/pt-longjmp.c: Moved to...
5128         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5130 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5132         * Makefile (libpthread-routines): Add pt-cleanup.
5133         * pt-longjmp.c: Removed.
5134         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5135         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5136         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5137         Version longjmp, siglongjmp for GLIBC_2.3.4.
5138         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5140 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5142         * sysdeps/pthread/pthread_cond_timedwait.c
5143         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5144         Reuse code.  Add __builtin_expects.
5146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5147         (__pthread_cond_timedwait): Get internal lock in case timeout has
5148         passed before the futex syscall.
5149         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5151 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5153         * allocatestack.c: Pretty printing.
5155         * sysdeps/pthread/createthread.c (create_thread): Don't add
5156         CLONE_DETACHED bit if it is not necessary.
5158 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5160         * pthread_getattr_np.c: Include ldsodefs.h.
5162 2004-01-16  Richard Henderson  <rth@redhat.com>
5164         * allocatestack.c: Don't declare __libc_stack_end.
5165         * init.c (__pthread_initialize_minimal_internal): Likewise.
5166         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5168 2004-01-15  Richard Henderson  <rth@redhat.com>
5170         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5171         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5172         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5173         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5174         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5175         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5176         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5177         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5179 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5181         * init.c (pthread_functions): Make array const.
5183 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5185         * allocatestack.c (__make_stacks_executable): Change interface.
5186         Check parameters.  Pass parameter on to libc counterpart.
5187         * pthreadP.h: Change declaration.
5189 2004-01-13  Richard Henderson  <rth@redhat.com>
5191         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5192         prototype form.
5193         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5194         Likewise.
5196         * sysdeps/alpha/Makefile: New file.
5197         * sysdeps/alpha/tcb-offsets.sym: New file.
5198         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5199         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5201         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5202         on powerpc version.
5204 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5206         * Makefile (tests): Add tst-backtrace1.
5207         * tst-backtrace1.c: New test.
5209 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5211         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5212         register as second parameter to the REGISTER macro.
5213         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5214         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5215         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5216         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5217         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5218         of thread register as second parameter to REGISTER macro in 64 case.
5220 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5222         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5223         (CFLAGS-getpid.o): Defined.
5224         (CFLAGS-getpid.os): Defined.
5226 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5228         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5229         returned for main thread does not overlap with any other VMA.
5230         Patch by Jakub Jelinek.
5232 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5234         * tst-raise1.c: Include stdio.h.
5236 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5238         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5239         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5240         If pid is 0, set it to selftid.
5241         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5242         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5243         != 0, return self->tid without doing a syscall.
5244         * descr.h (struct pthread): Move pid field after tid.
5246         * Makefile (tests): Add tst-raise1.
5247         * tst-raise1.c: New file.
5249 2003-12-23  Roland McGrath  <roland@redhat.com>
5251         * tst-oddstacklimit.c: New file.
5252         * Makefile (tests): Add it.
5253         (tst-oddstacklimit-ENV): New variable.
5255         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5256         value up to page size for __default_stacksize.
5258 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5260         * Makefile (tests): Add tst-eintr5.
5261         * tst-eintr5.c: New file.
5263         * eintr.c (eintr_source): Prevent sending signal to self.
5265         * tst-eintr2.c (tf1): Improve error message.
5267 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5269         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5270         * sysdeps/unix/sysv/linux/getpid.c: New file.
5271         * pthread_cancel.c: Add comment explaining use of PID field.
5272         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5273         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5274         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5275         temporarily to signal the field must not be relied on and updated
5276         by getpid().
5277         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5278         temporarily negative.
5279         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5281 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5283         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5284         (eintr_source): If ARG != NULL, use pthread_kill.
5285         * tst-eintr1.c: Adjust for this change.
5286         * tst-eintr2.c: Likewise.
5287         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5288         * tst-eintr3.c: New file.
5289         * tst-eintr4.c: New file.
5291 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5293         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5294         if CANCELSTATE_BITMASK is set.
5295         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5296         Likewise.
5298         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5299         (tests-reverse): Add tst-cancel23.
5300         * tst-cancel22.c: New test.
5301         * tst-cancel23.c: New test.
5303 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5305         * tst-eintr1.c: Better error messages.
5307         * Makefile (tests): Add tst-eintr2.
5308         * tst-eintr2.c: New file.
5310 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5312         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5313         (CFLAGS-tst-cancelx21.c): Set.
5314         * tst-cancel21.c: New test.
5315         * tst-cancelx21.c: New test.
5317         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5318         comparison operand.
5319         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5320         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5321         * pt-longjmp.c: Include jmpbuf-unwind.h.
5322         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5323         _JMPBUF_UNWINDS.  Adjust compared pointers.
5324         * init.c (__pthread_initialize_minimal_internal): Initialize
5325         pd->stackblock_size.
5326         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5327         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5328         * sysdeps/i386/jmpbuf-unwind.h: New file.
5329         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5330         * sysdeps/s390/jmpbuf-unwind.h: New file.
5331         * sysdeps/sh/jmpbuf-unwind.h: New file.
5332         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5333         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5334         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5335         (_JMPBUF_CFA_UNWINDS): Remove.
5336         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5338 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5340         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5341         (CFLAGS-tst-cancelx20.c): Set.
5342         * tst-cancel20.c: New test.
5343         * tst-cancelx20.c: New test.
5345 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5347         * init.c (__pthread_initialize_minimal_internal): Don't treat
5348         architectures with separate register stack special here when
5349         computing default stack size.
5351 2003-12-17  Roland McGrath  <roland@redhat.com>
5353         * Makefile (tst-cancelx7-ARGS): New variable.
5354         Reportd by Greg Schafer <gschafer@zip.com.au>.
5356 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5358         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5359         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5360         (tst-stack3-ENV): Set.
5361         ($(objpfx)tst-stack3-mem): New.
5362         * tst-stack3.c: New test.
5364 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5366         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5367         Add unwind directives.  Drop unused .regstk directive.
5368         (_fini_EPILOG_BEGINS): Add unwind directives.
5370 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5372         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5373         Assume parameter is a pointer.
5374         (lll_futex_wake): Likewise.
5375         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5376         Likewise.
5377         (lll_futex_wake): Likewise.
5378         Reported by Boris Hu.
5379         * sysdeps/unix/sysv/linux/unregister-atfork.c
5380         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5382         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5384 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5386         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5387         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5388         __rtld_lock_initialize for ld.so lock.
5389         Patch in part by Adam Li <adam.li@intel.com>.
5391 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5393         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5394         in $(gnulib).  Also, remove stale comment.
5396 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5398         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5399         advantage of new syscall stub and optimize accordingly.
5401         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5402         from SYS_futex, to match expectations of
5403         sysdep.h:DO_INLINE_SYSCALL.
5404         (lll_futex_clobbers): Remove.
5405         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5406         (lll_futex_wake): Likewise.
5407         (lll_futex_requeue): Likewise.
5408         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5409         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5410         Jelinek).
5411         (__lll_mutex_lock): Likewise.
5412         (__lll_mutex_cond_lock): Likewise.
5413         (__lll_mutex_timed_lock): Likewise.
5414         (__lll_mutex_unlock): Likewise.
5415         (__lll_mutex_unlock_force): Likewise.
5417         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5418         comes before the include of <sysdep.h>.
5419         (THREAD_SELF_SYSINFO): New macro.
5420         (THREAD_SYSINFO): Likewise.
5421         (INIT_SYSINFO): New macro.
5422         (TLS_INIT_TP): Call INIT_SYSINFO.
5424         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5426         * sysdeps/pthread/createthread.c (create_thread): Use
5427         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5428         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5429         THREAD_SELF_SYSINFO instead of open code.
5430         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5431         (THREAD_SYSINFO): Likewise.
5433         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5435         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5437 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5439         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5440         instead of .init.  Patch by David Mosberger.
5442 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5444         * sysdeps/pthread/configure.in: Remove broken declaration in C
5445         cleanup handling check.
5447 2003-11-30  Andreas Jaeger  <aj@suse.de>
5449         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5450         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5451         Likewise.
5453 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5455         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5456         * pthread_attr_destroy.c: Include shlib-compat.h.
5457         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5458         is set in iattr->flags.
5459         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5461 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5463         * Makefile (distribute): Add tst-cleanup4aux.c.
5465         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5466         include.
5468 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5470         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5471         pthread_cond_signal.
5473         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5474         store mutex address if the current value is ~0l.
5475         * sysdeps/pthread/pthread_cond_timedwait.c
5476         (__pthread_cond_timedwait): Likewise.
5477         * sysdeps/pthread/pthread_cond_broadcast.c
5478         (__pthread_cond_broadcast): Don't use requeue for pshared
5479         condvars.
5481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5482         (__pthread_cond_wait): Don't store mutex address if the current
5483         value is ~0l.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5485         (__pthread_cond_timedwait): Likewise.
5486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5487         (__pthread_cond_broadcast): Don't use requeue for pshared
5488         condvars.
5490         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5491         element with ~0l for pshared condvars, with NULL otherwise.
5493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5494         (__pthread_cond_wait): Don't store mutex address if the current
5495         value is ~0l.
5496         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5497         (__pthread_cond_timedwait): Likewise.
5498         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5499         (__pthread_cond_broadcast): Don't use requeue for pshared
5500         condvars.
5502         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5503         * tst-cond12.c: New file.
5504         * tst-cond13.c: New file.
5506 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5508         * sysdeps/pthread/configure.in: Make missing forced unwind support
5509         fatal.
5511 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5513         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5515 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5517         * Makefile: Add magic to clean up correctly.
5519 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5521         * unwind.c (FRAME_LEFT): Define.
5522         (unwind_stop): Handle old style cleanups here.
5523         (__pthread_unwind): Handle old style cleanups only if
5524         !HAVE_FORCED_UNWIND.
5525         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5526         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5527         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5528         ($(objpfx)tst-cleanupx4): Likewise.
5529         * tst-cleanup4.c: New test.
5530         * tst-cleanup4aux.c: New.
5531         * tst-cleanupx4.c: New test.
5533 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5535         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5536         lll_mutex_*lock macros to skip atomic operations on some archs.
5538 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5540         * sysdeps/pthread/tst-timer.c (main): Initialize
5541         sigev2.sigev_value as well.
5543 2003-10-15  Roland McGrath  <roland@redhat.com>
5545         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5546         is missing.
5547         * sysdeps/pthread/configure: Regenerated.
5549 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5551         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5552         locking macros.  No distinction between normal and mutex locking
5553         anymore.
5554         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5555         Merge bits from lowlevelmutex.S we still need.
5556         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5557         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5558         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5559         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5560         new mutex implementation.
5561         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5562         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5563         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5564         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5565         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5566         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5567         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5568         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5569         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5570         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5571         symbol for entry point to avoid cancellation.
5573 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5575         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5576         changes.
5577         (SAVE_OLDTYPE_0): Fix a typo.
5579 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5581         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5582         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5584 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5586         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5587         correct offset.
5589 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5591         * Makefile (tests): Add tst-cancel19.
5592         * tst-cancel19.c: New test.
5594 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5596         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5597         restoring of the old cancellation type.
5599 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5601         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5603 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5605         * sysdeps/pthread/malloc-machine.h: New file
5607 2003-09-24  Roland McGrath  <roland@redhat.com>
5609         * allocatestack.c (__make_stacks_executable): Don't ignore return
5610         value from _dl_make_stack_executable.
5612 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5614         * allocatestack.c (__make_stacks_executable): Also change
5615         permission of the currently unused stacks.
5617         * allocatestack.c (change_stack_perm): Split out from
5618         __make_stacks_executable.
5619         (allocate_stack): If the required permission changed between the time
5620         we started preparing the stack and queueing it, change the permission.
5621         (__make_stacks_executable): Call change_stack_perm.
5623         * Makefile: Build tst-execstack-mod locally.
5624         * tst-execstack-mod.c: New file.
5626 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5628         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5630 2003-09-23  Roland McGrath  <roland@redhat.com>
5632         * tst-execstack.c: New file.
5633         * Makefile (tests): Add it.
5634         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5635         (LDFLAGS-tst-execstack): New variable.
5637         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5638         whether to use PROT_EXEC for stack mmap.
5639         (__make_stacks_executable): New function.
5640         * pthreadP.h: Declare it.
5641         * init.c (__pthread_initialize_minimal_internal): Set
5642         GL(dl_make_stack_executable_hook) to that.
5644 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5646         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5647         recommendation from AMD re avoidance of lock prefix.
5649 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5651         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5652         lll_futex_timed_wait instead of lll_futex_wait.
5653         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5654         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5655         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5656         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5657         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5658         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5659         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5660         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5661         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5662         Completely revamp the locking macros.  No distinction between
5663         normal and mutex locking anymore.
5664         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5665         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5666         __lll_lock_timedwait): Fix prototypes.
5667         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5668         __lll_lock_timedwait): Likewise.
5669         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5670         macros, add __builtin_expect.
5671         (lll_mutex_timedlock): Likewise.  Fix return value.
5672         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5673         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5674         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5675         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5676         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5677         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5678         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5679         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5681 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5683         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5684         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5685         operation if possible.
5687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5688         like jumping over the lock prefix.
5690 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5692         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5693         locking macros.  No distinction between normal and mutex locking
5694         anymore.
5695         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5696         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5697         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5698         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5699         locking.  Merge bits from lowlevelmutex.S we still need.
5700         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5701         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5702         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5703         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5704         * Makefile (routines): Remove libc-lowlevelmutex.
5705         (libpthread-rountines): Remove lowlevelmutex.
5706         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5707         for new mutex implementation.
5708         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5709         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5710         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5712         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5713         Likewise.
5714         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5715         Likewise.
5716         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5717         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5718         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5719         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5720         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5721         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5722         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5723         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5724         Likewise.
5725         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5726         Likewise.
5727         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5728         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5729         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5730         Don't use requeue.
5731         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5732         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5734 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5736         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5737         in parameters of asm with output parameters.
5739         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5740         type of DECR parameter to int.
5741         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5743 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5745         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5746         guardsize for each thread.
5748 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5750         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5751         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5752         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5754         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5755         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5756         NULL.
5757         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5758         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5759         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5760         (pthread_getaffinity_np): Add hidden_def.
5762         * Makefile (tests): Add tst-attr3.
5763         * tst-attr3.c: New test.
5765         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5767 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5769         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5770         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5772 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5774         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5775         * tst-align.c: Include tst-stack-align.h.
5776         (tf, do_test): Use TEST_STACK_ALIGN macro.
5778 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5780         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5781         variable.
5783 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5785         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5786         stack-related values for the initial thread.
5788 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5790         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5792 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5794         * pthread_mutex_lock.c: Minor code rearrangements.
5796 2003-09-05  Roland McGrath  <roland@redhat.com>
5798         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5799         Instead, include ../nptl_db/db_info.c to do its magic.
5800         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5801         (__pthread_pthread_key_2ndlevel_size): Likewise.
5802         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5803         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5804         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5805         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5806         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5807         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5808         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5809         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5810         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5811         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5812         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5813         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5814         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5815         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5816         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5817         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5818         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5820 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5822         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5823         of pthread_t to be compatible with LT.
5824         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5825         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5826         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5827         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5828         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5829         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5830         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5832 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5834         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5836 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5838         * unwind-forcedunwind.c: Move to...
5839         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5840         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5841         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5842         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5843         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5844         * unwind.c: Include jmpbuf-unwind.h.
5845         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5847 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5849         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5850         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5851         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5852         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5853         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5854         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5855         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5856         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5857         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5858         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5859         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5860         function.
5861         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5862         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5863         * Makefile (tests): Add tst-stack2.
5864         * tst-stack2.c: New test.
5865         * tst-stack1.c: Include limits.h and sys/param.h.
5866         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5868         * pthread_condattr_setpshared.c: Include errno.h.
5869         (pthread_condattr_setpshared): Return EINVAL if pshared
5870         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5872         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5873         defined symbol for entry point to avoid cancellation.
5874         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5875         Likewise.
5876         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5877         Likewise.
5878         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5879         Likewise.
5880         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5881         Likewise.
5882         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5883         Likewise.
5884         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5885         __close_nocancel, __read_nocancel, __write_nocancel,
5886         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5887         libpthread.so or librt.so, define to corresponding function
5888         without _nocancel suffix.
5889         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5890         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5891         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5893         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5895 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5897         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5898         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5900         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5901         in subsections has a symbol associated with it.
5903         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5904         defined symbol for entry point to avoid cancellation.
5905         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5907 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5909         * Makefile (tests): Add tst-tls5.
5910         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5911         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5912         ($(objpfx)tst-tls5): New.
5913         ($(objpfx)tst-tls6.out): Likewise.
5914         (tests): Depend on $(objpfx)tst-tls6.out.
5915         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5916         (do_test): Check pthread_self () return value alignment.
5917         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5918         (tf): Check pthread_self () return value alignment.
5919         * tst-tls5.c: New test.
5920         * tst-tls5.h: New.
5921         * tst-tls5mod.c: New.
5922         * tst-tls5moda.c: New.
5923         * tst-tls5modb.c: New.
5924         * tst-tls5modc.c: New.
5925         * tst-tls5modd.c: New.
5926         * tst-tls5mode.c: New.
5927         * tst-tls5modf.c: New.
5928         * tst-tls6.sh: New test.
5930         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5931         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5932         * init.c (pthread_functions): Initialize them.
5933         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5934         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5935         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5936         pthread_cond_timedwait@@GLIBC_2.3.2.
5938 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5940         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5941         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5942         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5943         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5944         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5945         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5947         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5949         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5950         _POSIX_THREAD_PRIORITY_SCHEDULING.
5951         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5953 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5955         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5956         nested function, use static inline function from libio.h.
5957         Code by Richard Henderson.
5959         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5960         weak.
5962 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5964         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5965         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5966         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5967         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5968         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5969         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5970         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5971         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5972         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5973         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5974         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5975         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5976         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5977         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5978         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5979         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5980         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5981         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5982         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5983         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5984         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5985         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5986         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5987         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5988         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5989         * sysdeps/sparc/tls.h: New file.
5990         * sysdeps/sparc/tcb-offsets.sym: New file.
5991         * sysdeps/sparc/Makefile: New file.
5992         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5993         * init.c [__sparc__] (__NR_set_tid_address): Define.
5995 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5997         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5998         _IO_release_lock): Define.
6000 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
6002         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
6003         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6005 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6007         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6008         (__pthread_cleanup_class): Add missing return types of member
6009         functions.
6011 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6013         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6014         (lll_mutex_unlock_force): Add memory barrier between store and futex
6015         syscall.
6017 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6019         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6020         tempmsg in first loop.
6022 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6024         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6025         _POSIX_THREAD_PRIORITY_SCHEDULING.
6026         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6028 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6030         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6031         (__rtld_lock_default_lock_recursive,
6032         __rtld_lock_default_unlock_recursive): Define.
6033         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6034         __rtld_lock_unlock_recursive): Define using
6035         GL(_dl_rtld_*lock_recursive).
6036         * init.c (__pthread_initialize_minimal_internal): Initialize
6037         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6038         Lock GL(_dl_load_lock) the same number of times as
6039         GL(_dl_load_lock) using non-mt implementation was nested.
6041         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6042         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6044 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6046         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6047         PIPE_BUF.
6049 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6051         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6053 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6055         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6056         to first syscall error check.  Move syscall error check for tkill
6057         into __ASSUME_CLONE_STOPPED #ifdef.
6059 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6061         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6062         is not defined, do explicit synchronization.
6063         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6064         is not defined also unlock pd->lock for non-debugging case in case
6065         it is necessary.
6066         * pthread_create.c (start_thread): Always get and release pd->lock
6067         if __ASSUME_CLONE_STOPPED is not defined.
6068         (start_thread_debug): Removed.  Adjust users.
6069         * allocatestack.c (allocate_stack): Always initialize lock if
6070         __ASSUME_CLONE_STOPPED is not defined.
6071         * Makefile (tests): Add tst-sched1.
6072         * tst-sched1.c: New file.
6074         * sysdeps/pthread/createthread.c (do_clone): Only use
6075         sched_setschduler and pass correct parameters.
6077 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6079         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6080         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6081         PTHREAD_STACK_MIN in comments.
6083 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6085         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6086         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6087         argument.
6088         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6089         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6090         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6091         (__pthread_cleanup_upto): Fix prototype.
6092         (_longjmp_unwind): Adjust caller.
6093         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6094         Change second argument to const struct pointer.
6095         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6096         * tst-sem9.c (main): Likewise.
6097         * unwind.c: Include string.h for strlen prototype.
6099 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6101         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6102         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6103         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6104         Define HAVE_CMOV.
6105         Patch by Nicholas Miell <nmiell@attbi.com>.
6107 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6109         * init.c (__pthread_initialize_minimal_internal): Initialize
6110         GL(dl_init_static_tls).
6111         * pthreadP.h (__pthread_init_static_tls): New prototype.
6112         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6113         New functions.
6114         * Makefile (tests): Add tst-tls4.
6115         (modules-names): Add tst-tls4moda and tst-tls4modb.
6116         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6117         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6118         tst-tls4modb.so.
6119         * tst-tls4.c: New file.
6120         * tst-tls4moda.c: New file.
6121         * tst-tls4modb.c: New file.
6123 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6125         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6126         before __timer_dealloc.
6127         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6128         Don't call list_unlink.
6130 2003-07-29  Roland McGrath  <roland@redhat.com>
6132         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6134 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6136         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6137         Don't reuse struct aiocb A if it failed.
6138         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6139         not just one byte, as that does not block.
6141 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6143         * sysdeps/pthread/unwind-resume.c: New file.
6144         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6145         unwind-resume in csu subdir.
6146         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6147         exceptions.
6148         (librt-sysdep_routines, librt-shared-only-routines): Add
6149         rt-unwind-resume.
6150         * sysdeps/pthread/rt-unwind-resume.c: New file.
6151         * unwind-forcedunwind.c: New file.
6152         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6153         (libpthread-shared-only-routines): Likewise.
6154         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6155         * pthreadP.h (pthread_cancel_init): New prototype.
6156         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6158         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6159         attr argument const struct pthread_attr *.
6161         * res.c (__res_state): Return __resp.
6162         * descr.h: Include resolv.h.
6163         (struct pthread): Add res field.
6164         * pthread_create.c: Include resolv.h.
6165         (start_thread): Initialize __resp.
6166         * Makefile (tests): Add tst-_res1.
6167         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6168         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6169         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6170         libpthread.
6171         * tst-_res1.c: New file.
6172         * tst-_res1mod1.c: New file.
6173         * tst-_res1mod2.c: New file.
6175 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6177         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6179         * Makefile: Define various *-no-z-defs variables for test DSOs
6180         which has undefined symbols.
6182 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6184         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6185         Retry if the stwcx fails to store once_control.
6187 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6189         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6190         pthread_attr_setaffinity.
6191         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6192         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6193         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6194         * pthread_attr_destroy.c: Free cpuset element if allocated.
6195         * pthread_create.c: Pass iattr as additional parameter to
6196         create_thread.
6197         * sysdeps/pthread/createthread.c: If attribute is provided and
6198         a new thread is created with affinity set or scheduling parameters,
6199         start thread with CLONE_STOPPED.
6200         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6201         pthread_attr_setaffinity.
6202         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6203         cpuset element.
6205 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6207         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6209 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6211         * sysdeps/pthread/configure.in: Require CFI directives also for
6212         ppc and s390.
6214 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6216         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6217         Add cfi directives.
6219 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6221         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6222         CLEANUP_JMP_BUF.
6223         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6224         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6225         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6226         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6227         not self pointer in __writer.  Compare with TID to determine
6228         deadlocks.
6229         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6230         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6231         Likewise.
6232         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6233         Likewise.
6234         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6235         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6236         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6237         macros also when compiling librt.
6239 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6241         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6242         -fasynchronous-unwind-tables.
6243         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6244         (PSEUDO): Add cfi directives.
6245         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6246         Likewise.
6247         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6248         Likewise.
6250 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6252         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6253         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6254         * unwind.c (__pthread_unwind_next): Add hidden_def.
6255         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6256         Likewise.
6257         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6258         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6259         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6260         Likewise.
6261         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6262         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6263         Likewise.
6264         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6265         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6266         __pthread_unregister_cancel and __pthread_unwind_next.
6268 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6270         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6271         different symbol for the cancellation syscall wrapper and
6272         non-cancellation syscall wrapper.
6273         (PSEUDO_END): Define.
6275 2003-07-05  Richard Henderson  <rth@redhat.com>
6277         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6278         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6279         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6280         return actual return value from the syscall, not 0.
6282 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6284         * descr.h (struct pthread): Add pid field.
6285         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6286         (__reclaim_stacks): Likewise.
6287         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6288         also check for PID of the signal source.
6289         (__pthread_initialize_minimal_internal): Also initialize pid field
6290         of initial thread's descriptor.
6291         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6292         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6293         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6294         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6295         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6297 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6299         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6300         Fix use of parameter.
6301         (__libc_cleanup_pop): Likewise.
6303 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6305         * init.c (sigcancel_handler): Change parameters to match handler
6306         for SA_SIGACTION.  Check signal number and code to recognize
6307         invalid invocations.
6309 2003-07-03  Roland McGrath  <roland@redhat.com>
6311         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6312         Apply sizeof (struct pthread) bias to r13 value.
6314 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6316         * sysdeps/pthread/configure.in: Require CFI directives.
6318         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6319         definition.
6320         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6321         libpthread compilation.
6322         * unwind.c (__pthread_unwind): Add hidden_def.
6323         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6325 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6327         * libc-cancellation.c (__libc_cleanup_routine): Define.
6328         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6329         (__pthread_cleanup_pop): Define.
6331 2003-07-01  Richard Henderson  <rth@redhat.com>
6333         * sysdeps/alpha/elf/pt-initfini.c: New file.
6334         * sysdeps/alpha/pthread_spin_lock.S: New file.
6335         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6336         * sysdeps/alpha/pthreaddef.h: New file.
6337         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6338         * sysdeps/alpha/tls.h: New file.
6339         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6340         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6341         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6342         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6343         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6344         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6345         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6346         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6347         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6348         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6350 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6352         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6353         cleanup support and unwind info.
6355 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6357         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6358         Use correct cleanup handler registration.  Add unwind info.
6359         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6360         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6361         * tst-once3.c: Add cleanup handler and check it is called.
6362         * tst-once4.c: Likewise.
6363         * tst-oncex3.c: New file.
6364         * tst-oncex4.c: New file.
6365         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6367 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6369         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6371 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6373         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6374         (tf_msgsnd): Likewise.
6376         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6377         premature returns a bit more.
6379 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6381         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6382         definition to the front.
6384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6385         the cleanup functions to make the names unique.  Fix dwarf opcode
6386         un unwind table.
6387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6388         functions to make the names unique.  Fix CFA offset for two blocks.
6390 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6392         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6393         missing closing braces.
6394         Patch by Christophe Saout <christophe@saout.de>.
6396 2003-06-24  Roland McGrath  <roland@redhat.com>
6398         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6400 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6402         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6403         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6405         * pthreadP.h: Declare __find_thread_by_id.
6406         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6407         * pthread_clock_gettime.c: Allow using other thread's clock.
6408         * pthread_clock_settime.c: Likewise.
6409         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6410         * Makefile: Add rules to build and run tst-clock2.
6411         * tst-clock2.c: New file.
6413 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6415         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6416         to use exception-based cleanup handler.
6417         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6419         * tst-cond8.c (ch): Announce that we are done.
6421         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6423         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6424         Also test aio_suspend with timeout value.
6426 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6428         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6429         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6430         attribute_hidden.
6432         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6433         (__pthread_mutex_lock_internal): Likewise.
6434         (__pthread_mutex_unlock_internal): Likewise.
6435         (__pthread_mutex_unlock_usercnt): Declare.
6436         * pthread_mutex_destroy.c: Always fail if used in any way.
6437         * pthread_mutex_init.c: Update comment.
6438         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6439         * pthread_mutex_timedlock.c: Adjust __nusers.
6440         * pthread_mutex_trylock.c: Adjust __nusers.
6441         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6442         and public interfaces are wrapper with pass additional parameter.
6443         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6444         parameter zero.
6445         * tst-mutex8.c: New file.
6446         * Makefile (tests): Add tst-mutex8.
6447         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6448         __pthread_mutex_unlock_usercnt.
6449         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6450         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6451         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6452         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6453         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6454         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6455         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6456         Add __nusers.
6457         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6458         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6459         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6460         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6461         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6463         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6464         * pthread_mutex_timedlock.c: Likewise.
6465         * pthread_mutex_trylock.c: Adjust __nusers.
6466         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6467         * tst-mutex9.c: New file.
6468         * Makefile (tests): Add tst-mutex9.
6469         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6470         * sysdeps/ia64/tls.h: Likewise.
6471         * sysdeps/powerpc/tls.h: Likewise.
6472         * sysdeps/s390/tls.h: Likewise.
6473         * sysdeps/sh/tls.h: Likewise.
6474         * sysdeps/x86_64/tls.h: Likewise.
6475         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6476         Change type of __owner.
6477         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6478         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6479         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6480         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6481         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6483 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6485         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6486         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6488         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6489         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6490         instead of nr to lll_futex_wake.  Only set errno and return -1
6491         if err < 0.
6493         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6494         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6495         return actual return value from the syscall, not 0.
6497 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6499         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6500         find a random value.
6501         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6502         errno==EIDRM.
6504         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6505         compat_timer_settime.
6506         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6507         compat_timer_gettime.
6508         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6509         compat_timer_getoverrun.
6510         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6511         compat_timer_delete.
6513         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6514         error-checking mutex detect busy mutexes.
6516 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6518         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6519         Add ax to clobber list.
6520         (lll_mutex_cond_lock): Likewise.
6521         (lll_mutex_unlock): Likewise.
6522         (lll_lock): Likewise.
6523         (lll_unlock): Likewise.
6525         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6526         * tst-cancel18.c: New file.
6527         * tst-cancelx18.c: New file.
6529         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6530         and tcdrain.
6532         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6533         * tst-cancel17.c: New file.
6534         * tst-cancelx17.c: New file.
6536         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6537         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6538         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6540         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6542 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6544         * sysdeps/pthread/createthread.c (create_thread): Set
6545         header.multiple_threads unconditionally.
6546         * allocatestack.c (allocate_stack): Likewise.
6547         * descr.h (struct pthread): Add header.multiple_threads
6548         unconditionally.
6549         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6550         Define for librt.  #error if neither libpthread, libc nor librt.
6551         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6552         Likewise.
6553         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6554         CDISABLE): Likewise.
6555         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6556         CDISABLE): Likewise.
6557         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6558         CDISABLE): Likewise.
6559         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6560         CDISABLE): Likewise.  Access header.multiple_threads outside of
6561         libc and libpthread.
6562         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6563         Likewise.
6564         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6565         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6567 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6569         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6570         Also test early cancellation before the thread reaches the cancellation
6571         point.
6573         * Makefile: Compile forward.c with exceptions.
6575         * sysdeps/unix/sysv/linux/sleep.c: New file.
6577 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6579         * Makefile: Add CFLAGS definition to compile function wrappers
6580         duplicated from libc with exceptions.
6581         * tst-cancel4.c: Also check cancellation handlers.
6583         * Makefile: Add rules to build and run tst-cancel16 and
6584         tst-cancelx16.  Add missing CFLAGS definitions.
6585         * tst-cancel16.c: New file.
6586         * tst-cancelx16.c: New file.
6588 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6590         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6591         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6592         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6593         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6595         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6596         (LIBC_CANCEL_RESET): Likewise.
6597         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6598         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6599         librt-cancellation.
6600         (CFLAGS-libcrt-cancellation.c): Define.
6601         * sysdeps/pthread/librt-cancellation.c: New file.
6602         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6603         macros also when compiling librt.
6604         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6605         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6606         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6607         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6608         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6609         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6610         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6612         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6613         compat_timer_create.
6615 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6617         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6619         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6620         __register_atfork.
6621         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6622         Add libc_hidden_def.
6624 2003-06-13  Roland McGrath  <roland@redhat.com>
6626         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6627         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6629 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6631         * allocatestack.c (queue_stack): Always inline.
6632         * ptreadhP.h (__do_cancel): Likewise.
6634 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6636         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6637         a typo.
6639 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6641         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6642         (__pthread_cond_signal): Remove incorrect second addition for
6643         cond_lock!=0.
6645 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6647         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6648         (__pthread_cond_signal): Use correct futex pointer in
6649         __lll_mutex_lock_wait call.
6651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6652         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6654 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6656         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6657         cancelable.
6658         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6659         Likewise.
6661         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6662         hand-written CFI generation code.  Since ENTRY/END also initiated
6663         CFI frames this caused two CFI sets to be generated.
6665 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6667         * cleanup_routine.c: New file.
6668         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6669         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6670         cleanup handling.
6671         * Makefile (libpthread-routines): Add cleanup_routine.
6672         Add more CFLAGS variables to compile with exceptions.  Add comments
6673         why which file needs unwind tables.
6674         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6675         tests.
6676         * tst-cancelx1.c: New file.
6677         * tst-cancelx2.c: New file.
6678         * tst-cancelx3.c: New file.
6679         * tst-cancelx4.c: New file.
6680         * tst-cancelx5.c: New file.
6681         * tst-cancelx6.c: New file.
6682         * tst-cancelx7.c: New file.
6683         * tst-cancelx8.c: New file.
6684         * tst-cancelx9.c: New file.
6685         * tst-cancelx10.c: New file.
6686         * tst-cancelx11.c: New file.
6687         * tst-cancelx12.c: New file.
6688         * tst-cancelx13.c: New file.
6689         * tst-cancelx14.c: New file.
6690         * tst-cancelx15.c: New file.
6691         * tst-cleanupx0.c: New file.
6692         * tst-cleanupx0.expect: New file.
6693         * tst-cleanupx1.c: New file.
6694         * tst-cleanupx2.c: New file.
6695         * tst-cleanupx3.c: New file.
6697         * tst-cleanup0.c: Make standard compliant.
6698         * tst-cleanup1.c: Likewise.
6700         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6701         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6702         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6703         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6704         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6705         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6706         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6707         CLEANUP_JMP_BUF.
6708         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6709         * tst-cancel12.c: New file.
6710         * tst-cancel13.c: New file.
6711         * tst-cancel14.c: New file.
6712         * tst-cancel15.c: New file.
6713         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6714         and tst-cancel15.
6716         * tst-cancel1.c: Add some comments.
6718         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6719         timeout correctly.
6721 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6723         * Makefile (CFLAGS-pthread_cancel.c): Define.
6725 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6727         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6728         Change type of __writer element to int.
6729         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6730         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6731         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6732         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6733         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6734         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6735         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6736         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6737         Compare with TID to determine deadlocks.
6738         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6739         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6740         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6741         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6742         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6743         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6744         Likewise.
6745         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6746         Likewise.
6747         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6748         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6749         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6750         Likewise.
6751         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6752         Likewise.
6753         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6754         * Makefile (tests): Add tst-rwlock12.
6755         * tst-rwlock12.c: New file.
6757 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6759         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6760         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6761         Remove bogus hidden_proto.
6762         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6763         Likewise.
6764         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6765         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6766         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6767         ___lll_mutex_timedlock): Likewise.
6769 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6772         (__pthread_cond_signal): Add some code to eventually handle
6773         cond_lock!=0.
6775 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6777         * Makefile (tests): Add tst-exec4.
6778         (tst-exec4-ARGS): Define.
6779         * tst-exec4.c: New file.
6781 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6783         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6784         Also fail if tv_nsec < 0.
6785         (__lll_timedwait_tid): Likewise.
6786         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6787         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6788         Likewise.
6789         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6790         Likewise.
6791         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6792         Likewise.
6793         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6794         Likewise.
6795         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6796         Likewise.
6797         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6798         Likewise.
6800         * Makefile (tests): Add tst-sem8 and tst-sem9.
6801         * tst-sem8.c: New file.
6802         * tst-sem9.c: New file.
6803         * sem_open.c: Fix creation of in_use record if the file exists but
6804         no internal record.
6806         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6807         definitions.
6809         * sysdeps/pthread/timer_create.c (timer_create): In case
6810         evp==NULL, assign timer ID to sival_ptr.
6812         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6813         struct pthread_unwind_buf *.
6814         (struct pthread): Likewise for cleanup_jmp_buf element.
6816         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6817         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6818         * unwind.c (__pthread_unwind_next): Likewise.
6820 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6822         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6823         (lll_futex_timed_wait): Use int for futex value parameter.
6824         (lll_futex_wake): Likewise.
6825         (lll_futex_requeue): Likewise.
6827         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6828         Replace one memory operation with one register operation.
6830         * tst-join4.c (do_test): Fix error message.
6832         * tst-rwlock6.c (do_test): Use correct format specifier.
6834         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6835         (__lll_mutex_lock_wait): Replace one memory operation with one
6836         register operation.
6837         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6838         (__lll_mutex_lock_wait): Likewise.
6840         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6841         (__lll_mutex_cond_lock): Add one to value parameter of
6842         __lll_lock_wait to reflect reality in the futex syscall.
6843         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6844         (lll_mutex_cond_lock): Likewise.
6846 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6848         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6849         New function.
6850         (lll_mutex_cond_lock): Define.
6852 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6854         * Makefile (tests): Add tst-signal6.
6855         * tst-signal6.c: New file.
6857         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6858         (__lll_mutex_unlock_force): New function
6859         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6861         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6862         (__lll_mutex_unlock_force): New function.
6863         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6865         * tst-rwlock7.c (do_test): Use correct format specifier.
6867         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6868         Find break parameter in correct asm argument.
6870 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6872         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6873         Remove out4.
6874         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6875         error occured.
6876         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6877         Add __mutex.
6878         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6879         lll_futex_requeue, lll_mutex_unlock_force): Define.
6881 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6883         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6884         (pthread_cond_t): Add __mutex.
6885         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6886         lll_futex_requeue, lll_mutex_unlock_force): Define.
6888 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6890         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6891         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6892         Add __mutex field.
6893         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6894         Define.
6895         (lll_futex_wait, lll_futex_wake): Define.
6896         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6897         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6898         FUTEX_REQUEUE instead of FUTEX_WAIT.
6899         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6900         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6901         mutex which was used in condvar structure.  Call
6902         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6903         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6905         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6906         include tcb-offsets.h.  Read wakeup value in locked region.
6907         Use the value of gbr register as THREAD_ID.
6908         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6909         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6910         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6912         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6913         macros.
6915 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6917         * sysdeps/pthread/pthread_cond_broadcast.c
6918         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6920 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6922         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6923         typo in register name.
6924         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6925         correctly.  Actually use requeue.  Little optimization.
6926         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6927         mutex address early.  Handle cancellation state as 32-bit value.
6928         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6929         Remove unnecessary label.
6931 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6933         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6934         instead of FUTEX_WAIT.
6935         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6938         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6940         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6941         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6942         of __pthread_mutex_lock_internal.
6943         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6944         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6945         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6946         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6947         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6949         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6950         Add pthread_mutex_cond_lock.
6951         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6952         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6953         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6954         lll_mutex_cond_lock.
6955         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6956         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6957         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6958         Add __mutex field.
6959         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6960         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6962         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6963         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6965         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6966         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6967         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6968         macro don't define aliases.
6970         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6971         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6972         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6973         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6974         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6976         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6977         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6978         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6980 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6982         * sem_open.c: Fix one endless loop.  Implement correct semantics
6983         wrt opening the same semaphore more then once.
6984         * sem_close.c: Adjust for sem_open change.
6985         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6986         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6987         * Makefile (tests): Add tst-sem7.
6988         * tst-sem7.c: New file.
6990 2003-05-16  Roland McGrath  <roland@redhat.com>
6992         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6993         uninitialized variable braino.
6995 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6997         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6998         test for syscall availability.
7000         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
7001         __no_posix_timers to -1 if the syscalls don't exist.
7003         * pthread_join.c (pthread_join): Set tid field of the joined
7004         thread to -1.  This isn't necessary but helps to recognize some
7005         error conditions with almost no cost.
7007         * allocatestack.c (FREE_P): Also negative values indicate an
7008         unused stack.
7010         * unwind.c: Include <unistd.h>.
7012 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7014         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7016 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7018         * Makefile (crti-objs, crtn-objs): New variables.
7019         (omit-deps, extra-objs): Add crtn.
7020         ($(objpfx)libpthread.so): Depend on both crti and crtn
7021         and links to them in multidir.
7022         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7024 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7026         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7027         (lll_mutex_unlock): Use atomic_exchange_rel.
7029 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7031         * cond-perf.c (cons): Add missing locking around setting of alldone.
7033 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7035         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7036         related macros.
7037         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7039 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7041         * tst-sem6.c: New file.
7042         * Makefile (tests): Add tst-sem6.
7044         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7045         Use atomic_exchange_rel instead of atomic_exchange.
7046         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7047         Likewise.
7049         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7050         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7051         vsyscall is possible.
7053         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7054         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7055         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7056         pthread_setaffinity_np.
7057         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7058         and pthread_setaffinity_np.
7059         * Makefile (libpthread-routines): Add pthread_getaffinity and
7060         pthread_setaffinity.
7062         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7063         use it in case mmap to allocate the stack fails.
7064         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7065         ARCH_MAP_FLAGS here.
7066         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7067         ARCH_RETRY_MMAP.
7069 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7071         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7072         handler implementation.  It is now lockless in fork().
7073         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7074         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7075         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7076         declare the __fork_*_lists.
7077         (struct fork_handler): Include pointers to all three functions.
7078         Add next, refcntr and need_signal elements.
7079         (__fork_handlers): New declaration.
7080         (__register_atfork_malloc): Remove declaration.
7081         (HAVE_register_atfork_malloc): Remove definition.
7082         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7083         __pthread_child_handler variable.
7084         (__libc_pthread_init): Use __register_atfork instead of explicitly
7085         adding to the list.
7086         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7087         and lll_futex_wake.
7088         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7090         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7091         function must never be reached.
7093         * cond-perf.c: New file.
7095 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7097         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7099 2003-05-04  Roland McGrath  <roland@redhat.com>
7101         * Makefile ($(objpfx)../libc.so): New target.
7103 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7105         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7106         (pthread_condattr_t): Size is only an int, don't use long for
7107         alignment.
7108         (pthread_mutexattr_t): Likewise.
7109         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7110         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7111         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7113 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7115         * sysdeps/i386/tls.h: Define THREAD_ID.
7116         * sysdeps/ia64/tls.h: Likewise.
7117         * sysdeps/powerpc/tls.h: Likewise.
7118         * sysdeps/s390/tls.h: Likewise.
7119         * sysdeps/sh/tls.h: Likewise.
7120         * sysdeps/x86_64/tls.h: Likewise.
7121         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7122         record ownership.
7123         * pthread_mutex_timedlock.c: Likewise.
7124         * pthread_mutex_trylock.c: Likewise.
7125         * pthread_mutex_unlock.c: Likewise.
7126         * pthread_rwlock_trywrlock.c: Likewise.
7127         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7128         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7129         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7130         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7132         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7133         flag.
7135 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7137         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7138         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7139         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7140         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7141         Make __align long long instead of long.
7142         (pthread_rwlock_t): Formatting.
7143         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7144         (pthread_rwlock_t): Formatting.
7145         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7146         (pthread_cond_t): Make __align long long instead of long.
7147         (pthread_rwlock_t): Move __flags field to the same position as in
7148         linuxthreads.
7150 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7152         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7153         * tst-rwlock7.c (do_test): Likewise.
7155 2003-04-26  Roland McGrath  <roland@redhat.com>
7157         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7159 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7161         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7162         sizeof (struct pthread).
7163         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7164         1 struct pthread.
7165         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7166         to 0.
7167         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7168         struct pthread.
7169         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7170         to 32-bit bytes.
7171         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7172         tcbp.
7173         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7174         unneccessarily.
7175         (NO_TLS_OFFSET): Define.
7176         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7177         add TLS_TCB_SIZE unnecessarily.
7179 2003-04-22  Roland McGrath  <roland@redhat.com>
7181         * Makeconfig (shared-thread-library): Reverse link order to work
7182         around linker bug.
7184 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7186         * semaphore.h: Fix typo in comment.
7188 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7190         * sysdeps/pthread/sigfillset.c: New file.
7192         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7193         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7194         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7195         * sysdeps/pthread/sigaction.c: Likewise.
7196         * sysdeps/pthread/sigprocmask.c: New file.
7197         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7198         __SIGRTMIN+1.
7199         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7200         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7201         in this case.
7203 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7205         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7206         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7208         * sysdeps/unix/sysv/linux/unregister-atfork.c
7209         (__unregister_atfork): Don't free memory not allocated dynamically.
7211         * semaphore.h: Remove __THROW marker from cancellation points.
7212         * nptl/sysdeps/pthread/pthread.h: Likewise.
7214 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7216         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7217         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7218         __THROW.
7220 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7222         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7224 2003-04-15  Roland McGrath  <roland@redhat.com>
7226         * forward.c (__pthread_unwind): Tweak to avoid warning.
7228 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7230         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7232 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7234         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7235         overflow CFA advance instructions.
7236         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7238 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7240         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7241         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7242         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7243         defined.
7245         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7246         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7248         DW_CFA_advance_loc for .Laddl-.Lsubl.
7250 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7252         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7253         position-independent unwind data for static libraries.
7254         Add missing unwind info.  Add comments.
7256         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7257         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7259         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7261 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7263         * Makefile: Make sure all cancellation points are compiled with
7264         exception and asynchronous unwind tables.
7266         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7267         which mishandles loading of global object addresses in PIC.
7268         (THREAD_SETMEM_NC): Likewise.
7270 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7272         * pthread.h: Define new data structure for cleanup buffer.  Declare
7273         new cleanup handler interfaces.
7274         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7275         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7276         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7277         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7278         it.  Declare old cleanup handler installation functions.
7279         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7280         handling.
7281         * cleanup_defer.c: Likewise.
7282         * cleanup_compat.c: New file.  Old cleanup code.
7283         * cleanup_def_compat.c: New file.  Old cleanup code.
7284         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7285         if own thread descriptor.
7286         * unwind.c: New file.
7287         * forward.c: Add __pthread_unwind.
7288         * init.c (pthread_functions): Add __pthread_unwind.
7289         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7290         Add ptr___pthread_unwind.
7291         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7292         and unwind function.
7293         * Makefile (libpthread-routines): Add cleanup_compat,
7294         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7295         table generation if necessary.
7296         * version.c: Record whether unwind support is compiled in.
7297         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7298         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7299         handler interfaces.
7300         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7301         complication to generate unwind information for syscall wrappers.
7302         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7303         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7304         __cleanup_fct_attribute.
7306         * Makefile: Add rules to build and run tst-cleanup0.
7307         * tst-cleanup0.c: New file.
7308         * tst-cleanup0.expect: New file.
7310         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7311         caller.  Optimize to avoid often unecessary local variable.
7313 2003-04-11  Roland McGrath  <roland@redhat.com>
7315         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7316         sets variable `multidir'; include that.
7317         (generated): Add it.
7318         ($(objpfx)$(multidir)/crti.o): New target.
7319         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7321 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7323         * tst-attr2.c (do_test): Add cast to avoid warning.
7324         * tst-mutex4.c (do_test): Likewise.
7326 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7328         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7329         in child.
7331 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7333         * Makefile (tests): Add tst-detach1.
7334         * tst-detach1.c: New file.
7336 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7338         * sysdeps/pthread/pthread.h: Remove duplicate
7339         pthread_cleanup_{push,pop} definitions.
7341         * tst-barrier2.c: Eliminate warnings.
7342         * tst-cancel4.c: Likewise.
7343         * tst-cond4.c: Likewise.
7344         * tst-cond6.c: Likewise.
7345         * tst-detach1.c: Likewise.
7346         * tst-rwlock4.c: Likewise.
7347         * tst-rwlock6.c: Likewise.
7348         * tst-rwlock7.c: Likewise.
7349         * tst-sem3.c: Likewise.
7350         * tst-spin2.c: Likewise.
7351         * tst-umask1.c: Likewise.
7353 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7355         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7357 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7359         * descr.h (struct pthread): Move cancelhandling member to the front.
7361 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7363         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7364         malloc_parent, and malloc_child statically.
7365         (__register_atfork_malloc): New function.
7366         (free_mem): Don't free any of the malloc_* variables on the list.
7367         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7368         Define HAVE_register_atfork_malloc.
7370 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7372         * sysdeps/pthread/createthread.c (create_thread): Add some more
7373         comments explaining when to set multiple_threads and when not.
7375         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7376         THREAD_ATOMIC_BIT_SET if not already defined.
7377         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7378         THREAD_ATOMIC_BIT_SET:
7379         * sysdeps/x86_64/tls.h: Likewise.
7380         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7381         THREAD_ATOMIC_CMPXCHG_VAL.
7382         (_pthread_cleanup_pop_restore): Likewise.
7383         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7384         (__pthread_enable_asynccancel_2): Likewise.
7385         (__pthread_disable_asynccancel): Likewise.
7386         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7387         (__libc_disable_asynccancel): Likewise.
7388         * init.c (sigcancel_handler): Likewise.
7389         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7390         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7392 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7394         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7395         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7396         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7397         * Makefile (tests): Add tst-cancel11.
7398         * tst-cancel11.c: New file.
7400 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7402         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7403         round, not the first.  Use specific_used flag instead of local
7404         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7405         (__free_tcb): Don't call deallocate_tsd here.
7406         (start_thread): Call deallocate_tsd here.
7407         * pthread_setspecific.c: Set specific_used flag really only when
7408         needed.
7409         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7410         * tst-tsd3.c: New file.
7411         * tst-tsd4.c: New file.
7413 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7415         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7416         Use atomic_exchange_and_add instead of __lll_add.
7417         (__lll_mutex_timedlock): Likewise.
7418         Patch by Ian Wienand.
7420 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7422         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7423         (SINGLE_THREAD_P): Fix typo.
7424         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7426 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7428         * Makefile (tests): Add tst-align.
7429         * tst-align.c: New file.
7430         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7432         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7433         function correctly.
7435         * tst-tsd2.c: Add casts to avoid warnings.
7437 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7439         * descr.h (struct pthread): Move most often used elements to the front.
7441 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7443         * Makefile (libpthread-routines): Add pthread_atfork.
7444         (libpthread-static-only-routines): Add pthread_atfork.
7446 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7448         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7449         of TLS_DTV_AT_TP.
7450         (INSTALL_DTV): Add parens.
7451         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7452         Use passed descr instead of THREAD_SELF.
7453         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7454         (__lll_mutex_timedlock_wait): Correct expected value after
7455         spurious wakeup.
7456         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7457         Release lock before waking up the waiters.
7458         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7459         criteria.  Reorderstruct passed to cleanup handler.  Fix
7460         handling of cancellation and failung pthread_mutex_unlock call.
7461         Use __pthread_enable_asynccancel_2 instead of
7462         __pthread_enable_asynccancel.
7463         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7464         Return result of lock re-get if it fails.
7465         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7466         for __pthread_cleanup_push.
7467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7468         completely broken rwlock implementation.
7469         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7471         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7472         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7474         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7475         versioned_symbol macro.
7476         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7477         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7479 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7481         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7482         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7483         and __helper_tid.
7484         (struct timer): Remove th and bar field.
7485         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7486         debugging code.  Create only one helper thread.
7487         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7488         helper thread.
7489         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7490         Renamed.  Define statically.  Use thread info from siginfo.
7491         (__helper_once): New variable.
7492         (__helper_tid): New variable.
7493         (__reset_helper_control): New function.
7494         (__start_helper_thread): New function.
7496         * pthread_create.c (start_thread): Don't use setjmp inside
7497         __builtin_expect to work around gcc bug.
7499         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7500         timer_delete syscall fails, but not with ENOSYS, set
7501         __no_posix_timers.
7503         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7504         (timer_settime): Fix typo.
7505         * sysdeps/unix/sysv/linux/timer_getoverr.c
7506         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7508 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7510         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7511         offset of cleanupbuf.__prev.
7513 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7515         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7516         of included file.
7518 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7520         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7521         NULL provide default definition to syscall.
7523 2003-03-25  Roland McGrath  <roland@redhat.com>
7525         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7526         (timer_id2ptr): Fix typo.
7528 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7530         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7531         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7532         * sysdeps/ia64/pthreaddef.h: Likewise.
7533         * sysdeps/powerpc/pthreaddef.h: Likewise.
7534         * sysdeps/s390/pthreaddef.h: Likewise.
7535         * sysdeps/sh/pthreaddef.h: Likewise.
7536         * sysdeps/x86_64/pthreaddef.h: Likewise.
7537         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7538         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7539         being changed.
7540         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7541         SIGTIMER is not unblocked.
7542         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7543         RT signal taken.
7544         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7545         be send.
7546         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7547         pass pointer through as ID.
7548         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7549         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7550         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7551         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7552         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7553         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7554         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7555         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7556         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7557         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7558         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7559         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7560         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7561         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7562         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7563         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7564         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7565         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7566         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7567         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7568         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7569         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7570         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7571         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7572         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7573         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7574         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7575         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7576         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7577         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7578         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7579         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7580         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7582         * pthreadP.h: Remove FRAME_LEFT definition.
7583         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7584         already left frame.  Programs which have this problem are not POSIX
7585         compliant.
7586         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7588 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7590         * sysdeps/pthread/tst-timer.c: Check return values of the
7591         functions we test.
7593 2003-03-23  Roland McGrath  <roland@redhat.com>
7595         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7596         * tst-tls3mod.c: Likewise.
7597         * tst-tls1.c: Likewise.
7598         * tst-tls2.c: Likewise.
7600         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7601         undefined behavior.
7603         * tst-join5.c (tf1, tf2): Add a cast.
7605         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7607         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7608         Don't test anything.
7609         * tst-cond4.c: Likewise.
7610         * tst-cond6.c: Likewise.
7611         * tst-flock2.c: Likewise.
7612         * tst-mutex4.c: Likewise.
7613         * tst-rwlock4.c: Likewise.
7614         * tst-signal1.c: Likewise.
7615         * tst-spin2.c: Likewise.
7616         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7618         * tst-mutex4.c: Use test-skeleton.c.
7619         * tst-spin2.c: Likewise.
7620         * tst-sysconf.c: Likewise.
7621         * tst-barrier2.c: Likewise.
7622         * tst-cond4.c: Likewise.
7623         * tst-cond6.c: Likewise.
7624         * tst-rwlock4.c: Likewise.
7625         * tst-unload.c: Likewise.
7626         * tst-flock2.c (do_test): Use return instead of exit.
7628 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7630         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7632 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7634         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7635         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7636         instead of __lll_compare_and_swap.
7637         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7638         Likewise.
7639         Removed definition if __lll_compare_and_swap.
7641         * cancellation.c: Adjust for new form of compare&exchange macros.
7642         * cleanup_defer.c: Likewise.
7643         * init.c: Likewise.
7644         * libc-cancellation.c: Likewise.
7645         * old_pthread_cond_broadcast.c: Likewise.
7646         * old_pthread_cond_signal.c: Likewise.
7647         * old_pthread_cond_timedwait.c: Likewise.
7648         * old_pthread_cond_wait.c: Likewise.
7649         * pthread_cancel.c: Likewise.
7650         * pthread_create.c: Likewise.
7651         * pthread_detach.c: Likewise.
7652         * pthread_join.c: Likewise.
7653         * pthread_key_delete.c: Likewise.
7654         * pthread_setcancelstate.c: Likewise.
7655         * pthread_setcanceltype.c: Likewise.
7656         * pthread_timedjoin.c: Likewise.
7657         * pthread_tryjoin.c: Likewise.
7658         * sysdeps/pthread/createthread.c: Likewise.
7660 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7662         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7663         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7664         definitions.  Replace uses with calls to atomic_* functions.
7665         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7666         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7667         __lll_test_and_set calls with atomic_exchange_and_add and
7668         atomic_exchange calls respectively.
7669         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7670         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7671         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7672         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7673         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7674         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7675         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7677         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7678         returns the old value.
7680 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7682         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7683         int for variable OLDVAL and correct inline assembler contraint.
7684         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7685         type int for variable OLD.
7687         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7688         only for s390-32.
7689         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7690         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7691         instead of multiple_threads field in the TCB.
7693 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7695         * sysdeps/i386/i686/bits/atomic.h: Removed.
7696         * sysdeps/i386/i586/bits/atomic.h: Removed.
7697         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7698         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7699         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7700         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7701         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7702         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7703         * atomic.h: Removed.  Moved to glibc.
7705         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7706         support for clock selection.
7708         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7709         signalling waiters.
7711 2003-03-18  Roland McGrath  <roland@redhat.com>
7713         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7714         Add __lll_rel_instr first.  Add memory clobber.
7715         (lll_mutex_unlock): Use __lll_test_and_set.
7716         From Paul Mackerras <paulus@samba.org>.
7718         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7719         unconditionally.
7720         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7721         (SINGLE_THREAD_P):  Add `header.' prefix.
7722         From Paul Mackerras <paulus@samba.org>.
7724         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7725         pthread_timedjoin_np to ...
7726         (libpthread: GLIBC_2.3.3): ... here.
7727         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7729         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7730         Avoid shadowing VAL variable.
7732         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7733         New macro.
7735 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7737         * Makefile (tests): Add tst-cond11.
7738         * tst-cond11.c: New file.
7740         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7741         struct passed to cleanup handler to eliminate one more
7742         instruction.
7743         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7745         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7746         (pthrad_cond_t): Replace __unused field with __clock.
7748         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7749         waken all waiters in cleanup handler.
7750         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7751         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7753         * pthread_condattr_getclock.c: New file.
7754         * pthread_condattr_setclock.c: New file.
7755         * sysdeps/pthread/pthread.h: Declare these new functions.
7756         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7757         * Makefile (libpthread-routines): Add the new functions.
7758         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7759         Renamed field to value.  Document use of the bits.
7760         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7761         change.
7762         * pthread_condattr_setpshared.c: Likewise.
7763         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7764         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7765         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7766         Add __clock field.
7767         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7768         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7769         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7770         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7771         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7772         Implement clock selection.
7773         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7774         * pthread-errnos.sym: Add ENOSYS.
7775         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7776         _POSIX_CLOCK_SELECTION.
7777         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7779         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7780         invalid .size directive.
7782 2003-03-17  Roland McGrath  <roland@redhat.com>
7784         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7785         Formatting tweaks.
7787 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7789         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7790         Use __lll_add instead of spelling it out.  Use protected symbol names.
7791         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7792         Use __lll_add.
7793         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7794         Renamed from lll_compare_and_swap.  Use new name where necessary.
7795         (__lll_add): Defined.
7796         (__lll_dec_if_positive): Defined.
7797         (__lll_test_and_set): Defined.
7798         * sysdeps/ia64/pthread_spin_init.c: Removed.
7799         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7800         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7801         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7802         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7803         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7804         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7805         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7806         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7807         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7808         __sync_lock_release_si.
7809         Patch by Jakub Jelinek.
7811         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7812         Fix timeout handling.
7813         (__lll_timedwait_tid): Likewise.
7814         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7815         Patch by Jakub Jelinek.
7817         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7819 2003-03-17  Roland McGrath  <roland@redhat.com>
7821         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7822         * sysdeps/pthread/pthread_spin_init.c: New file.
7823         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7824         * sysdeps/powerpc/Makefile: New file.
7825         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7826         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7827         * sysdeps/powerpc/pthreaddef.h: New file.
7828         * sysdeps/powerpc/tcb-offsets.sym: New file.
7829         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7830         * sysdeps/powerpc/tls.h: New file.
7831         * sysdeps/powerpc/bits/atomic.h: New file.
7832         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7833         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7834         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7836         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7837         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7838         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7839         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7840         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7841         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7842         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7843         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7844         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7845         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7846         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7847         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7848         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7849         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7850         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7852         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7853         not gettimeofday.
7854         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7855         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7856         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7857         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7858         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7860 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7862         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7863         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7866         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7868 2003-03-16  Roland McGrath  <roland@redhat.com>
7870         * tst-fork4.c: Include <string.h>.
7871         * tst-signal2.c: Likewise.
7872         * tst-mutex5.c (do_test): exit -> return.
7873         * tst-mutex2.c: Include <stdlib.h>.
7875 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7877         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7878         (__lll_mutex_timedlock_wait): Correct expected value after
7879         spurious wakeup.  Otherwise we would never wait again.
7881         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7882         zone versus inline asm stupidity.  Use correct instructions.
7884         * tst-rwlock6.c: Add some more status output.
7886 2003-03-15  Roland McGrath  <roland@redhat.com>
7888         * sysdeps/pthread/configure.in: New file.
7889         * sysdeps/pthread/configure: New file (generated).
7891 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7893         * allocatestack.c (allocate_stack): Store the exact stack size of
7894         user allocated stacks.
7896 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7898         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7899         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7900         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7901         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7902         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7903         Use `header.' prefix.
7904         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7906 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7908         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7909         __builtin_frame_address, use stack pointer.
7911         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7912         instead of __builtin_frame_pointer.
7914 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7916         * tst-basic1.c (do_test): Add cast to avoid warning.
7917         * tst-basic2.c (do_test): Likewise.
7919         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7920         amount of stack correction.
7922         * tst-fork4.c: Use test-skeleton.c.
7924 2003-03-14  Roland McGrath  <roland@redhat.com>
7926         * init.c: Fix typo "#eli" for "#else".
7928 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7930         * allocatestack.c (__stack_user): Use hidden_data_def.
7931         * pthread_create.c (__pthread_keys): Likewise.
7933         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7935 2003-03-14  Roland McGrath  <roland@redhat.com>
7937         * tst-fork4.c: New file.
7938         * Makefile (tests): Add it.
7940         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7941         we always define the padding space.
7942         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7943         stopped supporting its own extensions fully.
7944         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7945         struct also called `header', so `header.multiple_threads' is the field
7946         name to use on all machines.
7947         * allocatestack.c (allocate_stack): Use `header.' prefix.
7948         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7949         * pthread_create.c (__pthread_create_2_1): Likewise.
7950         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7951         (THREAD_SELF): Likewise.
7952         * sysdeps/x86_64/tls.h: Likewise.
7953         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7954         (SINGLE_THREAD_P): Likewise.
7955         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7956         (SINGLE_THREAD_P): Likewise.
7957         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7958         (SINGLE_THREAD_P): Likewise.
7960         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7961         value directly.
7963 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7965         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7966         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7968         * pthread_create.c (start_thread): setjmp is expected to return 0.
7970         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7971         (THREAD_GETMEM_NC): Likewise.
7973 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7975         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7976         and the size of the stack which must be allocated is a multiple,
7977         allocate one more page.
7978         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7979         MULTI_PAGE_ALIASING.
7981 2003-03-13  Roland McGrath  <roland@redhat.com>
7983         * pthread_create.c (start_thread): Set EXITING_BIT after the
7984         event-reporting (and destructors), not before.
7986 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7988         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7989         lll_futex_wake): Declare register variables as long int instead of
7990         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7991         Make syscall arguments clobbered by the syscall.
7992         (lll_futex_wait): Define using lll_futex_timed_wait.
7994         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7995         to void *.
7997         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7998         PPID if [! NDEBUG].
8000         * allocatestack.c (nptl_ncreated): Only declare if
8001         COLORING_INCREMENT != 0.
8003         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
8004         (__libc_enable_asynccancel_2): Remove prototype.
8006         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8007         ctid to match kernel.
8009 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8011         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8012         libc_multiple_threads.
8013         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8014         __libc_multiple_threads to...
8015         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8017         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8018         versioning.
8019         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8020         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8022         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8023         (__pthread_once_internal): Define.
8025         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8026         macros instead of .symver directly.
8027         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8028         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8030         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8031         * sysdeps/x86_64/tcb-offsets.sym: New file.
8032         * sysdeps/x86_64/Makefile: New file.
8034         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8035         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8036         to access own pthread_t in TCB.
8037         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8038         Likewise.
8039         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8040         Likewise.
8041         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8043 2003-03-12  Roland McGrath  <roland@redhat.com>
8045         * pthread-errnos.sym: New file.
8046         * Makefile (gen-as-const-headers): New variable, list that file.
8047         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8048         header <pthread-errnos.h> instead of defining errno values here.
8049         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8050         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8051         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8053         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8054         Likewise.
8055         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8056         Likewise.
8057         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8059         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8060         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8061         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8062         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8063         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8064         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8065         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8066         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8067         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8068         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8069         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8070         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8071         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8072         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8073         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8074         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8075         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8076         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8077         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8078         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8079         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8080         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8081         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8082         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8083         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8085         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8086         CLONE_CHILD_SETTID worked.
8088 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8090         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8091         file.
8092         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8093         file.
8095         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8096         (pthread_cond_t): Add padding.
8098         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8099         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8100         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8102         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8103         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8104         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8105         (__pthread_rwlock_timedrdlock): Likewise.
8106         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8107         (__pthread_rwlock_wrlock): Likewise.
8108         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8109         (__pthread_rwlock_rdlock): Likewise.
8111         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8113         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8114         result of lock re-get if it fails.
8116 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8118         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8120         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8123         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8124         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8125         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8126         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8127         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8129         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8130         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8132         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8133         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8134         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8135         (create_thread): Likewise.
8136         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8137         * init.c (__pthread_initialize_minimal_internal): Initialize
8138         __libc_multiple_threads_ptr if necessary.
8139         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8140         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8141         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8142         __libc_multiple_threads.
8143         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8144         necessary.
8146         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8147         (THREAD_SETMEM_NC): Likewise.
8149         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8150         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8151         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8152         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8154         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8155         Eliminate one entire instruction.
8157         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8158         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8160         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8161         instead of __pthread_enable_asynccancel.
8162         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8163         (__pthread_cond_wait): Likewise.
8164         * sysdeps/pthread/pthread_cond_timedwait.c
8165         (__pthread_cond_timedwait): Likewise.
8166         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8168         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8169         (__condvar_cleanup): Wake up all waiters in case we got signaled
8170         after being woken up but before disabling asynchronous
8171         cancellation.
8172         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8173         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8174         (__condvar_cleanup): Likewise.
8176         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8177         Make it an error if architecture has no #if case.  Add x86-64.
8179         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8180         pt-initfini.s generation.
8182         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8183         (TLS_INIT_TP): Fix typo.
8185 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8187         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8188         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8190         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8191         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8192         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8193         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8194         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8195         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8196         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8197         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8199 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8201         * sysdeps/pthread/pthread_cond_timedwait.c
8202         (__pthread_cond_timedwait): Return the result of the final
8203         locking.  If it succeeds, the regular function return value.
8205         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8206         Return result of the final locking.
8207         * version.c (__nptl_main): Work around problems with the strange
8208         INTERNAL_SYSCALL macro on ppc32.
8209         * init.c (__pthread_initialize_minimal_internal): Unblock
8210         SIGCANCEL in case the parent blocked it.
8211         Reported by Paul Mackerras <paulus@samba.org>.
8213         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8214         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8215         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8217 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8219         * sysdeps/pthread/pthread_cond_timedwait.c
8220         (__pthread_cond_timedwait): Unlock and fail if
8221         __pthread_mutex_unlock_internal failed.
8223         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8224         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8225         Use ARCH_CLONE.
8226         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8227         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8228         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8229         ALLOCATE_STACK): New macros.
8230         (TLS_TPADJ): New macro.
8231         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8232         (allocate_stack): Handle TLS_DTV_AT_TP and
8233         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8234         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8235         Don't set PD->self.
8236         * init.c [__ia64__] (__NR_set_tid_address): Define.
8238         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8239         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8240         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8241         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8242         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8243         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8244         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8245         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8246         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8247         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8248         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8249         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8250         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8251         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8252         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8253         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8254         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8255         * sysdeps/ia64/bits/atomic.h: New file.
8256         * sysdeps/ia64/Makefile: New file.
8257         * sysdeps/ia64/pthread_spin_init.c: New file.
8258         * sysdeps/ia64/pthread_spin_lock.c: New file.
8259         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8260         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8261         * sysdeps/ia64/pthreaddef.h: New file.
8262         * sysdeps/ia64/tcb-offsets.sym: New file.
8263         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8264         * sysdeps/ia64/tls.h: New file.
8266         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8267         to syscall instead of no arguments.
8269 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8271         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8272         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8273         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8274         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8276         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8277         unused code.
8279         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8281         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8282         lowlevelbarrier.sym.
8283         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8284         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8285         Include lowlevelbarrier.h and don't define offsets locally.
8286         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8288         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8289         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8290         (__lll_mutex_timedlock_wait): Likewise.
8291         (lll_mutex_lock): Adjust asm for that.
8292         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8293         (lll_lock): Adjust asm for operand order change.
8294         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8295         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8297         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8298         Reverse order of parameters.
8299         (__lll_timedwait_tid): Remove regparms attribute.
8300         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8301         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8303         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8304         (__lll_timedwait_tid): Remove one unnecessary instruction.
8306         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8307         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8308         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8309         lowlevelmutex.S.
8311         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8312         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8313         for NOT_IN_libc.
8314         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8315         lowlevellock.S.
8317         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8318         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8319         for libc.so.
8320         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8321         define LOCK here (if UP is not defined).  The actual code is in
8322         lowlevelmutex.S.
8324         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8325         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8326         __lll_timedwait_tid for libc.so.
8327         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8328         define LOCK here (if UP is not defined).  The actual code is in
8329         lowlevellock.S.
8331         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8332         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8333         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8334         instead of lowlevelsem.h.
8335         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8336         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8337         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8339         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8340         lowlevelrwlock.sym.
8341         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8342         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8343         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8345         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8346         register loading.
8347         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8348         last changed.  D'oh.
8350         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8352         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8353         of __libc_locking_needed.
8354         (lll_trylock): Initialize %eax to zero.
8356         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8357         pthread_cond_t definition.
8359 2003-03-10  Roland McGrath  <roland@redhat.com>
8361         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8362         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8363         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8364         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8365         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8367         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8368         Instead of setting PD->multiple_threads, set globals
8369         __pthread_multiple_threads and __libc_multiple_threads.
8370         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8371         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8372         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8374         * descr.h (struct pthread): Conditionalize first member on
8375         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8376         containing an anonymous tcbhead_t.  Move `list' member out.
8377         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8378         * allocatestack.c: Remove use of `header.data.' prefix.
8379         * pthread_create.c: Likewise.
8380         * init.c (__pthread_initialize_minimal_internal): Likewise.
8381         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8382         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8383         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8384         * sysdeps/x86_64/tls.h: Likewise.
8385         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8386         (SINGLE_THREAD_P): Likewise.
8387         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8388         (SINGLE_THREAD_P): Likewise.
8389         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8390         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8392 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8394         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8396         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8397         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8399         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8400         leftovers from the ia32 code.
8402         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8403         memory load.
8404         (clear_once_control): Don't load %esi.
8406         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8407         handling.
8409         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8411         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8412         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8414         * Makefile (tests): Add tst-cond10.
8415         * tst-cond10.c: New file.
8417 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8419         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8420         * tst-signal3.c (do_test): Likewise.
8421         * tst-sem5.c (do_test): Likewise.
8422         * tst-kill6.c (do_test): Likewise.
8423         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8425         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8426         of inc/dec.
8427         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8428         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8429         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8430         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8431         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8433         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8434         Likewise.
8435         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8436         Likewise.
8437         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8438         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8440         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8442         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8443         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8444         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8446         * allocatestack.c (allocate_stack): If mprotect() fails free the
8447         TLS memory.
8449 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8451         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8453         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8454         lll_wake_tid.  This was used only to work around kernel limits in
8455         the early days.
8456         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8457         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8458         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8459         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8461         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8462         (__pthread_initialize_minimal_internal): Change initialization of
8463         __static_tls_align_m1 appropriately.
8464         * pthreadP.h (__static_tls_align_m1): Renamed from
8465         __static_tls_align.
8466         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8467         instead of __static_tls_align-1.
8469 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8471         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8473         * pthread_create.c: Define __pthread_keys using nocommon
8474         attribute, not by placing it explicitly in bss.
8475         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8477         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8478         Use it in mmap call to allocate stacks.
8480         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8482         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8483         result of the thread function.
8485 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8487         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8488         version is just fine.
8490         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8491         (__pthread_child_handler): Renamed from pthread_child_handler,
8492         exported, and marked hidden.  Change all users.
8493         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8494         free __pthread_child_handler from child list.
8496 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8498         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8500         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8501         Fix handling of cancellation and failing pthread_mutex_unlock call.
8502         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8503         (__pthread_cond_wait): Likewise.
8505         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8506         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8507         lll_futex_timed_wait call.
8508         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8509         (pthread_rwlock_timedwrlock): Likewise.
8511         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8512         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8513         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8515         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8516         check of lll_futex_wake return value.
8518 2003-03-03  Roland McGrath  <roland@redhat.com>
8520         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8522         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8523         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8524         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8526 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8528         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8529         error for CPU clocks.
8531         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8532         _POSIX_MONOTONIC_CLOCK.
8533         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8535         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8536         recent kernels.
8538 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8540         * descr.h (struct pthread): Move cleanup field to the front.
8542 2003-03-01  Roland McGrath  <roland@redhat.com>
8544         * sem_open.c (sem_open): Braino fix.
8546 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8548         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8550         __pthread_cleanup_pop functionality.
8551         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8553         * descr.h (struct pthread): Move tid field to the front now that
8554         it is often used.
8556         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8557         (__lll_mutex_timedlock_wait): Remove.
8558         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8559         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8560         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8561         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8562         (lll_unlock_wake_cb): Don't save and restore %esi.
8563         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8564         %esi.
8565         (__lll_timedwait_tid): Add alignment.
8566         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8567         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8568         %esi.
8569         (__lll_timedwait_tid): Removed.
8570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8571         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8572         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8573         (pthread_barrier_wait): Don't save, load, and restore %esi for
8574         last thread.
8575         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8576         (__pthread_cond_signal): Don't save, load, and restore %esi.
8577         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8578         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8579         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8580         Don't save, load, and restore %esi.
8582 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8584         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8585         Release lock before waking up the waiters.
8587         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8589         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8590         (reader_thread): Likewise.
8592         * sysdeps/pthread/pthread_rwlock_unlock.c
8593         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8594         to wake up readers if there are none.
8596         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8597         Release internal lock before wake threads.
8599 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8601         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8602         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8603         predefined.
8604         * tst-rwlock9.c: Likewise.
8605         * tst-rwlock10.c: New file.
8606         * tst-rwlock11.c: New file.
8608         * Makefile (tests): Add tst-dlsym1.
8609         * tst-dlsym1.c: New file.
8611         * init.c (__pthread_initialize_minimal_internal): Set
8612         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8613         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8615 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8617         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8619         * tst-cond2.c: Fix sychronization with child.
8621         * tst-rwlock8.c (reader_thread): Remove unused variable.
8623         * Makefile: Add rules to build and run tst-tls3.
8624         * tst-tls3.c: New file.
8625         * tst-tls3mod.c: New file.
8627         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8628         * tst-rwlock8.c: New file.
8629         * tst-rwlock9.c: New file.
8630         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8631         complete broken rwlock implementation.
8632         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8633         Likewise.
8634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8635         Likewise.
8636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8637         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8638         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8639         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8640         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8641         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8642         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8644 2003-02-23  Roland McGrath  <roland@redhat.com>
8646         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8648 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8650         * Makefile (tests): Add tst-context1.
8651         * tst-context1.c: New file.
8653         * Makefile (tests): Add tst-tls1 and tst-tls2.
8654         * tst-tls1.c: New file.
8655         * tst-tls2.c: New file.
8657         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8658         for failed cmpxchg.
8660         * pthread_create.c (start_thread): Set EXITING_BIT early.
8662         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8663         (THREAD_GETMEM_NC): Likewise.
8665 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8667         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8668         off 3 more bytes by using offset-less instructions when possible.
8670         * Makefile: Add dependency for $(objpfx)version.d.
8672         * eintr.c (eintr_source): Add unnecessary return but the compiler
8673         insists.
8675         * tst-kill3.c: Include <unistd.h>.
8677 2003-02-21  Roland McGrath  <roland@redhat.com>
8679         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8681 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8683         * Makefile (tests): Add tst-eintr1.
8684         (distribute): Add eintr.c.
8685         * tst-eintr1.c: New file.
8686         * eintr.c: New file.
8688         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8690         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8691         Disallow sending SIGCANCEL.
8693         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8694         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8695         * tst-kill1.c: New file.
8696         * tst-kill2.c: New file.
8697         * tst-kill3.c: New file.
8698         * tst-kill5.c: New file.
8699         * tst-kill6.c: New file.
8700         * tst-basic7.c: Renamed to...
8701         * tst-kill4.c: ...this.
8703 2003-02-21  Roland McGrath  <roland@redhat.com>
8705         * Makefile (install-lib-ldscripts): New variable.
8707 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8709         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8710         * pthread_cancel.c: Use INVALID_TD_P.
8711         * pthread_detach.c: Likewise.
8712         * pthread_getschedparam.c: Likewise.
8713         * pthread_setschedparam.c: Likewise.
8714         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8715         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8716         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8717         * pthread_timedjoin.c: Likewise.
8719         * tst-basic7.c: Include <signal.h>.
8721         * pthread_join.c (pthread_join): Limited checking for invalid
8722         descriptors.
8723         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8725 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8727         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8728         beginning of the loop.  Clear the entire first block of TSD.
8729         * Makefile (tests): Add tst-key4.
8730         * tst-key4.c: New file.
8732 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8734         * Makefile (tests): Add tst-basic7.
8735         * tst-basic7.c: New file.
8737         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8738         Add some more __builtin_expect.
8740         * pthreadP.h: Define dummy version of DEBUGGING_P.
8742 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8744         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8745         _POSIX_THREAD_PRIORITY_SCHEDULING.
8746         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8747         _XOPEN_REALTIME_THREADS.
8748         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8750         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8751         kernel returns EINVAL for PID <= 0, work around it.
8753         * Makefile (tests): Add tst-signal5.
8754         * tst-signal5.c: New file.
8756         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8757         and LOGIN_NAME_MAX.
8759         * tst-cancel1.c (tf): Block all signals.
8761         * Makefile (tests): Add tst-basic6.
8762         * tst-basic6.c: New file.
8764         * tst-basic1.c: Add test for process ID.
8766         * Makefile (tests): Add tst-cancel10.
8767         * tst-cancel10.c: New file.
8769         * Makefile (tests): Add tst-signal4.
8770         * tst-signal4.c: New file.
8772         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8773         __sigismember instead of sigismember.  Add __builtin_expect.
8775 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8777         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8778         pthread_setcancelstate, and pthread_rwlock_setpshared.
8780         * tst-cancel7.c (do_test): Make sure the pid file exists before
8781         canceling the thread.
8783         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8784         pthread_rwlock_timedrdlock tests.
8785         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8786         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8787         Check for invalid tv_nsec field.
8788         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8789         Likewise.
8791         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8792         recursive mutex of overflow.
8794         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8796         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8797         going into an endless loop.
8798         * Makefile (tests): Add tst-cancel9.
8799         * tst-cancel9.c: New file.
8801         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8803 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8805         * tst-mutex5.c (do_test): Add more timedlock tests.
8807         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8808         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8810         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8811         use INLINE_SYSCALL.  Error number is returned, not -1.
8813         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8814         and __deallocate_stack with internal_function.
8815         * pthread_create.c: Adjust definitions appropriately.
8816         * allocatestack.c: Likewise.
8818         * pthread_join.c: Add one more __builtin_expect.
8819         * pthread_timedjoin.c: Likewise.
8821         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8822         not data of sequence number does not match.
8823         Add one __builtin_expect.
8825         * Makefile (tests): Add tst-clock1.
8826         * tst-clock1.c: New file.
8828         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8829         negative arguments.
8830         * Makefile (tests): Add tst-basic5.
8831         * tst-basic5.c: New file.
8833 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8835         * Makefile (tests): Add tst-basic4.
8836         * tst-basic4.c: New file.
8838         * pthreadP.h: Add declaraction for __nptl_nthreads.
8839         * pthread_create.c: Define __nptl_nthreads
8840         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8841         after thread is done.  If then zero, call exit(0).
8842         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8843         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8844         * init.c (pthread_functions): Initialize ptr_nthreads.
8845         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8846         (__reclaim_stacks): Decrement __nptl_nthreads.
8847         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8848         Define.
8849         * Makefile (tests): Add tst-basic3.
8850         * tst-basic3.c: New file.
8852         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8853         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8854         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8855         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8856         if asynchronous canceling is enabled.
8857         * pthread_join.c (pthread_join): When recognizing circular joins,
8858         take into account the other thread might be already canceled.
8859         * Makefile (tests): Add tst-join5.
8860         * tst-join5.c: New file.
8862         * Makefile (tests): Add tst-join4.
8863         * tst-join4.c: New file.
8865 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8867         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8869 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8871         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8872         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8873         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8874         warning.
8875         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8876         to avoid warning.
8877         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8878         error if lll_futex_wake failed.
8880 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8883         handling of cancellation and failung pthread_mutex_unlock call.
8884         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8885         * Makefile (tests): Add tst-cond8 and tst-cond9.
8886         * tst-cond8.c: New file.
8887         * tst-cond9.c: New file.
8889         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8891         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8892         non-standard initializers with __USE_GNU.
8894         * Makefile (tests): Add tst-cleanup3.
8895         * tst-cleanup3.c: New file.
8897 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8899         * Makefile (tests): Add tst-attr1 and tst-attr2.
8900         * tst-attr1.c: New file.
8901         * tst-attr2.c: New file.
8903         * Makefile: Add rules to build and run tst-atfork2 test.
8904         * tst-atfork2.c: New file.
8905         * tst-atfork2mod.c: New file.
8907         * sysdeps/unix/sysv/linux/unregister-atfork.c
8908         (__unregister_atfork): Free the memory allocated for the handlers
8909         after removing them from the lists.
8911         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8912         cleanup function.
8914         * tst-atfork1.c (do_test): Wait for the child we forked.
8915         Report error in child.
8917         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8919         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8921 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8923         * Makefile (tests): Add tst-cancel8.
8924         * tst-cancel8.c: New file.
8926         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8927         clearing of control variable.
8928         * Makefile (tests): Add tst-once3 and tst-once4.
8929         * tst-once3.c: New file.
8930         * tst-once4.c: New file.
8932 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8934         * sysdeps/sh/Makefile: New file.
8935         * sysdeps/sh/bits/atomic.h: New file.
8936         * sysdeps/sh/pthread_spin_init.c: New file.
8937         * sysdeps/sh/pthread_spin_lock.c: New file.
8938         * sysdeps/sh/pthread_spin_trylock.S: New file.
8939         * sysdeps/sh/pthread_spin_unlock.S: New file.
8940         * sysdeps/sh/pthreaddef.h: New file.
8941         * sysdeps/sh/tcb-offsets.sym: New file.
8942         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8943         * sysdeps/sh/tls.h: New file.
8944         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8945         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8946         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8947         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8948         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8949         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8950         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8951         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8952         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8953         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8954         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8955         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8956         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8957         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8958         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8959         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8960         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8961         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8962         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8963         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8964         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8965         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8966         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8967         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8968         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8969         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8970         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8971         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8972         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8973         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8975 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8977         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8978         according to POSIX.
8980         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8982 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8984         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8985         (TLS_GET_FS): New #define.
8986         (TLS_SET_FS): New #define.
8987         Correct value of __NR_set_thread_area.
8989         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8991 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8993         * Makefile (tests): Add tst-popen1.
8994         * tst-popen1.c: New file.
8996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8997         but inactive generalization.
8998         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8999         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
9000         Minor optimization, remove one instruction.
9001         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
9003 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9005         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9007 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9009         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9010         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9011         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9012         * sysdeps/pthread/pthread_cond_signal.c: New file.
9013         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9014         * sysdeps/pthread/pthread_cond_wait.c: New file.
9015         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9016         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9017         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9018         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9019         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9020         * sysdeps/s390/Makefile: New file.
9021         * sysdeps/s390/bits/atomic.h: New file.
9022         * sysdeps/s390/pthread_spin_init.c: New file.
9023         * sysdeps/s390/pthread_spin_lock.c: New file.
9024         * sysdeps/s390/pthread_spin_trylock.c: New file.
9025         * sysdeps/s390/pthread_spin_unlock.c: New file.
9026         * sysdeps/s390/pthreaddef.h: New file.
9027         * sysdeps/s390/tcb-offsets.sym: New file.
9028         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9029         * sysdeps/s390/tls.h: New file.
9030         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9031         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9032         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9033         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9034         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9035         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9036         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9037         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9038         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9039         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9040         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9041         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9042         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9043         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9044         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9045         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9046         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9047         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9048         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9049         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9050         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9051         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9052         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9054 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9056         * atomic.h: Add a couple more default implementations.
9057         (atomic_compare_and_exchange_acq): Use
9058         __arch_compare_and_exchange_32_acq in return value definition.  It
9059         always exists.
9060         (atomic_bit_set): Renamed from atomic_set_bit.
9061         Add missing atomic_ prefixes.
9063         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9064         thread library is available, use correct value to mark initialized
9065         once variable.
9067 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9069         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9070         __sysconf to determine pagesize.
9072         * pthread_create.c: Include <atomic.h>.
9073         * allocatestack.c (allocate_stack): Implement coloring of the
9074         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9075         size minus one.  Adjust users.
9076         * sysdeps/i386/i686/Makefile: New file.
9078 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9080         * allocatestack.c: Improve comment throughout the file.
9082         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9083         (__lll_lock_wait): Add branch prediction.
9084         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9085         (__lll_lock_wait): Likewise.
9086         (lll_unlock_wake_cb): Removed.
9088 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9090         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9091         _POSIX_THREAD_PRIORITY_SCHEDULING.
9093 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9095         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9096         Fix return type of ptr___pthread_getspecific.
9098 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9100         * Makefile (tests): Add tst-umask1.
9101         (tst-umask1-ARGS): Define.
9102         * tst-umask1.c: New file.
9104 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9106         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9107         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9108         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9109         pthread_rwlock_unlock.
9110         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9111         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9112         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9113         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9115         New file.
9116         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9117         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9118         New file.
9119         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9120         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9121         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9122         New file.
9123         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9124         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9125         New file.
9126         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9127         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9128         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9129         New file.
9130         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9131         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9132         New file.
9133         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9135         * Makefile (libpthread-routines): Remove lowlevelcond and
9136         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9137         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9138         and pthread_cond_broadcast.
9139         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9140         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9141         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9142         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9143         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9144         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9145         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9146         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9147         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9148         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9151         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9153         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9154         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9155         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9156         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9157         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9158         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9159         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9160         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9161         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9162         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9163         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9164         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9165         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9166         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9167         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9168         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9169         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9171         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9172         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9173         of the code is moved to ...
9174         * sysdeps/pthread/createthread.c: ...here.  New file.
9176 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9178         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9179         (__new_sem_post): Clear %eax before returning.
9180         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9182         * Makefile (tests): Add tst-cleanup2.
9183         * tst-cleanup2.c: New file.
9185         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9186         Interpret first parameter correctly.
9188 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9190         * Makefile (headers): Add bits/semaphore.h.
9192 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9194         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9195         if not SHARED.
9197 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9199         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9200         must be used and mapping failed.
9201         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9203         * Makefile (CFLAGS-pthread_self.os): Define this, not
9204         CFLAGS-pthread_self.c.
9206 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9208         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9209         lll_unlock_wake_cb.
9211         * Makefile (libpthread-routines): Add version.  Add rules to build
9212         version.os and banner.h.
9213         * version.c: New file.
9215 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9217         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9218         the alias unconditional.
9219         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9221 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9223         * Makefile (CFLAGS-pthread_self.c): New definition.
9225 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9227         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9228         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9229         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9230         * init.c (__pthread_initialize_minimal_internal): Likewise.
9232 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9234         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9236         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9237         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9238         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9239         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9240         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9241         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9243 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9245         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9246         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9247         * tst-cancel-wrappers.sh: Remove all exceptions.
9249 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9251         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9252         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9254         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9255         Use __libc_pthread_functions array if SHARED.
9257         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9258         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9260         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9261         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9262         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9263         __libc_ptf_call instead of __libc_maybe_call.
9264         (PTF): New #define.
9265         (__libc_cleanup_region_start): Wrap function name with PTF call.
9266         (__libc_cleanup_region_end): Likewise.
9267         (__libc_cleanup_end): Likewise.
9269         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9270         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9271         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9272         * pthreadP.h: Add prototypes.
9274         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9275         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9276         __pthread_rwlock_unlock aliases.
9277         * pthreadP.h: Add prototypes for new aliases.
9279         * pthreadP.h (struct pthead_functions): Moved to...
9280         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9281         * init.c (pthread_functions): Add initializers for new elements.
9283         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9284         __pthread_cleanup_pop_restore aliases.
9285         * pthreadP.h: Add prototypes.
9287         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9288         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9289         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9290         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9291         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9292         * pthreadP.h: Adjust prototypes and callers.
9294 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9296         * Makefile (tests): Add tst-cancel7.
9297         (tst-cancel7-ARGS): New variable.
9298         * tst-cancel7.c: New file.
9300         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9301         around gcc defficiencies.
9302         * old_pthread_cond_signal.c: Likewise.
9303         * old_pthread_cond_timedwait.c: Likewise.
9304         * old_pthread_cond_wait.c: Likewise.
9306         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9308 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9310         * Makefile (tests): Add tst-cond7.
9311         * tst-cond7.c: New file.
9313         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9314         (condvar_cleanup): Get condvar address from the right place.
9316         * atomic.h: Correct definitions of atomic_full_barrier,
9317         atomic_read_barrier, atomic_write_barrier.
9319         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9320         race-free.
9321         * old_pthread_cond_signal.c: Likewise.
9322         * old_pthread_cond_timedwait.c: Likewise.
9323         * old_pthread_cond_wait.c: Likewise.
9325 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9327         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9329 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9331         * pthreadP.h (pthread_cond_2_0_t): New type.
9332         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9333         Use new type for the 2.0 condvar function prototypes.
9334         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9335         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9336         parameter.
9337         * old_pthread_cond_destroy.c: Likewise.
9338         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9339         * old_pthread_cond_signal.c: Likewise.
9340         * old_pthread_cond_timedwait.c: Likewise.
9341         * old_pthread_cond_wait.c: Likewise.
9343         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9344         (__pthread_cond_wait): Don't save cancellation mode and seq value
9345         in same location.
9347         * herrno.c (__h_errno_location): Don't define as weak.
9349 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9351         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9352         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9353         and pthread_cond_wait.
9354         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9355         Renamed to...
9356         (__pthread_cond_broadcast_2_0): ... this.
9357         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9358         Renamed to...
9359         (__pthread_cond_destroy_2_0): ... this.
9360         * old_pthread_cond_init.c (__old_pthread_cond_init):
9361         Renamed to...
9362         (__pthread_cond_init_2_0): ... this.
9363         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9364         Renamed to...
9365         (__pthread_cond_signal_2_0): ... this.
9366         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9367         Renamed to...
9368         (__pthread_cond_wait_2_0): ... this.
9369         * pthread_cond_destroy.c: Include shlib-compat.h.
9370         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9371         * pthread_cond_init.c: Include shlib-compat.h.
9372         (pthread_cond_init): Change strong_alias into versioned_symbol.
9373         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9374         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9375         fields.
9376         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9377         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9378         __pthread_cond_wait_2_0): New prototypes.
9379         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9380         __old_pthread_cond_init, __old_pthread_cond_signal,
9381         __old_pthread_cond_wait): Removed.
9382         * init.c: Include shlib-compat.h.
9383         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9384         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9385         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9386         ptr___pthread_cond_*_2_0 fields.
9387         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9388         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9390         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9391         LIBC_SIGACTION was not yet defined.
9392         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9393         [!defined LIBC_SIGACTION] (__sigaction): New function and
9394         libc_hidden_weak.
9395         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9396         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9398 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9400         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9402 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9404         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9405         New, larger type definition.
9406         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9407         implementation.
9408         * Versions [libpthread]: Add definitions for new pthread_cond_*
9409         interfaces for version GLIBC_2.3.2.
9410         * pthread_cond_init.c: Update initialization for new type definition.
9411         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9412         pthread_cond_timedwait, pthread_cond_signal, and
9413         pthread_cond_broadcast.  Add old_pthread_cond_init,
9414         old_pthread_cond_destroy, old_pthread_cond_wait,
9415         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9416         old_pthread_cond_broadcast.
9417         * old_pthread_cond_broadcast.c: New file.
9418         * old_pthread_cond_destroy.c: New file.
9419         * old_pthread_cond_init.c: New file.
9420         * old_pthread_cond_signal.c: New file.
9421         * old_pthread_cond_timedwait.c: New file.
9422         * old_pthread_cond_wait.c: New file.
9423         * pthreadP.h: Add prototypes for the compatibility interfaces.
9425         * pthread_cond_destroy.c: Don't include <errno.h>.
9427 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9429         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9430         unnecessary zero offset when addressing MUTEX.
9432 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9434         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9435         __register_atfork.
9436         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9437         for __register_atfork.
9439 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9441         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9442         instead of ASSEMBLER test macro.
9444         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9445         __libc_current_sigrtmax): Add libc_hidden_def.
9447         * sysdeps/pthread/list.h: Remove assert.h include.
9449 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9451         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9452         __pthread_initialize_minimal_internal not
9453         __pthread_initialize_minimal.
9455 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9457         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9458         __pthread_initialize_minimal as hidden.
9460         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9461         constructor.
9463 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9465         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9466         $(common-objpfx)format.lds, include that into the output script.
9467         Fix comment.
9468         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9470 2002-12-28  Andreas Jaeger  <aj@suse.de>
9472         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9473         nsec resolution changes.
9474         (xstat64_conv): Likewise.
9475         (xstat32_conv): Likewise.
9476         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9477         struct kernel_stat.
9478         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9479         structs stat and stat64.
9480         * time/time.h (__timespec_defined): Define for __USE_MISC.
9481         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9483 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9485         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9486         argument.
9487         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9488         (pthread_exit): Use strong_alias to avoid warnings.
9489         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9490         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9491         ptr___pthread_attr_init_2_*.
9492         * init.c (pthread_functions): Adjust.
9494 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9496         * forward.c: Make all functions available by default again.  It
9497         caused too much trouble.
9499         * pt-siglongjmp.c: Removed.
9501 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9503         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9504         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9505         * sysdeps/i386/Makefile: New file.
9506         * sysdeps/i386/tcb-offsets.sym: New file.
9507         * sysdeps/pthread/tcb-offsets.h: New file.
9508         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9509         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9511         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9512         __register_atfork...
9513         (GLIBC_2.3.2): ...here.
9515 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9517         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9518         pthread_attr_setstackaddr with __attribute_deprecated__.
9520 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9522         * pt-system.c (system): Remove cancellation handling.
9523         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9524         cancellation routines.
9526 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9528         * descr.h: Include <dl-sysdep.h>.
9529         (struct pthread): Move header.data.list to the back of the struct.
9530         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9531         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9532         (SYSINFO_OFFSEET): Likewise.
9534 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9536         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9537         Define.
9538         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9539         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9540         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9541         (USE_DL_SYSINFO): Undef.
9543 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9545         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9546         $(common-objpfx)libc.so.
9547         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9548         it is bigger than pipe buffer size even on arches with bigger
9549         page size.
9550         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9552 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9554         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9555         correct errno access for case that USE___THREAD is not defined.
9557 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9559         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9560         Patch by Marijn Ros <marijn@mad.scientist.com>.
9562 2002-12-22  Roland McGrath  <roland@redhat.com>
9564         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9566 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9568         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9570 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9572         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9573         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9574         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9576         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9577         of int $0x80.
9578         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9579         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9580         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9581         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9582         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9583         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9584         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9585         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9587         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9588         sysenter.
9589         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9591         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9593         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9594         in new TCB.
9595         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9596         that sysinfo is properly initialized.
9597         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9598         to 1 only for ld.so.
9600         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9601         RTLD_CORRECT_DYNAMIC_WEAK.
9603 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9605         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9606         Use return 0 as 6th argument to FORWARD4.
9607         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9609 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9611         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9612         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9613         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9614         (INIT_SYSINFO): New #define.
9615         (TLS_TP_INIT): Use INIT_SYSINFO.
9616         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9617         At test to make sure SYSINFO_OFFSET value is correct.
9618         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9620 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9622         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9623         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9624         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9625         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9626         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9627         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9628         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9630 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9632         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9633         macro instead of using int $0x80 directly.
9635         * sysdeps/pthread/bits/stdio-lock.h: New file.
9636         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9637         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9638         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9639         * Makefile (routines): Add libc-lowlevelmutex.
9641         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9642         __i686.get_pc_thunk.dx.
9644 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9646         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9647         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9648         ($(objpfx)tst-cancel-wrappers.out): New rule.
9649         * tst-cancel-wrappers.sh: New test.
9650         * tst-locale1.c: Include signal.h.
9651         (uselocale): Test static linking of __libc_current_sigrt*.
9653 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9655         * Makefile (tests): Add tst-cancel6.
9656         * tst-cancel6.c: New file
9658 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9660         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9661         Define meaningfully for assembler as well.
9662         * pthreadP.h (struct pthread_functions): Remove
9663         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9664         and ptr_pthread_attr_init_2_1 fields.
9665         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9666         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9667         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9668         (FORWARD3): Define using FORWARD4.
9669         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9670         versions.
9671         * pt-system.c: Remove duplicate stdlib.h include.
9673 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9675         * sem_init.c: Define sem_init@GLIBC_2.0.
9676         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9677         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9679         * flockfile.c: Moved to...
9680         * sysdeps/pthread/flockfile.c: ...here.  New file.
9681         * funlockfile.c: Moved to...
9682         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9683         * ftrylockfile.c: Moved to...
9684         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9686 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9688         * libc-cancellation.c: Guard both function with
9689         #if !defined NOT_IN_libc.
9690         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9691         automatically provided pthread wrappers.
9692         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9693         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9694         nor in libpthread.
9695         * pt-open.c: Removed.
9696         * pt-fcntl.c: Removed.
9697         * pt-fsync.c: Removed.
9698         * pt-lseek.c: Removed.
9699         * pt-msgrcv.c: Removed.
9700         * pt-msgsnd.c: Removed.
9701         * pt-msync.c: Removed.
9702         * pt-nanosleep.c: Removed.
9703         * pt-open64.c: Removed.
9704         * pt-pause.c: Removed.
9705         * pt-pread.c: Removed.
9706         * pt-pread64.c: Removed.
9707         * pt-pwrite.c: Removed.
9708         * pt-pwrite64.c: Removed.
9709         * pt-read.c: Removed.
9710         * pt-recv.c: Removed.
9711         * pt-recvfrom.c: Removed.
9712         * pt-recvmsg.c: Removed.
9713         * pt-send.c: Removed.
9714         * pt-sendto.c: Removed.
9715         * pt-sigtimedwait.c: Removed.
9716         * pt-sigwait.c: Removed.
9717         * pt-wait.c: Removed.
9718         * pt-waitpid.c: Removed.
9719         * pt-write.c: Removed.
9720         * pt-accept.c: Removed.
9721         * pt-close.c: Removed.
9722         * pt-connect.c: Removed.
9723         * pt-lseek64.c: Removed.
9724         * pt-sendmsg.c: Removed.
9725         * pt-tcdrain.c: Removed.
9727 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9729         * init.c (__pthread_initialize_minimal_internal): Renamed from
9730         __pthread_initialize_minimal.  Make old name an alias.  This
9731         converts a normal relocation into a relative relocation.
9733         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9735         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9736         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9737         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9738         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9739         pt-sigwaitinfo, pt-waitid, and pt-writev.
9740         * pt-creat.c: Removed.
9741         * pt-poll.c: Removed.
9742         * pt-pselect.c: Removed.
9743         * pt-readv.c: Removed.
9744         * pt-select.c: Removed.
9745         * pt-sigpause.c: Removed.
9746         * pt-sigsuspend.c: Removed.
9747         * pt-sigwaitinfo.c: Removed.
9748         * pt-waitid.c: Removed.
9749         * pt-writev.c: Removed.
9751         * init.c (pthread_functions): New variable.
9752         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9753         (or NULL) to __libc_pthread_init.
9754         * forward.c: Rewrite to use __libc:pthread_functions array to get
9755         function addresses.
9756         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9757         prototype.
9758         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9759         Take new parameter.  Copy content of variable pointed to by it
9760         to __libc_pthread_init.
9762         * pthreadP.h (struct pthread_functions): New type.
9763         (__libc_pthread_init): Declare.
9765         * pthread_attr_destroy.c: Add namespace protected alias.
9766         * pthread_attr_getdetachstate.c: Likewise.
9767         * pthread_attr_getinheritsched.c: Likewise.
9768         * pthread_attr_getschedparam.c: Likewise.
9769         * pthread_attr_getschedpolicy.c: Likewise.
9770         * pthread_attr_getscope.c: Likewise.
9771         * pthread_attr_setdetachstate.c: Likewise.
9772         * pthread_attr_setinheritsched.c: Likewise.
9773         * pthread_attr_setschedparam.c: Likewise.
9774         * pthread_attr_setschedpolicy.c: Likewise.
9775         * pthread_attr_setscope.c: Likewise.
9776         * pthread_cond_broadcast.c: Likewise.
9777         * pthread_cond_destroy.c: Likewise.
9778         * pthread_cond_init.c: Likewise.
9779         * pthread_cond_signal.c: Likewise.
9780         * pthread_cond_wait.c: Likewise.
9781         * pthread_condattr_destroy.c: Likewise.
9782         * pthread_condattr_init.c: Likewise.
9783         * pthread_equal.c: Likewise.
9784         * pthread_exit.c: Likewise.
9785         * pthread_getschedparam.c: Likewise.
9786         * pthread_self.c: Likewise.
9787         * pthread_setcancelstate.c: Likewise.
9788         * pthread_setschedparam.c: Likewise.
9789         * pthread_mutex_destroy.c: Likewise.
9790         * pthread_mutex_init.c: Likewise.
9791         * pthreadP.h: Add prototypes for the aliases.
9793         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9794         multiple_threads member in correct TCB to 1.
9796         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9797         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9798         member of thread decriptor, otherwise return unconditionally 1.
9800 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9802         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9803         regular Linux version.  Remove file.
9804         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9805         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9806         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9807         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9808         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9809         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9810         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9811         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9812         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9813         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9814         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9815         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9816         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9817         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9818         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9819         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9820         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9821         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9822         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9823         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9824         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9825         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9826         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9827         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9828         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9829         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9830         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9831         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9832         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9833         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9835 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9837         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9838         * sysdeps/unix/sysv/linux/open.c: Removed.
9839         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9840         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9841         * sysdeps/unix/sysv/linux/msync.c: Removed.
9842         * sysdeps/unix/sysv/linux/read.c: Removed.
9843         * sysdeps/unix/sysv/linux/close.c: Removed.
9844         * sysdeps/unix/sysv/linux/creat.c: Removed.
9845         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9846         * sysdeps/unix/sysv/linux/pause.c: Removed.
9847         * sysdeps/unix/sysv/linux/select.c: Removed.
9848         * sysdeps/unix/sysv/linux/write.c: Removed.
9850 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9852         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9853         element in TCB to see whether locking is needed.
9855         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9856         MULTIPLE_THREADS_OFFSET value is correct.
9858         * sysdeps/unix/sysv/linux/close.c: New file.
9859         * sysdeps/unix/sysv/linux/connect.S: New file.
9860         * sysdeps/unix/sysv/linux/creat.c: New file.
9861         * sysdeps/unix/sysv/linux/fsync.c: New file.
9862         * sysdeps/unix/sysv/linux/llseek.c: New file.
9863         * sysdeps/unix/sysv/linux/lseek.c: New file.
9864         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9865         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9866         * sysdeps/unix/sysv/linux/msync.c: New file.
9867         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9868         * sysdeps/unix/sysv/linux/open.c: New file.
9869         * sysdeps/unix/sysv/linux/open64.c: New file.
9870         * sysdeps/unix/sysv/linux/pause.c: New file.
9871         * sysdeps/unix/sysv/linux/poll.c: New file.
9872         * sysdeps/unix/sysv/linux/pread.c: New file.
9873         * sysdeps/unix/sysv/linux/pread64.c: New file.
9874         * sysdeps/unix/sysv/linux/pselect.c: New file.
9875         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9876         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9877         * sysdeps/unix/sysv/linux/readv.c: New file.
9878         * sysdeps/unix/sysv/linux/recv.S: New file.
9879         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9880         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9881         * sysdeps/unix/sysv/linux/select.c: New file.
9882         * sysdeps/unix/sysv/linux/send.S: New file.
9883         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9884         * sysdeps/unix/sysv/linux/sendto.S: New file.
9885         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9886         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9887         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9888         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9889         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9890         * sysdeps/unix/sysv/linux/system.c: New file.
9891         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9892         * sysdeps/unix/sysv/linux/wait.c: New file.
9893         * sysdeps/unix/sysv/linux/waitid.c: New file.
9894         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9895         * sysdeps/unix/sysv/linux/writev.c: New file.
9896         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9898         * pt-readv.c: Fix comment.
9900 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9902         * tst-cleanup1.c: Include stdlib.h.
9904         * tst-cancel5.c: New test.
9905         * Makefile (tests): Add tst-cancel5.
9906         (tst-cancel5): Link against libc.so libpthread.so in that order.
9908 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9910         * forward.c (test_loaded): Prevent recursive calls.
9912         * Makefile (routines): Add libc-cancellation.
9913         * libc-cancellation.c: New file.
9914         * descr.h (struct pthread): Add multiple_threads field.
9915         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9916         new thread descriptor to 1.
9917         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9918         Initialize multiple_thread field after successful thread creation.
9919         * cancellation.c (__do_cancel): Move to pthreadP.h.
9920         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9921         (__pthread_disable_asynccancel): Add internal_function attribute.
9922         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9923         * pthread_setcancelstate.c: Likewise.
9924         * pthread_setcanceltype.c: Likewise.
9925         * pthread_exit.c: Likewise.
9926         * pthreadP.h (CANCELLATION_P): Likewise.
9927         (__do_cancel): Define as static inline.
9928         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9929         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9930         declarations.
9931         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9932         fields.  Define MULTIPLE_THREADS_OFFSET.
9933         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9934         declaration.
9935         * sysdeps/unix/sysv/linux/accept.S: New file.
9936         * sysdeps/unix/sysv/linux/read.c: New file.
9937         * sysdeps/unix/sysv/linux/write.c: New file.
9938         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9939         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9940         initialization of __libc_locking_needed.
9941         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9942         __libc_locking_needed, use multiple_threads field in TCB.
9943         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9945 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9947         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9948         version.
9949         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9951         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9952         access to __libc_locking_needed for PIC.
9954 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9956         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9957         declare for libc.so.
9958         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9959         expression.
9960         (__libc_lock_lock): Put into statement expression.
9961         (__libc_lock_unlock): Remove trailing semicolon.
9962         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9964 2002-12-12  Roland McGrath  <roland@redhat.com>
9966         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9967         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9969 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9971         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9972         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9973         Initialize __libc_locking_needed.
9974         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9975         instead of __register_pthread_fork_handler.
9976         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9977         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9978         fork-gen with libc_pthread_init.
9979         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9980         of __register_pthread_fork_handler.
9981         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9982         of __register_pthread_fork_handler.
9983         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9984         __libc_locking_needed to determine whether lock prefix can be avoided.
9985         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9987 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9989         * Makefile (tests): Add tst-cleanup1.
9990         * tst-cleanup1.c: New file.
9991         * cancellation.c (__cleanup_thread): Removed.
9992         (__do_cancel): Remove call to __cleanup_thread.
9993         * pthreadP.h: Remove __cleanup_thread prorotype.
9995         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9996         Remember function and argument even if cancellation handler
9997         function is not available.
9998         (__libc_cleanup_region_end): Execute registered function directly if
9999         pthread functions are not available.
10000         (__libc_cleanup_end): Likewise.
10002         * init.c (__pthread_initialize_minimal): Fix initialization in
10003         static lib by preventing gcc from being too clever.
10005 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10007         * init.c (__pthread_initialize_minimal): Remove unneccesary
10008         sigaddset call.
10010         * Makefile (tests): We can run tst-locale2 now.
10012 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10014         * Versions: Remove duplicated sigwait entry.
10016 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10018         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10019         inside libpthread.
10021         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10023         * pthreadP.h: Declare __pthread_enable_asynccancel and
10024         __pthread_disable_asynccancel.
10025         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10026         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10027         * cancellation.c (__pthread_enable_asynccancel): New function.
10028         (__pthread_disable_asynccancel): New function.
10029         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10030         * pt-close.c: Likewise.
10031         * pt-connect.c: Likewise.
10032         * pt-creat.c: Likewise.
10033         * pt-fcntl.c: Likewise.
10034         * pt-fsync.c: Likewise.
10035         * pt-lseek.c: Likewise.
10036         * pt-lseek64.c: Likewise.
10037         * pt-msgrcv.c: Likewise.
10038         * pt-msgsnd.c: Likewise.
10039         * pt-msync.c: Likewise.
10040         * pt-nanosleep.c: Likewise.
10041         * pt-open.c: Likewise.
10042         * pt-open64.c: Likewise.
10043         * pt-pause.c: Likewise.
10044         * pt-poll.c: Likewise.
10045         * pt-pread.c: Likewise.
10046         * pt-pread64.c: Likewise.
10047         * pt-pselect.c: Likewise.
10048         * pt-pwrite.c: Likewise.
10049         * pt-pwrite64.c: Likewise.
10050         * pt-read.c: Likewise.
10051         * pt-readv.c: Likewise.
10052         * pt-recv.c: Likewise.
10053         * pt-recvfrom.c: Likewise.
10054         * pt-recvmsg.c: Likewise.
10055         * pt-select.c: Likewise.
10056         * pt-send.c: Likewise.
10057         * pt-sendmsg.c: Likewise.
10058         * pt-sendto.c: Likewise.
10059         * pt-sigpause.c: Likewise.
10060         * pt-sigsuspend.c: Likewise.
10061         * pt-sigtimedwait.c: Likewise.
10062         * pt-sigwait.c: Likewise.
10063         * pt-sigwaitinfo.c: Likewise.
10064         * pt-system.c: Likewise.
10065         * pt-tcdrain.c: Likewise.
10066         * pt-wait.c: Likewise.
10067         * pt-waitid.c: Likewise.
10068         * pt-waitpid.c: Likewise.
10069         * pt-write.c: Likewise.
10070         * pt-writev.c: Likewise.
10071         * pthread_join.c: Likewise.
10072         * pthread_timedjoin.c: Likewise.
10074         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10075         (__xpg_sigpause): New function.
10076         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10078 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10080         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10082         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10083         _GI_pthread_cleanup_pop to pthreadP.h.
10085         * ftrylockfile.c: Use _IO_lock_trylock instead of
10086         pthread_mutex_trylock.
10088         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10089         (CANCEL_RESET): Likewise.
10090         (__pthread_setcanceltype_): Declare.
10091         (__pthread_mutex_lock_internal): Declare.
10092         (__pthread_mutex_unlock_internal): Declare.
10093         (__pthread_once_internal): Declare.
10094         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10095         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10097         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10098         and pthread_mutex_unlock.
10099         * pthread_cond_wait.c: Likewise.
10100         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10101         * pthread_mutex_unlock.c: Likewise.
10103         * pthread_setcanceltype.c: Add additional alias
10104         __pthread_setcanceltype.
10106         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10107         * sem_open.c (sem_open): Likewise.
10108         Use __libc_open, __libc_write, and __libc_close instead of
10109         open, write, and close respectively.
10111         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10112         Rewrite as statement expression since it must return a value.
10114         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10115         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10116         __pthread_kill.
10118         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10119         alias __pthread_once_internal.
10121         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10123 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10125         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10126         * tst-stdio1.c: New file.
10127         * tst-stdio2.c: New file.
10129         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10131         * Makefile (tests): Comment out tst-locale2 for now.
10132         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10134         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10135         -D_IO_MTSAFE_IO.
10136         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10137         Use _IO_lock_init instead of explicit assignment.
10139         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10140         Define __libc_lock_* and __libc_lock_recursive macros with
10141         lowlevellock macros, not pthread mutexes.
10143         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10144         of pthread_mutex_lock.
10145         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10146         instead of pthread_mutex_unlock.
10148 2002-12-06  Roland McGrath  <roland@redhat.com>
10150         * allocatestack.c (__stack_user): Use uninitialized defn.
10151         * init.c (__pthread_initialize_minimal): Initialize it here.
10153 2002-12-05  Roland McGrath  <roland@redhat.com>
10155         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10156         string.
10157         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10159         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10160         missing & here too.
10162 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10164         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10165         lowlevellock.
10166         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10167         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10168         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10169         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10170         for __libc_lock_* macros.
10171         * Makefile (routines): Add libc-lowlevellock.
10173 2002-10-09  Roland McGrath  <roland@redhat.com>
10175         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10176         Under [__PIC__], call the function via the pointer fetched for
10177         comparison rather than a call by name that uses the PLT.
10178         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10179         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10180         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10181         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10182         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10184 2002-12-04  Roland McGrath  <roland@redhat.com>
10186         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10188         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10189         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10191         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10193 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10195         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10196         a completely opaque, non-integer type.
10197         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10199 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10201         * sysdeps/i386/tls.h: Include stdlib.h.
10202         * sysdeps/x86_64/tls.h: Likewise.
10204 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10206         * Makefile (tests): Add tst-locale2.
10207         (tests-static): Likewise.
10208         * tst-locale2.c: New file.
10210         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10211         volatile and add memory clobbers to lock operations.
10213 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10215         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10216         * sysdeps/i386/i486/bits/atomic.h: New file.
10217         * sysdeps/i386/i586/bits/atomic.h: New file.
10218         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10219         include i486 version.
10220         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10221         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10222         Patch by Marijn Ros <marijn@mad.scientist.com>.
10224         * allocatestack.c (get_cached_stack): Don't crash if we first
10225         found a stack with a larger size then needed.
10226         Reported by Hui Huang <hui.huang@sun.com>.
10228         * Makefile (tests): Add tst-sysconf.
10229         * tst-sysconf.c: New file.
10231         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10232         PTHREAD_THREADS_MAX.
10234 2002-12-02  Roland McGrath  <roland@redhat.com>
10236         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10237         Declare using hidden_proto instead of attribute_hidden, so there are
10238         non-.hidden static symbols for gdb to find.
10239         (__pthread_keys): Likewise.
10240         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10241         * allocatestack.c (__stack_user): Likewise.
10242         * pthread_create.c (__pthread_keys): Likewise.
10243         (__nptl_threads_events, __nptl_last_event): Make these static instead
10244         of hidden.
10245         * pthread_key_create.c (__pthread_pthread_keys_max,
10246         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10248 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10250         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10251         statically.
10252         * tst-locale1.c: New file.
10254         * pthread_cond_timedwait.c: Include <stdlib.h>.
10256         * Makefile (tests): Add tst-fork2 and tst-fork3.
10257         * tst-fork2.c: New file.
10258         * tst-fork3.c: New file.
10260 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10262         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10264         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10265         require it to 200112L.
10267         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10268         instruction only if HAVE_CMOV is defined.
10269         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10271         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10273         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10275         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10277         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10279 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10281         * sysdeps/x86_64/bits/atomic.h: New file.
10283         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10284         16-bit operations.
10286         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10287         possible since gettid cannot fail.
10289         * sysdeps/x86_64/pthreaddef.h: New file.
10291         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10293         * sysdeps/x86_64/pthread_spin_init.c: New file.
10294         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10295         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10296         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10298         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10299         Add missing lock prefix.  Minute optimization.
10301         * tst-spin2.c (main): Also check successful trylock call.
10303         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10304         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10306         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10307         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10309         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10310         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10311         value in case of an error.  Add support for INTERNAL_SYSCALL.
10313         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10314         value in case of an error.
10316         * sysdeps/x86_64/tls.h: New file.
10318 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10320         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10321         takes the array member name and the index as parameters.
10322         (THREAD_SETMEM_NC): Likewise.
10323         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10324         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10325         interfaces.
10327         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10328         to decide which code to use.
10329         (THREAD_SETMEM_NC): Likewise.
10331         * allocatestack.c (queue_stack): Don't remove stack from list here.
10332         Do it in the caller.  Correct condition to prematurely terminate
10333         loop to free stacks.
10334         (__deallocate_stack): Remove stack from list here.
10336 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10338         * Makefile (tests): Add tst-stack1.
10339         * tst-stack1.c: New file.
10341         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10342         provided stack.
10344         * pthread_attr_getstack.c: Return bottom of the thread area.
10346 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10348         * Makefile (libpthread-routines): Add pt-allocrtsig and
10349         pthread_kill_other_threads.
10350         * pt-allocrtsig.c: New file.
10351         * pthread_kill_other_threads.c: New file.
10352         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10353         all three functions.
10354         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10355         allocrtsig.
10356         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10357         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10358         and __libc_allocate_rtsig_private.
10359         * Versions (libpthread): Export pthread_kill_other_threads_np,
10360         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10362 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10364         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10365         the end of the stack.  Adjust computations.
10366         When mprotect call fails dequeue stack and free it.
10367         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10368         attribute.
10369         * pthread_getattr_np.c: Likewise.
10371         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10372         surprises.
10374 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10376         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10377         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10379 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10381         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10382         * pthread_setspecific.c: Likewise.
10384 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10386         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10387         definitions.  Get them from the official place.
10388         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10390         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10391         Use new CLONE_ flags in clone() calls.
10393         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10394         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10396         * Versions: Add pthread_* functions for libc.
10397         * forward.c: New file.
10399         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10400         errno-loc.
10401         * herrno.c: New file.
10402         * res.c: New file.
10404         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10405         sem_trywait, and sem_timedwait.  Add herrno and res.
10406         * sem_init.c: Don't initialize lock and waiters members.
10407         * sem_open.c: Likewise.
10408         * sem_post.c: Removed.
10409         * sem_wait.c: Removed.
10410         * sem_trywait.c: Removed.
10411         * sem_timedwait.c: Removed.
10412         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10413         Includes full implementations of sem_post, sem_wait, sem_trywait,
10414         and sem_timedwait.
10415         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10416         for new implementation.
10417         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10418         and waiters fields.
10420         * tst-sem3.c: Improve error message.
10421         * tst-signal3.c: Likewise.
10423         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10424         to tell the kernel about the termination futex and to initialize tid
10425         member.  Don't initialize main_thread.
10426         * descr.h (struct pthread): Remove main_thread member.
10427         * cancelllation.c (__do_cancel): Remove code handling main thread.
10428         The main thread is not special anymore.
10430         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10431         size of the stacks to stack_cache_actsize.
10433         * pt-readv.c: Add missing "defined".
10434         * pt-sigwait.c: Likewise.
10435         * pt-writev.c: Likewise.
10437 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10439         * Versions: Export __connect from libpthread.
10440         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10442         * Makefile (libpthread-routines): Add pt-raise.
10443         * sysdeps/unix/sysv/linux/raise.c: New file.
10444         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10445         * sysdeps/generic/pt-raise.c: New file.
10447         * pthread_cond_init.c: Initialize all data elements of the condvar
10448         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10450         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10451         * pthread_create.c: Likewise.
10453         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10454         * tst-key1.c: New file.
10455         * tst-key2.c: New file.
10456         * tst-key3.c: New file.
10458         * Versions: Export pthread_detach for version GLIBC_2.0.
10459         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10461 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10463         * pthread_key_create.c: Terminate search after an unused key was found.
10464         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10466         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10467         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10469 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10471         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10472         dynamic lookup for errno in PIC.
10474         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10475         release the stack lock as soon as possible.
10476         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10477         the static TLS block.
10478         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10480         * cancellation.c: Renamed from cancelation.c.
10481         * Makefile: Adjust accordingly.
10482         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10483         * cleanup_defer.c: Use CANCELLATION_P.
10484         * pthread_testcancel.c: Likewise.
10485         * descr.h: Fix spelling in comments.
10486         * init.c: Likewise.
10487         * pthread_getattr_np.c: Likewise.
10488         * pthread_getschedparam.c: Likewise.
10489         * pthread_setschedparam.c: Likewise.
10490         * Versions: Likewise.
10492         * pt-pselect.c: New file.
10493         * Makefile (libpthread-routines): Add pt-pselect.
10494         * Versions: Add pselect.
10496         * tst-cancel4.c: New file.
10497         * Makefile (tests): Add tst-cancel4.
10499 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10501         * pthread_mutex_lock.c: Always record lock ownership.
10502         * pthread_mutex_timedlock.c: Likewise.
10503         * pthread_mutex_trylock.c: Likewise.
10505         * pt-readv.c: New file.
10506         * pt-writev.c: New file.
10507         * pt-creat.c: New file.
10508         * pt-msgrcv.c: New file.
10509         * pt-msgsnd.c: New file.
10510         * pt-poll.c: New file.
10511         * pt-select.c: New file.
10512         * pt-sigpause.c: New file.
10513         * pt-sigsuspend.c: New file.
10514         * pt-sigwait.c: New file.
10515         * pt-sigwaitinfo.c: New file.
10516         * pt-waitid.c: New file.
10517         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10518         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10519         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10520         * Versions: Add all the new functions.
10522         * tst-exit1.c: New file.
10523         * Makefile (tests): Add tst-exit1.
10525         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10527 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10529         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10531         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10532         call.  pthread_join is an official cancellation point.
10533         * pthread_timedjoin.c: Likewise.
10535         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10536         and the condvar's mutex are retrieved.
10537         * pthread_cond_timedwait.c: Likewise.
10538         Reported by dice@saros.East.Sun.COM.
10540 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10542         * pthreadP.h: Cut out all type definitions and move them...
10543         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10544         * pthreadP.h: Include <internaltypes.h>.
10546         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10547         performance tweaks.
10549         * sem_trywait.c: Shuffle #includes around to get right order.
10550         * sem_timedwait.c: Likewise.
10551         * sem_post.c: Likewise.
10552         * sem_wait.c: Likewise.
10554         * nptl 0.3 released.
10556         * Makefile (tests): Add tst-signal3.
10557         * tst-signal3.c: New file.
10559 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10561         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10562         the asms modify the sem object.
10563         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10565         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10566         the actual members.
10567         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10568         * semaphoreP.h: Include pthreadP.h.
10569         * sem_getvalue.c: Adjust to sem_t change.
10570         * sem_init.c: Likewise.
10571         * sem_open.c: Likewise.
10572         * sem_post.c: Likewise.
10573         * sem_timedwait.c: Likewise.
10574         * sem_trywait.c: Likewise.
10575         * sem_wait.c: Likewise.
10577 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10579         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10580         * tst-basic2.c: New file.
10581         * tst-exec1.c: New file.
10582         * tst-exec2.c: New file.
10583         * tst-exec3.c: New file.
10585         * tst-fork1.c: Remove extra */.
10587         * nptl 0.2 released.  The API for IA-32 is complete.