* posix/regex_internal.h (build_wcs_upper_buffer):
[glibc.git] / nptl / ChangeLog
blob716d6658b3543968f01354f1eadec1631fdd7e3d
1 2008-11-26  Chris Steel  <chris.steel.lnx@googlemail.com>
3         * posix/regex_internal.h (build_wcs_upper_buffer):
4         Return type is reg_error_t.
6 2008-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
8         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define FUTEX_WAIT_BITSET
9         and FUTEX_WAKE_BITSET.
11 2008-12-02  Ulrich Drepper  <drepper@redhat.com>
13         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_WAIT_BITSET
14         and FUTEX_WAKE_BITSET.
15         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
16         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
17         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
18         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
20 2008-11-25  Roland McGrath  <roland@redhat.com>
22         * sysdeps/alpha, sysdeps/unix/sysv/linux/alpha:
23         Subdirectories moved to ports repository as
24         sysdeps/.../nptl subdirectories.
26 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
28         [BZ #7008]
29         * pthread_condattr_setclock.c (pthread_condattr_setclock): Fix masking
30         of old value.
31         * pthread_cond_init.c (__pthread_cond_init): Fix
32         cond->__data.__nwaiters initialization.
33         * Makefile (tests): Add tst-cond23.
34         * tst-cond23.c: New test.
36 2008-11-07  Jakub Jelinek  <jakub@redhat.com>
38         * sysdeps/pthread/malloc-machine.h (MALLOC): Adjust __libc_tsd_define
39         arguments.
40         (tsd_setspecific, tsd_getspecific): Adjust __libc_tsd_{set,get}
41         arguments.
43 2008-11-01  Ulrich Drepper  <drepper@redhat.com>
45         [BZ #6955]
46         * pthread_mutex_lock.c: Add support for private PI mutexes.
47         * pthread_mutex_timedlock.c: Likewise.
48         * pthread_mutex_trylock.c: Likewise.
49         * pthread_mutex_unlock.c: Likewise.
50         Patch mostly by Ben Jackson <ben@ben.com>.
52 2008-10-31  Ulrich Drepper  <drepper@redhat.com>
54         [BZ #6843]
55         * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread):
56         Increase stack size for helper thread.
58 2008-10-06  Martin Schwidefsky  <schwidefsky@de.ibm.com>
60         * sysdeps/s390/tls.h (THREAD_SET_STACK_GUARD): Add empty inline
61         assembly with a clobber list for access registers a0 and a1.
63 2008-09-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
65         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Add memory barrier
66         to force runp->refcntr to be read from memory.
68 2008-09-08  Richard Guenther  <rguenther@suse.de>
70         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_lock,
71         lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
72         lll_timedlock, lll_robust_timedlock, lll_unlock,
73         lll_robust_unlock): Promote private to int.
75 2008-08-15  Ulrich Drepper  <drepper@redhat.com>
77         * sysdeps/x86_64/pthreaddef.h: Remove ARCH_MAP_FLAGS and
78         ARCH_RETRY_MMAP definitions.
79         * allocatestack.c: Remove definition of ARCH_MAP_FLAGS.
80         Define MAP_STACK when not defined.
81         (allocate_stack): Use MAP_STACK instead of ARCH_MAP_FLAGS.  Remove
82         handling of ARCH_RETRY_MMAP.
84 2008-07-30  Ulrich Drepper  <drepper@redhat.com>
86         * tst-align2.c (f): Print message that f is reached.
88 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
90         [BZ #6740]
91         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
92         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
94 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
96         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
97         SOCK_CLOEXEC if possible.
99 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
101         * Makefile (tests): Add tst-rwlock2a.
102         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
103         * tst-rwlock2a.c: New file.
105 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
107         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
109 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
111         * sysdeps/pthread/pthread.h: Fix typo in comment.
113 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
115         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
116         of CPU set to the kernel.
118 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
120         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
121         cfi directives.
122         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
123         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
124         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
125         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
126         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
127         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
129 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
131         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
132         cfi directives.
133         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
134         Likewise.
135         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
136         Likewise.
137         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
138         Likewise.
140 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
142         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
144 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
146         David S. Miller  <davem@davemloft.net>
148         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
150 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
152         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
153         __pshared correctly.
154         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
155         Likewise.
156         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
157         Likewise.
158         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
159         Likewise.
160         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
161         Likewise.
162         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
164 2008-04-14  David S. Miller  <davem@davemloft.net>
166         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
167         (__old_sem_wait): Fix argument to lll_futex_wait().
169 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
171         * pthread_create.c: Require pthread_mutex_trylock and
172         pthread_key_delete for libgcc.
174 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
176         [BZ #6020]
177         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
178         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
179         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
181 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
183         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
184         <linux/limits.h> has defined it.
185         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
186         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
187         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
188         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
190 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
192         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
193         of ASSEMBLER.
194         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
195         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
197 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
199         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
200         HAVE_DL_DISCOVER_OSVERSION.
201         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
202         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
204 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
206         [BZ #5778]
207         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
208         _POSIX_CHOWN_RESTRICTED value to zero.
210 2008-01-31  Roland McGrath  <roland@redhat.com>
212         * Makefile (omit-deps): Variable removed.
214 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
216         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
217         unnecessary addr32 prefix.
219 2008-01-29  Roland McGrath  <roland@redhat.com>
221         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
223 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
225         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
227 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
229         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
230         a scratch register.
231         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
232         (__lll_lock_wait_private): Fix typo.
233         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
234         (pthread_barrier_wait): Likewise.  Adjust XADD use.
235         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
236         Adjust XADD use.
237         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
238         (pthread_rwlock_timedrdlock): Return correct return value.
239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
240         (pthread_rwlock_timedwrlock): Likewise.
242 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
244         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
245         thread returns the program exits with an error code.
247 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
249         * pthread-errnos.sym: Add EOVERFLOW.
250         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
251         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
252         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
253         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
255 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
257         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
258         parameter.  Passed it as permission to mmap.
259         * allocatestack.c (allocate_stack): Pass prot as second parameter
260         to ARCH_RETRY_MMAP.
262 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
264         * tst-basic7.c: Allocate memory for the stack.
266         [BZ #5465]
267         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
268         (__pthread_cond_timedwait): Don't use VDSO.
269         Patch by Michal Januszewski.
271 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
273         [BZ #5455]
274         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
275         Allow label before pthread_cleanup_pop.
276         (pthread_cleanup_pop_restore_np): Likewise.
278 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
280         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
281         Store 2 before returning ETIMEDOUT.
283 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
285         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
286         Store 2 before returning ETIMEDOUT.
287         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
288         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
289         (__lll_lock_wait_private): Optimize.
290         (__lll_lock_wait): Likewise.
292 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
294         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
295         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
296         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
298 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
300         [BZ #5240]
301         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
302         If we time out, try one last time to lock the futex to avoid
303         losing a wakeup signal.
304         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
305         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
307         [BZ #5245]
308         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
309         if necessary.
311 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
313         [BZ #5245]
314         * allocatestack.c (allocate_stack): Change ENOMEM error in case
315         mmap failed to EAGAIN.
316         * Makefile (tests): Add tst-basic7.
317         * tst-basic7.c: New file.
319 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
321         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
322         Use __linkin_atfork.
324 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
326         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
327         missing line continuations.
328         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
329         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
331 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
333         [BZ #5220]
334         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
335         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
336         (struct timer): Add next element.
337         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
338         enqueue timer structure into __active_timer_sigev_thread list.
339         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
340         remove timer struct from __active_timer_sigev_thread.
341         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
342         Before using timer structure make sure it is still on the
343         __active_timer_sigev_thread list.  Keep lock until done.
344         Define __active_timer_sigev_thread and
345         __active_timer_sigev_thread_lock.
347 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
349         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
350         Redefine thread_atfork for use of ATFORK_MEM.
351         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
352         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
353         function.
354         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
355         Use atomic operation when removing first element of list.
357 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
359         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
360         routine instead of an alias to __new_sem_post.
362 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
364         * init.c (__pthread_initialize_minimal): Initialize word to appease
365         valgrind.
367 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
369         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
370         libc.so just clear NAME.
371         (__libc_rwlock_fini): Nop inside of libc.so.
372         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
373         all zeros.
375 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
378         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
379         unlocking failed.
380         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
382 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
384         [BZ #4938]
385         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
386         reclaimed stack if necessary.
387         * Makefile (tests): Add tst-tsd6.
388         * tst-tsd6.c: New file.
390 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
392         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
393         Add private argument.
395 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
397         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
398         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
400 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
402         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
403         (__lll_robust_timedlock): Pass private as last argument to
404         __lll_robust_timedlock_wait.
405         (__lll_unlock): Fix a pasto.
407 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
409         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
410         sparc_old_sem): New structs.
411         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
412         (__sem_wait_cleanup): New function.
413         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
414         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
415         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
416         lll_futex_wait.
417         (__old_sem_wait): New function.
418         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
419         nptl/sysdeps/unix/sysv/linux/sparc version.
420         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
421         Likewise.
422         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
423         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
424         (__new_sem_trywait): Use sparc_old_sem structure.
425         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
426         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
427         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
428         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
429         lll_futex_timed_wait.
430         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
431         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
432         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
433         lll_futex_wake.
434         (__old_sem_post): New function.
435         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
436         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
437         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
438         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
439         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
440         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
442 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
444         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
445         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
446         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
447         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
448         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
449         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
450         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
451         Use FUTEX_WAKE_OP.
452         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
453         kernel-features.h and tcb-offsets.h.
454         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
455         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
456         process private.
457         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
458         tcb-offsets.h.
459         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
460         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
461         process private.
462         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
463         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
465         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
470 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
472         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
473         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
474         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
475         lll_futex_timed_wait.
477         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
478         __lll_robust_unlock): Rewrite as macros instead of inline functions.
479         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
480         __lll_robust_unlock, __lll_wait_tid): Likewise.
482 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
484         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
485         Fix a pasto.
486         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
487         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
488         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
489         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
491         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
492         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
494         kernel-features.h.
495         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
496         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
497         process private.  Switch DW_CFA_advance_loc1 and some
498         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
499         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
500         (__pthread_cond_timedwait, __condvar_tw_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_loc{1,2} and some
503         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
504         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
505         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
506         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
507         Likewise.
508         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
509         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
511         Likewise.
512         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
513         (__pthread_cond_broadcast): Compare %r8 instead of
514         dep_mutex-cond_*(%rdi) with $-1.
515         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
516         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
517         of oring.
519 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
521         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
523 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
525         * allocatestack.c: Include kernel-features.h.
526         * pthread_create.c: Likewise.
527         * pthread_mutex_init.c: Likewise.
528         * init.c: Likewise.
529         * pthread_cond_timedwait.c: Likewise.
530         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
531         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
532         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
533         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
534         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
535         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
536         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
537         Likewise.
538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
539         Likewise.
540         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
541         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
542         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
543         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
545 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
547         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
548         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
549         byte elements.  One of them is the new __shared element.
550         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
551         adjust names of other padding elements.
552         * sysdeps/unix/sysv/linux/s390/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/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
558         Renamed __pad1 element to __shared, adjust names of other padding
559         elements.
560         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
561         (pthread_rwlock_t): Likewise.
562         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
563         typo.
565 2007-08-09  Anton Blanchard  <anton@samba.org>
567         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
569 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
571         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
572         <kernel-features.h>.
573         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
575 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
577         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
578         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
579         dealing with robust mutexes.
580         * pthread_mutex_timedlock.c: Likewise.
581         * pthread_mutex_trylock.c: Likewise.
582         * pthread_mutex_unlock.c: Likewise.
583         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
585 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
587         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
588         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
589         (PTHREAD_MUTEX_PSHARED): Define.
590         * pthread_mutex_init.c (__pthread_mutex_init): Set
591         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
592         mutexes.
593         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
594         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
595         as second argument to lll_lock.
596         (LLL_MUTEX_TRYLOCK): Take mutex as argument
597         instead of its __data.__lock field.
598         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
599         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
600         to lll_robust_lock.
601         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
602         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
603         instead of mutex->__data.__kind directly, pass
604         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
605         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
606         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
607         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
608         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
609         to lll_timedlock, lll_robust_timedlock, lll_unlock and
610         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
611         of mutex->__data.__kind directly.
612         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
613         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
614         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
615         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
616         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
617         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
618         and lll_futex_wake.
619         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
620         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
621         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
622         directly.
623         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
624         Take mutex as argument instead of its __data.__lock field, pass
625         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
626         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
627         __data.__lock field.
628         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
629         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
630         to lll_robust_cond_lock.
631         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
632         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
633         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
634         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
635         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
636         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
637         lll_futex_wait.
638         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
639         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
640         lll_futex_wake.
641         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
642         pshared variable, pass it to lll_lock, lll_unlock,
643         lll_futex_timedwait and lll_futex_wake.
644         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
645         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
646         and lll_futex_wake.
647         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
648         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
649         macro.
650         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
651         lll_futex_wake_unlock): Likewise.
652         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
653         Likewise.
654         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
655         lll_futex_wake_unlock): Likewise.
656         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
657         Likewise.
658         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
659         lll_futex_wake_unlock): Likewise.
660         (lll_futex_wake): Fix a typo.
661         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
662         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
663         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
664         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
665         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
666         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
667         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
668         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
669         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
670         (__pthread_cond_timedwait): Likewise.
671         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
672         (__condvar_cleanup, __pthread_cond_wait): Likewise.
674 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
676         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
677         Don't use CGOTSETUP and CGOTRESTORE macros.
678         (CGOTSETUP, CGOTRESTORE): Remove.
679         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
680         @local symbol.
682 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
684         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
685         definitions for private futexes.
686         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
687         kernel-features.h and lowlevellock.h.  Use private futexes if
688         they are available.
689         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
690         (__lll_mutex_lock_wait): Rename to
691         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
692         (__lll_mutex_timedlock_wait): Rename to ...
693         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
694         Don't compile in for libc.so.
695         (__lll_mutex_unlock_wake): Rename to ...
696         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
697         (__lll_timedwait_tid): Use __NR_gettimeofday.
698         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
699         the header from assembler.  Renamed all lll_mutex_* resp.
700         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
701         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
702         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
703         Define.
704         (__lll_lock_wait_private): Add prototype.
705         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
706         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
707         __lll_unlock_wake): Likewise.
708         (lll_lock): Add private argument.  Call __lll_lock_wait_private
709         if private is constant LLL_PRIVATE.
710         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
711         lll_timedlock, lll_robust_timedlock): Add private argument.
712         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
713         if private is constant LLL_PRIVATE.
714         (lll_robust_unlock, lll_robust_dead): Add private argument.
715         (lll_lock_t): Remove.
716         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
717         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
718         lll_cond_wake, lll_cond_broadcast): Remove.
719         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
720         kernel-features.h and lowlevellock.h.
721         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
722         (LOAD_FUTEX_WAIT): Define.
723         (__lll_robust_mutex_lock_wait): Rename to ...
724         (__lll_robust_lock_wait): ... this.  Add private argument.
725         Use LOAD_FUTEX_WAIT macro.
726         (__lll_robust_mutex_timedlock_wait): Rename to ...
727         (__lll_robust_timedlock_wait): ... this.    Add private argument.
728         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
729         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
730         lowlevellock.h.
731         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
732         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
733         __lll_mutex_{lock,unlock}_*.
734         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
735         lowlevellock.h and pthread-errnos.h.
736         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
737         FUTEX_CMP_REQUEUE, EINVAL): Remove.
738         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
739         __lll_mutex_{lock,unlock}_*.
740         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
741         lowlevellock.h and pthread-errnos.h.
742         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
743         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
744         __lll_mutex_{lock,unlock}_*.
745         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
746         lowlevellock.h.
747         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
748         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
749         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
750         (__condvar_tw_cleanup): Likewise.
751         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
752         lowlevellock.h.
753         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
754         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
755         __lll_mutex_{lock,unlock}_*.
756         ( __condvar_w_cleanup): Likewise.
757         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
758         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
759         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
760         lowlevellock.h.
761         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
762         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
763         __lll_mutex_{lock,unlock}_*.
764         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
765         lowlevellock.h.
766         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
767         FUTEX_PRIVATE_FLAG): Remove.
768         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
769         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
770         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
771         lowlevellock.h.
772         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
773         FUTEX_PRIVATE_FLAG): Remove.
774         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
775         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
776         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
777         lowlevellock.h.
778         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
779         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
780         __lll_mutex_{lock,unlock}_*.
781         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
782         lowlevellock.h.
783         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
784         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
785         __lll_mutex_{lock,unlock}_*.
786         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
787         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
788         (__new_sem_post): Use standard initial exec code sequences.
789         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
790         lowlevellock.h.
791         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
792         FUTEX_PRIVATE_FLAG): Remove.
793         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
794         exec code sequences.
795         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
796         (__new_sem_trywait): Use standard initial exec code sequences.
797         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
798         (__new_sem_wait): Use standard initial exec code sequences.
800 2007-07-31  Anton Blanchard  <anton@samba.org>
802         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
803         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
804         atomic_full_barrier.
806 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
808         * allocatestack.c (stack_cache_lock): Change type to int.
809         (get_cached_stack, allocate_stack, __deallocate_stack,
810         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
811         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
812         as second argument to lll_lock and lll_unlock macros on
813         stack_cache_lock.
814         * pthread_create.c (__find_in_stack_list): Likewise.
815         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
816         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
817         as second argument.
818         * descr.h (struct pthread): Change lock and setxid_futex field
819         type to int.
820         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
821         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
822         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
823         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
824         Likewise.
825         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
826         * pthread_cond_init.c (__pthread_cond_init): Likewise.
827         * pthreadP.h (__attr_list_lock): Change type to int.
828         * pthread_attr_init.c (__attr_list_lock): Likewise.
829         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
830         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
831         lll_{,un}lock.
832         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
833         also for lll_futex_{wake,wait}.
834         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
835         a pointer to const.
836         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
837         LLL_SHARED as second argument to lll_{,un}lock.
838         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
839         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
840         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
841         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
842         Likewise.
843         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
844         as second argument to lll_{,un}lock macros on pd->lock.
845         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
846         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
847         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
848         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
849         Likewise.
850         * sysdeps/pthread/createthread.c (do_clone, create_thread):
851         Likewise.
852         * pthread_once.c (once_lock): Change type to int.
853         (__pthread_once): Pass LLL_PRIVATE as second argument to
854         lll_{,un}lock macros on once_lock.
855         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
856         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
857         rwlock->__data.__shared as second argument to them and similarly
858         for lll_futex_w*.
859         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
860         Likewise.
861         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
862         Likewise.
863         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
864         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
865         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
866         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
867         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
868         to lll_{,un}lock macros on __sem_mappings_lock.
869         * sem_open.c (check_add_mapping): Likewise.
870         (__sem_mappings_lock): Change type to int.
871         * semaphoreP.h (__sem_mappings_lock): Likewise.
872         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
873         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
874         instead of lll_*mutex_*, pass LLL_SHARED as last
875         argument.
876         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
877         pass LLL_SHARED as last argument.
878         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
879         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
880         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
881         pass LLL_SHARED as last argument.
882         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
883         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
884         LLL_SHARED as last argument.
885         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
886         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
887         Similarly.
888         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
889         __libc_lock_lock_recursive, __libc_lock_unlock,
890         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
891         argument to lll_{,un}lock.
892         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
893         _IO_lock_unlock): Likewise.
894         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
895         compound literal.
896         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
897         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
898         __fork_lock.
899         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
900         free_mem): Likewise.
901         (__fork_lock): Change type to int.
902         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
903         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
904         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
905         lll_futex_wake.
906         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
907         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
908         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
909         New function.
910         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
911         pass it through to lll_futex_*wait, only compile in when
912         IS_IN_libpthread.
913         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
914         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
915         argument and pass it through to lll_futex_*wait.
916         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
917         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
918         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
919         inline functions to __lll_* resp. __lll_robust_*.
920         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
921         (lll_mutex_dead): Add private argument.
922         (__lll_lock_wait_private): New prototype.
923         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
924         __lll_robust_lock_timedwait): Add private argument to prototypes.
925         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
926         call __lll_lock_wait_private, otherwise pass private to
927         __lll_lock_wait.
928         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
929         __lll_robust_timedlock): Add private argument, pass it to
930         __lll_*wait functions.
931         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
932         call __lll_unlock_wake_private, otherwise pass private to
933         __lll_unlock_wake.
934         (__lll_robust_unlock): Add private argument, pass it to
935         __lll_robust_unlock_wake.
936         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
937         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
938         argument, pass it through to __lll_* inline function.
939         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
940         (lll_lock_t): Remove.
941         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
942         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
943         lll_cond_wake, lll_cond_broadcast): Remove.
944         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
945         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
946         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
947         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
948         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
949         the header from assembler.  Renamed all lll_mutex_* resp.
950         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
951         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
952         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
953         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
954         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
955         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
956         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
957         Remove prototype.
958         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
959         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
960         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
961         (lll_trylock): Likewise, use __lll_trylock_asm, pass
962         MULTIPLE_THREADS_OFFSET as another asm operand.
963         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
964         MULTIPLE_THREADS_OFFSET as last asm operand, call
965         __lll_lock_wait_private if private is constant LLL_PRIVATE,
966         otherwise pass private as another argument to __lll_lock_wait.
967         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
968         lll_timedlock, lll_robust_timedlock): Add private argument, pass
969         private as another argument to __lll_*lock_wait call.
970         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
971         MULTIPLE_THREADS_OFFSET as another asm operand, call
972         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
973         otherwise pass private as another argument to __lll_unlock_wake.
974         (lll_robust_unlock): Add private argument, pass private as another
975         argument to __lll_unlock_wake.
976         (lll_robust_dead): Add private argument, use __lll_private_flag
977         macro.
978         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
979         LLL_MUTEX_LOCK_INITIALIZER.
980         (lll_lock_t): Remove.
981         (LLL_LOCK_INITIALIZER_WAITERS): Define.
982         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
983         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
984         lll_cond_wake, lll_cond_broadcast): Remove.
985         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
986         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
987         2007-05-2{3,9} changes.
988         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
989         kernel-features.h and lowlevellock.h.
990         (LOAD_PRIVATE_FUTEX_WAIT): Define.
991         (LOAD_FUTEX_WAIT): Rewritten.
992         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
993         define.
994         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
995         (__lll_mutex_lock_wait): Rename to ...
996         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
997         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
998         (__lll_mutex_timedlock_wait): Rename to ...
999         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
1000         contains private argument.  Don't compile in for libc.so.
1001         (__lll_mutex_unlock_wake): Rename to ...
1002         (__lll_unlock_wake): ... this.  %ecx contains private argument.
1003         Don't compile in for libc.so.
1004         (__lll_timedwait_tid): Use __NR_gettimeofday.
1005         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
1006         kernel-features.h and lowlevellock.h.
1007         (LOAD_FUTEX_WAIT): Define.
1008         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
1009         define.
1010         (__lll_robust_mutex_lock_wait): Rename to ...
1011         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
1012         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
1013         macro.
1014         (__lll_robust_mutex_timedlock_wait): Rename to ...
1015         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
1016         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
1017         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
1018         lowlevellock.h.
1019         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1020         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1021         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
1022         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
1023         to __lll_lock_wait in %edx.
1024         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
1025         Include lowlevellock.h and pthread-errnos.h.
1026         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1027         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1028         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
1029         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1030         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1031         __lll_unlock_wake.
1032         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
1033         Include lowlevellock.h and pthread-errnos.h.
1034         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1035         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1036         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
1037         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1038         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1039         __lll_unlock_wake.
1040         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
1041         Include lowlevellock.h.
1042         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1043         Don't define.
1044         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
1045         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
1046         pass LLL_SHARED in %ecx to both __lll_lock_wait and
1047         __lll_unlock_wake.  Use __NR_gettimeofday.
1048         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
1049         Include lowlevellock.h.
1050         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1051         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
1052         to __lll_*, pass cond_lock address in %edx rather than %ecx to
1053         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
1054         and __lll_unlock_wake.
1055         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
1056         Include lowlevellock.h.
1057         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1058         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
1059         MUTEX(%ebx) address in %edx rather than %ecx to
1060         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1061         and __lll_unlock_wake.  Move return value from %ecx to %edx
1062         register.
1063         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1064         Include lowlevellock.h.
1065         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1066         Don't define.
1067         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1068         MUTEX(%ebp) address in %edx rather than %ecx to
1069         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1070         and __lll_unlock_wake.  Move return value from %ecx to %edx
1071         register.  Use __NR_gettimeofday.
1072         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1073         Include lowlevellock.h.
1074         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
1075         Don't define.
1076         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1077         MUTEX(%ebp) address in %edx rather than %ecx to
1078         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
1079         and __lll_unlock_wake.  Move return value from %ecx to %edx
1080         register.  Use __NR_gettimeofday.
1081         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
1082         Include lowlevellock.h.
1083         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1084         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
1085         MUTEX(%edi) address in %edx rather than %ecx to
1086         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1087         and __lll_unlock_wake.
1088         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1089         Include lowlevellock.h.
1090         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1091         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1092         MUTEX(%ebx) address in %edx rather than %ecx to
1093         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1094         and __lll_unlock_wake.  Move return value from %ecx to %edx
1095         register.
1096         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1097         lowlevellock.h.
1098         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1099         define.
1100         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1101         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1102         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1103         lowlevellock.h.
1104         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1105         (sem_timedwait): Use __NR_gettimeofday.
1106         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1107         lowlevellock.h.
1108         (LOCK): Don't define.
1109         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1110         lowlevellock.h.
1111         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1112         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1113         are waiters.
1114         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1115         2007-05-2{3,9} changes.
1116         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1117         kernel-features.h and lowlevellock.h.
1118         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1119         (LOAD_FUTEX_WAIT): Rewritten.
1120         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1121         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1122         (__lll_mutex_lock_wait): Rename to ...
1123         (__lll_lock_wait): ... this.  %esi is now private argument.
1124         Don't compile in for libc.so.
1125         (__lll_mutex_timedlock_wait): Rename to ...
1126         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1127         Don't compile in for libc.so.
1128         (__lll_mutex_unlock_wake): Rename to ...
1129         (__lll_unlock_wake): ... this.  %esi contains private argument.
1130         Don't compile in for libc.so.
1131         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1132         kernel-features.h and lowlevellock.h.
1133         (LOAD_FUTEX_WAIT): Define.
1134         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1135         (__lll_robust_mutex_lock_wait): Rename to ...
1136         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1137         Use LOAD_FUTEX_WAIT macro.
1138         (__lll_robust_mutex_timedlock_wait): Rename to ...
1139         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1140         private, use LOAD_FUTEX_WAIT macro.
1141         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1142         lowlevellock.h.
1143         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1144         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1145         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1146         __lll_lock_wait and __lll_unlock_wake.
1147         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1148         Include lowlevellock.h and pthread-errnos.h.
1149         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1150         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1151         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1152         pass LLL_SHARED in %esi to both __lll_lock_wait and
1153         __lll_unlock_wake.
1154         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1155         Include lowlevellock.h and pthread-errnos.h.
1156         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1157         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1158         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1159         pass LLL_SHARED in %esi to both __lll_lock_wait and
1160         __lll_unlock_wake.
1161         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1162         Include lowlevellock.h.
1163         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1164         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1165         pass LLL_SHARED in %esi to both __lll_lock_wait and
1166         __lll_unlock_wake.
1167         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1168         Include lowlevellock.h.
1169         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1170         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1171         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1172         and __lll_unlock_wake.
1173         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1174         Include lowlevellock.h.
1175         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1176         Don't define.
1177         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1178         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1179         and __lll_unlock_wake.
1180         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1181         Include lowlevellock.h.
1182         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1183         Don't define.
1184         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1185         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1186         and __lll_unlock_wake.
1187         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1188         Include lowlevellock.h.
1189         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1190         Don't define.
1191         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1192         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1193         and __lll_unlock_wake.
1194         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1195         Include lowlevellock.h.
1196         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1197         Don't define.
1198         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1199         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1200         and __lll_unlock_wake.
1201         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1202         Include lowlevellock.h.
1203         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1204         Don't define.
1205         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1206         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1207         and __lll_unlock_wake.
1208         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1209         lowlevellock.h.
1210         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1211         define.
1212         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1213         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1214         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1215         lowlevellock.h.
1216         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1217         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1218         lowlevellock.h.
1219         (LOCK): Don't define.
1220         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1221         lowlevellock.h.
1222         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1223         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1224         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1225         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1226         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1227         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1228         (__lll_lock_wait_private): New function.
1229         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1230         it to lll_futex_*wait.  Don't compile in for libc.so.
1231         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1232         Remove.
1233         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1234         (struct sparc_pthread_barrier): Remove.
1235         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1236         struct sparc_pthread_barrier.  Pass
1237         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1238         and lll_futex_wait macros.
1239         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1240         Remove.
1241         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1242         Include sparc pthread_barrier_wait.c instead of generic one.
1244 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1246         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1248         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1249         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1250         %ecx.
1251         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1252         (pthread_rwlock_timedwrlock): Likewise.
1253         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1254         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1256 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1258         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1260 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1262         * tst-locale2.c (useless): Add return statement.
1264 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1266         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1267         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1268         * pthread_create.c (start_thread): Likewise.
1269         * init.c (sighandler_setxid): Likewise.
1270         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1271         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1272         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1273         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1274         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1275         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1276         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1277         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1278         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1279         Likewise.
1280         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1281         Likewise.
1282         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1283         Likewise.
1284         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1285         __rtld_notify): Likewise.
1286         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1287         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1288         __pthread_once): Likewise.
1289         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1290         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1291         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1292         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1293         (lll_futex_wait): Add private argument, define as wrapper around
1294         lll_futex_timed_wait.
1295         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1296         use __lll_private_flag macro.
1297         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1298         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1299         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1300         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1301         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1302         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1303         (lll_futex_wait): Add private argument, define as wrapper around
1304         lll_futex_timed_wait.
1305         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1306         use __lll_private_flag macro.
1307         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1308         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1309         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1310         Define.
1311         (lll_futex_timed_wait, lll_futex_wake): Use it.
1312         (lll_private_futex_wait, lll_private_futex_timed_wait,
1313         lll_private_futex_wake): Removed.
1314         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1315         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1316         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1317         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1318         (lll_futex_wait): Add private argument, define as wrapper around
1319         lll_futex_timed_wait.
1320         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1321         use __lll_private_flag macro.
1322         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1323         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1324         to lll_futex_*.
1325         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1326         (lll_private_futex_wait, lll_private_futex_timed_wait,
1327         lll_private_futex_wake): Removed.
1328         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1329         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1330         (lll_private_futex_wait, lll_private_futex_timed_wait,
1331         lll_private_futex_wake): Removed.
1332         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1333         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1334         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1335         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1336         (lll_futex_wait): Add private argument, define as wrapper around
1337         lll_futex_timed_wait.
1338         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1339         use __lll_private_flag macro.
1340         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1341         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1342         to lll_futex_*.
1343         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1344         Define.
1345         (lll_futex_timed_wait, lll_futex_wake): Use it.
1346         (lll_private_futex_wait, lll_private_futex_timed_wait,
1347         lll_private_futex_wake): Removed.
1349 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1351         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1352         of the structure for sparc32.
1354 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1356         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1358 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1360         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1361         code used when private futexes are assumed.
1362         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1363         Likewise.
1365 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1367         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1368         (__lll_private_flag): Define.
1369         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1370         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1371         __lll_private_flag.
1372         (lll_private_futex_wait, lll_private_futex_timedwait,
1373         lll_private_futex_wake): Define as wrapper around non-_private
1374         macros.
1375         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1376         (__lll_private_flag): Define.
1377         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1378         (lll_private_futex_wait, lll_private_futex_timedwait,
1379         lll_private_futex_wake): Define as wrapper around non-_private
1380         macros.
1382 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1384         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1385         parameter to lll_futex_wait call.
1386         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1388         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1389         Replace lll_futex_wait with lll_private_futex_wait.
1390         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1391         Add LLL_SHARED parameter to lll_futex_wake().
1393         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1394         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1395         lll_private_futex_wake.
1396         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1397         bit from private parm before syscall.
1398         (lll_futex_timed_wait): Likewise.
1399         (lll_futex_wake): Likewise.
1400         (lll_futex_wake_unlock): Likewise.
1401         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1402         (lll_robust_mutex_unlock): Likewise.
1403         (lll_mutex_unlock_force): Likewise.
1404         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1406 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1408         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1409         compilation when unconditionally using private futexes.
1410         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1411         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1412         Likewise.
1413         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1414         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1416 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1418         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1419         Define.
1421 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1423         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1424         kernel-features.h.
1426 2007-05-16  Roland McGrath  <roland@redhat.com>
1428         * init.c (__nptl_initial_report_events): New variable.
1429         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1430         to that.
1432 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1434         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1435         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1437 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1439         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1440         implementation.
1442 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1444         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1445         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1446         * pthread_mutex_timedlock.c: Likewise.
1447         * pthread_mutex_trylock.c: Likewise.
1448         * pthread_mutex_unlock.c: Likewise.
1450 2007-06-17  Andreas Schwab  <schwab@suse.de>
1452         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1453         sections.
1455 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1457         * allocatestack.c (allocate_stack): Make code compile if
1458         __ASSUME_PRIVATE_FUTEX is set.
1460 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1462         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1463         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1465         (__pthread_rwlock_wrlock): Likewise.
1466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1467         (pthread_rwlock_timedrdlock): Likewise.
1468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1469         (pthread_rwlock_timedwrlock): Likewise.
1470         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1471         (__pthread_rwlock_unlock): Likewise.
1473 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1475         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1476         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1477         Split __flags into __flags, __shared, __pad1 and __pad2.
1478         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1479         futexes if they are available.
1480         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1481         in libc-lowlevellock.S allow using private futexes.
1482         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1483         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1484         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1485         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1486         lll_private_futex_timed_wait and lll_private_futex_wake.
1487         (lll_robust_mutex_unlock): Fix typo.
1488         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1489         field in futex command setup.
1490         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1491         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1492         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1493         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1494         if they are available.  Remove clear_once_control.
1495         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1496         futexes if they are available.
1497         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1498         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1499         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1500         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1501         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1502         Wake only when there are waiters.
1503         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1504         support.  Indicate that there are waiters.  Remove unnecessary
1505         extra cancellation test.
1506         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1507         left-over duplication of __sem_wait_cleanup.
1509 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1511         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1512         parameter to lll_futex_wait, lll_futex_timed_wait, and
1513         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1514         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1515         lll_private_futex_wake.
1516         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1517         * allocatestack.c: Adjust use of lll_futex_* macros.
1518         * init.c: Likewise.
1519         * lowlevellock.h: Likewise.
1520         * pthread_barrier_wait.c: Likewise.
1521         * pthread_cond_broadcast.c: Likewise.
1522         * pthread_cond_destroy.c: Likewise.
1523         * pthread_cond_signal.c: Likewise.
1524         * pthread_cond_timedwait.c: Likewise.
1525         * pthread_cond_wait.c: Likewise.
1526         * pthread_create.c: Likewise.
1527         * pthread_mutex_lock.c: Likewise.
1528         * pthread_mutex_setprioceiling.c: Likewise.
1529         * pthread_mutex_timedlock.c: Likewise.
1530         * pthread_mutex_unlock.c: Likewise.
1531         * pthread_rwlock_timedrdlock.c: Likewise.
1532         * pthread_rwlock_timedwrlock.c: Likewise.
1533         * pthread_rwlock_unlock.c: Likewise.
1534         * sysdeps/alpha/tls.h: Likewise.
1535         * sysdeps/i386/tls.h: Likewise.
1536         * sysdeps/ia64/tls.h: Likewise.
1537         * sysdeps/powerpc/tls.h: Likewise.
1538         * sysdeps/pthread/aio_misc.h: Likewise.
1539         * sysdeps/pthread/gai_misc.h: Likewise.
1540         * sysdeps/s390/tls.h: Likewise.
1541         * sysdeps/sh/tls.h: Likewise.
1542         * sysdeps/sparc/tls.h: Likewise.
1543         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1544         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1545         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1546         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1547         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1548         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1549         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1550         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1551         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1552         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1553         Likewise.
1554         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1555         * sysdeps/x86_64/tls.h: Likewise.
1557 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1559         * pthread_getattr_np.c: No need to install a cancellation handler,
1560         this is no cancellation point.
1561         * pthread_getschedparam.c: Likewise.
1562         * pthread_setschedparam.c: Likewise.
1563         * pthread_setschedprio.c: Likewise.
1564         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1565         lll_unlock_wake_cb.
1566         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1567         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1568         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1569         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1570         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1571         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1572         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1573         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1574         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1575         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1576         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1577         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1579         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1580         whether there are more than one thread makes no sense here since
1581         we only call the slow path if the locks are taken.
1582         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1584         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1585         COND_NWAITERS_SHIFT.
1586         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1587         COND_CLOCK_BITS.
1588         * pthread_cond_init.c: Likewise.
1589         * pthread_cond_timedwait.c: Likewise.
1590         * pthread_cond_wait.c: Likewise.
1591         * pthread_condattr_getclock.c: Likewise.
1592         * pthread_condattr_setclock.c: Likewise.
1593         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1594         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1595         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1597         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1599 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1601         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1602         unistd.h.
1604         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1605         insn suffix.
1606         (THREAD_GSCOPE_GET_FLAG): Remove.
1607         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1608         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1609         changes.
1610         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1611         (THREAD_GSCOPE_GET_FLAG): Remove.
1612         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1613         instead of THREAD_GSCOPE_GET_FLAG.
1614         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1615         it.
1616         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1617         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1618         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1619         THREAD_GSCOPE_WAIT): Define.
1620         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1621         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1622         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1623         THREAD_GSCOPE_WAIT): Define.
1624         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1625         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1626         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1627         THREAD_GSCOPE_WAIT): Define.
1628         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1629         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1630         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1631         THREAD_GSCOPE_WAIT): Define.
1633 2007-05-24  Richard Henderson  <rth@redhat.com>
1635         * descr.h (struct pthread): Add header.gscope_flag.
1636         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1637         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1638         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1639         THREAD_GSCOPE_WAIT): Define.
1641 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1643         * init.c: Make it compile with older kernel headers.
1645         * tst-initializers1.c: Show through exit code which test failed.
1647         * pthread_rwlock_init.c: Also initialize __shared field.
1648         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1649         element in rwlock structure into four byte elements.  One of them is
1650         the new __shared element.
1651         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1652         Likewise.
1653         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1654         __shared, adjust names of other padding elements.
1655         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1656         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1657         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1658         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1659         FUTEX_PRIVATE_FLAG.
1660         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1661         futex to use private operations if possible.
1662         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1663         Likewise.
1664         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1665         Likewise.
1666         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1667         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1668         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1669         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1670         Likewise.
1671         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1672         Likewise.
1673         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1674         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1676 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1678         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1679         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1680         * pthread_rwlock_timedrdlock.c: Likewise.
1681         * pthread_rwlock_tryrdlock.c: Likewise.
1683         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1684         optimization.
1686         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1687         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1688         duplication of __sem_wait_cleanup.
1690         * allocatestack.c: Revert last change.
1691         * init.c: Likewise.
1692         * sysdeps/i386/tls.h: Likewise.
1693         * sysdeps/x86_64/tls.h: Likewise.
1694         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1695         header structure.
1696         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1698         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1699         Add private field.
1700         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1701         * pthread_barrier_init.c: Set private flag if pshared and private
1702         futexes are supported.
1703         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1704         private field in futex command setup.
1705         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1707 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1709         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1710         support.
1711         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1712         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1713         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1714         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1715         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1717         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1718         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1719         fields in the structure.
1720         (__old_sem_init): New function.
1721         * sem_open.c: Initialize all fields of the structure.
1722         * sem_getvalue.c: Adjust for renamed element.
1723         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1724         (gen-as-const-headers): Add structsem.sym.
1725         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1726         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1727         struct new_sem.  Add struct old_sem.
1728         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1729         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1730         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1731         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1732         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1733         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1734         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1735         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1736         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1737         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1738         * tst-sem10.c: New file.
1739         * tst-sem11.c: New file.
1740         * tst-sem12.c: New file.
1741         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1742         of struct sem.
1744 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1745             Jakub Jelinek  <jakub@redhat.com>
1747         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1748         Move __pthread_enable_asynccancel right before futex syscall.
1749         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1750         Likewise.
1752 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1754         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1755         THREAD_COPY_PRIVATE_FUTEX): Define.
1756         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1757         THREAD_COPY_PRIVATE_FUTEX): Define.
1758         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1759         * init.c (__pthread_initialize_minimal_internal): Use
1760         THREAD_SET_PRIVATE_FUTEX.
1762         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1763         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1764         THREAD_GSCOPE_FLAG_WAIT): Define.
1765         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1766         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1767         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1768         PTR_DEMANGLE.
1769         (THREAD_GSCOPE_GET_FLAG): Define.
1770         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1771         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1772         instead of ->header.gscope_flag directly.
1774 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1776         * init.c (__pthread_initialize_minimal_internal): Check whether
1777         private futexes are available.
1778         * allocatestack.c (allocate_stack): Copy private_futex field from
1779         current thread into the new stack.
1780         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1781         futexes if they are available.
1782         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1783         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1784         in libc-lowlevellock.S allow using private futexes.
1785         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1786         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1787         FUTEX_PRIVATE_FLAG.
1788         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1789         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1790         if they are available.
1791         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1792         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1793         * sysdeps/i386/tcb-offsets.sym: Likewise.
1794         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1795         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1797 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1799         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1800         Remove ptr_wait_lookup_done again.
1801         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1802         (__pthread_initialize_minimal_internal): Initialize
1803         _dl_wait_lookup_done pointer in _rtld_global directly.
1804         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1805         Remove code to code _dl_wait_lookup_done.
1806         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1807         encrypted for now.
1809 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1811         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1812         pthread_mutex_init failed with ENOTSUP.
1814 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1816         * allocatestack.c (__wait_lookup_done): New function.
1817         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1818         Add ptr_wait_lookup_done.
1819         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1820         * pthreadP.h: Declare __wait_lookup_done.
1821         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1822         Define macros to implement reference handling of global scope.
1823         * sysdeps/x86_64/tls.h: Likewise.
1824         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1825         Initialize GL(dl_wait_lookup_done).
1827 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1829         [BZ #4512]
1830         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1831         is detected.
1832         * pthread_mutex_timedlock.c: Likewise.
1833         * pthread_mutex_trylock.c: Likewise.
1834         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1836         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1837         * tst-robust9.c: New file.
1838         * tst-robustpi9.c: New file.
1840         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1841         unnecessary extra cancellation test.
1843 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1845         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1846         extra cancellation test.
1847         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1849 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1851         * descr.h (struct pthread): Rearrange members to fill hole in
1852         64-bit layout.
1854         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1855         (__pthread_setaffinity_new): If syscall was successful and
1856         RESET_VGETCPU_CACHE is defined, use it before returning.
1857         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1859 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1861         [BZ #4455]
1862         * tst-align2.c: Include stackinfo.h.
1863         * tst-getpid1.c: Likewise.
1865 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1867         [BZ #4455]
1868         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1869         * tst-getpid1.c (do_test): Likewise.
1871         [BZ #4456]
1872         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1873         (allocate_stack): Likewise.
1875 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1877         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1878         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1879         (__lll_robust_timedlock_wait): Likewise.
1880         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1882 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1884         [BZ #4465]
1885         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1886         * tst-cancel4.c (tf_fdatasync): New test.
1888 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1890         [BZ #4392]
1891         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1892         check mutexes like normal mutexes.
1894         [BZ #4306]
1895         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1896         Initialize the whole sigevent structure to appease valgrind.
1898 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1900         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1901         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1903 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1905         * tst-locale1.c: Avoid warnings.
1906         * tst-locale2.c: Likewise.
1908 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1910         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1911         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1913 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1915         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1916         __extern_always_inline where appropriate.
1917         * sysdeps/pthread/pthread.h: Likewise.
1919 2007-03-13  Richard Henderson  <rth@redhat.com>
1921         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1922         separate cfi regions for the two subsections.
1924 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1926         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1927         new thread, don't just decrement it.
1928         Patch by Suzuki K P <suzuki@in.ibm.com>.
1930 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1932         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1933         PTHFCT_CALL definition.
1935 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1937         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1938         available, don't use it.
1940 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1942         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1943         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1944         call into the kernel to delay.
1946 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1948         * tst-initializers1.c: We want to test the initializers as seen
1949         outside of libc, so undefined _LIBC.
1951         * pthread_join.c (cleanup): Avoid warning.
1953 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1955         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1956         (__lll_timedwait_tid): Add unwind info.
1958         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1959         function table, mangle the pointers.
1960         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1961         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1962         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1963         demangle pointers before use.
1964         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1965         demangle pointer.
1966         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1967         * sysdeps/pthread/setxid.h: Likewise.
1969 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1971         * tst-rwlock7.c: Show some more information in case of correct
1972         behavior.
1974 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1976         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1977         (lll_futex_timed_wait): Undo part of last change, don't negate
1978         return value.
1980 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1982         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1983         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1985 2006-12-28  David S. Miller  <davem@davemloft.net>
1987         * shlib-versions: Fix sparc64 linux target specification.
1989 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1991         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1992         Adjust include path for pthread_barrier_wait.c move.
1994 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1996         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1997         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1999 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
2001         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
2002         6 argument cancellable syscalls.
2003         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2004         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
2005         6 argument cancellable syscalls.
2006         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
2008 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
2010         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
2011         (__rtld_mrlock_initialize): Add missing closing parenthesis.
2013 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
2015         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
2016         __sync_lock_release instead of __sync_lock_release_si.
2018 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
2020         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
2021         Define.
2022         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
2023         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
2024         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
2025         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
2026         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
2027         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2028         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
2029         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
2030         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2031         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2032         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
2034 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
2036         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
2037         * pthread_barrier_wait.c: ...here.
2038         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
2039         * pthread_cond_broadcast.c: ...here.
2040         * sysdeps/pthread/pthread_cond_signal.c: Move to...
2041         * pthread_cond_signal.c: ...here.
2042         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
2043         * pthread_cond_timedwait.c: ...here.
2044         * sysdeps/pthread/pthread_cond_wait.c: Move to...
2045         * pthread_cond_wait.c: ...here.
2046         * sysdeps/pthread/pthread_once.c: Move to...
2047         * pthread_once.c: ...here.
2048         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
2049         * pthread_rwlock_rdlock.c: ...here.
2050         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
2051         * pthread_rwlock_timedrdlock.c: ...here.
2052         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
2053         * pthread_rwlock_timedwrlock.c: ...here.
2054         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
2055         * pthread_rwlock_unlock.c: ...here.
2056         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
2057         * pthread_rwlock_wrlock.c: ...here.
2058         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
2059         * pthread_spin_destroy.c: ...here.
2060         * sysdeps/pthread/pthread_spin_init.c: Move to...
2061         * pthread_spin_init.c: ...here.
2062         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
2063         * pthread_spin_unlock.c: ...here.
2064         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
2065         * pthread_getcpuclockid.c: ...here.
2067         * init.c: USE_TLS support is now always enabled.
2068         * tst-tls5.h: Likewise.
2069         * sysdeps/alpha/tls.h: Likewise.
2070         * sysdeps/i386/tls.h: Likewise.
2071         * sysdeps/ia64/tls.h: Likewise.
2072         * sysdeps/powerpc/tls.h: Likewise.
2073         * sysdeps/s390/tls.h: Likewise.
2074         * sysdeps/sh/tls.h: Likewise.
2075         * sysdeps/sparc/tls.h: Likewise.
2076         * sysdeps/x86_64/tls.h: Likewise.
2078 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
2080         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2081         __rtld_mrlock_change): Update oldval if atomic compare and exchange
2082         failed.
2084         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
2085         Define to THREAD_SELF->header.multiple_threads.
2086         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2087         Likewise.
2088         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2089         Likewise.
2090         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2091         (SINGLE_THREAD_P): Likewise.
2092         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2093         (SINGLE_THREAD_P): Likewise.
2094         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2095         (SINGLE_THREAD_P): Likewise.
2096         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2097         (SINGLE_THREAD_P): Likewise.
2098         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2099         Likewise.
2100         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2101         (SINGLE_THREAD_P): Likewise.
2102         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2103         (SINGLE_THREAD_P): Likewise.
2104         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2105         Likewise.
2107 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2109         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2110         by default rather than 2_3_3.
2112 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2114         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2115         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2116         atomic_* instead of catomic_* macros.
2118 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2120         [BZ #3285]
2121         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2122         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2123         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2124         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2125         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2126         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2127         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2128         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2129         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2130         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2131         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2132         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2133         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2135 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2137         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2138         cancelable syscalls with six parameters.
2140         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2141         operations instead of atomic_*.
2143 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2145         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2147 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2149         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2150         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2151         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2152         New file.
2153         * pthread_attr_setstack.c: Allow overwriting the version number of the
2154         new symbol.
2155         * pthread_attr_setstacksize.c: Likewise.
2156         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2157         it.
2158         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2159         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2161 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2163         [BZ #3251]
2164         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2165         Patch by Petr Baudis.
2167 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2169         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2171         * tst-cancel2.c (tf): Loop as long as something was written.
2173 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2175         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2176         mutexes wake all mutexes.
2177         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2178         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2179         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2181 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2183         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2184         to guarantee the thread is always canceled.
2186 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2188         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2189         Include stdlib.h.
2190         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2191         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2192         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2193         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2196 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2198         [BZ #3123]
2199         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2200         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2201         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2202         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2203         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2204         * Makefile (tests): Add tst-cond22.
2205         * tst-cond22.c: New file.
2207 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2209         [BZ #3124]
2210         * descr.h (struct pthread): Add parent_cancelhandling.
2211         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2212         cancelhandling value to child.
2213         * pthread_create.c (start_thread): If parent thread was canceled
2214         reset the SIGCANCEL mask.
2215         * Makefile (tests): Add tst-cancel25.
2216         * tst-cancel25.c: New file.
2218 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2219             Ulrich Drepper  <drepper@redhat.com>
2221         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2222         counterp if it is already zero.
2223         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2225 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2226             Roland McGrath  <roland@redhat.com>
2228         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2229         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2230         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2231         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2232         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2233         lll_robust_mutex_timedlock, lll_mutex_unlock,
2234         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2235         Add _L_*_ symbols around the subsection.
2236         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2237         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2239 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2240             Roland McGrath  <roland@redhat.com>
2242         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2243         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2244         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2245         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2246         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2247         lll_robust_mutex_timedlock, lll_mutex_unlock,
2248         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2249         Add _L_*_ symbols around the subsection.
2250         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2251         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2253 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2255         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2256         change because it can disturb too much existing code.  If real hard
2257         reader preference is needed we'll introduce another type.
2258         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2259         (pthread_rwlock_timedwrlock): Likewise.
2260         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2261         Likewise.
2263 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2265         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2266         reader preference.
2267         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2268         (pthread_rwlock_timedwrlock): Likewise.
2269         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2270         Likewise.
2272 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2274         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2275         Only define ifdef SHARED.
2277 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2279         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2280         (free_stacks): ...here.
2281         (__free_stack_cache): New function.
2282         * pthreadP.h: Declare __free_stack_cache.
2283         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2284         ptr_freeres.
2285         * init.c (pthread_functions): Initialize ptr_freeres.
2286         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2287         New freeres function.
2289 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2291         [BZ #3018]
2292         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2294 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2296         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2297         _XOPEN_REALTIME_THREADS.
2299 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2301         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2302         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2303         HAVE_CLOCK_GETTIME_VSYSCALL.
2304         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2306 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2308         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2309         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2310         * descr.h (struct priority_protection_data): New type.
2311         (struct pthread): Add tpp field.
2312         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2313         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2314         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2315         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2316         TPP mutexes.
2317         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2318         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2319         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2320         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2321         * tpp.c: New file.
2322         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2323         boosted by TPP.
2324         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2325         * pthread_mutexattr_getprioceiling.c
2326         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2327         in the SCHED_FIFO priority range.
2328         * pthread_mutexattr_setprioceiling.c
2329         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2330         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2331         if mutex is not TPP.  Ceiling is now in __data.__lock.
2332         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2333         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2334         is now in __data.__lock.  Add locking.
2335         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2336         * Makefile (libpthread-routines): Add tpp.
2337         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2338         * tst-tpp.h: New file.
2339         * tst-mutexpp1.c: New file.
2340         * tst-mutexpp6.c: New file.
2341         * tst-mutexpp10.c: New file.
2342         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2343         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2345 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2347         [BZ #2843]
2348         * pthread_join.c (pthread_join): Account for self being canceled
2349         when checking for deadlocks.
2350         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2351         (tf1): Don't print anything after pthread_join returns, this would be
2352         another cancellation point.
2353         (tf2): Likewise.
2354         * tst-join6.c: New file.
2355         * Makefile (tests): Add tst-join6.
2357 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2359         [BZ #2892]
2360         * pthread_setspecific.c (__pthread_setspecific): Check
2361         out-of-range index before checking for unused key.
2363         * sysdeps/pthread/gai_misc.h: New file.
2365 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2367         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2368         file.  Don't use sysctl.
2369         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2370         overwrite the file if this is likely not true.
2372 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2374         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2375         * Makefile (tests): Add tst-getpid3.
2376         * tst-getpid3.c: New file.
2378 2006-07-30  Roland McGrath  <roland@redhat.com>
2380         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2382         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2383         (pause_not_cancel): New macro.
2384         (nanosleep_not_cancel): New macro.
2385         (sigsuspend_not_cancel): New macro.
2386         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2387         nanosleep_not_cancel macro from <not-cancel.h>.
2388         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2389         macro from <not-cancel.h>.
2391 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2392             Jakub Jelinek  <jakub@redhat.com>
2394         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2395         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2396         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2397         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2398         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2399         * pthread_mutex_lock.c: Likewise.
2400         * pthread_mutex_timedlock.c: Likewise.
2401         * pthread_mutex_trylock.c: Likewise.
2402         * pthread_mutex_unlock.c: Likewise.
2403         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2404         all mutexes.
2405         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2406         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2407         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2408         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2409         pthread-pi-defines.sym.
2410         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2411         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2412         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2413         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2414         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2415         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2416         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2417         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2418         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2419         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2420         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2421         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2422         * tst-mutex2.c: Likewise.
2423         * tst-mutex3.c: Likewise.
2424         * tst-mutex4.c: Likewise.
2425         * tst-mutex5.c: Likewise.
2426         * tst-mutex6.c: Likewise.
2427         * tst-mutex7.c: Likewise.
2428         * tst-mutex7a.c: Likewise.
2429         * tst-mutex8.c: Likewise.
2430         * tst-mutex9.c: Likewise.
2431         * tst-robust1.c: Likewise.
2432         * tst-robust7.c: Likewise.
2433         * tst-robust8.c: Likewise.
2434         * tst-mutexpi1.c: New file.
2435         * tst-mutexpi2.c: New file.
2436         * tst-mutexpi3.c: New file.
2437         * tst-mutexpi4.c: New file.
2438         * tst-mutexpi5.c: New file.
2439         * tst-mutexpi6.c: New file.
2440         * tst-mutexpi7.c: New file.
2441         * tst-mutexpi7a.c: New file.
2442         * tst-mutexpi8.c: New file.
2443         * tst-mutexpi9.c: New file.
2444         * tst-robust1.c: New file.
2445         * tst-robust2.c: New file.
2446         * tst-robust3.c: New file.
2447         * tst-robust4.c: New file.
2448         * tst-robust5.c: New file.
2449         * tst-robust6.c: New file.
2450         * tst-robust7.c: New file.
2451         * tst-robust8.c: New file.
2452         * Makefile (tests): Add the new tests.
2454         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2455         * pthread_mutex_destroy.c: Remove unneeded label.
2457 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2459         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2460         computations to compile time.
2462 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2464         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2466 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2468         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2470 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2472         * pthread_key_create.c (__pthread_key_create): Do away with
2473         __pthread_keys_lock.
2475         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2476         (__kernel_cpumask_size): Mark as hidden.
2477         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2479         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2480         * semaphoreP.h (__sem_mappings_lock): Likewise.
2482 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2484         * pthread_atfork.c: Mark __dso_handle as hidden.
2486 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2488         [BZ #2644]
2489         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2490         the reload problem.  Change the one path in pthread_cancel_init
2491         which causes the problem.  Force gcc to reload.  Simplify callers.
2492         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2493         (_Unwind_GetBSP): Undo last patch.
2495 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2497         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2498         function pointer is reloaded after pthread_cancel_init calls.
2500         [BZ #2644]
2501         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2502         pointers are reloaded after pthread_cancel_init calls.
2504 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2506         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2507         __always_inline.
2509 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2511         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2512         Allocate new object which is passed to timer_sigev_thread so that
2513         the timer can be deleted before the new thread is scheduled.
2515 2006-04-26  Roland McGrath  <roland@redhat.com>
2517         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2519 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2521         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2522         suffix for conditional jumps.
2523         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2524         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2525         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2526         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2527         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2528         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2530         * init.c (sigcancel_handler): Compare with correct PID even if the
2531         thread is in the middle of a fork call.
2532         (sighandler_setxid): Likewise.
2533         Reported by Suzuki K P <suzuki@in.ibm.com> .
2535 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2537         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2539 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2541         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2542         fails [Coverity CID 105].
2544 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2546         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2548 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2550         [BZ #2505]
2551         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2552         Define __lll_rel_instr using lwsync.
2554 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2556         * allocatestack.c (allocate_stack): Always initialize robust_head.
2557         * descr.h: Define struct robust_list_head.
2558         (struct pthread): Use robust_list_head in robust mutex list definition.
2559         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2560         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2561         (__pthread_initialize_minimal_internal): Register robust_list with
2562         the kernel.
2563         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2564         Declare __set_robust_list_avail.
2565         * pthread_create.c (start_thread): Register robust_list of new thread.
2566         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2567         waiters.
2568         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2569         number of users, it's unreliable.
2570         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2571         set_robust_list syscall is available.
2572         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2573         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2574         Set robust_head.list_op_pending before trying to lock a robust mutex.
2575         * pthread_mutex_timedlock.c: Likewise.
2576         * pthread_mutex_trylock.c: Likewise.
2577         * pthread_mutex_unlock.c: Likewise for unlocking.
2578         * Makefile (tests): Add tst-robust8.
2579         * tst-robust8.c: New file.
2581 2006-03-08  Andreas Schwab  <schwab@suse.de>
2583         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2584         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2586 2006-03-05  Roland McGrath  <roland@redhat.com>
2588         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2589         and $config_os doesn't match *linux*.
2591 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2593         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2594         Use __syscall_error.
2595         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2596         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2597         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2598         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2599         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2600         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2602 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2604         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2606 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2608         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2609         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2610         mutex.
2611         (__lll_robust_timedlock_wait): Likewise.
2612         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2613         (__lll_robust_lock_wait): Likewise.
2614         (__lll_robust_timedlock_wait): Likewise.
2615         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2616         (__lll_robust_lock_wait): Likewise.
2617         (__lll_robust_timedlock_wait): Likewise.
2619 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2621         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2622         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2623         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2624         lll_robust_mutex_unlock): Define.
2625         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2627 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2629         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2630         instead of <clone.S>.
2632 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2634         * Makefile (libpthread-routines): Add
2635         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2636         and pthread_mutex_[sg]etprioceiling.
2637         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2638         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2639         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2640         pthread_mutex_setprioceiling.
2641         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2642         PTHREAD_PRIO_PROTECT): New enum values.
2643         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2644         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2645         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2646         prototypes.
2647         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2648         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2649         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2650         Define.
2651         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2652         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2653         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2654         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2655         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2656         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2657         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2658         protocol mutexes.
2659         * pthread_mutex_getprioceiling.c: New file.
2660         * pthread_mutex_setprioceiling.c: New file.
2661         * pthread_mutexattr_getprioceiling.c: New file.
2662         * pthread_mutexattr_setprioceiling.c: New file.
2663         * pthread_mutexattr_getprotocol.c: New file.
2664         * pthread_mutexattr_setprotocol.c: New file.
2666 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2668         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2670 2006-02-27  Roland McGrath  <roland@redhat.com>
2672         * sysdeps/pthread/Subdirs: List nptl here too.
2673         * configure (libc_add_on_canonical): New variable.
2675         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2677         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2678         self to get main source tree's file.
2679         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2680         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2681         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2682         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2683         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2684         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2685         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2686         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2687         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2688         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2689         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2690         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2691         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2693         * Makefile: Use $(sysdirs) in vpath directive.
2695         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2696         (CPPFLAGS-timer_routines.c): Likewise.
2698         * Makeconfig (includes): Variable removed.
2700 2006-02-26  Roland McGrath  <roland@redhat.com>
2702         * sysdeps/generic/pt-raise.c: Moved to ...
2703         * pt-raise.c: ... here.
2704         * sysdeps/generic/lowlevellock.h: Moved to ...
2705         * lowlevellock.h: ... here.
2707 2006-02-23  Roland McGrath  <roland@redhat.com>
2709         * descr.h (struct pthread): Add final member `end_padding'.
2710         (PTHREAD_STRUCT_END_PADDING): Use it.
2712 2006-02-20  Roland McGrath  <roland@redhat.com>
2714         * sysdeps/mips: Directory removed, saved in ports repository.
2715         * sysdeps/unix/sysv/linux/mips: Likewise.
2717 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2719         * tst-robust1.c: Add second mutex to check that the mutex list is
2720         handled correctly.
2722 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2724         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2725         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2726         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2727         lll_robust_mutex_unlock): New macros.
2728         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2729         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2730         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2731         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2732         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2734 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2736         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2737         definitions.
2738         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2740 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2742         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2743         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2744         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2745         (lll_robust_mutex_unlock): Likewise.
2747 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2749         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2750         Set robust_list.__next rather than robust_list.
2751         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2752         (__pthread_list_t): New typedef.
2753         (pthread_mutex_t): Replace __next and __prev fields with __list.
2754         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2755         (__pthread_list_t): New typedef.
2756         (pthread_mutex_t): Replace __next and __prev fields with __list.
2757         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2758         (__pthread_list_t, __pthread_slist_t): New typedefs.
2759         (pthread_mutex_t): Replace __next and __prev fields with __list.
2760         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2761         (__pthread_list_t, __pthread_slist_t): New typedefs.
2762         (pthread_mutex_t): Replace __next and __prev fields with __list.
2763         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2764         (__pthread_list_t, __pthread_slist_t): New typedefs.
2765         (pthread_mutex_t): Replace __next and __prev fields with __list.
2766         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2767         (__pthread_slist_t): New typedef.
2768         (pthread_mutex_t): Replace __next field with __list.
2770 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2772         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2773         PTHREAD_MUTEX_OWNERDEAD.
2774         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2775         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2776         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2777         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2778         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2779         to PTHREAD_MUTEX_INCONSISTENT.
2780         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2781         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2782         * pthread_mutex_trylock.c: Likewise.
2783         * pthread_mutex_timedlock.c: Likewise.
2784         * pthread_mutex_unlock.c: Likewise.
2785         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2786         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2787         lowlevelrobustlock.sym.
2788         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2789         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2790         definitions.
2791         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2792         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2793         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2794         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2795         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2797 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2799         * allocatestack.c (allocate_stack): Initialize robust_list.
2800         * init.c (__pthread_initialize_minimal_internal): Likewise.
2801         * descr.h (struct xid_command): Pretty printing.
2802         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2803         robust_list.  Adjust macros.
2804         * pthread_create.c (start_thread): Adjust robust_list handling.
2805         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2806         but the owner for all robust mutex types.
2807         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2808         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2809         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2810         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2812         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2813         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2815 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2817         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2818         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2820 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2822         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2823         Return status.
2824         (lll_futex_timed_wait): Define.
2826 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2828         * tst-cancel4.c: Test ppoll.
2830 2006-01-18  Andreas Jaeger  <aj@suse.de>
2832         [BZ #2167]
2833         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2834         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2835         by Jim Gifford <patches@jg555.com>.
2837 2006-01-13  Richard Henderson  <rth@redhat.com>
2839         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2841 2006-01-10  Roland McGrath  <roland@redhat.com>
2843         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2844         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2845         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2846         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2847         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2848         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2849         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2850         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2851         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2852         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2854 2006-01-09  Roland McGrath  <roland@redhat.com>
2856         * tst-initializers1-c89.c: New file.
2857         * tst-initializers1-c99.c: New file.
2858         * tst-initializers1-gnu89.c: New file.
2859         * tst-initializers1-gnu99.c: New file.
2860         * Makefile (tests): Add them.
2861         (CFLAGS-tst-initializers1-c89.c): New variable.
2862         (CFLAGS-tst-initializers1-c99.c): New variable.
2863         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2864         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2866         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2867         Use __extension__ on anonymous union definition.
2868         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2869         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2870         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2871         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2872         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2874 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2876         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2877         Don't give the union a name because it changes the mangled name.
2878         Instead name the struct for __data.
2879         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2880         Likewise.
2881         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2882         Likewise.
2884 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2886         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2887         stack bias to mc_ftp field.
2889 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2891         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2892         being too clever and reloading the futex value where it shouldn't.
2894 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2896         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2897         correct type.
2899 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2901         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2902         Add cfi directives.
2904 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2906         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2907         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2908         rename in tcbhead_t.
2910         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2911         Don't give the union a name because it changes the mangled name.
2912         Instead name the struct for __data.
2913         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2914         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2915         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2916         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2917         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2918         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2920 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2922         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2923         Return status.
2924         (lll_futex_timed_wait): Define.
2925         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2926         * sysdeps/pthread/aio_misc.h: New file.
2928 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2930         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2932 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2934         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2935         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2936         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2938 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2940         * tst-cancel24.cc: Use C headers instead of C++ headers.
2942 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2944         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2945         sparc-linux configured glibc.
2946         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2947         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2948         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2949         atomic_compare_and_exchange_val_24_acq instead of
2950         atomic_compare_and_exchange_val_acq.
2951         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2952         instead of atomic_exchange_rel.
2953         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2954         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2955         file.
2956         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2957         file.
2958         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2959         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2960         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2961         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2962         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2963         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2964         New file.
2965         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2966         New file.
2967         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2968         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2969         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2970         file.
2971         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2972         file.
2973         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2975 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2977         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2978         mutex initializers.
2980 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2982         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2983         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2984         THREAD_COPY_POINTER_GUARD): Define.
2985         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2986         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2988 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2990         * version.c: Update copyright year.
2992 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2994         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2995         .eh_frame section, use cfi_* directives.
2996         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2998 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
3000         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
3001         now.
3003 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
3005         * sysdeps/pthread/sigaction.c: Removed.
3006         * sigaction.c: New file.
3007         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
3009 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
3011         * Makefile (tests): Add tst-signal7.
3012         * tst-signal7.c: New file.
3014 2005-12-27  Roland McGrath  <roland@redhat.com>
3016         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
3017         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
3018         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
3019         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
3020         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
3021         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3022         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3023         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3024         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3025         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
3026         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3028 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
3030         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
3031         and __prev field to pthread_mutex_t.
3032         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3033         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3034         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3035         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3036         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
3037         to pthread_mutex_t.
3039 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
3041         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
3042         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
3043         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
3044         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
3045         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
3046         and PTHREAD_MUTEXATTR_FLAG_BITS.
3047         * descr.h (struct pthread): Add robust_list field and define
3048         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
3049         * pthread_mutexattr_getrobust.c: New file.
3050         * pthread_mutexattr_setrobust.c: New file.
3051         * pthread_mutex_consistent.c: New file.
3052         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
3053         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3054         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
3055         Adjust pthread_mutex_t initializers.
3056         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
3057         field to pthread_mutex_t.
3058         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
3059         and __prev field to pthread_mutex_t.
3060         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
3061         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
3062         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
3063         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
3064         * pthread_mutexattr_gettype.c: Likewise.
3065         * pthread_mutexattr_setpshared.c: Likewise.
3066         * pthread_mutexattr_settype.c: Likewise.
3067         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
3068         Initialize mutex kind according to robust flag.
3069         * pthread_mutex_lock.c: Implement local robust mutex.
3070         * pthread_mutex_timedlock.c: Likewise.
3071         * pthread_mutex_trylock.c: Likewise.
3072         * pthread_mutex_unlock.c: Likewise.
3073         * pthread_create.c (start_thread): Mark robust mutexes which remained
3074         locked as dead.
3075         * tst-robust1.c: New file.
3076         * tst-robust2.c: New file.
3077         * tst-robust3.c: New file.
3078         * tst-robust4.c: New file.
3079         * tst-robust5.c: New file.
3080         * tst-robust6.c: New file.
3081         * tst-robust7.c: New file.
3082         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
3083         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
3084         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
3085         tst-robust5, tst-robust6, and tst-robust7.
3087         * tst-typesizes.c: New file.
3088         * Makefile (tests): Add tst-typesizes.
3090         * tst-once3.c: More debug output.
3092 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3094         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3095         missing after last change.
3097         * version.c: Update copyright year.
3099 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3101         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3102         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3103         * pthread_mutex_trylock.c: Likewise.
3104         * pthread_mutex_timedlock.c: Likewise.
3105         * pthread_mutex_unlock.c: Likewise.
3107 2005-12-22  Roland McGrath  <roland@redhat.com>
3109         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3110         so that #include_next's search location is not reset to the -I..
3111         directory where <nptl/...> can be found.
3113 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3115         [BZ #1913]
3116         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3117         Fix unwind info.  Remove useless branch prediction prefix.
3118         * tst-cancel24.cc: New file.
3119         * Makefile: Add rules to build and run tst-cancel24.
3121 2005-12-21  Roland McGrath  <roland@redhat.com>
3123         * libc-cancellation.c: Use <> rather than "" #includes.
3124         * pt-cleanup.c: Likewise.
3125         * pthread_create.c: Likewise.
3126         * pthread_join.c: Likewise.
3127         * pthread_timedjoin.c: Likewise.
3128         * pthread_tryjoin.c: Likewise.
3129         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3130         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3131         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3132         * unwind.c: Likewise.
3134 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3136         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3137         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3138         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3139         THREAD_COPY_POINTER_GUARD): Define.
3141 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3143         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3144         rather than one.
3145         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3146         THREAD_COPY_POINTER_GUARD): Define.
3147         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3148         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3149         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3150         THREAD_COPY_POINTER_GUARD): Define.
3151         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3152         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3153         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3154         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3155         Use PTR_DEMANGLE for B0 if defined.
3157 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3159         * pthread_create.c (__pthread_create_2_1): Use
3160         THREAD_COPY_POINTER_GUARD if available.
3161         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3162         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3163         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3164         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3165         * sysdeps/x86_64/tls.h: Likewise.
3167 2005-12-15  Roland McGrath  <roland@redhat.com>
3169         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3171 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3173         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3174         sysdeps/generic.
3175         * errno-loc.c: New file.
3177 2005-12-12  Roland McGrath  <roland@redhat.com>
3179         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3180         adjustments before choosing stack size.  Update minimum stack size
3181         calculation to match allocate_stack change.
3183 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3185         * allocatestack.c (allocate_stack): Don't demand that there is an
3186         additional full page available on the stack beside guard, TLS, the
3187         minimum stack.
3189 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3191         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3192         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3194         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3195         compiling 32-bit code we must define __cleanup_fct_attribute.
3197 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3199         [BZ #1920]
3200         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3201         __attribute__ instead of __attribute.
3202         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3203         (__cleanup_fct_attribute): Likewise.
3205 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3207         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3208         a write barrier before writing libgcc_s_getcfa.
3210 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3212         * sysdeps/unix/sysv/linux/configure: Removed.
3214 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3216         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3217         optional init_array/fini_array support.
3219 2005-10-24  Roland McGrath  <roland@redhat.com>
3221         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3222         versioned_symbol use.
3224 2005-10-16  Roland McGrath  <roland@redhat.com>
3226         * init.c (__pthread_initialize_minimal_internal): Even when using a
3227         compile-time default stack size, apply the minimum that allocate_stack
3228         will require, and round up to page size.
3230 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3232         * Makefile ($(test-modules)): Remove static pattern rule.
3234 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3235             Ulrich Drepper  <drepper@redhat.com>
3237         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3238         alignment in callback function.
3239         * Makefile: Add rules to build and run tst-align3.
3240         * tst-align3.c: New file.
3242 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3244         * allocatestack.c (setxid_signal_thread): Add
3245         INTERNAL_SYSCALL_DECL (err).
3247 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3249         * allocatestack.c (setxid_signal_thread): Need to use
3250         atomic_compare_and_exchange_bool_acq.
3252 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3253             Jakub Jelinek  <jakub@redhat.com>
3255         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3256         CANCEL_RESTMASK.
3257         (struct pthread): Move specific_used field to avoid padding.
3258         Add setxid_futex field.
3259         * init.c (sighandler_setxid): Reset setxid flag and release the
3260         setxid futex.
3261         * allocatestack.c (setxid_signal_thread): New function.  Broken
3262         out of the bodies of the two loops in __nptl_setxid.  For undetached
3263         threads check whether they are exiting and if yes, don't send a signal.
3264         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3265         * pthread_create.c (start_thread): For undetached threads, check
3266         whether setxid bit is set.  If yes, wait until signal has been
3267         processed.
3269         * allocatestack.c (STACK_VARIABLES): Initialize them.
3270         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3272 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3274         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3275         waiters, awake all waiters on the associated mutex.
3277 2005-09-22  Roland McGrath  <roland@redhat.com>
3279         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3280         ../sysdeps/x86_64/hp-timing.h).
3282 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3284         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3285         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3286         (lll_futex_wake_unlock): Define.
3287         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3288         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3289         (lll_futex_wake_unlock): Define.
3290         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3291         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3292         (lll_futex_wake_unlock): Define.
3293         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3294         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3295         (lll_futex_wake_unlock): Define.
3296         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3297         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3298         (lll_futex_wake_unlock): Define.
3299         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3300         lll_futex_wake_unlock.
3301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3302         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3303         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3304         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3305         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3306         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3308 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3310         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3311         Fix typo in register name.
3313 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3315         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3316         Use __sigfillset.  Document that sigfillset does the right thing wrt
3317         to SIGSETXID.
3319 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3321         [BZ #1102]
3322         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3323         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3324         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3325         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3326         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3327         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3328         in the structure.
3329         * Makefile (tests): Add tst-initializers1.
3330         (CFLAGS-tst-initializers1.c): Set.
3331         * tst-initializers1.c: New test.
3333 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3335         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3336         Make sure __flags are located at offset 48 from the start of the
3337         structure.
3339 2005-07-02  Roland McGrath  <roland@redhat.com>
3341         * Makeconfig: Comment fix.
3343 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3345         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3346         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3347         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3348         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3349         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3350         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3351         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3352         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3353         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3354         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3356 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3358         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3359         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3360         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3361         fields.
3362         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3363         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3364         field.  Put in sysinfo field unconditionally.
3365         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3366         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3367         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3368         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3369         fields.
3370         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3371         * pthread_create.c (__pthread_create_2_1): Use
3372         THREAD_COPY_STACK_GUARD macro.
3373         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3374         tests.
3375         * tst-stackguard1.c: New file.
3376         * tst-stackguard1-static.c: New file.
3378 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3380         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3381         Invoke CGOTSETUP and CGOTRESTORE.
3382         (CGOTSETUP, CGOTRESTORE): Define.
3384 2005-05-29  Richard Henderson  <rth@redhat.com>
3386         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3387         (tf_write, tf_writev): Use it.
3388         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3389         the system minimum.
3391 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3393         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3394         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3395         __librt_*_asynccancel@local.
3397 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3399         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3400         all occurrences of JUMPTARGET.  Instead append @local to labels.
3402 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3404         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3405         size/alignment of struct pthread rather than tcbhead_t.
3406         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3407         Likewise.
3408         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3409         Likewise.
3410         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3411         Likewise.
3413 2005-05-19  Richard Henderson  <rth@redhat.com>
3415         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3416         __sync_val_compare_and_swap, not explicit _si variant.
3417         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3419 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3421         [BZ #915]
3422         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3424 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3426         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3427         .eh_frame section, use cfi_* directives.
3429 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3431         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3432         of "" includes.
3434 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3436         [BZ #1075]
3437         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3438         aio_write blocks.
3440 2005-04-27  Roland McGrath  <roland@redhat.com>
3442         * Makefile (tests): Remove tst-clock2.
3444         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3445         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3446         translating to the kernel clockid_t for our own process/thread clock.
3448         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3450 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3452         * old_pthread_cond_init.c: Include <errno.h>.
3453         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3454         process shared or uses clock other than CLOCK_REALTIME.
3455         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3457 2005-04-13  David S. Miller  <davem@davemloft.net>
3459         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3460         * sysdeps/sparc/sparc64/clone.S: New file.
3462 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3464         [BZ #1102]
3465         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3466         __inline instead of inline.
3467         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3469 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3471         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3472         functionally equivalent, but shorter instructions.
3473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3474         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3475         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3476         Likewise.
3477         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3478         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3479         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3480         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3482         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3483         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3484         Likewise.
3485         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3486         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3487         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3488         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3489         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3491 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3493         * sysdeps/mips/Makefile: New file.
3494         * sysdeps/mips/nptl-sysdep.S: New file.
3495         * sysdeps/mips/tcb-offsets.sym: New file.
3496         * sysdeps/mips/pthread_spin_lock.S: New file.
3497         * sysdeps/mips/pthread_spin_trylock.S: New file.
3498         * sysdeps/mips/pthreaddef.h: New file.
3499         * sysdeps/mips/tls.h: New file.
3500         * sysdeps/mips/jmpbuf-unwind.h: New file.
3501         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3502         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3503         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3504         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3505         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3506         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3507         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3508         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3509         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3510         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3512 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3514         [BZ #1112]
3515         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3516         variable to scerr.
3518 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3520         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3522 2005-02-25  Roland McGrath  <roland@redhat.com>
3524         * alloca_cutoff.c: Correct license text.
3525         * tst-unload.c: Likewise.
3526         * sysdeps/pthread/allocalim.h: Likewise.
3527         * sysdeps/pthread/pt-initfini.c: Likewise.
3528         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3529         * sysdeps/pthread/bits/sigthread.h: Likewise.
3530         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3531         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3533 2005-02-16  Roland McGrath  <roland@redhat.com>
3535         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3536         Use unsigned int * for ptr_nthreads.
3538 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3540         [BZ #721]
3541         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3542         gcc4.
3544 2005-02-07  Richard Henderson  <rth@redhat.com>
3546         [BZ #787]
3547         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3548         argument.
3550 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3552         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3553         order of arguments in invocation of atomic_add_zero.
3555 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3557         [BZ #737]
3558         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3559         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3560         at least gotntpoff relocation and addition.
3561         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3562         Likewise.
3563         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3564         Likewise.
3565         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3566         Likewise.
3568 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3570         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3571         entry for static tls deallocation fix.
3572         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3573         also contains information whether the memory pointed to is static
3574         TLS or not.
3575         * sysdeps/i386/tls.h: Likewise.
3576         * sysdeps/ia64/tls.h: Likewise.
3577         * sysdeps/powerpc/tls.h: Likewise.
3578         * sysdeps/s390/tls.h: Likewise.
3579         * sysdeps/sh/tls.h: Likewise.
3580         * sysdeps/sparc/tls.h: Likewise.
3581         * sysdeps/x86_64/tls.h: Likewise.
3583 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3585         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3587 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3589         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3590         %esp.
3591         * Makefile (tests): Add tst-align2.
3592         * tst-align2.c: New test.
3593         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3594         -mpreferred-stack-boundary=4.
3596 2004-12-18  Roland McGrath  <roland@redhat.com>
3598         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3599         New file removed withdrawn for the moment.
3601 2004-12-17  Richard Henderson  <rth@redhat.com>
3603         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3604         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3606 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3608         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3609         Increased PTHREAD_STACK_MIN.
3611         * tst-context1.c (stacks): Use bigger stack size.
3613 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3615         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3616         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3618 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3620         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3621         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3622         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3624 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3626         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3628 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3630         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3631         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3633         * tst-getpid1.c: If child crashes, report this first.  Print which
3634         signal.
3636 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3638         * init.c (__pthread_initialize_minimal_internal): Also unblock
3639         SIGSETXID.
3641 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3643         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3644         _POSIX_THREAD_CPUTIME): Define to 0.
3645         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3646         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3647         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3648         __timer_signal_thread_tclk): Remove.
3649         (init_module): Remove their initialization.
3650         (thread_cleanup): Remove their cleanup assertions.
3651         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3652         __timer_signal_thread_tclk): Remove.
3653         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3654         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3655         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3657 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3659         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3660         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3662         * Makefile (tests): Add tst-getpid2.
3663         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3664         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3665         * tst-getpid2.c: New test.
3667 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3669         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3671 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3673         * Makefile (tests): Add tst-getpid1.
3674         * tst-getpid1.c: New file.
3675         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3676         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3678 2004-12-02  Roland McGrath  <roland@redhat.com>
3680         * Makefile (libpthread-nonshared): Variable removed.
3681         ($(objpfx)libpthread_nonshared.a): Target removed.
3682         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3683         These are now handled by generic magic from
3684         libpthread-static-only-routines being set.
3686 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3688         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3689         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3690         _POSIX_THREAD_PRIO_PROTECT): Define.
3691         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3692         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3693         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3695 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3697         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3698         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3699         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3700         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3701         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3702         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3703         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3705 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3707         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3709         * Makefile (libpthread-routines): Add pthread_setschedprio.
3710         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3711         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3712         * pthread_setschedprio.c: New file.
3714 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3716         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3717         * pthread_cancel.c (pthread_create): Likewise.
3719         * Makefile (libpthread-routines): Add vars.
3720         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3721         * init.c (__default_stacksize, __is_smp): Remove.
3722         * vars.c: New file.
3723         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3724         and define a wrapper macro.
3725         (PTHREAD_STATIC_FN_REQUIRE): Define.
3726         * allocatestack.c (__find_thread_by_id): Undefine.
3727         * pthread_create (__pthread_keys): Remove.
3728         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3729         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3730         PTHREAD_STATIC_FN_REQUIRE.
3732 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3734         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3735         parameter to REGISTER macro.
3737 2004-11-17  Roland McGrath  <roland@redhat.com>
3739         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3740         Make sure SIGCANCEL is blocked as well.
3742 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3744         * sysdeps/pthread/setxid.h: New file.
3745         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3746         (struct xid_command): Add forward decl.
3747         (struct pthread_functions): Change return type of __nptl_setxid hook
3748         to int.
3749         * pthreadP.h (__nptl_setxid): Change return type to int.
3750         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3751         calling thread, return its return value and set errno on failure.
3752         * descr.h (struct xid_command): Change id type to long array.
3754         * Makefile: Add rules to build and test tst-setuid1 and
3755         tst-setuid1-static.
3756         * tst-setuid1.c: New test.
3757         * tst-setuid1-static.c: New test.
3759 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3761         * Makefile (tests): Add tst-exit3.
3762         * tst-exit3.c: New test.
3764 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3766         * Makefile (tests): Add tst-exit2.
3767         * tst-exit2.c: New file.
3769 2004-11-09  Roland McGrath  <roland@redhat.com>
3771         [BZ #530]
3772         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3773         here, before calling clone.
3774         * pthread_create.c (start_thread): Don't do it here.
3776 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3778         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3780 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3782         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3783         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3784         assembler warning.
3786 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3788         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3789         if sched_priority is not between minprio and maxprio.
3791 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3793         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3794         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3796         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3797         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3799 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3801         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3802         not-cancelable I/O functions.
3804 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3806         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3807         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3808         make sure 2 is stored in the futex and we looked at the old value.
3809         Fix a few other problems to return the correct value.
3811 2004-10-14  Richard Henderson  <rth@redhat.com>
3813         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3814         make gcc4 happy.
3816 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3818         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3819         of pthread-functions.h and pthreaddef.h.
3820         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3822         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3823         Change __data.__nwaiters from int to unsigned int.
3825         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3826         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3828         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3829         before return type.
3831         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3832         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3834 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3836         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3837         test fails, remove message queue.
3838         (tf_msgsnd): Likewise.
3840 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3842         * tst-clock1.c: Change #ifdef to #if defined.
3843         * tst-clock2.c: Likewise.
3844         * tst-cond11.c: Likewise.
3846         * sysdeps/pthread/timer_create.c (timer_create): Use
3847         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3848         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3849         THREAD_CPUTIME.
3851 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3853         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3854         _POSIX_THREAD_CPUTIME): Define to 0.
3856 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3858         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3859         and _POSIX_THREAD_CPUTIME to zero.
3860         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3861         * tst-barrier2.c: Fix testing for POSIX feature.
3862         * tst-clock1.c: Likewise.
3863         * tst-clock2.c: Likewise.
3864         * tst-cond11.c: Likewise.
3865         * tst-cond4.c: Likewise.
3866         * tst-cond6.c: Likewise.
3867         * tst-flock2.c: Likewise.
3868         * tst-mutex4.c: Likewise.
3869         * tst-mutex9.c: Likewise.
3870         * tst-rwlock12.c: Likewise.
3871         * tst-rwlock4.c: Likewise.
3872         * tst-signal1.c: Likewise.
3873         * tst-spin2.c: Likewise.
3874         * sysdeps/pthread/posix-timer.h: Likewise.
3875         * sysdeps/pthread/timer_create.c: Likewise.
3876         * sysdeps/pthread/timer_routines.c: Likewise.
3878 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3880         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3881         (__lll_mutex_timedlock_wait): Address futex correctly.
3883         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3884         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3885         make sure 2 is stored in the futex and we looked at the old value.
3886         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3887         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3888         which might very well made the code not working at all before.
3889         [BZ #417]
3891 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3893         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3894         allow SIGSETXID to be sent.
3895         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3896         for SIGSETXID to be defined.
3897         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3898         SIGSETXID cannot be blocked.
3900         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3901         Add __extension__ to long long types.
3902         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3903         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3904         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3905         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3906         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3907         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3908         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3910 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3912         * descr.h (struct pthread): Add stopped_start field.
3913         * sysdeps/pthread/createthread.c (create_thread): Set
3914         start_stopped flag in descriptor for new thread appropriately.
3915         * pthread_create.c (start_thread): Only take lock to be stopped on
3916         startup if stopped_start flag says so.
3918 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3920         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3921         is created detached and if yes, do not try to free the stack in case
3922         the thread creation failed.
3923         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3924         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3925         case there has been no error.  [BZ #405]
3927         * pthread_create.c (start_thread): Don't wait for scheduler data
3928         etc to be set at the beginning of the function.  The cancellation
3929         infrastructure must have been set up.  And enable async
3930         cancellation before potentially going to sleep.  [BZ #401]
3932 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3934         * Versions: Remove exports for pthread_set*id_np functions.
3935         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3936         for now.
3937         * Makefile: Don't build pthread_set*id code for now.
3939 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3941         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3942         internal use.
3943         * allocatestack.c (__nptl_setxid): New function.
3944         * descr.h (struct xid_command): Define type.
3945         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3946         (sighandler_setxid): New function.
3947         (__pthread_initialize_minimal): Register sighandler_setxid for
3948         SIGCANCEL.
3949         * pt-allocrtsig.c: Update comment.
3950         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3951         Declare __nptl_setxid.
3952         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3953         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3954         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3955         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3956         and pthread_setresuid_np.
3957         * pthread_setgid_np.c: New file.
3958         * pthread_setuid_np.c: New file.
3959         * pthread_setegid_np.c: New file.
3960         * pthread_seteuid_np.c: New file.
3961         * pthread_setregid_np.c: New file.
3962         * pthread_setreuid_np.c: New file.
3963         * pthread_setresgid_np.c: New file.
3964         * pthread_setresuid_np.c: New file.
3965         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3966         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3967         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3968         and pthread_setresuid_np.
3969         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3970         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3971         pthread_setregid, and pthread_setresgid.
3973 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3975         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3976         ENOMEM when out of memory.
3978 2004-09-10  Roland McGrath  <roland@redhat.com>
3980         [BZ #379]
3981         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3982         code, since we don't try to use the broken CLONE_STOPPED any more.
3983         * pthread_create.c (start_thread): Likewise.
3985 2004-09-15  Richard Henderson  <rth@redhat.com>
3987         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3989 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3991         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3992         (__libc_unwind_longjmp): Delete macro and declare as function.
3993         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3994         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3995         nptl directory.
3996         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3997         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3998         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
4000 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
4002         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
4003         for __USE_XOPEN2K.
4004         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
4005         types also for __USE_XOPEN2K.
4006         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4007         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4008         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4009         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4010         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4011         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4012         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4013         [BZ #320]
4015 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
4017         * sysdeps/pthread/pthread.h
4018         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
4019         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
4020         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
4021         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
4022         [BZ #375]
4024 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
4026         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
4027         PSEUDO to be used with . prefix.
4029         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
4030         Use atomic_increment instead of atomic_exchange_and_add.
4031         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
4032         Likewise.
4033         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
4034         Likewise.
4035         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
4036         Likewise.
4038         * allocatestack.c (allocate_stack): Use atomic_increment_val
4039         instead of atomic_exchange_and_add.
4040         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
4041         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
4042         Likewise.
4043         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4044         Likewise.
4046         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
4047         the initialization function might throw.
4049 2005-09-05  Richard Henderson  <rth@redhat.com>
4051         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4052         Move definition inside libpthread, libc, librt check.  Provide
4053         definition for rtld.
4055 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
4057         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
4058         * sysdeps/i386/jmpbuf-unwind.h: Likewise
4059         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
4060         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
4061         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
4062         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
4063         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
4064         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
4065         * unwind.c: Use it.
4067         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4068         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
4069         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4070         Likewise.
4071         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4072         Decrement __nwaiters.  If pthread_cond_destroy has been called and
4073         this is the last waiter, signal pthread_cond_destroy caller and
4074         avoid using the pthread_cond_t structure after unlock.
4075         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
4076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4077         Read clock type from the least significant bits of __nwaiters instead
4078         of __clock.
4079         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4080         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
4082 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
4084         [BZ #342]
4085         * Makefile (tests): Add tst-cond20 and tst-cond21.
4086         * tst-cond20.c: New test.
4087         * tst-cond21.c: New test.
4088         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4089         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4090         it unsigned int.
4091         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4092         Likewise.
4093         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4094         (pthread_cond_t): Likewise.
4095         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4096         Likewise.
4097         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4098         Likewise.
4099         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4100         Likewise.
4101         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4102         (cond_nwaiters): New.
4103         (clock_bits): New.
4104         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4105         if there are waiters not signalled yet.
4106         Wait until all already signalled waiters wake up.
4107         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4108         __nwaiters.  If pthread_cond_destroy has been called and this is the
4109         last waiter, signal pthread_cond_destroy caller and avoid using
4110         the pthread_cond_t structure after unlock.
4111         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4112         decrement it when leaving.  If pthread_cond_destroy has been called
4113         and this is the last waiter, signal pthread_cond_destroy caller.
4114         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4115         Likewise.  Read clock type from the least significant bits of
4116         __nwaiters instead of __clock.
4117         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4118         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4119         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4120         clock type just from the last COND_CLOCK_BITS bits of value.
4121         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4122         instead of __clock, just from second bit of condattr's value.
4124 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4126         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4127         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4128         != 64.
4129         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4131 2004-08-15  Roland McGrath  <roland@frob.com>
4133         * pthread_atfork.c: Update copyright terms including special exception
4134         for these trivial files, which are statically linked into executables
4135         that use dynamic linking for the significant library code.
4137 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4139         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4140         pthread_rwlock_rdlock.
4141         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4142         Decrease __nr_readers_queued after reacquiring lock.
4143         * sysdeps/pthread/pthread_rwlock_timedrdlock
4144         (pthread_rwlock_timedrdlock): Likewise.
4145         Reported by Bob Cook <bobcook47@hotmail.com>.
4147 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4149         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4150         before pthread_barrier_wait.
4152 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4155         Remove unnecessary exception handling data.
4157 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4159         [BZ #284]
4160         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4161         instead of clockid_t.
4163 2004-07-21  Roland McGrath  <roland@redhat.com>
4165         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4167 2004-07-19  Roland McGrath  <roland@redhat.com>
4169         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4171 2004-07-02  Roland McGrath  <roland@redhat.com>
4173         * configure: Don't exit.
4175 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4177         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4178         (__pthread_cond_timedwait): Check for invalid nanosecond in
4179         timeout value.
4181 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4183         * Makefile: Add rules to build and run tst-fini1.
4184         * tst-fini1.c: New file.
4185         * tst-fini1mod.c: New file.
4187 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4189         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4190         if no cancellation support is needed.
4191         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4192         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4193         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4194         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4195         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4196         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4197         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4198         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4199         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4201         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4202         only if not already defined.
4204 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4206         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4207         constraint "m" instead of "0" for futex.
4209         * shlib-versions: Add powerpc64-.*-linux.*.
4211 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4213         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4214         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4215         for valid tv_nsec.
4216         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4217         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4218         bits.
4220 2004-06-29  Roland McGrath  <roland@redhat.com>
4222         * Banner: NPTL no longer has its own version number.
4223         * Makefile (nptl-version): Variable removed.
4224         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4225         using $(version), the glibc version number.
4227 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4229         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4230         Fix branch offset for a PLT entry.
4231         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4232         Likewise.
4233         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4234         Likewise.
4235         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4236         Likewise.
4237         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4238         Likewise.
4240 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4242         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4243         unconditionally.
4245 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4247         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4248         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4249         instead of tv_sec.
4250         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4251         (pthread_rwlock_timedrdlock): Likewise.
4253 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4255         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4256         Set __r7 to val, not mutex.
4258 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4260         * Makefile: Add rules to build tst-rwlock14.
4261         * tst-rwlock14.c: New file.
4263 2004-06-24  Boris Hu  <boris.hu@intel.com>
4265         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4266         check.
4267         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4269 2004-06-19  Andreas Jaeger  <aj@suse.de>
4271         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4272         assembler in last patch.
4274 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4276         * sysdeps/pthread/pthread_cond_timedwait.c
4277         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4279         (__pthread_cond_timedwait): Check for invalid nanosecond in
4280         timeout value.
4281         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4282         * tst-cond19.c: New file.
4283         * Makefile: Add rules to build and run tst-cond19.
4285 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4287         * tst-context1.c (GUARD_PATTERN): Defined.
4288         (tst_context_t): Define struct containing ucontext_t & guard words.
4289         (ctx): Declare as an array of tst_context_t.
4290         (fct): Verify uc_link & guard words are still valid.
4291         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4293 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4295         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4296         Add __data.__futex field, reshuffle __data.__clock.
4297         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4298         (__pthread_cond_signal): Increment __futex at the same time as
4299         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4300         address of low 32-bits of __wakeup_seq to futex syscall.
4301         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4302         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4303         releasing internal lock to FUTEX_WAIT.
4304         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4305         (__pthread_cond_timedwait): Likewise.
4306         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4307         (FUTEX_CMP_REQUEUE): Define.
4308         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4309         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4310         Pass __futex value from before the unlock and __futex address instead
4311         of address of low 32-bits of __wakeup_seq to futex syscall.
4312         Fallback to FUTEX_WAKE all on any errors.
4314 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4316         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4317         comment typo.
4318         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4319         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4320         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4321         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4322         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4324 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4326         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4327         Add memory clobber to inline assembly.
4328         (__lll_mutex_trylock): Likewise.
4329         (__lll_mutex_cond_trylock): Likewise.
4331 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4333         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4334         Pass val argument as 6th system call argument in %r7.
4336 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4338         * Makefile (tests): Add tst-cond16.
4339         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4340         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4341         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4342         Add __data.__futex field, reshuffle __data.__clock.
4343         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4344         (__pthread_cond_signal): Increment __futex at the same time as
4345         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4346         address of low 32-bits of __wakeup_seq to futex syscall.
4347         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4348         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4349         releasing internal lock to FUTEX_WAIT.
4350         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4351         (__pthread_cond_timedwait): Likewise.
4352         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4353         (FUTEX_CMP_REQUEUE): Define.
4354         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4355         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4356         Pass __futex value from before the unlock and __futex address instead
4357         of address of low 32-bits of __wakeup_seq to futex syscall.
4358         Fallback to FUTEX_WAKE all on any errors.
4359         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4360         Define.
4361         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4362         internally.  Return non-zero if error, zero if success.
4363         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4364         Add __data.__futex field, reshuffle __data.__clock.
4365         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4366         Define.
4367         (lll_futex_requeue): Add val argument, return 1 unconditionally
4368         for the time being.
4369         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4370         Add __data.__futex field, reshuffle __data.__clock.
4371         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4372         Define.
4373         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4374         internally.  Return non-zero if error, zero if success.
4375         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4376         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4377         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4378         Define.
4379         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4380         internally.  Return non-zero if error, zero if success.
4381         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4382         Add __data.__futex field, reshuffle __data.__clock.
4383         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4384         Define.
4385         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4386         internally.  Return non-zero if error, zero if success.
4387         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4388         Add __data.__futex field, reshuffle __data.__clock.
4389         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4390         Add __data.__futex field, reshuffle __data.__clock.
4391         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4392         Increment __futex at the same time as __wakeup_seq or __total_seq.
4393         Pass address of __futex instead of address of low 32-bits of
4394         __wakeup_seq to futex syscall.
4395         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4396         Pass __futex value from before releasing internal lock
4397         to FUTEX_WAIT.
4398         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4399         Likewise.  Avoid unnecessary shadowing of variables.
4400         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4401         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4402         unlock and __futex address instead of address of low 32-bits of
4403         __wakeup_seq to futex_requeue macro, adjust for new return value
4404         meaning.
4405         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4406         (__pthread_cond_signal): Increment __futex at the same time as
4407         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4408         address of low 32-bits of __wakeup_seq to futex syscall.
4409         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4410         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4411         releasing internal lock to FUTEX_WAIT.
4412         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4413         (__pthread_cond_timedwait): Likewise.
4414         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4415         (FUTEX_CMP_REQUEUE): Define.
4416         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4417         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4418         Pass __futex value from before the unlock and __futex address instead
4419         of address of low 32-bits of __wakeup_seq to futex syscall.
4420         Fallback to FUTEX_WAKE all on any errors.
4422 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4424         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4425         Add nop to align the end of critical section.
4426         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4428 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4430         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4431         Add __broadcast_seq field.
4432         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4433         all waiters as woken with woken_seq and bump broadcast counter.
4434         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4435         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4436         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4437         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4439 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4441         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4442         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4443         Reported by Kaz Kojima.
4445 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4447         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4449 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4451         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4452         __broadcast_seq with bc_seq after acquiring internal lock instead of
4453         before it.
4455 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4457         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4458         compilation.
4459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4460         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4461         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4462         (pthread_cond_t): Add __data.__broadcast_seq field.
4463         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4464         (FRAME_SIZE): Define.
4465         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4466         Comment typo fixes.
4467         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4468         Define.
4469         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4470         typo fixes.
4471         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4472         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4473         fixes.
4475 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4477         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4478         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4479         Add __broadcast_seq field.
4480         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4481         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4482         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4483         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4484         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4485         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4486         all waiters as woken with woken_seq and bump broadcast counter.
4487         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4489         __broadcast_seq field.
4490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4491         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4492         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4493         * pthread_cond_init.c: Initialize __broadcast_seq field.
4494         * Makefile (tests): Add tst-cond17 and tst-cond18.
4495         Add .NOTPARALLEL goal.
4496         * tst-cond16.c: New file.  From Jakub.
4497         * tst-cond17.c: New file.  From Jakub.
4498         * tst-cond18.c: New file.  From Jakub.
4500 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4502         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4503         unwind info.
4505         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4506         Parametrize frame size.  Correct some unwind info.
4507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4509 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4511         * tst-stack3.c: Note testing functionality beyond POSIX.
4513 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4515         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4516         Change conditional from ifdef to if.
4518 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4520         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4521         SYSDEP_CANCEL_ERROR): Define.
4522         (PSEUDO): Use it.
4524 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4526         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4528 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4530         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4532 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4534         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4535         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4536         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4537         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4539 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4541         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4542         thread has all signals blocked.
4544 2004-04-18  Andreas Jaeger  <aj@suse.de>
4546         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4547         (SEM_VALUE_MAX): Add missing brace.
4549 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4551         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4552         in rt subdir.
4553         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4554         * sysdeps/pthread/tst-mqueue8x.c: New test.
4555         * tst-cancel4.c: Update comment about message queues.
4557         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4558         return it_value { 0, 0 }.
4559         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4560         like SIGEV_SIGNAL.
4561         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4562         assertion for SIGEV_NONE.
4563         (thread_attr_compare): Compare all attributes, not just a partial
4564         subset.
4566 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4568         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4570 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4572         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4573         Just use a plain number.
4574         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4575         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4576         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4577         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4578         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4579         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4580         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4582 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4584         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4585         frame info.
4586         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4588 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4590         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4591         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4592         of calling sigwaitinfo.
4594 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4596         * allocatestack.c (allocate_stack): Set reported_guardsize
4597         unconditionally.
4598         * pthread_getattr_np.c (pthread_getattr_np): Use
4599         reported_guardsize instead of guardsize.
4600         * descr.h (struct pthread): Add reported_guardsize field.
4602 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4604         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4606 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4608         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4610 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4612         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4613         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4614         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4615         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4616         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4617         Define.
4618         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4619         (_POSIX_MESSAGE_PASSING): Define.
4620         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4621         (_POSIX_MESSAGE_PASSING): Define.
4622         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4623         (_POSIX_MESSAGE_PASSING): Define.
4625 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4627         * tst-context1.c (fct): Check whether correct stack is used.
4629 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4631         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4632         matching constraints for asm mem parameters.
4634         * tst-clock2.c (tf): Don't define unless needed.
4636 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4638         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4639         $(gnulib).
4641 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4643         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4644         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4645         * pthreadP.h: Declare __nptl_deallocate_tsd.
4646         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4647         Adjust caller.
4649         * Makefile (tests): Add tst-tsd5.
4650         * tst-tsd5.c: New file.
4652 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4654         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4655         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4656         is SHLIB_COMPAT check.
4657         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4658         (__pthread_attr_getaffinity_old): Likewise.
4659         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4660         (__pthread_getaffinity_old): Likewise.
4661         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4662         (__pthread_setaffinity_old): Likewise.
4664 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4666         * allocatestack.c (_make_stacks_executable): Call
4667         _dl_make_stack_executable first.
4669 2004-03-24  Roland McGrath  <roland@redhat.com>
4671         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4672         constraint instead of "0".
4674 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4676         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4677         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4679         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4680         code to avoid warning.
4682 2004-03-24  Andreas Jaeger  <aj@suse.de>
4684         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4685         (__pthread_attr_setaffinity_old): Remove const.
4687 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4689         * sysdeps/unix/sysv/linux/smp.h: New file.
4690         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4691         * init.c: Define __is_smp.
4692         (__pthread_initialize_minimal_internal): Call is_smp_system to
4693         initialize __is_smp.
4694         * pthreadP.h: Declare __is_smp.
4695         Define MAX_ADAPTIVE_COUNT is necessary.
4696         * pthread_mutex_init.c: Add comment regarding __spins field.
4697         * pthread_mutex_lock.c: Implement adaptive mutex type.
4698         * pthread_mutex_timedlock.c: Likewise.
4699         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4700         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4701         Add __spins field.
4702         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4703         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4704         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4705         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4706         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4707         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4708         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4709         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4710         lll_mutex_cond_trylock.
4711         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4712         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4713         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4714         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4715         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4716         Define BUSY_WAIT_NOP.
4717         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4718         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4720         * tst-mutex5.c: Add support for testing adaptive mutexes.
4721         * tst-mutex7.c: Likewise.
4722         * tst-mutex5a.c: New file.
4723         * tst-mutex7a.c: New file.
4724         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4726         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4727         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4728         vgettimeofday call might destroy the content.
4730         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4731         @pause in the loop.
4733         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4734         No need to restrict type of ret.  Make it int.  Add comment.
4736         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4737         Remove unnecessary setne instruction.
4739 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4741         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4742         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4743         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4744         If realloc fails, break out of the loop.
4746 2004-03-20  Andreas Jaeger  <aj@suse.de>
4748         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4749         (__pthread_setaffinity_old): Fix interface.
4750         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4751         (__pthread_getaffinity_old): Likewise.
4753         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4754         (__pthread_setaffinity_new): Remove duplicate declaration.
4756 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4758         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4759         the return value to a safe register.
4760         (CDISABLE): Set the function argument correctly.
4762 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4764         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4765         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4766         Rewrite so that only one locked memory operation per round is needed.
4767         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4768         (pthread_barrier_wait): After wakeup, release lock only when the
4769         last thread stopped using the barrier object.
4770         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4771         (__pthread_cond_wait): Don't store mutex address if the current
4772         value is ~0l.  Add correct cleanup support and unwind info.
4773         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4774         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4775         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4776         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4777         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4778         Add correct cleanup support and unwind info.
4779         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4780         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4781         information for syscall wrappers.
4783 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4785         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4786         cpusetsize field, remove next.
4787         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4788         parameter for size of the CPU set.
4789         (pthread_setaffinity_np): Likewise.
4790         (pthread_attr_getaffinity_np): Likewise.
4791         (pthread_attr_setaffinity_np): Likewise.
4792         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4793         interface change, keep compatibility code.
4794         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4795         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4796         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4797         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4798         __pthread_getaffinity_np.
4799         * Versions: Add version for changed interfaces.
4800         * tst-attr3.c: Adjust test for interface change.
4801         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4802         increasing buffer sizes.
4803         * pthread_attr_destroy.c: Remove unused list handling.
4804         * pthread_attr_init.c: Likewise.
4806 2004-03-17  Roland McGrath  <roland@redhat.com>
4808         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4809         first argument to clock_getres so we ever enable kernel timers.
4811 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4813         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4815 2004-03-12  Richard Henderson  <rth@redhat.com>
4817         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4818         oldvalue from CENABLE to CDISABLE.
4820 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4822         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4823         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4824         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4825         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4827 2004-03-11  Richard Henderson  <rth@redhat.com>
4829         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4830         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4831         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4833 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4835         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4836         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4837         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4839 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4841         * forward.c (__pthread_cond_broadcast_2_0,
4842         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4843         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4844         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4846 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4848         * sysdeps/sh/tcb-offsets.sym: Add PID.
4849         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4850         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4852 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4854         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4855         include <sysdep-cancel.h>, vfork is no cancellation point.
4856         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4857         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4858         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4860 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4862         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4863         libc_hidden_def.
4864         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4865         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4866         Likewise.
4867         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4868         Likewise.
4869         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4870         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4871         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4872         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4873         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4875         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4876         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4877         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4878         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4879         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4880         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4882         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4883         a local register for saving old PID.  Negate PID in parent upon exit.
4885         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4886         tcb-offsets.h.
4887         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4888         before syscall, set to the old value in the parent afterwards.
4889         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4890         * sysdeps/unix/sysv/linux/s390/s390-64/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-64/vfork.S: New file.
4895         * sysdeps/s390/tcb-offsets.sym: Add PID.
4897         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4898         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4899         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4900         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4901         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4902         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4904 2004-03-10  Andreas Schwab  <schwab@suse.de>
4906         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4907         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4908         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4910 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4912         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4913         * tst-cancel21.c (do_one_test): Likewise.
4914         Reported by Gordon Jin <gordon.jin@intel.com>.
4916 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4918         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4919         if non-zero and set to INT_MIN if zero.
4920         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4921         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4922         (SAVE_PID, RESTORE_PID): Define.
4923         (__vfork): Use it.
4924         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4925         Use relative path to avoid including NPTL i386/vfork.S.
4926         (SAVE_PID, RESTORE_PID): Define.
4927         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4928         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4929         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4930         tst-vfork2x.
4931         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4932         * tst-vfork1.c: New test.
4933         * tst-vfork2.c: New test.
4934         * tst-vfork1x.c: New test.
4935         * tst-vfork2x.c: New test.
4937 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4939         * sysdeps/i386/tcb-offsets.sym: Add PID.
4940         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4941         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4942         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4944 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4946         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4948 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4950         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4951         _rtld_global_ro.
4953 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4955         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4956         _rtld_global_ro.
4958         * tst-once4.c: Remove unnecessary macro definition.
4960         * tst-mutex7.c (do_test): Limit thread stack size.
4961         * tst-once2.c (do_test): Likewise.
4962         * tst-tls3.c (do_test): Likewise.
4963         * tst-tls1.c (do_test): Likewise.
4964         * tst-signal3.c (do_test): Likewise.
4965         * tst-kill6.c (do_test): Likewise.
4966         * tst-key4.c (do_test): Likewise.
4967         * tst-join4.c (do_test): Likewise.
4968         * tst-fork1.c (do_test): Likewise.
4969         * tst-context1.c (do_test): Likewise.
4970         * tst-cond2.c (do_test): Likewise.
4971         * tst-cond10.c (do_test): Likewise.
4972         * tst-clock2.c (do_test): Likewise.
4973         * tst-cancel10.c (do_test): Likewise.
4974         * tst-basic2.c (do_test): Likewise.
4975         * tst-barrier4.c (do_test): Likewise.
4977 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4979         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4981 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4983         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4984         (__pthread_cond_timedwait): Optimize wakeup test.
4985         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4986         (__pthread_cond_wait): Likewise.
4987         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4988         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4989         Likewise.
4991 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4993         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4994         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4995         the atomic instruction needed.
4996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4997         (__lll_mutex_lock_wait): Likewise.
4999 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
5001         * Makefile (tests): Add tst-cond14 and tst-cond15.
5002         * tst-cond14.c: New file.
5003         * tst-cond15.c: New file.
5005 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
5007         * sysdeps/pthread/createthread.c (create_thread): Remove use of
5008         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
5009         needs to be implemented differently to be useful.
5011 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
5013         * pthread_attr_setschedparam.c: Don't test priority against limits
5014         here.  Set ATTR_FLAG_SCHED_SET flag.
5015         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
5016         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
5017         from parent thread to child.  If attribute is used and scheduling
5018         parameters are not inherited, copy parameters from attribute or
5019         compute them.  Check priority value.
5020         * pthread_getschedparam.c: If the parameters aren't known yet get
5021         them from the kernel.
5022         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
5023         ATTR_FLAG_POLICY_SET flag for thread.
5024         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
5025         and ATTR_FLAG_POLICY_SET.
5027         * sysdeps/pthread/createthread.c: Use tgkill if possible.
5029         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
5030         fail if stack address hasn't been set.  Just return 0.
5032 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
5034         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
5035         libpthread for the files in this list.
5036         (CFLAGS-tst-unload): Removed.
5037         * tst-unload.c (do_test): Don't use complete path for
5038         LIBPHREAD_SO.
5040         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
5041         tst-_res1mod2.
5043 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
5045         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5046         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
5047         operation per round is needed.
5048         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
5049         (__lll_mutex_lock_wait): Likewise.
5051 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
5053         * tst-cancel9.c (cleanup): Don't print to stderr.
5055 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5057         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
5059 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
5061         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
5062         (__syscall_error_handler2): Call CDISABLE.
5063         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
5064         (__syscall_error_handler2): Call CDISABLE.
5066         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5067         Release lock before the loop, don't reacquire it.
5069         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
5071 2004-02-19  Andreas Schwab  <schwab@suse.de>
5073         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5074         Fix last change.
5076 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
5078         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
5079         (pthread_barrier_wait): After wakeup, release lock only when the
5080         last thread stopped using the barrier object.
5081         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
5082         (pthread_barrier_wait): Likewise.
5083         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
5084         Likewise.
5085         * Makefile (tests): Add tst-barrier4.
5086         * tst-barrier4.c: New file.
5088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5089         (__pthread_cond_timedwait): Perform timeout test while holding
5090         internal lock to prevent wakeup race.
5091         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5092         * sysdeps/pthread/pthread_cond_timedwait.c
5093         (__pthread_cond_timedwait): Likewise.
5094         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5095         (__pthread_cond_timedwait): Likewise.
5097 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5099         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5100         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5101         * Makefile (tests): Add tst-rwlock13.
5102         * tst-rwlock13.c: New test.
5104 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5107         (__condvar_tw_cleanup): Little optimization.
5108         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5110 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5112         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5113         libpthread as "lib" parameter to SHLIB_COMPAT.
5114         (__novmx_siglongjmp): Fix typo in function name.
5115         (__novmx_longjmp): Fix typo in function name.
5117 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5119         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5120         __builtin_expect.
5122         * sysdeps/generic/pt-longjmp.c: Moved to...
5123         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5125 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5127         * Makefile (libpthread-routines): Add pt-cleanup.
5128         * pt-longjmp.c: Removed.
5129         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5130         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5131         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5132         Version longjmp, siglongjmp for GLIBC_2.3.4.
5133         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5135 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5137         * sysdeps/pthread/pthread_cond_timedwait.c
5138         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5139         Reuse code.  Add __builtin_expects.
5141         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5142         (__pthread_cond_timedwait): Get internal lock in case timeout has
5143         passed before the futex syscall.
5144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5146 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5148         * allocatestack.c: Pretty printing.
5150         * sysdeps/pthread/createthread.c (create_thread): Don't add
5151         CLONE_DETACHED bit if it is not necessary.
5153 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5155         * pthread_getattr_np.c: Include ldsodefs.h.
5157 2004-01-16  Richard Henderson  <rth@redhat.com>
5159         * allocatestack.c: Don't declare __libc_stack_end.
5160         * init.c (__pthread_initialize_minimal_internal): Likewise.
5161         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5163 2004-01-15  Richard Henderson  <rth@redhat.com>
5165         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5166         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5167         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5168         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5169         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5170         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5171         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5172         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5174 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5176         * init.c (pthread_functions): Make array const.
5178 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5180         * allocatestack.c (__make_stacks_executable): Change interface.
5181         Check parameters.  Pass parameter on to libc counterpart.
5182         * pthreadP.h: Change declaration.
5184 2004-01-13  Richard Henderson  <rth@redhat.com>
5186         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5187         prototype form.
5188         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5189         Likewise.
5191         * sysdeps/alpha/Makefile: New file.
5192         * sysdeps/alpha/tcb-offsets.sym: New file.
5193         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5194         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5196         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5197         on powerpc version.
5199 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5201         * Makefile (tests): Add tst-backtrace1.
5202         * tst-backtrace1.c: New test.
5204 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5206         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5207         register as second parameter to the REGISTER macro.
5208         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5209         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5210         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5211         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5212         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5213         of thread register as second parameter to REGISTER macro in 64 case.
5215 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5217         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5218         (CFLAGS-getpid.o): Defined.
5219         (CFLAGS-getpid.os): Defined.
5221 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5223         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5224         returned for main thread does not overlap with any other VMA.
5225         Patch by Jakub Jelinek.
5227 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5229         * tst-raise1.c: Include stdio.h.
5231 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5233         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5234         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5235         If pid is 0, set it to selftid.
5236         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5237         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5238         != 0, return self->tid without doing a syscall.
5239         * descr.h (struct pthread): Move pid field after tid.
5241         * Makefile (tests): Add tst-raise1.
5242         * tst-raise1.c: New file.
5244 2003-12-23  Roland McGrath  <roland@redhat.com>
5246         * tst-oddstacklimit.c: New file.
5247         * Makefile (tests): Add it.
5248         (tst-oddstacklimit-ENV): New variable.
5250         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5251         value up to page size for __default_stacksize.
5253 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5255         * Makefile (tests): Add tst-eintr5.
5256         * tst-eintr5.c: New file.
5258         * eintr.c (eintr_source): Prevent sending signal to self.
5260         * tst-eintr2.c (tf1): Improve error message.
5262 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5264         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5265         * sysdeps/unix/sysv/linux/getpid.c: New file.
5266         * pthread_cancel.c: Add comment explaining use of PID field.
5267         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5268         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5269         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5270         temporarily to signal the field must not be relied on and updated
5271         by getpid().
5272         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5273         temporarily negative.
5274         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5276 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5278         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5279         (eintr_source): If ARG != NULL, use pthread_kill.
5280         * tst-eintr1.c: Adjust for this change.
5281         * tst-eintr2.c: Likewise.
5282         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5283         * tst-eintr3.c: New file.
5284         * tst-eintr4.c: New file.
5286 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5288         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5289         if CANCELSTATE_BITMASK is set.
5290         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5291         Likewise.
5293         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5294         (tests-reverse): Add tst-cancel23.
5295         * tst-cancel22.c: New test.
5296         * tst-cancel23.c: New test.
5298 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5300         * tst-eintr1.c: Better error messages.
5302         * Makefile (tests): Add tst-eintr2.
5303         * tst-eintr2.c: New file.
5305 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5307         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5308         (CFLAGS-tst-cancelx21.c): Set.
5309         * tst-cancel21.c: New test.
5310         * tst-cancelx21.c: New test.
5312         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5313         comparison operand.
5314         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5315         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5316         * pt-longjmp.c: Include jmpbuf-unwind.h.
5317         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5318         _JMPBUF_UNWINDS.  Adjust compared pointers.
5319         * init.c (__pthread_initialize_minimal_internal): Initialize
5320         pd->stackblock_size.
5321         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5322         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5323         * sysdeps/i386/jmpbuf-unwind.h: New file.
5324         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5325         * sysdeps/s390/jmpbuf-unwind.h: New file.
5326         * sysdeps/sh/jmpbuf-unwind.h: New file.
5327         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5328         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5329         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5330         (_JMPBUF_CFA_UNWINDS): Remove.
5331         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5333 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5335         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5336         (CFLAGS-tst-cancelx20.c): Set.
5337         * tst-cancel20.c: New test.
5338         * tst-cancelx20.c: New test.
5340 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5342         * init.c (__pthread_initialize_minimal_internal): Don't treat
5343         architectures with separate register stack special here when
5344         computing default stack size.
5346 2003-12-17  Roland McGrath  <roland@redhat.com>
5348         * Makefile (tst-cancelx7-ARGS): New variable.
5349         Reportd by Greg Schafer <gschafer@zip.com.au>.
5351 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5353         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5354         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5355         (tst-stack3-ENV): Set.
5356         ($(objpfx)tst-stack3-mem): New.
5357         * tst-stack3.c: New test.
5359 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5361         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5362         Add unwind directives.  Drop unused .regstk directive.
5363         (_fini_EPILOG_BEGINS): Add unwind directives.
5365 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5367         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5368         Assume parameter is a pointer.
5369         (lll_futex_wake): Likewise.
5370         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5371         Likewise.
5372         (lll_futex_wake): Likewise.
5373         Reported by Boris Hu.
5374         * sysdeps/unix/sysv/linux/unregister-atfork.c
5375         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5377         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5379 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5381         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5382         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5383         __rtld_lock_initialize for ld.so lock.
5384         Patch in part by Adam Li <adam.li@intel.com>.
5386 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5388         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5389         in $(gnulib).  Also, remove stale comment.
5391 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5393         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5394         advantage of new syscall stub and optimize accordingly.
5396         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5397         from SYS_futex, to match expectations of
5398         sysdep.h:DO_INLINE_SYSCALL.
5399         (lll_futex_clobbers): Remove.
5400         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5401         (lll_futex_wake): Likewise.
5402         (lll_futex_requeue): Likewise.
5403         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5404         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5405         Jelinek).
5406         (__lll_mutex_lock): Likewise.
5407         (__lll_mutex_cond_lock): Likewise.
5408         (__lll_mutex_timed_lock): Likewise.
5409         (__lll_mutex_unlock): Likewise.
5410         (__lll_mutex_unlock_force): Likewise.
5412         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5413         comes before the include of <sysdep.h>.
5414         (THREAD_SELF_SYSINFO): New macro.
5415         (THREAD_SYSINFO): Likewise.
5416         (INIT_SYSINFO): New macro.
5417         (TLS_INIT_TP): Call INIT_SYSINFO.
5419         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5421         * sysdeps/pthread/createthread.c (create_thread): Use
5422         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5423         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5424         THREAD_SELF_SYSINFO instead of open code.
5425         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5426         (THREAD_SYSINFO): Likewise.
5428         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5430         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5432 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5434         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5435         instead of .init.  Patch by David Mosberger.
5437 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5439         * sysdeps/pthread/configure.in: Remove broken declaration in C
5440         cleanup handling check.
5442 2003-11-30  Andreas Jaeger  <aj@suse.de>
5444         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5445         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5446         Likewise.
5448 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5450         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5451         * pthread_attr_destroy.c: Include shlib-compat.h.
5452         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5453         is set in iattr->flags.
5454         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5456 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5458         * Makefile (distribute): Add tst-cleanup4aux.c.
5460         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5461         include.
5463 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5465         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5466         pthread_cond_signal.
5468         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5469         store mutex address if the current value is ~0l.
5470         * sysdeps/pthread/pthread_cond_timedwait.c
5471         (__pthread_cond_timedwait): Likewise.
5472         * sysdeps/pthread/pthread_cond_broadcast.c
5473         (__pthread_cond_broadcast): Don't use requeue for pshared
5474         condvars.
5476         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5477         (__pthread_cond_wait): Don't store mutex address if the current
5478         value is ~0l.
5479         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5480         (__pthread_cond_timedwait): Likewise.
5481         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5482         (__pthread_cond_broadcast): Don't use requeue for pshared
5483         condvars.
5485         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5486         element with ~0l for pshared condvars, with NULL otherwise.
5488         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5489         (__pthread_cond_wait): Don't store mutex address if the current
5490         value is ~0l.
5491         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5492         (__pthread_cond_timedwait): Likewise.
5493         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5494         (__pthread_cond_broadcast): Don't use requeue for pshared
5495         condvars.
5497         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5498         * tst-cond12.c: New file.
5499         * tst-cond13.c: New file.
5501 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5503         * sysdeps/pthread/configure.in: Make missing forced unwind support
5504         fatal.
5506 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5508         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5510 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5512         * Makefile: Add magic to clean up correctly.
5514 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5516         * unwind.c (FRAME_LEFT): Define.
5517         (unwind_stop): Handle old style cleanups here.
5518         (__pthread_unwind): Handle old style cleanups only if
5519         !HAVE_FORCED_UNWIND.
5520         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5521         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5522         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5523         ($(objpfx)tst-cleanupx4): Likewise.
5524         * tst-cleanup4.c: New test.
5525         * tst-cleanup4aux.c: New.
5526         * tst-cleanupx4.c: New test.
5528 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5530         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5531         lll_mutex_*lock macros to skip atomic operations on some archs.
5533 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5535         * sysdeps/pthread/tst-timer.c (main): Initialize
5536         sigev2.sigev_value as well.
5538 2003-10-15  Roland McGrath  <roland@redhat.com>
5540         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5541         is missing.
5542         * sysdeps/pthread/configure: Regenerated.
5544 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5546         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5547         locking macros.  No distinction between normal and mutex locking
5548         anymore.
5549         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5550         Merge bits from lowlevelmutex.S we still need.
5551         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5552         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5553         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5554         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5555         new mutex implementation.
5556         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5557         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5558         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5559         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5560         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5561         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5562         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5563         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5564         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5565         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5566         symbol for entry point to avoid cancellation.
5568 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5570         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5571         changes.
5572         (SAVE_OLDTYPE_0): Fix a typo.
5574 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5576         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5577         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5579 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5581         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5582         correct offset.
5584 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5586         * Makefile (tests): Add tst-cancel19.
5587         * tst-cancel19.c: New test.
5589 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5591         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5592         restoring of the old cancellation type.
5594 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5596         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5598 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5600         * sysdeps/pthread/malloc-machine.h: New file
5602 2003-09-24  Roland McGrath  <roland@redhat.com>
5604         * allocatestack.c (__make_stacks_executable): Don't ignore return
5605         value from _dl_make_stack_executable.
5607 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5609         * allocatestack.c (__make_stacks_executable): Also change
5610         permission of the currently unused stacks.
5612         * allocatestack.c (change_stack_perm): Split out from
5613         __make_stacks_executable.
5614         (allocate_stack): If the required permission changed between the time
5615         we started preparing the stack and queueing it, change the permission.
5616         (__make_stacks_executable): Call change_stack_perm.
5618         * Makefile: Build tst-execstack-mod locally.
5619         * tst-execstack-mod.c: New file.
5621 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5623         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5625 2003-09-23  Roland McGrath  <roland@redhat.com>
5627         * tst-execstack.c: New file.
5628         * Makefile (tests): Add it.
5629         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5630         (LDFLAGS-tst-execstack): New variable.
5632         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5633         whether to use PROT_EXEC for stack mmap.
5634         (__make_stacks_executable): New function.
5635         * pthreadP.h: Declare it.
5636         * init.c (__pthread_initialize_minimal_internal): Set
5637         GL(dl_make_stack_executable_hook) to that.
5639 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5641         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5642         recommendation from AMD re avoidance of lock prefix.
5644 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5646         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5647         lll_futex_timed_wait instead of lll_futex_wait.
5648         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5649         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5650         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5651         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5652         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5653         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5654         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5655         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5656         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5657         Completely revamp the locking macros.  No distinction between
5658         normal and mutex locking anymore.
5659         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5660         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5661         __lll_lock_timedwait): Fix prototypes.
5662         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5663         __lll_lock_timedwait): Likewise.
5664         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5665         macros, add __builtin_expect.
5666         (lll_mutex_timedlock): Likewise.  Fix return value.
5667         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5668         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5669         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5670         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5671         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5672         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5673         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5674         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5676 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5678         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5679         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5680         operation if possible.
5682         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5683         like jumping over the lock prefix.
5685 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5687         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5688         locking macros.  No distinction between normal and mutex locking
5689         anymore.
5690         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5691         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5692         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5693         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5694         locking.  Merge bits from lowlevelmutex.S we still need.
5695         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5696         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5697         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5698         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5699         * Makefile (routines): Remove libc-lowlevelmutex.
5700         (libpthread-rountines): Remove lowlevelmutex.
5701         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5702         for new mutex implementation.
5703         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5706         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5707         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5708         Likewise.
5709         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5710         Likewise.
5711         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5712         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5713         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5714         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5715         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5717         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5718         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5719         Likewise.
5720         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5721         Likewise.
5722         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5723         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5724         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5725         Don't use requeue.
5726         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5727         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5729 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5731         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5732         in parameters of asm with output parameters.
5734         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5735         type of DECR parameter to int.
5736         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5738 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5740         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5741         guardsize for each thread.
5743 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5745         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5746         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5747         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5749         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5750         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5751         NULL.
5752         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5753         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5754         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5755         (pthread_getaffinity_np): Add hidden_def.
5757         * Makefile (tests): Add tst-attr3.
5758         * tst-attr3.c: New test.
5760         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5762 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5764         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5765         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5767 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5769         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5770         * tst-align.c: Include tst-stack-align.h.
5771         (tf, do_test): Use TEST_STACK_ALIGN macro.
5773 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5775         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5776         variable.
5778 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5780         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5781         stack-related values for the initial thread.
5783 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5785         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5787 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5789         * pthread_mutex_lock.c: Minor code rearrangements.
5791 2003-09-05  Roland McGrath  <roland@redhat.com>
5793         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5794         Instead, include ../nptl_db/db_info.c to do its magic.
5795         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5796         (__pthread_pthread_key_2ndlevel_size): Likewise.
5797         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5798         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5799         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5800         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5801         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5802         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5803         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5804         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5805         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5806         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5807         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5808         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5809         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5810         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5811         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5812         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5813         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5815 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5817         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5818         of pthread_t to be compatible with LT.
5819         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5820         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5821         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5822         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5823         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5824         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5825         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5827 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5829         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5831 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5833         * unwind-forcedunwind.c: Move to...
5834         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5835         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5836         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5837         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5838         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5839         * unwind.c: Include jmpbuf-unwind.h.
5840         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5842 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5844         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5845         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5846         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5847         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5848         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5849         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5850         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5851         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5852         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5853         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5854         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5855         function.
5856         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5857         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5858         * Makefile (tests): Add tst-stack2.
5859         * tst-stack2.c: New test.
5860         * tst-stack1.c: Include limits.h and sys/param.h.
5861         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5863         * pthread_condattr_setpshared.c: Include errno.h.
5864         (pthread_condattr_setpshared): Return EINVAL if pshared
5865         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5867         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5868         defined symbol for entry point to avoid cancellation.
5869         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5870         Likewise.
5871         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5872         Likewise.
5873         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5874         Likewise.
5875         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5876         Likewise.
5877         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5878         Likewise.
5879         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5880         __close_nocancel, __read_nocancel, __write_nocancel,
5881         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5882         libpthread.so or librt.so, define to corresponding function
5883         without _nocancel suffix.
5884         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5885         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5886         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5888         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5890 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5892         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5893         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5895         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5896         in subsections has a symbol associated with it.
5898         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5899         defined symbol for entry point to avoid cancellation.
5900         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5902 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5904         * Makefile (tests): Add tst-tls5.
5905         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5906         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5907         ($(objpfx)tst-tls5): New.
5908         ($(objpfx)tst-tls6.out): Likewise.
5909         (tests): Depend on $(objpfx)tst-tls6.out.
5910         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5911         (do_test): Check pthread_self () return value alignment.
5912         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5913         (tf): Check pthread_self () return value alignment.
5914         * tst-tls5.c: New test.
5915         * tst-tls5.h: New.
5916         * tst-tls5mod.c: New.
5917         * tst-tls5moda.c: New.
5918         * tst-tls5modb.c: New.
5919         * tst-tls5modc.c: New.
5920         * tst-tls5modd.c: New.
5921         * tst-tls5mode.c: New.
5922         * tst-tls5modf.c: New.
5923         * tst-tls6.sh: New test.
5925         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5926         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5927         * init.c (pthread_functions): Initialize them.
5928         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5929         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5930         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5931         pthread_cond_timedwait@@GLIBC_2.3.2.
5933 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5935         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5936         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5937         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5938         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5939         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5940         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5942         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5944         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5945         _POSIX_THREAD_PRIORITY_SCHEDULING.
5946         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5948 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5950         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5951         nested function, use static inline function from libio.h.
5952         Code by Richard Henderson.
5954         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5955         weak.
5957 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5959         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5960         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5961         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5962         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5963         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5964         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5965         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5966         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5967         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5968         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5969         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5970         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5971         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5972         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5973         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5974         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5975         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5976         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5977         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5978         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5979         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5980         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5981         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5982         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5983         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5984         * sysdeps/sparc/tls.h: New file.
5985         * sysdeps/sparc/tcb-offsets.sym: New file.
5986         * sysdeps/sparc/Makefile: New file.
5987         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5988         * init.c [__sparc__] (__NR_set_tid_address): Define.
5990 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5992         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5993         _IO_release_lock): Define.
5995 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5997         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5998         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
6000 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
6002         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
6003         (__pthread_cleanup_class): Add missing return types of member
6004         functions.
6006 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
6008         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6009         (lll_mutex_unlock_force): Add memory barrier between store and futex
6010         syscall.
6012 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
6014         * tst-cancel4.c (do_test): Also unlink tempfname and remove
6015         tempmsg in first loop.
6017 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
6019         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
6020         _POSIX_THREAD_PRIORITY_SCHEDULING.
6021         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
6023 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6025         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
6026         (__rtld_lock_default_lock_recursive,
6027         __rtld_lock_default_unlock_recursive): Define.
6028         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
6029         __rtld_lock_unlock_recursive): Define using
6030         GL(_dl_rtld_*lock_recursive).
6031         * init.c (__pthread_initialize_minimal_internal): Initialize
6032         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
6033         Lock GL(_dl_load_lock) the same number of times as
6034         GL(_dl_load_lock) using non-mt implementation was nested.
6036         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
6037         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
6039 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
6041         * tst-cancel17.c (do_test): Make len2 maximum of page size and
6042         PIPE_BUF.
6044 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
6046         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
6048 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
6050         * sysdeps/pthread/createthread.c (do_clone): Move error handling
6051         to first syscall error check.  Move syscall error check for tkill
6052         into __ASSUME_CLONE_STOPPED #ifdef.
6054 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
6056         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
6057         is not defined, do explicit synchronization.
6058         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
6059         is not defined also unlock pd->lock for non-debugging case in case
6060         it is necessary.
6061         * pthread_create.c (start_thread): Always get and release pd->lock
6062         if __ASSUME_CLONE_STOPPED is not defined.
6063         (start_thread_debug): Removed.  Adjust users.
6064         * allocatestack.c (allocate_stack): Always initialize lock if
6065         __ASSUME_CLONE_STOPPED is not defined.
6066         * Makefile (tests): Add tst-sched1.
6067         * tst-sched1.c: New file.
6069         * sysdeps/pthread/createthread.c (do_clone): Only use
6070         sched_setschduler and pass correct parameters.
6072 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6074         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
6075         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
6076         PTHREAD_STACK_MIN in comments.
6078 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
6080         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
6081         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
6082         argument.
6083         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
6084         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
6085         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
6086         (__pthread_cleanup_upto): Fix prototype.
6087         (_longjmp_unwind): Adjust caller.
6088         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6089         Change second argument to const struct pointer.
6090         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6091         * tst-sem9.c (main): Likewise.
6092         * unwind.c: Include string.h for strlen prototype.
6094 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6096         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6097         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6098         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6099         Define HAVE_CMOV.
6100         Patch by Nicholas Miell <nmiell@attbi.com>.
6102 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6104         * init.c (__pthread_initialize_minimal_internal): Initialize
6105         GL(dl_init_static_tls).
6106         * pthreadP.h (__pthread_init_static_tls): New prototype.
6107         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6108         New functions.
6109         * Makefile (tests): Add tst-tls4.
6110         (modules-names): Add tst-tls4moda and tst-tls4modb.
6111         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6112         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6113         tst-tls4modb.so.
6114         * tst-tls4.c: New file.
6115         * tst-tls4moda.c: New file.
6116         * tst-tls4modb.c: New file.
6118 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6120         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6121         before __timer_dealloc.
6122         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6123         Don't call list_unlink.
6125 2003-07-29  Roland McGrath  <roland@redhat.com>
6127         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6129 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6131         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6132         Don't reuse struct aiocb A if it failed.
6133         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6134         not just one byte, as that does not block.
6136 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6138         * sysdeps/pthread/unwind-resume.c: New file.
6139         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6140         unwind-resume in csu subdir.
6141         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6142         exceptions.
6143         (librt-sysdep_routines, librt-shared-only-routines): Add
6144         rt-unwind-resume.
6145         * sysdeps/pthread/rt-unwind-resume.c: New file.
6146         * unwind-forcedunwind.c: New file.
6147         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6148         (libpthread-shared-only-routines): Likewise.
6149         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6150         * pthreadP.h (pthread_cancel_init): New prototype.
6151         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6153         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6154         attr argument const struct pthread_attr *.
6156         * res.c (__res_state): Return __resp.
6157         * descr.h: Include resolv.h.
6158         (struct pthread): Add res field.
6159         * pthread_create.c: Include resolv.h.
6160         (start_thread): Initialize __resp.
6161         * Makefile (tests): Add tst-_res1.
6162         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6163         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6164         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6165         libpthread.
6166         * tst-_res1.c: New file.
6167         * tst-_res1mod1.c: New file.
6168         * tst-_res1mod2.c: New file.
6170 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6172         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6174         * Makefile: Define various *-no-z-defs variables for test DSOs
6175         which has undefined symbols.
6177 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6179         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6180         Retry if the stwcx fails to store once_control.
6182 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6184         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6185         pthread_attr_setaffinity.
6186         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6187         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6188         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6189         * pthread_attr_destroy.c: Free cpuset element if allocated.
6190         * pthread_create.c: Pass iattr as additional parameter to
6191         create_thread.
6192         * sysdeps/pthread/createthread.c: If attribute is provided and
6193         a new thread is created with affinity set or scheduling parameters,
6194         start thread with CLONE_STOPPED.
6195         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6196         pthread_attr_setaffinity.
6197         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6198         cpuset element.
6200 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6202         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6204 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6206         * sysdeps/pthread/configure.in: Require CFI directives also for
6207         ppc and s390.
6209 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6211         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6212         Add cfi directives.
6214 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6216         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6217         CLEANUP_JMP_BUF.
6218         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6219         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6220         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6221         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6222         not self pointer in __writer.  Compare with TID to determine
6223         deadlocks.
6224         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6225         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6226         Likewise.
6227         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6228         Likewise.
6229         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6230         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6231         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6232         macros also when compiling librt.
6234 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6236         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6237         -fasynchronous-unwind-tables.
6238         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6239         (PSEUDO): Add cfi directives.
6240         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6241         Likewise.
6242         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6243         Likewise.
6245 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6247         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6248         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6249         * unwind.c (__pthread_unwind_next): Add hidden_def.
6250         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6251         Likewise.
6252         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6253         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6254         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6255         Likewise.
6256         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6257         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6258         Likewise.
6259         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6260         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6261         __pthread_unregister_cancel and __pthread_unwind_next.
6263 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6265         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6266         different symbol for the cancellation syscall wrapper and
6267         non-cancellation syscall wrapper.
6268         (PSEUDO_END): Define.
6270 2003-07-05  Richard Henderson  <rth@redhat.com>
6272         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6273         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6274         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6275         return actual return value from the syscall, not 0.
6277 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6279         * descr.h (struct pthread): Add pid field.
6280         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6281         (__reclaim_stacks): Likewise.
6282         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6283         also check for PID of the signal source.
6284         (__pthread_initialize_minimal_internal): Also initialize pid field
6285         of initial thread's descriptor.
6286         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6287         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6288         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6289         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6290         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6292 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6294         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6295         Fix use of parameter.
6296         (__libc_cleanup_pop): Likewise.
6298 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6300         * init.c (sigcancel_handler): Change parameters to match handler
6301         for SA_SIGACTION.  Check signal number and code to recognize
6302         invalid invocations.
6304 2003-07-03  Roland McGrath  <roland@redhat.com>
6306         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6307         Apply sizeof (struct pthread) bias to r13 value.
6309 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6311         * sysdeps/pthread/configure.in: Require CFI directives.
6313         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6314         definition.
6315         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6316         libpthread compilation.
6317         * unwind.c (__pthread_unwind): Add hidden_def.
6318         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6320 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6322         * libc-cancellation.c (__libc_cleanup_routine): Define.
6323         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6324         (__pthread_cleanup_pop): Define.
6326 2003-07-01  Richard Henderson  <rth@redhat.com>
6328         * sysdeps/alpha/elf/pt-initfini.c: New file.
6329         * sysdeps/alpha/pthread_spin_lock.S: New file.
6330         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6331         * sysdeps/alpha/pthreaddef.h: New file.
6332         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6333         * sysdeps/alpha/tls.h: New file.
6334         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6335         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6336         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6337         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6338         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6339         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6340         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6341         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6342         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6343         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6345 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6347         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6348         cleanup support and unwind info.
6350 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6352         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6353         Use correct cleanup handler registration.  Add unwind info.
6354         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6355         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6356         * tst-once3.c: Add cleanup handler and check it is called.
6357         * tst-once4.c: Likewise.
6358         * tst-oncex3.c: New file.
6359         * tst-oncex4.c: New file.
6360         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6362 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6364         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6366 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6368         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6369         (tf_msgsnd): Likewise.
6371         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6372         premature returns a bit more.
6374 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6376         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6377         definition to the front.
6379         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6380         the cleanup functions to make the names unique.  Fix dwarf opcode
6381         un unwind table.
6382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6383         functions to make the names unique.  Fix CFA offset for two blocks.
6385 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6387         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6388         missing closing braces.
6389         Patch by Christophe Saout <christophe@saout.de>.
6391 2003-06-24  Roland McGrath  <roland@redhat.com>
6393         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6395 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6397         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6398         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6400         * pthreadP.h: Declare __find_thread_by_id.
6401         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6402         * pthread_clock_gettime.c: Allow using other thread's clock.
6403         * pthread_clock_settime.c: Likewise.
6404         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6405         * Makefile: Add rules to build and run tst-clock2.
6406         * tst-clock2.c: New file.
6408 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6410         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6411         to use exception-based cleanup handler.
6412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6414         * tst-cond8.c (ch): Announce that we are done.
6416         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6418         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6419         Also test aio_suspend with timeout value.
6421 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6423         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6424         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6425         attribute_hidden.
6427         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6428         (__pthread_mutex_lock_internal): Likewise.
6429         (__pthread_mutex_unlock_internal): Likewise.
6430         (__pthread_mutex_unlock_usercnt): Declare.
6431         * pthread_mutex_destroy.c: Always fail if used in any way.
6432         * pthread_mutex_init.c: Update comment.
6433         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6434         * pthread_mutex_timedlock.c: Adjust __nusers.
6435         * pthread_mutex_trylock.c: Adjust __nusers.
6436         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6437         and public interfaces are wrapper with pass additional parameter.
6438         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6439         parameter zero.
6440         * tst-mutex8.c: New file.
6441         * Makefile (tests): Add tst-mutex8.
6442         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6443         __pthread_mutex_unlock_usercnt.
6444         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6445         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6446         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6447         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6448         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6449         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6450         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6451         Add __nusers.
6452         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6453         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6454         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6455         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6456         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6458         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6459         * pthread_mutex_timedlock.c: Likewise.
6460         * pthread_mutex_trylock.c: Adjust __nusers.
6461         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6462         * tst-mutex9.c: New file.
6463         * Makefile (tests): Add tst-mutex9.
6464         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6465         * sysdeps/ia64/tls.h: Likewise.
6466         * sysdeps/powerpc/tls.h: Likewise.
6467         * sysdeps/s390/tls.h: Likewise.
6468         * sysdeps/sh/tls.h: Likewise.
6469         * sysdeps/x86_64/tls.h: Likewise.
6470         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6471         Change type of __owner.
6472         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6473         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6474         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6475         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6478 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6480         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6481         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6483         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6484         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6485         instead of nr to lll_futex_wake.  Only set errno and return -1
6486         if err < 0.
6488         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6489         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6490         return actual return value from the syscall, not 0.
6492 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6494         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6495         find a random value.
6496         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6497         errno==EIDRM.
6499         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6500         compat_timer_settime.
6501         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6502         compat_timer_gettime.
6503         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6504         compat_timer_getoverrun.
6505         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6506         compat_timer_delete.
6508         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6509         error-checking mutex detect busy mutexes.
6511 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6513         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6514         Add ax to clobber list.
6515         (lll_mutex_cond_lock): Likewise.
6516         (lll_mutex_unlock): Likewise.
6517         (lll_lock): Likewise.
6518         (lll_unlock): Likewise.
6520         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6521         * tst-cancel18.c: New file.
6522         * tst-cancelx18.c: New file.
6524         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6525         and tcdrain.
6527         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6528         * tst-cancel17.c: New file.
6529         * tst-cancelx17.c: New file.
6531         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6532         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6533         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6535         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6537 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6539         * sysdeps/pthread/createthread.c (create_thread): Set
6540         header.multiple_threads unconditionally.
6541         * allocatestack.c (allocate_stack): Likewise.
6542         * descr.h (struct pthread): Add header.multiple_threads
6543         unconditionally.
6544         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6545         Define for librt.  #error if neither libpthread, libc nor librt.
6546         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6547         Likewise.
6548         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6549         CDISABLE): Likewise.
6550         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6551         CDISABLE): Likewise.
6552         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6553         CDISABLE): Likewise.
6554         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6555         CDISABLE): Likewise.  Access header.multiple_threads outside of
6556         libc and libpthread.
6557         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6558         Likewise.
6559         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6560         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6562 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6564         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6565         Also test early cancellation before the thread reaches the cancellation
6566         point.
6568         * Makefile: Compile forward.c with exceptions.
6570         * sysdeps/unix/sysv/linux/sleep.c: New file.
6572 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6574         * Makefile: Add CFLAGS definition to compile function wrappers
6575         duplicated from libc with exceptions.
6576         * tst-cancel4.c: Also check cancellation handlers.
6578         * Makefile: Add rules to build and run tst-cancel16 and
6579         tst-cancelx16.  Add missing CFLAGS definitions.
6580         * tst-cancel16.c: New file.
6581         * tst-cancelx16.c: New file.
6583 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6585         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6586         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6587         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6588         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6590         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6591         (LIBC_CANCEL_RESET): Likewise.
6592         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6593         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6594         librt-cancellation.
6595         (CFLAGS-libcrt-cancellation.c): Define.
6596         * sysdeps/pthread/librt-cancellation.c: New file.
6597         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6598         macros also when compiling librt.
6599         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6600         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6601         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6602         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6603         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6604         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6605         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6607         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6608         compat_timer_create.
6610 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6612         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6614         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6615         __register_atfork.
6616         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6617         Add libc_hidden_def.
6619 2003-06-13  Roland McGrath  <roland@redhat.com>
6621         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6622         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6624 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6626         * allocatestack.c (queue_stack): Always inline.
6627         * ptreadhP.h (__do_cancel): Likewise.
6629 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6631         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6632         a typo.
6634 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6636         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6637         (__pthread_cond_signal): Remove incorrect second addition for
6638         cond_lock!=0.
6640 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6642         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6643         (__pthread_cond_signal): Use correct futex pointer in
6644         __lll_mutex_lock_wait call.
6646         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6647         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6649 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6651         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6652         cancelable.
6653         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6654         Likewise.
6656         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6657         hand-written CFI generation code.  Since ENTRY/END also initiated
6658         CFI frames this caused two CFI sets to be generated.
6660 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6662         * cleanup_routine.c: New file.
6663         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6664         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6665         cleanup handling.
6666         * Makefile (libpthread-routines): Add cleanup_routine.
6667         Add more CFLAGS variables to compile with exceptions.  Add comments
6668         why which file needs unwind tables.
6669         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6670         tests.
6671         * tst-cancelx1.c: New file.
6672         * tst-cancelx2.c: New file.
6673         * tst-cancelx3.c: New file.
6674         * tst-cancelx4.c: New file.
6675         * tst-cancelx5.c: New file.
6676         * tst-cancelx6.c: New file.
6677         * tst-cancelx7.c: New file.
6678         * tst-cancelx8.c: New file.
6679         * tst-cancelx9.c: New file.
6680         * tst-cancelx10.c: New file.
6681         * tst-cancelx11.c: New file.
6682         * tst-cancelx12.c: New file.
6683         * tst-cancelx13.c: New file.
6684         * tst-cancelx14.c: New file.
6685         * tst-cancelx15.c: New file.
6686         * tst-cleanupx0.c: New file.
6687         * tst-cleanupx0.expect: New file.
6688         * tst-cleanupx1.c: New file.
6689         * tst-cleanupx2.c: New file.
6690         * tst-cleanupx3.c: New file.
6692         * tst-cleanup0.c: Make standard compliant.
6693         * tst-cleanup1.c: Likewise.
6695         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6696         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6697         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6698         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6699         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6700         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6701         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6702         CLEANUP_JMP_BUF.
6703         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6704         * tst-cancel12.c: New file.
6705         * tst-cancel13.c: New file.
6706         * tst-cancel14.c: New file.
6707         * tst-cancel15.c: New file.
6708         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6709         and tst-cancel15.
6711         * tst-cancel1.c: Add some comments.
6713         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6714         timeout correctly.
6716 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6718         * Makefile (CFLAGS-pthread_cancel.c): Define.
6720 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6722         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6723         Change type of __writer element to int.
6724         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6725         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6726         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6727         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6728         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6729         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6730         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6731         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6732         Compare with TID to determine deadlocks.
6733         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6734         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6735         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6736         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6737         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6738         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6739         Likewise.
6740         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6741         Likewise.
6742         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6743         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6744         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6745         Likewise.
6746         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6747         Likewise.
6748         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6749         * Makefile (tests): Add tst-rwlock12.
6750         * tst-rwlock12.c: New file.
6752 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6754         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6755         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6756         Remove bogus hidden_proto.
6757         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6758         Likewise.
6759         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6760         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6761         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6762         ___lll_mutex_timedlock): Likewise.
6764 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6767         (__pthread_cond_signal): Add some code to eventually handle
6768         cond_lock!=0.
6770 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6772         * Makefile (tests): Add tst-exec4.
6773         (tst-exec4-ARGS): Define.
6774         * tst-exec4.c: New file.
6776 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6778         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6779         Also fail if tv_nsec < 0.
6780         (__lll_timedwait_tid): Likewise.
6781         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6782         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6783         Likewise.
6784         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6785         Likewise.
6786         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6787         Likewise.
6788         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6789         Likewise.
6790         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6791         Likewise.
6792         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6793         Likewise.
6795         * Makefile (tests): Add tst-sem8 and tst-sem9.
6796         * tst-sem8.c: New file.
6797         * tst-sem9.c: New file.
6798         * sem_open.c: Fix creation of in_use record if the file exists but
6799         no internal record.
6801         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6802         definitions.
6804         * sysdeps/pthread/timer_create.c (timer_create): In case
6805         evp==NULL, assign timer ID to sival_ptr.
6807         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6808         struct pthread_unwind_buf *.
6809         (struct pthread): Likewise for cleanup_jmp_buf element.
6811         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6812         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6813         * unwind.c (__pthread_unwind_next): Likewise.
6815 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6817         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6818         (lll_futex_timed_wait): Use int for futex value parameter.
6819         (lll_futex_wake): Likewise.
6820         (lll_futex_requeue): Likewise.
6822         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6823         Replace one memory operation with one register operation.
6825         * tst-join4.c (do_test): Fix error message.
6827         * tst-rwlock6.c (do_test): Use correct format specifier.
6829         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6830         (__lll_mutex_lock_wait): Replace one memory operation with one
6831         register operation.
6832         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6833         (__lll_mutex_lock_wait): Likewise.
6835         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6836         (__lll_mutex_cond_lock): Add one to value parameter of
6837         __lll_lock_wait to reflect reality in the futex syscall.
6838         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6839         (lll_mutex_cond_lock): Likewise.
6841 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6843         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6844         New function.
6845         (lll_mutex_cond_lock): Define.
6847 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6849         * Makefile (tests): Add tst-signal6.
6850         * tst-signal6.c: New file.
6852         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6853         (__lll_mutex_unlock_force): New function
6854         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6856         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6857         (__lll_mutex_unlock_force): New function.
6858         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6860         * tst-rwlock7.c (do_test): Use correct format specifier.
6862         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6863         Find break parameter in correct asm argument.
6865 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6867         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6868         Remove out4.
6869         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6870         error occured.
6871         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6872         Add __mutex.
6873         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6874         lll_futex_requeue, lll_mutex_unlock_force): Define.
6876 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6878         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6879         (pthread_cond_t): Add __mutex.
6880         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6881         lll_futex_requeue, lll_mutex_unlock_force): Define.
6883 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6885         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6886         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6887         Add __mutex field.
6888         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6889         Define.
6890         (lll_futex_wait, lll_futex_wake): Define.
6891         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6892         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6893         FUTEX_REQUEUE instead of FUTEX_WAIT.
6894         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6895         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6896         mutex which was used in condvar structure.  Call
6897         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6898         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6900         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6901         include tcb-offsets.h.  Read wakeup value in locked region.
6902         Use the value of gbr register as THREAD_ID.
6903         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6904         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6905         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6907         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6908         macros.
6910 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6912         * sysdeps/pthread/pthread_cond_broadcast.c
6913         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6915 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6917         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6918         typo in register name.
6919         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6920         correctly.  Actually use requeue.  Little optimization.
6921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6922         mutex address early.  Handle cancellation state as 32-bit value.
6923         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6924         Remove unnecessary label.
6926 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6928         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6929         instead of FUTEX_WAIT.
6930         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6931         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6932         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6933         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6934         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6935         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6936         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6937         of __pthread_mutex_lock_internal.
6938         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6939         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6940         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6941         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6942         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6943         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6944         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6945         Add pthread_mutex_cond_lock.
6946         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6947         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6948         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6949         lll_mutex_cond_lock.
6950         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6951         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6952         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6953         Add __mutex field.
6954         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6955         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6957         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6958         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6960         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6961         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6962         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6963         macro don't define aliases.
6965         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6966         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6967         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6968         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6969         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6970         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6971         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6973         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6975 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6977         * sem_open.c: Fix one endless loop.  Implement correct semantics
6978         wrt opening the same semaphore more then once.
6979         * sem_close.c: Adjust for sem_open change.
6980         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6981         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6982         * Makefile (tests): Add tst-sem7.
6983         * tst-sem7.c: New file.
6985 2003-05-16  Roland McGrath  <roland@redhat.com>
6987         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6988         uninitialized variable braino.
6990 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6992         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6993         test for syscall availability.
6995         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6996         __no_posix_timers to -1 if the syscalls don't exist.
6998         * pthread_join.c (pthread_join): Set tid field of the joined
6999         thread to -1.  This isn't necessary but helps to recognize some
7000         error conditions with almost no cost.
7002         * allocatestack.c (FREE_P): Also negative values indicate an
7003         unused stack.
7005         * unwind.c: Include <unistd.h>.
7007 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
7009         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
7011 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
7013         * Makefile (crti-objs, crtn-objs): New variables.
7014         (omit-deps, extra-objs): Add crtn.
7015         ($(objpfx)libpthread.so): Depend on both crti and crtn
7016         and links to them in multidir.
7017         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
7019 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
7021         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
7022         (lll_mutex_unlock): Use atomic_exchange_rel.
7024 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
7026         * cond-perf.c (cons): Add missing locking around setting of alldone.
7028 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
7030         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
7031         related macros.
7032         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7034 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
7036         * tst-sem6.c: New file.
7037         * Makefile (tests): Add tst-sem6.
7039         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
7040         Use atomic_exchange_rel instead of atomic_exchange.
7041         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
7042         Likewise.
7044         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
7045         code for lll_futex_wait and lll_futex_wake in static apps.  Use
7046         vsyscall is possible.
7048         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
7049         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
7050         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
7051         pthread_setaffinity_np.
7052         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
7053         and pthread_setaffinity_np.
7054         * Makefile (libpthread-routines): Add pthread_getaffinity and
7055         pthread_setaffinity.
7057         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
7058         use it in case mmap to allocate the stack fails.
7059         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
7060         ARCH_MAP_FLAGS here.
7061         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
7062         ARCH_RETRY_MMAP.
7064 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
7066         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
7067         handler implementation.  It is now lockless in fork().
7068         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
7069         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
7070         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
7071         declare the __fork_*_lists.
7072         (struct fork_handler): Include pointers to all three functions.
7073         Add next, refcntr and need_signal elements.
7074         (__fork_handlers): New declaration.
7075         (__register_atfork_malloc): Remove declaration.
7076         (HAVE_register_atfork_malloc): Remove definition.
7077         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
7078         __pthread_child_handler variable.
7079         (__libc_pthread_init): Use __register_atfork instead of explicitly
7080         adding to the list.
7081         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
7082         and lll_futex_wake.
7083         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7085         * unwind.c (unwind_cleanup): Print error message and then abort.  This
7086         function must never be reached.
7088         * cond-perf.c: New file.
7090 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7092         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7094 2003-05-04  Roland McGrath  <roland@redhat.com>
7096         * Makefile ($(objpfx)../libc.so): New target.
7098 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7100         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7101         (pthread_condattr_t): Size is only an int, don't use long for
7102         alignment.
7103         (pthread_mutexattr_t): Likewise.
7104         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7105         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7106         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7108 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7110         * sysdeps/i386/tls.h: Define THREAD_ID.
7111         * sysdeps/ia64/tls.h: Likewise.
7112         * sysdeps/powerpc/tls.h: Likewise.
7113         * sysdeps/s390/tls.h: Likewise.
7114         * sysdeps/sh/tls.h: Likewise.
7115         * sysdeps/x86_64/tls.h: Likewise.
7116         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7117         record ownership.
7118         * pthread_mutex_timedlock.c: Likewise.
7119         * pthread_mutex_trylock.c: Likewise.
7120         * pthread_mutex_unlock.c: Likewise.
7121         * pthread_rwlock_trywrlock.c: Likewise.
7122         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7123         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7124         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7125         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7127         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7128         flag.
7130 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7132         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7133         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7134         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7135         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7136         Make __align long long instead of long.
7137         (pthread_rwlock_t): Formatting.
7138         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7139         (pthread_rwlock_t): Formatting.
7140         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7141         (pthread_cond_t): Make __align long long instead of long.
7142         (pthread_rwlock_t): Move __flags field to the same position as in
7143         linuxthreads.
7145 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7147         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7148         * tst-rwlock7.c (do_test): Likewise.
7150 2003-04-26  Roland McGrath  <roland@redhat.com>
7152         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7154 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7156         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7157         sizeof (struct pthread).
7158         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7159         1 struct pthread.
7160         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7161         to 0.
7162         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7163         struct pthread.
7164         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7165         to 32-bit bytes.
7166         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7167         tcbp.
7168         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7169         unneccessarily.
7170         (NO_TLS_OFFSET): Define.
7171         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7172         add TLS_TCB_SIZE unnecessarily.
7174 2003-04-22  Roland McGrath  <roland@redhat.com>
7176         * Makeconfig (shared-thread-library): Reverse link order to work
7177         around linker bug.
7179 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7181         * semaphore.h: Fix typo in comment.
7183 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7185         * sysdeps/pthread/sigfillset.c: New file.
7187         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7188         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7189         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7190         * sysdeps/pthread/sigaction.c: Likewise.
7191         * sysdeps/pthread/sigprocmask.c: New file.
7192         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7193         __SIGRTMIN+1.
7194         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7195         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7196         in this case.
7198 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7200         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7201         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7203         * sysdeps/unix/sysv/linux/unregister-atfork.c
7204         (__unregister_atfork): Don't free memory not allocated dynamically.
7206         * semaphore.h: Remove __THROW marker from cancellation points.
7207         * nptl/sysdeps/pthread/pthread.h: Likewise.
7209 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7211         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7212         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7213         __THROW.
7215 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7217         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7219 2003-04-15  Roland McGrath  <roland@redhat.com>
7221         * forward.c (__pthread_unwind): Tweak to avoid warning.
7223 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7225         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7227 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7229         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7230         overflow CFA advance instructions.
7231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7233 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7235         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7236         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7237         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7238         defined.
7240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7241         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7242         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7243         DW_CFA_advance_loc for .Laddl-.Lsubl.
7245 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7247         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7248         position-independent unwind data for static libraries.
7249         Add missing unwind info.  Add comments.
7251         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7252         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7254         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7256 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7258         * Makefile: Make sure all cancellation points are compiled with
7259         exception and asynchronous unwind tables.
7261         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7262         which mishandles loading of global object addresses in PIC.
7263         (THREAD_SETMEM_NC): Likewise.
7265 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7267         * pthread.h: Define new data structure for cleanup buffer.  Declare
7268         new cleanup handler interfaces.
7269         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7270         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7271         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7272         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7273         it.  Declare old cleanup handler installation functions.
7274         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7275         handling.
7276         * cleanup_defer.c: Likewise.
7277         * cleanup_compat.c: New file.  Old cleanup code.
7278         * cleanup_def_compat.c: New file.  Old cleanup code.
7279         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7280         if own thread descriptor.
7281         * unwind.c: New file.
7282         * forward.c: Add __pthread_unwind.
7283         * init.c (pthread_functions): Add __pthread_unwind.
7284         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7285         Add ptr___pthread_unwind.
7286         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7287         and unwind function.
7288         * Makefile (libpthread-routines): Add cleanup_compat,
7289         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7290         table generation if necessary.
7291         * version.c: Record whether unwind support is compiled in.
7292         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7293         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7294         handler interfaces.
7295         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7296         complication to generate unwind information for syscall wrappers.
7297         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7298         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7299         __cleanup_fct_attribute.
7301         * Makefile: Add rules to build and run tst-cleanup0.
7302         * tst-cleanup0.c: New file.
7303         * tst-cleanup0.expect: New file.
7305         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7306         caller.  Optimize to avoid often unecessary local variable.
7308 2003-04-11  Roland McGrath  <roland@redhat.com>
7310         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7311         sets variable `multidir'; include that.
7312         (generated): Add it.
7313         ($(objpfx)$(multidir)/crti.o): New target.
7314         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7316 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7318         * tst-attr2.c (do_test): Add cast to avoid warning.
7319         * tst-mutex4.c (do_test): Likewise.
7321 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7323         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7324         in child.
7326 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7328         * Makefile (tests): Add tst-detach1.
7329         * tst-detach1.c: New file.
7331 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7333         * sysdeps/pthread/pthread.h: Remove duplicate
7334         pthread_cleanup_{push,pop} definitions.
7336         * tst-barrier2.c: Eliminate warnings.
7337         * tst-cancel4.c: Likewise.
7338         * tst-cond4.c: Likewise.
7339         * tst-cond6.c: Likewise.
7340         * tst-detach1.c: Likewise.
7341         * tst-rwlock4.c: Likewise.
7342         * tst-rwlock6.c: Likewise.
7343         * tst-rwlock7.c: Likewise.
7344         * tst-sem3.c: Likewise.
7345         * tst-spin2.c: Likewise.
7346         * tst-umask1.c: Likewise.
7348 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7350         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7352 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7354         * descr.h (struct pthread): Move cancelhandling member to the front.
7356 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7358         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7359         malloc_parent, and malloc_child statically.
7360         (__register_atfork_malloc): New function.
7361         (free_mem): Don't free any of the malloc_* variables on the list.
7362         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7363         Define HAVE_register_atfork_malloc.
7365 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7367         * sysdeps/pthread/createthread.c (create_thread): Add some more
7368         comments explaining when to set multiple_threads and when not.
7370         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7371         THREAD_ATOMIC_BIT_SET if not already defined.
7372         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7373         THREAD_ATOMIC_BIT_SET:
7374         * sysdeps/x86_64/tls.h: Likewise.
7375         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7376         THREAD_ATOMIC_CMPXCHG_VAL.
7377         (_pthread_cleanup_pop_restore): Likewise.
7378         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7379         (__pthread_enable_asynccancel_2): Likewise.
7380         (__pthread_disable_asynccancel): Likewise.
7381         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7382         (__libc_disable_asynccancel): Likewise.
7383         * init.c (sigcancel_handler): Likewise.
7384         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7385         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7387 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7389         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7390         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7391         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7392         * Makefile (tests): Add tst-cancel11.
7393         * tst-cancel11.c: New file.
7395 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7397         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7398         round, not the first.  Use specific_used flag instead of local
7399         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7400         (__free_tcb): Don't call deallocate_tsd here.
7401         (start_thread): Call deallocate_tsd here.
7402         * pthread_setspecific.c: Set specific_used flag really only when
7403         needed.
7404         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7405         * tst-tsd3.c: New file.
7406         * tst-tsd4.c: New file.
7408 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7410         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7411         Use atomic_exchange_and_add instead of __lll_add.
7412         (__lll_mutex_timedlock): Likewise.
7413         Patch by Ian Wienand.
7415 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7417         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7418         (SINGLE_THREAD_P): Fix typo.
7419         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7421 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7423         * Makefile (tests): Add tst-align.
7424         * tst-align.c: New file.
7425         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7427         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7428         function correctly.
7430         * tst-tsd2.c: Add casts to avoid warnings.
7432 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7434         * descr.h (struct pthread): Move most often used elements to the front.
7436 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7438         * Makefile (libpthread-routines): Add pthread_atfork.
7439         (libpthread-static-only-routines): Add pthread_atfork.
7441 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7443         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7444         of TLS_DTV_AT_TP.
7445         (INSTALL_DTV): Add parens.
7446         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7447         Use passed descr instead of THREAD_SELF.
7448         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7449         (__lll_mutex_timedlock_wait): Correct expected value after
7450         spurious wakeup.
7451         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7452         Release lock before waking up the waiters.
7453         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7454         criteria.  Reorderstruct passed to cleanup handler.  Fix
7455         handling of cancellation and failung pthread_mutex_unlock call.
7456         Use __pthread_enable_asynccancel_2 instead of
7457         __pthread_enable_asynccancel.
7458         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7459         Return result of lock re-get if it fails.
7460         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7461         for __pthread_cleanup_push.
7462         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7463         completely broken rwlock implementation.
7464         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7465         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7466         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7467         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7468         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7469         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7470         versioned_symbol macro.
7471         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7472         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7474 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7476         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7477         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7478         and __helper_tid.
7479         (struct timer): Remove th and bar field.
7480         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7481         debugging code.  Create only one helper thread.
7482         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7483         helper thread.
7484         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7485         Renamed.  Define statically.  Use thread info from siginfo.
7486         (__helper_once): New variable.
7487         (__helper_tid): New variable.
7488         (__reset_helper_control): New function.
7489         (__start_helper_thread): New function.
7491         * pthread_create.c (start_thread): Don't use setjmp inside
7492         __builtin_expect to work around gcc bug.
7494         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7495         timer_delete syscall fails, but not with ENOSYS, set
7496         __no_posix_timers.
7498         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7499         (timer_settime): Fix typo.
7500         * sysdeps/unix/sysv/linux/timer_getoverr.c
7501         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7503 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7505         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7506         offset of cleanupbuf.__prev.
7508 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7510         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7511         of included file.
7513 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7515         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7516         NULL provide default definition to syscall.
7518 2003-03-25  Roland McGrath  <roland@redhat.com>
7520         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7521         (timer_id2ptr): Fix typo.
7523 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7525         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7526         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7527         * sysdeps/ia64/pthreaddef.h: Likewise.
7528         * sysdeps/powerpc/pthreaddef.h: Likewise.
7529         * sysdeps/s390/pthreaddef.h: Likewise.
7530         * sysdeps/sh/pthreaddef.h: Likewise.
7531         * sysdeps/x86_64/pthreaddef.h: Likewise.
7532         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7533         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7534         being changed.
7535         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7536         SIGTIMER is not unblocked.
7537         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7538         RT signal taken.
7539         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7540         be send.
7541         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7542         pass pointer through as ID.
7543         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7544         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7545         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7546         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7547         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7548         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7549         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7550         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7551         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7552         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7553         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7554         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7555         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7556         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7557         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7558         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7559         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7560         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7561         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7562         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7563         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7564         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7565         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7566         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7567         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7568         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7569         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7570         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7571         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7572         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7573         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7574         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7575         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7577         * pthreadP.h: Remove FRAME_LEFT definition.
7578         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7579         already left frame.  Programs which have this problem are not POSIX
7580         compliant.
7581         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7583 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7585         * sysdeps/pthread/tst-timer.c: Check return values of the
7586         functions we test.
7588 2003-03-23  Roland McGrath  <roland@redhat.com>
7590         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7591         * tst-tls3mod.c: Likewise.
7592         * tst-tls1.c: Likewise.
7593         * tst-tls2.c: Likewise.
7595         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7596         undefined behavior.
7598         * tst-join5.c (tf1, tf2): Add a cast.
7600         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7602         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7603         Don't test anything.
7604         * tst-cond4.c: Likewise.
7605         * tst-cond6.c: Likewise.
7606         * tst-flock2.c: Likewise.
7607         * tst-mutex4.c: Likewise.
7608         * tst-rwlock4.c: Likewise.
7609         * tst-signal1.c: Likewise.
7610         * tst-spin2.c: Likewise.
7611         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7613         * tst-mutex4.c: Use test-skeleton.c.
7614         * tst-spin2.c: Likewise.
7615         * tst-sysconf.c: Likewise.
7616         * tst-barrier2.c: Likewise.
7617         * tst-cond4.c: Likewise.
7618         * tst-cond6.c: Likewise.
7619         * tst-rwlock4.c: Likewise.
7620         * tst-unload.c: Likewise.
7621         * tst-flock2.c (do_test): Use return instead of exit.
7623 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7625         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7627 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7629         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7630         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7631         instead of __lll_compare_and_swap.
7632         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7633         Likewise.
7634         Removed definition if __lll_compare_and_swap.
7636         * cancellation.c: Adjust for new form of compare&exchange macros.
7637         * cleanup_defer.c: Likewise.
7638         * init.c: Likewise.
7639         * libc-cancellation.c: Likewise.
7640         * old_pthread_cond_broadcast.c: Likewise.
7641         * old_pthread_cond_signal.c: Likewise.
7642         * old_pthread_cond_timedwait.c: Likewise.
7643         * old_pthread_cond_wait.c: Likewise.
7644         * pthread_cancel.c: Likewise.
7645         * pthread_create.c: Likewise.
7646         * pthread_detach.c: Likewise.
7647         * pthread_join.c: Likewise.
7648         * pthread_key_delete.c: Likewise.
7649         * pthread_setcancelstate.c: Likewise.
7650         * pthread_setcanceltype.c: Likewise.
7651         * pthread_timedjoin.c: Likewise.
7652         * pthread_tryjoin.c: Likewise.
7653         * sysdeps/pthread/createthread.c: Likewise.
7655 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7657         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7658         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7659         definitions.  Replace uses with calls to atomic_* functions.
7660         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7661         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7662         __lll_test_and_set calls with atomic_exchange_and_add and
7663         atomic_exchange calls respectively.
7664         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7665         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7666         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7667         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7668         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7669         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7670         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7672         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7673         returns the old value.
7675 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7677         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7678         int for variable OLDVAL and correct inline assembler contraint.
7679         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7680         type int for variable OLD.
7682         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7683         only for s390-32.
7684         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7685         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7686         instead of multiple_threads field in the TCB.
7688 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7690         * sysdeps/i386/i686/bits/atomic.h: Removed.
7691         * sysdeps/i386/i586/bits/atomic.h: Removed.
7692         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7693         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7694         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7695         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7696         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7697         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7698         * atomic.h: Removed.  Moved to glibc.
7700         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7701         support for clock selection.
7703         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7704         signalling waiters.
7706 2003-03-18  Roland McGrath  <roland@redhat.com>
7708         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7709         Add __lll_rel_instr first.  Add memory clobber.
7710         (lll_mutex_unlock): Use __lll_test_and_set.
7711         From Paul Mackerras <paulus@samba.org>.
7713         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7714         unconditionally.
7715         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7716         (SINGLE_THREAD_P):  Add `header.' prefix.
7717         From Paul Mackerras <paulus@samba.org>.
7719         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7720         pthread_timedjoin_np to ...
7721         (libpthread: GLIBC_2.3.3): ... here.
7722         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7724         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7725         Avoid shadowing VAL variable.
7727         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7728         New macro.
7730 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7732         * Makefile (tests): Add tst-cond11.
7733         * tst-cond11.c: New file.
7735         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7736         struct passed to cleanup handler to eliminate one more
7737         instruction.
7738         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7740         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7741         (pthrad_cond_t): Replace __unused field with __clock.
7743         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7744         waken all waiters in cleanup handler.
7745         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7746         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7748         * pthread_condattr_getclock.c: New file.
7749         * pthread_condattr_setclock.c: New file.
7750         * sysdeps/pthread/pthread.h: Declare these new functions.
7751         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7752         * Makefile (libpthread-routines): Add the new functions.
7753         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7754         Renamed field to value.  Document use of the bits.
7755         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7756         change.
7757         * pthread_condattr_setpshared.c: Likewise.
7758         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7759         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7760         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7761         Add __clock field.
7762         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7763         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7764         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7765         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7767         Implement clock selection.
7768         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7769         * pthread-errnos.sym: Add ENOSYS.
7770         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7771         _POSIX_CLOCK_SELECTION.
7772         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7774         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7775         invalid .size directive.
7777 2003-03-17  Roland McGrath  <roland@redhat.com>
7779         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7780         Formatting tweaks.
7782 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7784         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7785         Use __lll_add instead of spelling it out.  Use protected symbol names.
7786         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7787         Use __lll_add.
7788         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7789         Renamed from lll_compare_and_swap.  Use new name where necessary.
7790         (__lll_add): Defined.
7791         (__lll_dec_if_positive): Defined.
7792         (__lll_test_and_set): Defined.
7793         * sysdeps/ia64/pthread_spin_init.c: Removed.
7794         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7795         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7796         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7797         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7798         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7799         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7800         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7801         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7802         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7803         __sync_lock_release_si.
7804         Patch by Jakub Jelinek.
7806         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7807         Fix timeout handling.
7808         (__lll_timedwait_tid): Likewise.
7809         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7810         Patch by Jakub Jelinek.
7812         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7814 2003-03-17  Roland McGrath  <roland@redhat.com>
7816         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7817         * sysdeps/pthread/pthread_spin_init.c: New file.
7818         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7819         * sysdeps/powerpc/Makefile: New file.
7820         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7821         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7822         * sysdeps/powerpc/pthreaddef.h: New file.
7823         * sysdeps/powerpc/tcb-offsets.sym: New file.
7824         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7825         * sysdeps/powerpc/tls.h: New file.
7826         * sysdeps/powerpc/bits/atomic.h: New file.
7827         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7828         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7829         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7831         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7832         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7833         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7834         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7835         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7836         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7837         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7838         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7839         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7840         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7841         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7842         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7843         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7844         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7845         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7847         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7848         not gettimeofday.
7849         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7850         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7851         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7852         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7853         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7855 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7857         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7858         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7859         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7860         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7861         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7863 2003-03-16  Roland McGrath  <roland@redhat.com>
7865         * tst-fork4.c: Include <string.h>.
7866         * tst-signal2.c: Likewise.
7867         * tst-mutex5.c (do_test): exit -> return.
7868         * tst-mutex2.c: Include <stdlib.h>.
7870 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7872         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7873         (__lll_mutex_timedlock_wait): Correct expected value after
7874         spurious wakeup.  Otherwise we would never wait again.
7876         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7877         zone versus inline asm stupidity.  Use correct instructions.
7879         * tst-rwlock6.c: Add some more status output.
7881 2003-03-15  Roland McGrath  <roland@redhat.com>
7883         * sysdeps/pthread/configure.in: New file.
7884         * sysdeps/pthread/configure: New file (generated).
7886 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7888         * allocatestack.c (allocate_stack): Store the exact stack size of
7889         user allocated stacks.
7891 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7893         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7894         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7895         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7896         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7897         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7898         Use `header.' prefix.
7899         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7901 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7903         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7904         __builtin_frame_address, use stack pointer.
7906         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7907         instead of __builtin_frame_pointer.
7909 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7911         * tst-basic1.c (do_test): Add cast to avoid warning.
7912         * tst-basic2.c (do_test): Likewise.
7914         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7915         amount of stack correction.
7917         * tst-fork4.c: Use test-skeleton.c.
7919 2003-03-14  Roland McGrath  <roland@redhat.com>
7921         * init.c: Fix typo "#eli" for "#else".
7923 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7925         * allocatestack.c (__stack_user): Use hidden_data_def.
7926         * pthread_create.c (__pthread_keys): Likewise.
7928         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7930 2003-03-14  Roland McGrath  <roland@redhat.com>
7932         * tst-fork4.c: New file.
7933         * Makefile (tests): Add it.
7935         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7936         we always define the padding space.
7937         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7938         stopped supporting its own extensions fully.
7939         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7940         struct also called `header', so `header.multiple_threads' is the field
7941         name to use on all machines.
7942         * allocatestack.c (allocate_stack): Use `header.' prefix.
7943         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7944         * pthread_create.c (__pthread_create_2_1): Likewise.
7945         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7946         (THREAD_SELF): Likewise.
7947         * sysdeps/x86_64/tls.h: Likewise.
7948         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7949         (SINGLE_THREAD_P): Likewise.
7950         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7951         (SINGLE_THREAD_P): Likewise.
7952         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7953         (SINGLE_THREAD_P): Likewise.
7955         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7956         value directly.
7958 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7960         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7961         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7963         * pthread_create.c (start_thread): setjmp is expected to return 0.
7965         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7966         (THREAD_GETMEM_NC): Likewise.
7968 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7970         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7971         and the size of the stack which must be allocated is a multiple,
7972         allocate one more page.
7973         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7974         MULTI_PAGE_ALIASING.
7976 2003-03-13  Roland McGrath  <roland@redhat.com>
7978         * pthread_create.c (start_thread): Set EXITING_BIT after the
7979         event-reporting (and destructors), not before.
7981 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7983         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7984         lll_futex_wake): Declare register variables as long int instead of
7985         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7986         Make syscall arguments clobbered by the syscall.
7987         (lll_futex_wait): Define using lll_futex_timed_wait.
7989         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7990         to void *.
7992         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7993         PPID if [! NDEBUG].
7995         * allocatestack.c (nptl_ncreated): Only declare if
7996         COLORING_INCREMENT != 0.
7998         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7999         (__libc_enable_asynccancel_2): Remove prototype.
8001         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
8002         ctid to match kernel.
8004 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8006         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
8007         libc_multiple_threads.
8008         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
8009         __libc_multiple_threads to...
8010         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
8012         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
8013         versioning.
8014         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8015         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8017         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
8018         (__pthread_once_internal): Define.
8020         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
8021         macros instead of .symver directly.
8022         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8023         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
8025         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
8026         * sysdeps/x86_64/tcb-offsets.sym: New file.
8027         * sysdeps/x86_64/Makefile: New file.
8029         * sysdeps/i386/tcb-offsets.sym: Add SELF.
8030         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
8031         to access own pthread_t in TCB.
8032         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8033         Likewise.
8034         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8035         Likewise.
8036         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8038 2003-03-12  Roland McGrath  <roland@redhat.com>
8040         * pthread-errnos.sym: New file.
8041         * Makefile (gen-as-const-headers): New variable, list that file.
8042         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
8043         header <pthread-errnos.h> instead of defining errno values here.
8044         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
8045         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8046         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8047         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8048         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8049         Likewise.
8050         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8051         Likewise.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8054         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8055         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8056         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8057         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8058         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8059         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
8061         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8062         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
8063         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
8064         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
8065         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
8066         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
8067         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
8068         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
8069         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
8070         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
8071         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
8072         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8073         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
8074         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
8075         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
8076         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
8077         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
8078         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
8080         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
8081         CLONE_CHILD_SETTID worked.
8083 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
8085         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
8086         file.
8087         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8088         file.
8090         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8091         (pthread_cond_t): Add padding.
8093         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8094         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8095         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8097         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8098         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8099         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8100         (__pthread_rwlock_timedrdlock): Likewise.
8101         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8102         (__pthread_rwlock_wrlock): Likewise.
8103         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8104         (__pthread_rwlock_rdlock): Likewise.
8106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8108         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8109         result of lock re-get if it fails.
8111 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8113         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8114         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8115         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8117         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8118         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8119         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8120         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8121         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8122         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8124         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8125         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8127         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8128         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8129         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8130         (create_thread): Likewise.
8131         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8132         * init.c (__pthread_initialize_minimal_internal): Initialize
8133         __libc_multiple_threads_ptr if necessary.
8134         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8135         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8136         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8137         __libc_multiple_threads.
8138         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8139         necessary.
8141         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8142         (THREAD_SETMEM_NC): Likewise.
8144         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8145         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8146         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8147         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8149         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8150         Eliminate one entire instruction.
8152         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8153         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8154         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8155         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8156         instead of __pthread_enable_asynccancel.
8157         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8158         (__pthread_cond_wait): Likewise.
8159         * sysdeps/pthread/pthread_cond_timedwait.c
8160         (__pthread_cond_timedwait): Likewise.
8161         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8163         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8164         (__condvar_cleanup): Wake up all waiters in case we got signaled
8165         after being woken up but before disabling asynchronous
8166         cancellation.
8167         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8168         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8169         (__condvar_cleanup): Likewise.
8171         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8172         Make it an error if architecture has no #if case.  Add x86-64.
8174         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8175         pt-initfini.s generation.
8177         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8178         (TLS_INIT_TP): Fix typo.
8180 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8182         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8183         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8185         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8186         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8187         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8188         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8189         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8190         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8191         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8192         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8194 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8196         * sysdeps/pthread/pthread_cond_timedwait.c
8197         (__pthread_cond_timedwait): Return the result of the final
8198         locking.  If it succeeds, the regular function return value.
8200         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8201         Return result of the final locking.
8202         * version.c (__nptl_main): Work around problems with the strange
8203         INTERNAL_SYSCALL macro on ppc32.
8204         * init.c (__pthread_initialize_minimal_internal): Unblock
8205         SIGCANCEL in case the parent blocked it.
8206         Reported by Paul Mackerras <paulus@samba.org>.
8208         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8209         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8210         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8212 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8214         * sysdeps/pthread/pthread_cond_timedwait.c
8215         (__pthread_cond_timedwait): Unlock and fail if
8216         __pthread_mutex_unlock_internal failed.
8218         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8219         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8220         Use ARCH_CLONE.
8221         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8222         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8223         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8224         ALLOCATE_STACK): New macros.
8225         (TLS_TPADJ): New macro.
8226         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8227         (allocate_stack): Handle TLS_DTV_AT_TP and
8228         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8229         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8230         Don't set PD->self.
8231         * init.c [__ia64__] (__NR_set_tid_address): Define.
8233         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8234         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8235         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8236         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8237         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8238         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8239         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8240         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8241         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8242         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8243         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8244         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8245         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8246         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8247         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8248         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8249         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8250         * sysdeps/ia64/bits/atomic.h: New file.
8251         * sysdeps/ia64/Makefile: New file.
8252         * sysdeps/ia64/pthread_spin_init.c: New file.
8253         * sysdeps/ia64/pthread_spin_lock.c: New file.
8254         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8255         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8256         * sysdeps/ia64/pthreaddef.h: New file.
8257         * sysdeps/ia64/tcb-offsets.sym: New file.
8258         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8259         * sysdeps/ia64/tls.h: New file.
8261         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8262         to syscall instead of no arguments.
8264 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8266         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8267         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8268         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8269         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8271         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8272         unused code.
8274         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8276         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8277         lowlevelbarrier.sym.
8278         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8279         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8280         Include lowlevelbarrier.h and don't define offsets locally.
8281         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8283         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8284         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8285         (__lll_mutex_timedlock_wait): Likewise.
8286         (lll_mutex_lock): Adjust asm for that.
8287         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8288         (lll_lock): Adjust asm for operand order change.
8289         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8290         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8292         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8293         Reverse order of parameters.
8294         (__lll_timedwait_tid): Remove regparms attribute.
8295         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8296         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8298         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8299         (__lll_timedwait_tid): Remove one unnecessary instruction.
8301         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8302         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8303         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8304         lowlevelmutex.S.
8306         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8307         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8308         for NOT_IN_libc.
8309         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8310         lowlevellock.S.
8312         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8313         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8314         for libc.so.
8315         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8316         define LOCK here (if UP is not defined).  The actual code is in
8317         lowlevelmutex.S.
8319         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8320         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8321         __lll_timedwait_tid for libc.so.
8322         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8323         define LOCK here (if UP is not defined).  The actual code is in
8324         lowlevellock.S.
8326         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8327         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8328         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8329         instead of lowlevelsem.h.
8330         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8331         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8332         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8334         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8335         lowlevelrwlock.sym.
8336         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8337         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8338         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8340         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8341         register loading.
8342         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8343         last changed.  D'oh.
8345         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8347         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8348         of __libc_locking_needed.
8349         (lll_trylock): Initialize %eax to zero.
8351         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8352         pthread_cond_t definition.
8354 2003-03-10  Roland McGrath  <roland@redhat.com>
8356         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8357         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8358         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8359         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8360         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8362         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8363         Instead of setting PD->multiple_threads, set globals
8364         __pthread_multiple_threads and __libc_multiple_threads.
8365         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8366         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8367         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8369         * descr.h (struct pthread): Conditionalize first member on
8370         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8371         containing an anonymous tcbhead_t.  Move `list' member out.
8372         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8373         * allocatestack.c: Remove use of `header.data.' prefix.
8374         * pthread_create.c: Likewise.
8375         * init.c (__pthread_initialize_minimal_internal): Likewise.
8376         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8377         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8378         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8379         * sysdeps/x86_64/tls.h: Likewise.
8380         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8381         (SINGLE_THREAD_P): Likewise.
8382         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8383         (SINGLE_THREAD_P): Likewise.
8384         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8385         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8387 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8389         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8391         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8392         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8394         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8395         leftovers from the ia32 code.
8397         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8398         memory load.
8399         (clear_once_control): Don't load %esi.
8401         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8402         handling.
8404         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8406         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8407         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8409         * Makefile (tests): Add tst-cond10.
8410         * tst-cond10.c: New file.
8412 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8414         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8415         * tst-signal3.c (do_test): Likewise.
8416         * tst-sem5.c (do_test): Likewise.
8417         * tst-kill6.c (do_test): Likewise.
8418         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8420         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8421         of inc/dec.
8422         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8423         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8424         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8425         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8426         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8427         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8429         Likewise.
8430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8431         Likewise.
8432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8433         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8434         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8435         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8436         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8437         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8438         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8439         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8441         * allocatestack.c (allocate_stack): If mprotect() fails free the
8442         TLS memory.
8444 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8446         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8448         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8449         lll_wake_tid.  This was used only to work around kernel limits in
8450         the early days.
8451         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8452         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8453         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8454         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8456         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8457         (__pthread_initialize_minimal_internal): Change initialization of
8458         __static_tls_align_m1 appropriately.
8459         * pthreadP.h (__static_tls_align_m1): Renamed from
8460         __static_tls_align.
8461         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8462         instead of __static_tls_align-1.
8464 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8466         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8468         * pthread_create.c: Define __pthread_keys using nocommon
8469         attribute, not by placing it explicitly in bss.
8470         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8472         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8473         Use it in mmap call to allocate stacks.
8475         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8477         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8478         result of the thread function.
8480 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8482         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8483         version is just fine.
8485         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8486         (__pthread_child_handler): Renamed from pthread_child_handler,
8487         exported, and marked hidden.  Change all users.
8488         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8489         free __pthread_child_handler from child list.
8491 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8493         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8495         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8496         Fix handling of cancellation and failing pthread_mutex_unlock call.
8497         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8498         (__pthread_cond_wait): Likewise.
8500         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8501         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8502         lll_futex_timed_wait call.
8503         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8504         (pthread_rwlock_timedwrlock): Likewise.
8506         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8507         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8508         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8510         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8511         check of lll_futex_wake return value.
8513 2003-03-03  Roland McGrath  <roland@redhat.com>
8515         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8517         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8518         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8519         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8521 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8523         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8524         error for CPU clocks.
8526         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8527         _POSIX_MONOTONIC_CLOCK.
8528         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8530         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8531         recent kernels.
8533 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8535         * descr.h (struct pthread): Move cleanup field to the front.
8537 2003-03-01  Roland McGrath  <roland@redhat.com>
8539         * sem_open.c (sem_open): Braino fix.
8541 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8543         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8544         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8545         __pthread_cleanup_pop functionality.
8546         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8548         * descr.h (struct pthread): Move tid field to the front now that
8549         it is often used.
8551         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8552         (__lll_mutex_timedlock_wait): Remove.
8553         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8554         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8555         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8556         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8557         (lll_unlock_wake_cb): Don't save and restore %esi.
8558         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8559         %esi.
8560         (__lll_timedwait_tid): Add alignment.
8561         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8562         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8563         %esi.
8564         (__lll_timedwait_tid): Removed.
8565         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8566         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8567         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8568         (pthread_barrier_wait): Don't save, load, and restore %esi for
8569         last thread.
8570         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8571         (__pthread_cond_signal): Don't save, load, and restore %esi.
8572         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8573         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8574         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8575         Don't save, load, and restore %esi.
8577 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8579         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8580         Release lock before waking up the waiters.
8582         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8584         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8585         (reader_thread): Likewise.
8587         * sysdeps/pthread/pthread_rwlock_unlock.c
8588         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8589         to wake up readers if there are none.
8591         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8592         Release internal lock before wake threads.
8594 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8596         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8597         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8598         predefined.
8599         * tst-rwlock9.c: Likewise.
8600         * tst-rwlock10.c: New file.
8601         * tst-rwlock11.c: New file.
8603         * Makefile (tests): Add tst-dlsym1.
8604         * tst-dlsym1.c: New file.
8606         * init.c (__pthread_initialize_minimal_internal): Set
8607         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8608         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8610 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8612         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8614         * tst-cond2.c: Fix sychronization with child.
8616         * tst-rwlock8.c (reader_thread): Remove unused variable.
8618         * Makefile: Add rules to build and run tst-tls3.
8619         * tst-tls3.c: New file.
8620         * tst-tls3mod.c: New file.
8622         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8623         * tst-rwlock8.c: New file.
8624         * tst-rwlock9.c: New file.
8625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8626         complete broken rwlock implementation.
8627         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8628         Likewise.
8629         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8630         Likewise.
8631         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8632         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8633         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8634         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8635         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8636         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8637         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8639 2003-02-23  Roland McGrath  <roland@redhat.com>
8641         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8643 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8645         * Makefile (tests): Add tst-context1.
8646         * tst-context1.c: New file.
8648         * Makefile (tests): Add tst-tls1 and tst-tls2.
8649         * tst-tls1.c: New file.
8650         * tst-tls2.c: New file.
8652         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8653         for failed cmpxchg.
8655         * pthread_create.c (start_thread): Set EXITING_BIT early.
8657         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8658         (THREAD_GETMEM_NC): Likewise.
8660 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8662         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8663         off 3 more bytes by using offset-less instructions when possible.
8665         * Makefile: Add dependency for $(objpfx)version.d.
8667         * eintr.c (eintr_source): Add unnecessary return but the compiler
8668         insists.
8670         * tst-kill3.c: Include <unistd.h>.
8672 2003-02-21  Roland McGrath  <roland@redhat.com>
8674         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8676 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8678         * Makefile (tests): Add tst-eintr1.
8679         (distribute): Add eintr.c.
8680         * tst-eintr1.c: New file.
8681         * eintr.c: New file.
8683         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8685         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8686         Disallow sending SIGCANCEL.
8688         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8689         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8690         * tst-kill1.c: New file.
8691         * tst-kill2.c: New file.
8692         * tst-kill3.c: New file.
8693         * tst-kill5.c: New file.
8694         * tst-kill6.c: New file.
8695         * tst-basic7.c: Renamed to...
8696         * tst-kill4.c: ...this.
8698 2003-02-21  Roland McGrath  <roland@redhat.com>
8700         * Makefile (install-lib-ldscripts): New variable.
8702 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8704         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8705         * pthread_cancel.c: Use INVALID_TD_P.
8706         * pthread_detach.c: Likewise.
8707         * pthread_getschedparam.c: Likewise.
8708         * pthread_setschedparam.c: Likewise.
8709         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8710         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8711         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8712         * pthread_timedjoin.c: Likewise.
8714         * tst-basic7.c: Include <signal.h>.
8716         * pthread_join.c (pthread_join): Limited checking for invalid
8717         descriptors.
8718         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8720 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8722         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8723         beginning of the loop.  Clear the entire first block of TSD.
8724         * Makefile (tests): Add tst-key4.
8725         * tst-key4.c: New file.
8727 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8729         * Makefile (tests): Add tst-basic7.
8730         * tst-basic7.c: New file.
8732         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8733         Add some more __builtin_expect.
8735         * pthreadP.h: Define dummy version of DEBUGGING_P.
8737 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8739         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8740         _POSIX_THREAD_PRIORITY_SCHEDULING.
8741         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8742         _XOPEN_REALTIME_THREADS.
8743         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8745         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8746         kernel returns EINVAL for PID <= 0, work around it.
8748         * Makefile (tests): Add tst-signal5.
8749         * tst-signal5.c: New file.
8751         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8752         and LOGIN_NAME_MAX.
8754         * tst-cancel1.c (tf): Block all signals.
8756         * Makefile (tests): Add tst-basic6.
8757         * tst-basic6.c: New file.
8759         * tst-basic1.c: Add test for process ID.
8761         * Makefile (tests): Add tst-cancel10.
8762         * tst-cancel10.c: New file.
8764         * Makefile (tests): Add tst-signal4.
8765         * tst-signal4.c: New file.
8767         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8768         __sigismember instead of sigismember.  Add __builtin_expect.
8770 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8772         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8773         pthread_setcancelstate, and pthread_rwlock_setpshared.
8775         * tst-cancel7.c (do_test): Make sure the pid file exists before
8776         canceling the thread.
8778         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8779         pthread_rwlock_timedrdlock tests.
8780         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8781         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8782         Check for invalid tv_nsec field.
8783         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8784         Likewise.
8786         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8787         recursive mutex of overflow.
8789         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8791         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8792         going into an endless loop.
8793         * Makefile (tests): Add tst-cancel9.
8794         * tst-cancel9.c: New file.
8796         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8798 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8800         * tst-mutex5.c (do_test): Add more timedlock tests.
8802         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8803         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8805         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8806         use INLINE_SYSCALL.  Error number is returned, not -1.
8808         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8809         and __deallocate_stack with internal_function.
8810         * pthread_create.c: Adjust definitions appropriately.
8811         * allocatestack.c: Likewise.
8813         * pthread_join.c: Add one more __builtin_expect.
8814         * pthread_timedjoin.c: Likewise.
8816         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8817         not data of sequence number does not match.
8818         Add one __builtin_expect.
8820         * Makefile (tests): Add tst-clock1.
8821         * tst-clock1.c: New file.
8823         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8824         negative arguments.
8825         * Makefile (tests): Add tst-basic5.
8826         * tst-basic5.c: New file.
8828 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8830         * Makefile (tests): Add tst-basic4.
8831         * tst-basic4.c: New file.
8833         * pthreadP.h: Add declaraction for __nptl_nthreads.
8834         * pthread_create.c: Define __nptl_nthreads
8835         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8836         after thread is done.  If then zero, call exit(0).
8837         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8838         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8839         * init.c (pthread_functions): Initialize ptr_nthreads.
8840         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8841         (__reclaim_stacks): Decrement __nptl_nthreads.
8842         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8843         Define.
8844         * Makefile (tests): Add tst-basic3.
8845         * tst-basic3.c: New file.
8847         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8848         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8849         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8850         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8851         if asynchronous canceling is enabled.
8852         * pthread_join.c (pthread_join): When recognizing circular joins,
8853         take into account the other thread might be already canceled.
8854         * Makefile (tests): Add tst-join5.
8855         * tst-join5.c: New file.
8857         * Makefile (tests): Add tst-join4.
8858         * tst-join4.c: New file.
8860 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8862         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8864 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8866         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8867         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8868         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8869         warning.
8870         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8871         to avoid warning.
8872         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8873         error if lll_futex_wake failed.
8875 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8877         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8878         handling of cancellation and failung pthread_mutex_unlock call.
8879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8880         * Makefile (tests): Add tst-cond8 and tst-cond9.
8881         * tst-cond8.c: New file.
8882         * tst-cond9.c: New file.
8884         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8886         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8887         non-standard initializers with __USE_GNU.
8889         * Makefile (tests): Add tst-cleanup3.
8890         * tst-cleanup3.c: New file.
8892 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8894         * Makefile (tests): Add tst-attr1 and tst-attr2.
8895         * tst-attr1.c: New file.
8896         * tst-attr2.c: New file.
8898         * Makefile: Add rules to build and run tst-atfork2 test.
8899         * tst-atfork2.c: New file.
8900         * tst-atfork2mod.c: New file.
8902         * sysdeps/unix/sysv/linux/unregister-atfork.c
8903         (__unregister_atfork): Free the memory allocated for the handlers
8904         after removing them from the lists.
8906         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8907         cleanup function.
8909         * tst-atfork1.c (do_test): Wait for the child we forked.
8910         Report error in child.
8912         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8914         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8916 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8918         * Makefile (tests): Add tst-cancel8.
8919         * tst-cancel8.c: New file.
8921         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8922         clearing of control variable.
8923         * Makefile (tests): Add tst-once3 and tst-once4.
8924         * tst-once3.c: New file.
8925         * tst-once4.c: New file.
8927 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8929         * sysdeps/sh/Makefile: New file.
8930         * sysdeps/sh/bits/atomic.h: New file.
8931         * sysdeps/sh/pthread_spin_init.c: New file.
8932         * sysdeps/sh/pthread_spin_lock.c: New file.
8933         * sysdeps/sh/pthread_spin_trylock.S: New file.
8934         * sysdeps/sh/pthread_spin_unlock.S: New file.
8935         * sysdeps/sh/pthreaddef.h: New file.
8936         * sysdeps/sh/tcb-offsets.sym: New file.
8937         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8938         * sysdeps/sh/tls.h: New file.
8939         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8940         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8941         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8942         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8943         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8944         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8945         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8946         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8947         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8948         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8949         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8950         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8951         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8952         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8953         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8954         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8955         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8956         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8957         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8958         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8959         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8960         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8961         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8962         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8964         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8965         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8966         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8967         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8968         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8970 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8972         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8973         according to POSIX.
8975         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8977 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8979         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8980         (TLS_GET_FS): New #define.
8981         (TLS_SET_FS): New #define.
8982         Correct value of __NR_set_thread_area.
8984         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8986 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8988         * Makefile (tests): Add tst-popen1.
8989         * tst-popen1.c: New file.
8991         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8992         but inactive generalization.
8993         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8994         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8995         Minor optimization, remove one instruction.
8996         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8998 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9000         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
9002 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
9004         * init.c (__NR_set_tid_address): Add #ifdef for s390.
9005         * sysdeps/pthread/pthread_barrier_wait.c: New file.
9006         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
9007         * sysdeps/pthread/pthread_cond_signal.c: New file.
9008         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
9009         * sysdeps/pthread/pthread_cond_wait.c: New file.
9010         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
9011         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
9012         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
9013         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
9014         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
9015         * sysdeps/s390/Makefile: New file.
9016         * sysdeps/s390/bits/atomic.h: New file.
9017         * sysdeps/s390/pthread_spin_init.c: New file.
9018         * sysdeps/s390/pthread_spin_lock.c: New file.
9019         * sysdeps/s390/pthread_spin_trylock.c: New file.
9020         * sysdeps/s390/pthread_spin_unlock.c: New file.
9021         * sysdeps/s390/pthreaddef.h: New file.
9022         * sysdeps/s390/tcb-offsets.sym: New file.
9023         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
9024         * sysdeps/s390/tls.h: New file.
9025         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
9026         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
9027         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
9028         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
9029         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
9030         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
9031         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9032         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
9033         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
9034         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
9035         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
9036         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
9037         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
9038         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
9039         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
9040         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
9041         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
9042         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
9043         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
9044         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
9045         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
9046         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
9047         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
9049 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
9051         * atomic.h: Add a couple more default implementations.
9052         (atomic_compare_and_exchange_acq): Use
9053         __arch_compare_and_exchange_32_acq in return value definition.  It
9054         always exists.
9055         (atomic_bit_set): Renamed from atomic_set_bit.
9056         Add missing atomic_ prefixes.
9058         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
9059         thread library is available, use correct value to mark initialized
9060         once variable.
9062 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
9064         * allocatestack.c (allocate_stack): Use __getpagesize instead of
9065         __sysconf to determine pagesize.
9067         * pthread_create.c: Include <atomic.h>.
9068         * allocatestack.c (allocate_stack): Implement coloring of the
9069         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
9070         size minus one.  Adjust users.
9071         * sysdeps/i386/i686/Makefile: New file.
9073 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
9075         * allocatestack.c: Improve comment throughout the file.
9077         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
9078         (__lll_lock_wait): Add branch prediction.
9079         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
9080         (__lll_lock_wait): Likewise.
9081         (lll_unlock_wake_cb): Removed.
9083 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
9085         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
9086         _POSIX_THREAD_PRIORITY_SCHEDULING.
9088 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9090         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9091         Fix return type of ptr___pthread_getspecific.
9093 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9095         * Makefile (tests): Add tst-umask1.
9096         (tst-umask1-ARGS): Define.
9097         * tst-umask1.c: New file.
9099 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9101         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9102         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9103         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9104         pthread_rwlock_unlock.
9105         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9106         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9107         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9108         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9109         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9110         New file.
9111         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9112         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9113         New file.
9114         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9115         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9116         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9117         New file.
9118         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9119         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9120         New file.
9121         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9122         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9123         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9124         New file.
9125         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9126         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9127         New file.
9128         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9130         * Makefile (libpthread-routines): Remove lowlevelcond and
9131         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9132         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9133         and pthread_cond_broadcast.
9134         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9135         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9136         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9137         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9138         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9139         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9140         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9141         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9142         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9143         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9144         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9145         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9146         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9147         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9148         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9149         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9150         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9151         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9152         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9153         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9154         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9155         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9156         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9157         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9158         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9159         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9160         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9161         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9162         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9163         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9164         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9166         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9167         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9168         of the code is moved to ...
9169         * sysdeps/pthread/createthread.c: ...here.  New file.
9171 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9173         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9174         (__new_sem_post): Clear %eax before returning.
9175         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9177         * Makefile (tests): Add tst-cleanup2.
9178         * tst-cleanup2.c: New file.
9180         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9181         Interpret first parameter correctly.
9183 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9185         * Makefile (headers): Add bits/semaphore.h.
9187 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9189         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9190         if not SHARED.
9192 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9194         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9195         must be used and mapping failed.
9196         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9198         * Makefile (CFLAGS-pthread_self.os): Define this, not
9199         CFLAGS-pthread_self.c.
9201 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9203         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9204         lll_unlock_wake_cb.
9206         * Makefile (libpthread-routines): Add version.  Add rules to build
9207         version.os and banner.h.
9208         * version.c: New file.
9210 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9212         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9213         the alias unconditional.
9214         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9216 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9218         * Makefile (CFLAGS-pthread_self.c): New definition.
9220 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9222         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9223         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9224         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9225         * init.c (__pthread_initialize_minimal_internal): Likewise.
9227 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9229         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9231         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9232         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9233         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9234         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9235         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9236         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9238 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9240         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9241         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9242         * tst-cancel-wrappers.sh: Remove all exceptions.
9244 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9246         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9247         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9249         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9250         Use __libc_pthread_functions array if SHARED.
9252         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9253         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9255         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9256         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9257         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9258         __libc_ptf_call instead of __libc_maybe_call.
9259         (PTF): New #define.
9260         (__libc_cleanup_region_start): Wrap function name with PTF call.
9261         (__libc_cleanup_region_end): Likewise.
9262         (__libc_cleanup_end): Likewise.
9264         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9265         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9266         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9267         * pthreadP.h: Add prototypes.
9269         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9270         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9271         __pthread_rwlock_unlock aliases.
9272         * pthreadP.h: Add prototypes for new aliases.
9274         * pthreadP.h (struct pthead_functions): Moved to...
9275         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9276         * init.c (pthread_functions): Add initializers for new elements.
9278         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9279         __pthread_cleanup_pop_restore aliases.
9280         * pthreadP.h: Add prototypes.
9282         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9283         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9284         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9285         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9286         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9287         * pthreadP.h: Adjust prototypes and callers.
9289 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9291         * Makefile (tests): Add tst-cancel7.
9292         (tst-cancel7-ARGS): New variable.
9293         * tst-cancel7.c: New file.
9295         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9296         around gcc defficiencies.
9297         * old_pthread_cond_signal.c: Likewise.
9298         * old_pthread_cond_timedwait.c: Likewise.
9299         * old_pthread_cond_wait.c: Likewise.
9301         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9303 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9305         * Makefile (tests): Add tst-cond7.
9306         * tst-cond7.c: New file.
9308         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9309         (condvar_cleanup): Get condvar address from the right place.
9311         * atomic.h: Correct definitions of atomic_full_barrier,
9312         atomic_read_barrier, atomic_write_barrier.
9314         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9315         race-free.
9316         * old_pthread_cond_signal.c: Likewise.
9317         * old_pthread_cond_timedwait.c: Likewise.
9318         * old_pthread_cond_wait.c: Likewise.
9320 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9322         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9324 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9326         * pthreadP.h (pthread_cond_2_0_t): New type.
9327         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9328         Use new type for the 2.0 condvar function prototypes.
9329         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9330         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9331         parameter.
9332         * old_pthread_cond_destroy.c: Likewise.
9333         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9334         * old_pthread_cond_signal.c: Likewise.
9335         * old_pthread_cond_timedwait.c: Likewise.
9336         * old_pthread_cond_wait.c: Likewise.
9338         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9339         (__pthread_cond_wait): Don't save cancellation mode and seq value
9340         in same location.
9342         * herrno.c (__h_errno_location): Don't define as weak.
9344 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9346         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9347         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9348         and pthread_cond_wait.
9349         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9350         Renamed to...
9351         (__pthread_cond_broadcast_2_0): ... this.
9352         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9353         Renamed to...
9354         (__pthread_cond_destroy_2_0): ... this.
9355         * old_pthread_cond_init.c (__old_pthread_cond_init):
9356         Renamed to...
9357         (__pthread_cond_init_2_0): ... this.
9358         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9359         Renamed to...
9360         (__pthread_cond_signal_2_0): ... this.
9361         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9362         Renamed to...
9363         (__pthread_cond_wait_2_0): ... this.
9364         * pthread_cond_destroy.c: Include shlib-compat.h.
9365         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9366         * pthread_cond_init.c: Include shlib-compat.h.
9367         (pthread_cond_init): Change strong_alias into versioned_symbol.
9368         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9369         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9370         fields.
9371         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9372         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9373         __pthread_cond_wait_2_0): New prototypes.
9374         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9375         __old_pthread_cond_init, __old_pthread_cond_signal,
9376         __old_pthread_cond_wait): Removed.
9377         * init.c: Include shlib-compat.h.
9378         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9379         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9380         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9381         ptr___pthread_cond_*_2_0 fields.
9382         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9383         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9385         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9386         LIBC_SIGACTION was not yet defined.
9387         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9388         [!defined LIBC_SIGACTION] (__sigaction): New function and
9389         libc_hidden_weak.
9390         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9391         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9393 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9395         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9397 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9399         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9400         New, larger type definition.
9401         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9402         implementation.
9403         * Versions [libpthread]: Add definitions for new pthread_cond_*
9404         interfaces for version GLIBC_2.3.2.
9405         * pthread_cond_init.c: Update initialization for new type definition.
9406         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9407         pthread_cond_timedwait, pthread_cond_signal, and
9408         pthread_cond_broadcast.  Add old_pthread_cond_init,
9409         old_pthread_cond_destroy, old_pthread_cond_wait,
9410         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9411         old_pthread_cond_broadcast.
9412         * old_pthread_cond_broadcast.c: New file.
9413         * old_pthread_cond_destroy.c: New file.
9414         * old_pthread_cond_init.c: New file.
9415         * old_pthread_cond_signal.c: New file.
9416         * old_pthread_cond_timedwait.c: New file.
9417         * old_pthread_cond_wait.c: New file.
9418         * pthreadP.h: Add prototypes for the compatibility interfaces.
9420         * pthread_cond_destroy.c: Don't include <errno.h>.
9422 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9424         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9425         unnecessary zero offset when addressing MUTEX.
9427 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9429         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9430         __register_atfork.
9431         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9432         for __register_atfork.
9434 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9436         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9437         instead of ASSEMBLER test macro.
9439         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9440         __libc_current_sigrtmax): Add libc_hidden_def.
9442         * sysdeps/pthread/list.h: Remove assert.h include.
9444 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9446         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9447         __pthread_initialize_minimal_internal not
9448         __pthread_initialize_minimal.
9450 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9452         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9453         __pthread_initialize_minimal as hidden.
9455         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9456         constructor.
9458 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9460         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9461         $(common-objpfx)format.lds, include that into the output script.
9462         Fix comment.
9463         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9465 2002-12-28  Andreas Jaeger  <aj@suse.de>
9467         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9468         nsec resolution changes.
9469         (xstat64_conv): Likewise.
9470         (xstat32_conv): Likewise.
9471         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9472         struct kernel_stat.
9473         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9474         structs stat and stat64.
9475         * time/time.h (__timespec_defined): Define for __USE_MISC.
9476         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9478 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9480         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9481         argument.
9482         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9483         (pthread_exit): Use strong_alias to avoid warnings.
9484         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9485         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9486         ptr___pthread_attr_init_2_*.
9487         * init.c (pthread_functions): Adjust.
9489 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9491         * forward.c: Make all functions available by default again.  It
9492         caused too much trouble.
9494         * pt-siglongjmp.c: Removed.
9496 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9498         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9499         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9500         * sysdeps/i386/Makefile: New file.
9501         * sysdeps/i386/tcb-offsets.sym: New file.
9502         * sysdeps/pthread/tcb-offsets.h: New file.
9503         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9504         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9506         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9507         __register_atfork...
9508         (GLIBC_2.3.2): ...here.
9510 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9512         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9513         pthread_attr_setstackaddr with __attribute_deprecated__.
9515 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9517         * pt-system.c (system): Remove cancellation handling.
9518         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9519         cancellation routines.
9521 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9523         * descr.h: Include <dl-sysdep.h>.
9524         (struct pthread): Move header.data.list to the back of the struct.
9525         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9526         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9527         (SYSINFO_OFFSEET): Likewise.
9529 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9531         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9532         Define.
9533         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9534         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9535         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9536         (USE_DL_SYSINFO): Undef.
9538 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9540         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9541         $(common-objpfx)libc.so.
9542         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9543         it is bigger than pipe buffer size even on arches with bigger
9544         page size.
9545         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9547 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9549         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9550         correct errno access for case that USE___THREAD is not defined.
9552 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9554         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9555         Patch by Marijn Ros <marijn@mad.scientist.com>.
9557 2002-12-22  Roland McGrath  <roland@redhat.com>
9559         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9561 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9563         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9565 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9567         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9568         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9569         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9571         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9572         of int $0x80.
9573         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9574         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9575         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9576         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9577         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9578         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9579         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9580         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9582         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9583         sysenter.
9584         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9586         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9588         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9589         in new TCB.
9590         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9591         that sysinfo is properly initialized.
9592         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9593         to 1 only for ld.so.
9595         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9596         RTLD_CORRECT_DYNAMIC_WEAK.
9598 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9600         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9601         Use return 0 as 6th argument to FORWARD4.
9602         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9604 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9606         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9607         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9608         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9609         (INIT_SYSINFO): New #define.
9610         (TLS_TP_INIT): Use INIT_SYSINFO.
9611         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9612         At test to make sure SYSINFO_OFFSET value is correct.
9613         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9615 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9617         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9618         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9619         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9620         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9621         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9622         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9623         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9625 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9627         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9628         macro instead of using int $0x80 directly.
9630         * sysdeps/pthread/bits/stdio-lock.h: New file.
9631         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9632         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9633         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9634         * Makefile (routines): Add libc-lowlevelmutex.
9636         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9637         __i686.get_pc_thunk.dx.
9639 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9641         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9642         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9643         ($(objpfx)tst-cancel-wrappers.out): New rule.
9644         * tst-cancel-wrappers.sh: New test.
9645         * tst-locale1.c: Include signal.h.
9646         (uselocale): Test static linking of __libc_current_sigrt*.
9648 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9650         * Makefile (tests): Add tst-cancel6.
9651         * tst-cancel6.c: New file
9653 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9655         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9656         Define meaningfully for assembler as well.
9657         * pthreadP.h (struct pthread_functions): Remove
9658         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9659         and ptr_pthread_attr_init_2_1 fields.
9660         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9661         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9662         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9663         (FORWARD3): Define using FORWARD4.
9664         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9665         versions.
9666         * pt-system.c: Remove duplicate stdlib.h include.
9668 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9670         * sem_init.c: Define sem_init@GLIBC_2.0.
9671         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9672         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9674         * flockfile.c: Moved to...
9675         * sysdeps/pthread/flockfile.c: ...here.  New file.
9676         * funlockfile.c: Moved to...
9677         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9678         * ftrylockfile.c: Moved to...
9679         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9681 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9683         * libc-cancellation.c: Guard both function with
9684         #if !defined NOT_IN_libc.
9685         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9686         automatically provided pthread wrappers.
9687         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9688         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9689         nor in libpthread.
9690         * pt-open.c: Removed.
9691         * pt-fcntl.c: Removed.
9692         * pt-fsync.c: Removed.
9693         * pt-lseek.c: Removed.
9694         * pt-msgrcv.c: Removed.
9695         * pt-msgsnd.c: Removed.
9696         * pt-msync.c: Removed.
9697         * pt-nanosleep.c: Removed.
9698         * pt-open64.c: Removed.
9699         * pt-pause.c: Removed.
9700         * pt-pread.c: Removed.
9701         * pt-pread64.c: Removed.
9702         * pt-pwrite.c: Removed.
9703         * pt-pwrite64.c: Removed.
9704         * pt-read.c: Removed.
9705         * pt-recv.c: Removed.
9706         * pt-recvfrom.c: Removed.
9707         * pt-recvmsg.c: Removed.
9708         * pt-send.c: Removed.
9709         * pt-sendto.c: Removed.
9710         * pt-sigtimedwait.c: Removed.
9711         * pt-sigwait.c: Removed.
9712         * pt-wait.c: Removed.
9713         * pt-waitpid.c: Removed.
9714         * pt-write.c: Removed.
9715         * pt-accept.c: Removed.
9716         * pt-close.c: Removed.
9717         * pt-connect.c: Removed.
9718         * pt-lseek64.c: Removed.
9719         * pt-sendmsg.c: Removed.
9720         * pt-tcdrain.c: Removed.
9722 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9724         * init.c (__pthread_initialize_minimal_internal): Renamed from
9725         __pthread_initialize_minimal.  Make old name an alias.  This
9726         converts a normal relocation into a relative relocation.
9728         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9730         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9731         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9732         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9733         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9734         pt-sigwaitinfo, pt-waitid, and pt-writev.
9735         * pt-creat.c: Removed.
9736         * pt-poll.c: Removed.
9737         * pt-pselect.c: Removed.
9738         * pt-readv.c: Removed.
9739         * pt-select.c: Removed.
9740         * pt-sigpause.c: Removed.
9741         * pt-sigsuspend.c: Removed.
9742         * pt-sigwaitinfo.c: Removed.
9743         * pt-waitid.c: Removed.
9744         * pt-writev.c: Removed.
9746         * init.c (pthread_functions): New variable.
9747         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9748         (or NULL) to __libc_pthread_init.
9749         * forward.c: Rewrite to use __libc:pthread_functions array to get
9750         function addresses.
9751         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9752         prototype.
9753         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9754         Take new parameter.  Copy content of variable pointed to by it
9755         to __libc_pthread_init.
9757         * pthreadP.h (struct pthread_functions): New type.
9758         (__libc_pthread_init): Declare.
9760         * pthread_attr_destroy.c: Add namespace protected alias.
9761         * pthread_attr_getdetachstate.c: Likewise.
9762         * pthread_attr_getinheritsched.c: Likewise.
9763         * pthread_attr_getschedparam.c: Likewise.
9764         * pthread_attr_getschedpolicy.c: Likewise.
9765         * pthread_attr_getscope.c: Likewise.
9766         * pthread_attr_setdetachstate.c: Likewise.
9767         * pthread_attr_setinheritsched.c: Likewise.
9768         * pthread_attr_setschedparam.c: Likewise.
9769         * pthread_attr_setschedpolicy.c: Likewise.
9770         * pthread_attr_setscope.c: Likewise.
9771         * pthread_cond_broadcast.c: Likewise.
9772         * pthread_cond_destroy.c: Likewise.
9773         * pthread_cond_init.c: Likewise.
9774         * pthread_cond_signal.c: Likewise.
9775         * pthread_cond_wait.c: Likewise.
9776         * pthread_condattr_destroy.c: Likewise.
9777         * pthread_condattr_init.c: Likewise.
9778         * pthread_equal.c: Likewise.
9779         * pthread_exit.c: Likewise.
9780         * pthread_getschedparam.c: Likewise.
9781         * pthread_self.c: Likewise.
9782         * pthread_setcancelstate.c: Likewise.
9783         * pthread_setschedparam.c: Likewise.
9784         * pthread_mutex_destroy.c: Likewise.
9785         * pthread_mutex_init.c: Likewise.
9786         * pthreadP.h: Add prototypes for the aliases.
9788         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9789         multiple_threads member in correct TCB to 1.
9791         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9792         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9793         member of thread decriptor, otherwise return unconditionally 1.
9795 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9797         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9798         regular Linux version.  Remove file.
9799         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9800         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9801         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9802         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9803         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9804         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9805         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9806         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9807         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9808         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9809         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9810         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9811         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9812         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9813         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9814         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9815         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9816         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9817         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9818         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9819         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9820         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9821         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9822         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9823         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9824         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9825         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9826         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9827         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9828         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9830 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9832         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9833         * sysdeps/unix/sysv/linux/open.c: Removed.
9834         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9835         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9836         * sysdeps/unix/sysv/linux/msync.c: Removed.
9837         * sysdeps/unix/sysv/linux/read.c: Removed.
9838         * sysdeps/unix/sysv/linux/close.c: Removed.
9839         * sysdeps/unix/sysv/linux/creat.c: Removed.
9840         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9841         * sysdeps/unix/sysv/linux/pause.c: Removed.
9842         * sysdeps/unix/sysv/linux/select.c: Removed.
9843         * sysdeps/unix/sysv/linux/write.c: Removed.
9845 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9847         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9848         element in TCB to see whether locking is needed.
9850         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9851         MULTIPLE_THREADS_OFFSET value is correct.
9853         * sysdeps/unix/sysv/linux/close.c: New file.
9854         * sysdeps/unix/sysv/linux/connect.S: New file.
9855         * sysdeps/unix/sysv/linux/creat.c: New file.
9856         * sysdeps/unix/sysv/linux/fsync.c: New file.
9857         * sysdeps/unix/sysv/linux/llseek.c: New file.
9858         * sysdeps/unix/sysv/linux/lseek.c: New file.
9859         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9860         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9861         * sysdeps/unix/sysv/linux/msync.c: New file.
9862         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9863         * sysdeps/unix/sysv/linux/open.c: New file.
9864         * sysdeps/unix/sysv/linux/open64.c: New file.
9865         * sysdeps/unix/sysv/linux/pause.c: New file.
9866         * sysdeps/unix/sysv/linux/poll.c: New file.
9867         * sysdeps/unix/sysv/linux/pread.c: New file.
9868         * sysdeps/unix/sysv/linux/pread64.c: New file.
9869         * sysdeps/unix/sysv/linux/pselect.c: New file.
9870         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9871         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9872         * sysdeps/unix/sysv/linux/readv.c: New file.
9873         * sysdeps/unix/sysv/linux/recv.S: New file.
9874         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9875         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9876         * sysdeps/unix/sysv/linux/select.c: New file.
9877         * sysdeps/unix/sysv/linux/send.S: New file.
9878         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9879         * sysdeps/unix/sysv/linux/sendto.S: New file.
9880         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9881         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9882         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9883         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9884         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9885         * sysdeps/unix/sysv/linux/system.c: New file.
9886         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9887         * sysdeps/unix/sysv/linux/wait.c: New file.
9888         * sysdeps/unix/sysv/linux/waitid.c: New file.
9889         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9890         * sysdeps/unix/sysv/linux/writev.c: New file.
9891         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9893         * pt-readv.c: Fix comment.
9895 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9897         * tst-cleanup1.c: Include stdlib.h.
9899         * tst-cancel5.c: New test.
9900         * Makefile (tests): Add tst-cancel5.
9901         (tst-cancel5): Link against libc.so libpthread.so in that order.
9903 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9905         * forward.c (test_loaded): Prevent recursive calls.
9907         * Makefile (routines): Add libc-cancellation.
9908         * libc-cancellation.c: New file.
9909         * descr.h (struct pthread): Add multiple_threads field.
9910         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9911         new thread descriptor to 1.
9912         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9913         Initialize multiple_thread field after successful thread creation.
9914         * cancellation.c (__do_cancel): Move to pthreadP.h.
9915         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9916         (__pthread_disable_asynccancel): Add internal_function attribute.
9917         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9918         * pthread_setcancelstate.c: Likewise.
9919         * pthread_setcanceltype.c: Likewise.
9920         * pthread_exit.c: Likewise.
9921         * pthreadP.h (CANCELLATION_P): Likewise.
9922         (__do_cancel): Define as static inline.
9923         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9924         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9925         declarations.
9926         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9927         fields.  Define MULTIPLE_THREADS_OFFSET.
9928         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9929         declaration.
9930         * sysdeps/unix/sysv/linux/accept.S: New file.
9931         * sysdeps/unix/sysv/linux/read.c: New file.
9932         * sysdeps/unix/sysv/linux/write.c: New file.
9933         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9934         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9935         initialization of __libc_locking_needed.
9936         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9937         __libc_locking_needed, use multiple_threads field in TCB.
9938         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9940 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9942         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9943         version.
9944         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9946         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9947         access to __libc_locking_needed for PIC.
9949 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9951         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9952         declare for libc.so.
9953         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9954         expression.
9955         (__libc_lock_lock): Put into statement expression.
9956         (__libc_lock_unlock): Remove trailing semicolon.
9957         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9959 2002-12-12  Roland McGrath  <roland@redhat.com>
9961         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9962         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9964 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9966         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9967         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9968         Initialize __libc_locking_needed.
9969         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9970         instead of __register_pthread_fork_handler.
9971         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9972         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9973         fork-gen with libc_pthread_init.
9974         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9975         of __register_pthread_fork_handler.
9976         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9977         of __register_pthread_fork_handler.
9978         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9979         __libc_locking_needed to determine whether lock prefix can be avoided.
9980         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9982 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9984         * Makefile (tests): Add tst-cleanup1.
9985         * tst-cleanup1.c: New file.
9986         * cancellation.c (__cleanup_thread): Removed.
9987         (__do_cancel): Remove call to __cleanup_thread.
9988         * pthreadP.h: Remove __cleanup_thread prorotype.
9990         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9991         Remember function and argument even if cancellation handler
9992         function is not available.
9993         (__libc_cleanup_region_end): Execute registered function directly if
9994         pthread functions are not available.
9995         (__libc_cleanup_end): Likewise.
9997         * init.c (__pthread_initialize_minimal): Fix initialization in
9998         static lib by preventing gcc from being too clever.
10000 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
10002         * init.c (__pthread_initialize_minimal): Remove unneccesary
10003         sigaddset call.
10005         * Makefile (tests): We can run tst-locale2 now.
10007 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
10009         * Versions: Remove duplicated sigwait entry.
10011 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
10013         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
10014         inside libpthread.
10016         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
10018         * pthreadP.h: Declare __pthread_enable_asynccancel and
10019         __pthread_disable_asynccancel.
10020         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
10021         (CANCEL_RESET): Use __pthread_disable_asynccancel.
10022         * cancellation.c (__pthread_enable_asynccancel): New function.
10023         (__pthread_disable_asynccancel): New function.
10024         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
10025         * pt-close.c: Likewise.
10026         * pt-connect.c: Likewise.
10027         * pt-creat.c: Likewise.
10028         * pt-fcntl.c: Likewise.
10029         * pt-fsync.c: Likewise.
10030         * pt-lseek.c: Likewise.
10031         * pt-lseek64.c: Likewise.
10032         * pt-msgrcv.c: Likewise.
10033         * pt-msgsnd.c: Likewise.
10034         * pt-msync.c: Likewise.
10035         * pt-nanosleep.c: Likewise.
10036         * pt-open.c: Likewise.
10037         * pt-open64.c: Likewise.
10038         * pt-pause.c: Likewise.
10039         * pt-poll.c: Likewise.
10040         * pt-pread.c: Likewise.
10041         * pt-pread64.c: Likewise.
10042         * pt-pselect.c: Likewise.
10043         * pt-pwrite.c: Likewise.
10044         * pt-pwrite64.c: Likewise.
10045         * pt-read.c: Likewise.
10046         * pt-readv.c: Likewise.
10047         * pt-recv.c: Likewise.
10048         * pt-recvfrom.c: Likewise.
10049         * pt-recvmsg.c: Likewise.
10050         * pt-select.c: Likewise.
10051         * pt-send.c: Likewise.
10052         * pt-sendmsg.c: Likewise.
10053         * pt-sendto.c: Likewise.
10054         * pt-sigpause.c: Likewise.
10055         * pt-sigsuspend.c: Likewise.
10056         * pt-sigtimedwait.c: Likewise.
10057         * pt-sigwait.c: Likewise.
10058         * pt-sigwaitinfo.c: Likewise.
10059         * pt-system.c: Likewise.
10060         * pt-tcdrain.c: Likewise.
10061         * pt-wait.c: Likewise.
10062         * pt-waitid.c: Likewise.
10063         * pt-waitpid.c: Likewise.
10064         * pt-write.c: Likewise.
10065         * pt-writev.c: Likewise.
10066         * pthread_join.c: Likewise.
10067         * pthread_timedjoin.c: Likewise.
10069         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
10070         (__xpg_sigpause): New function.
10071         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
10073 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
10075         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
10077         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
10078         _GI_pthread_cleanup_pop to pthreadP.h.
10080         * ftrylockfile.c: Use _IO_lock_trylock instead of
10081         pthread_mutex_trylock.
10083         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
10084         (CANCEL_RESET): Likewise.
10085         (__pthread_setcanceltype_): Declare.
10086         (__pthread_mutex_lock_internal): Declare.
10087         (__pthread_mutex_unlock_internal): Declare.
10088         (__pthread_once_internal): Declare.
10089         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10090         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10092         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10093         and pthread_mutex_unlock.
10094         * pthread_cond_wait.c: Likewise.
10095         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10096         * pthread_mutex_unlock.c: Likewise.
10098         * pthread_setcanceltype.c: Add additional alias
10099         __pthread_setcanceltype.
10101         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10102         * sem_open.c (sem_open): Likewise.
10103         Use __libc_open, __libc_write, and __libc_close instead of
10104         open, write, and close respectively.
10106         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10107         Rewrite as statement expression since it must return a value.
10109         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10110         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10111         __pthread_kill.
10113         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10114         alias __pthread_once_internal.
10116         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10118 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10120         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10121         * tst-stdio1.c: New file.
10122         * tst-stdio2.c: New file.
10124         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10126         * Makefile (tests): Comment out tst-locale2 for now.
10127         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10129         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10130         -D_IO_MTSAFE_IO.
10131         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10132         Use _IO_lock_init instead of explicit assignment.
10134         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10135         Define __libc_lock_* and __libc_lock_recursive macros with
10136         lowlevellock macros, not pthread mutexes.
10138         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10139         of pthread_mutex_lock.
10140         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10141         instead of pthread_mutex_unlock.
10143 2002-12-06  Roland McGrath  <roland@redhat.com>
10145         * allocatestack.c (__stack_user): Use uninitialized defn.
10146         * init.c (__pthread_initialize_minimal): Initialize it here.
10148 2002-12-05  Roland McGrath  <roland@redhat.com>
10150         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10151         string.
10152         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10154         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10155         missing & here too.
10157 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10159         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10160         lowlevellock.
10161         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10162         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10163         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10164         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10165         for __libc_lock_* macros.
10166         * Makefile (routines): Add libc-lowlevellock.
10168 2002-10-09  Roland McGrath  <roland@redhat.com>
10170         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10171         Under [__PIC__], call the function via the pointer fetched for
10172         comparison rather than a call by name that uses the PLT.
10173         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10174         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10175         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10176         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10177         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10179 2002-12-04  Roland McGrath  <roland@redhat.com>
10181         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10183         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10184         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10186         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10188 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10190         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10191         a completely opaque, non-integer type.
10192         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10194 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10196         * sysdeps/i386/tls.h: Include stdlib.h.
10197         * sysdeps/x86_64/tls.h: Likewise.
10199 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10201         * Makefile (tests): Add tst-locale2.
10202         (tests-static): Likewise.
10203         * tst-locale2.c: New file.
10205         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10206         volatile and add memory clobbers to lock operations.
10208 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10210         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10211         * sysdeps/i386/i486/bits/atomic.h: New file.
10212         * sysdeps/i386/i586/bits/atomic.h: New file.
10213         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10214         include i486 version.
10215         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10216         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10217         Patch by Marijn Ros <marijn@mad.scientist.com>.
10219         * allocatestack.c (get_cached_stack): Don't crash if we first
10220         found a stack with a larger size then needed.
10221         Reported by Hui Huang <hui.huang@sun.com>.
10223         * Makefile (tests): Add tst-sysconf.
10224         * tst-sysconf.c: New file.
10226         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10227         PTHREAD_THREADS_MAX.
10229 2002-12-02  Roland McGrath  <roland@redhat.com>
10231         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10232         Declare using hidden_proto instead of attribute_hidden, so there are
10233         non-.hidden static symbols for gdb to find.
10234         (__pthread_keys): Likewise.
10235         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10236         * allocatestack.c (__stack_user): Likewise.
10237         * pthread_create.c (__pthread_keys): Likewise.
10238         (__nptl_threads_events, __nptl_last_event): Make these static instead
10239         of hidden.
10240         * pthread_key_create.c (__pthread_pthread_keys_max,
10241         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10243 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10245         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10246         statically.
10247         * tst-locale1.c: New file.
10249         * pthread_cond_timedwait.c: Include <stdlib.h>.
10251         * Makefile (tests): Add tst-fork2 and tst-fork3.
10252         * tst-fork2.c: New file.
10253         * tst-fork3.c: New file.
10255 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10257         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10259         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10260         require it to 200112L.
10262         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10263         instruction only if HAVE_CMOV is defined.
10264         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10266         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10268         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10270         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10272         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10274 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10276         * sysdeps/x86_64/bits/atomic.h: New file.
10278         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10279         16-bit operations.
10281         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10282         possible since gettid cannot fail.
10284         * sysdeps/x86_64/pthreaddef.h: New file.
10286         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10288         * sysdeps/x86_64/pthread_spin_init.c: New file.
10289         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10290         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10291         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10293         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10294         Add missing lock prefix.  Minute optimization.
10296         * tst-spin2.c (main): Also check successful trylock call.
10298         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10299         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10301         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10302         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10304         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10305         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10306         value in case of an error.  Add support for INTERNAL_SYSCALL.
10308         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10309         value in case of an error.
10311         * sysdeps/x86_64/tls.h: New file.
10313 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10315         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10316         takes the array member name and the index as parameters.
10317         (THREAD_SETMEM_NC): Likewise.
10318         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10319         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10320         interfaces.
10322         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10323         to decide which code to use.
10324         (THREAD_SETMEM_NC): Likewise.
10326         * allocatestack.c (queue_stack): Don't remove stack from list here.
10327         Do it in the caller.  Correct condition to prematurely terminate
10328         loop to free stacks.
10329         (__deallocate_stack): Remove stack from list here.
10331 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10333         * Makefile (tests): Add tst-stack1.
10334         * tst-stack1.c: New file.
10336         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10337         provided stack.
10339         * pthread_attr_getstack.c: Return bottom of the thread area.
10341 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10343         * Makefile (libpthread-routines): Add pt-allocrtsig and
10344         pthread_kill_other_threads.
10345         * pt-allocrtsig.c: New file.
10346         * pthread_kill_other_threads.c: New file.
10347         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10348         all three functions.
10349         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10350         allocrtsig.
10351         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10352         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10353         and __libc_allocate_rtsig_private.
10354         * Versions (libpthread): Export pthread_kill_other_threads_np,
10355         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10357 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10359         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10360         the end of the stack.  Adjust computations.
10361         When mprotect call fails dequeue stack and free it.
10362         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10363         attribute.
10364         * pthread_getattr_np.c: Likewise.
10366         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10367         surprises.
10369 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10371         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10372         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10374 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10376         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10377         * pthread_setspecific.c: Likewise.
10379 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10381         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10382         definitions.  Get them from the official place.
10383         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10385         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10386         Use new CLONE_ flags in clone() calls.
10388         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10389         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10391         * Versions: Add pthread_* functions for libc.
10392         * forward.c: New file.
10394         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10395         errno-loc.
10396         * herrno.c: New file.
10397         * res.c: New file.
10399         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10400         sem_trywait, and sem_timedwait.  Add herrno and res.
10401         * sem_init.c: Don't initialize lock and waiters members.
10402         * sem_open.c: Likewise.
10403         * sem_post.c: Removed.
10404         * sem_wait.c: Removed.
10405         * sem_trywait.c: Removed.
10406         * sem_timedwait.c: Removed.
10407         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10408         Includes full implementations of sem_post, sem_wait, sem_trywait,
10409         and sem_timedwait.
10410         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10411         for new implementation.
10412         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10413         and waiters fields.
10415         * tst-sem3.c: Improve error message.
10416         * tst-signal3.c: Likewise.
10418         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10419         to tell the kernel about the termination futex and to initialize tid
10420         member.  Don't initialize main_thread.
10421         * descr.h (struct pthread): Remove main_thread member.
10422         * cancelllation.c (__do_cancel): Remove code handling main thread.
10423         The main thread is not special anymore.
10425         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10426         size of the stacks to stack_cache_actsize.
10428         * pt-readv.c: Add missing "defined".
10429         * pt-sigwait.c: Likewise.
10430         * pt-writev.c: Likewise.
10432 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10434         * Versions: Export __connect from libpthread.
10435         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10437         * Makefile (libpthread-routines): Add pt-raise.
10438         * sysdeps/unix/sysv/linux/raise.c: New file.
10439         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10440         * sysdeps/generic/pt-raise.c: New file.
10442         * pthread_cond_init.c: Initialize all data elements of the condvar
10443         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10445         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10446         * pthread_create.c: Likewise.
10448         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10449         * tst-key1.c: New file.
10450         * tst-key2.c: New file.
10451         * tst-key3.c: New file.
10453         * Versions: Export pthread_detach for version GLIBC_2.0.
10454         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10456 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10458         * pthread_key_create.c: Terminate search after an unused key was found.
10459         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10461         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10462         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10464 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10466         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10467         dynamic lookup for errno in PIC.
10469         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10470         release the stack lock as soon as possible.
10471         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10472         the static TLS block.
10473         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10475         * cancellation.c: Renamed from cancelation.c.
10476         * Makefile: Adjust accordingly.
10477         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10478         * cleanup_defer.c: Use CANCELLATION_P.
10479         * pthread_testcancel.c: Likewise.
10480         * descr.h: Fix spelling in comments.
10481         * init.c: Likewise.
10482         * pthread_getattr_np.c: Likewise.
10483         * pthread_getschedparam.c: Likewise.
10484         * pthread_setschedparam.c: Likewise.
10485         * Versions: Likewise.
10487         * pt-pselect.c: New file.
10488         * Makefile (libpthread-routines): Add pt-pselect.
10489         * Versions: Add pselect.
10491         * tst-cancel4.c: New file.
10492         * Makefile (tests): Add tst-cancel4.
10494 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10496         * pthread_mutex_lock.c: Always record lock ownership.
10497         * pthread_mutex_timedlock.c: Likewise.
10498         * pthread_mutex_trylock.c: Likewise.
10500         * pt-readv.c: New file.
10501         * pt-writev.c: New file.
10502         * pt-creat.c: New file.
10503         * pt-msgrcv.c: New file.
10504         * pt-msgsnd.c: New file.
10505         * pt-poll.c: New file.
10506         * pt-select.c: New file.
10507         * pt-sigpause.c: New file.
10508         * pt-sigsuspend.c: New file.
10509         * pt-sigwait.c: New file.
10510         * pt-sigwaitinfo.c: New file.
10511         * pt-waitid.c: New file.
10512         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10513         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10514         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10515         * Versions: Add all the new functions.
10517         * tst-exit1.c: New file.
10518         * Makefile (tests): Add tst-exit1.
10520         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10522 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10524         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10526         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10527         call.  pthread_join is an official cancellation point.
10528         * pthread_timedjoin.c: Likewise.
10530         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10531         and the condvar's mutex are retrieved.
10532         * pthread_cond_timedwait.c: Likewise.
10533         Reported by dice@saros.East.Sun.COM.
10535 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10537         * pthreadP.h: Cut out all type definitions and move them...
10538         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10539         * pthreadP.h: Include <internaltypes.h>.
10541         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10542         performance tweaks.
10544         * sem_trywait.c: Shuffle #includes around to get right order.
10545         * sem_timedwait.c: Likewise.
10546         * sem_post.c: Likewise.
10547         * sem_wait.c: Likewise.
10549         * nptl 0.3 released.
10551         * Makefile (tests): Add tst-signal3.
10552         * tst-signal3.c: New file.
10554 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10556         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10557         the asms modify the sem object.
10558         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10560         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10561         the actual members.
10562         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10563         * semaphoreP.h: Include pthreadP.h.
10564         * sem_getvalue.c: Adjust to sem_t change.
10565         * sem_init.c: Likewise.
10566         * sem_open.c: Likewise.
10567         * sem_post.c: Likewise.
10568         * sem_timedwait.c: Likewise.
10569         * sem_trywait.c: Likewise.
10570         * sem_wait.c: Likewise.
10572 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10574         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10575         * tst-basic2.c: New file.
10576         * tst-exec1.c: New file.
10577         * tst-exec2.c: New file.
10578         * tst-exec3.c: New file.
10580         * tst-fork1.c: Remove extra */.
10582         * nptl 0.2 released.  The API for IA-32 is complete.