* scripts/gen-as-const.awk: Generate more widely usable code by
[glibc.git] / nptl / ChangeLog
blob346db28005e0dd95830e38fc9ff8a6dfb0294fea
1 2008-04-28  Hiroki Kaminaga  <kaminaga@sm.sony.co.jp>
3         [BZ #6740]
4         * sysdeps/powerpc/tcb-offsets.sym (PRIVATE_FUTEX_OFFSET): Guard symbol
5         definition with #ifndef __ASSUME_PRIVATE_FUTEX.
7 2008-07-25  Ulrich Drepper  <drepper@redhat.com>
9         * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Use
10         SOCK_CLOEXEC if possible.
12 2008-05-29  Ulrich Drepper  <drepper@redhat.com>
14         * Makefile (tests): Add tst-rwlock2a.
15         * tst-rwlock2.c: Use TYPE macro to decide what rwlock type to use.
16         * tst-rwlock2a.c: New file.
18 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
20         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
22 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
24         * sysdeps/pthread/pthread.h: Fix typo in comment.
26 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
28         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
29         of CPU set to the kernel.
31 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
33         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
34         cfi directives.
35         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
36         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
37         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
38         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
39         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
40         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
42 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
44         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
45         cfi directives.
46         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
47         Likewise.
48         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
49         Likewise.
50         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
51         Likewise.
53 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
55         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
57 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
59         David S. Miller  <davem@davemloft.net>
61         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
63 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
65         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
66         __pshared correctly.
67         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
68         Likewise.
69         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
70         Likewise.
71         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
72         Likewise.
73         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
74         Likewise.
75         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
77 2008-04-14  David S. Miller  <davem@davemloft.net>
79         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
80         (__old_sem_wait): Fix argument to lll_futex_wait().
82 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
84         * pthread_create.c: Require pthread_mutex_trylock and
85         pthread_key_delete for libgcc.
87 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
89         [BZ #6020]
90         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
91         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
92         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
94 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
96         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine ARG_MAX if
97         <linux/limits.h> has defined it.
98         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
99         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
100         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
101         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
103 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
105         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
106         of ASSEMBLER.
107         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
108         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
110 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
112         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
113         HAVE_DL_DISCOVER_OSVERSION.
114         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
115         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
117 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
119         [BZ #5778]
120         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
121         _POSIX_CHOWN_RESTRICTED value to zero.
123 2008-01-31  Roland McGrath  <roland@redhat.com>
125         * Makefile (omit-deps): Variable removed.
127 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
129         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
130         unnecessary addr32 prefix.
132 2008-01-29  Roland McGrath  <roland@redhat.com>
134         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
136 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
138         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
140 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
142         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
143         a scratch register.
144         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
145         (__lll_lock_wait_private): Fix typo.
146         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
147         (pthread_barrier_wait): Likewise.  Adjust XADD use.
148         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
149         Adjust XADD use.
150         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
151         (pthread_rwlock_timedrdlock): Return correct return value.
152         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
153         (pthread_rwlock_timedwrlock): Likewise.
155 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
157         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
158         thread returns the program exits with an error code.
160 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
162         * pthread-errnos.sym: Add EOVERFLOW.
163         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
164         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
165         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
166         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
168 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
170         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
171         parameter.  Passed it as permission to mmap.
172         * allocatestack.c (allocate_stack): Pass prot as second parameter
173         to ARCH_RETRY_MMAP.
175 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
177         * tst-basic7.c: Allocate memory for the stack.
179         [BZ #5465]
180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
181         (__pthread_cond_timedwait): Don't use VDSO.
182         Patch by Michal Januszewski.
184 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
186         [BZ #5455]
187         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
188         Allow label before pthread_cleanup_pop.
189         (pthread_cleanup_pop_restore_np): Likewise.
191 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
193         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
194         Store 2 before returning ETIMEDOUT.
196 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
198         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
199         Store 2 before returning ETIMEDOUT.
200         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
201         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
202         (__lll_lock_wait_private): Optimize.
203         (__lll_lock_wait): Likewise.
205 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
207         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
208         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
209         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
211 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
213         [BZ #5240]
214         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
215         If we time out, try one last time to lock the futex to avoid
216         losing a wakeup signal.
217         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
218         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
220         [BZ #5245]
221         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
222         if necessary.
224 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
226         [BZ #5245]
227         * allocatestack.c (allocate_stack): Change ENOMEM error in case
228         mmap failed to EAGAIN.
229         * Makefile (tests): Add tst-basic7.
230         * tst-basic7.c: New file.
232 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
234         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
235         Use __linkin_atfork.
237 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
239         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
240         missing line continuations.
241         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
242         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
244 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
246         [BZ #5220]
247         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
248         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
249         (struct timer): Add next element.
250         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
251         enqueue timer structure into __active_timer_sigev_thread list.
252         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
253         remove timer struct from __active_timer_sigev_thread.
254         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
255         Before using timer structure make sure it is still on the
256         __active_timer_sigev_thread list.  Keep lock until done.
257         Define __active_timer_sigev_thread and
258         __active_timer_sigev_thread_lock.
260 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
262         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
263         Redefine thread_atfork for use of ATFORK_MEM.
264         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
265         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
266         function.
267         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
268         Use atomic operation when removing first element of list.
270 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
272         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
273         routine instead of an alias to __new_sem_post.
275 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
277         * init.c (__pthread_initialize_minimal): Initialize word to appease
278         valgrind.
280 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
282         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
283         libc.so just clear NAME.
284         (__libc_rwlock_fini): Nop inside of libc.so.
285         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
286         all zeros.
288 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
290         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
291         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
292         unlocking failed.
293         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
295 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
297         [BZ #4938]
298         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
299         reclaimed stack if necessary.
300         * Makefile (tests): Add tst-tsd6.
301         * tst-tsd6.c: New file.
303 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
305         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
306         Add private argument.
308 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
311         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
313 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
315         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
316         (__lll_robust_timedlock): Pass private as last argument to
317         __lll_robust_timedlock_wait.
318         (__lll_unlock): Fix a pasto.
320 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
322         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
323         sparc_old_sem): New structs.
324         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
325         (__sem_wait_cleanup): New function.
326         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
327         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
328         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
329         lll_futex_wait.
330         (__old_sem_wait): New function.
331         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
332         nptl/sysdeps/unix/sysv/linux/sparc version.
333         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
334         Likewise.
335         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
336         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
337         (__new_sem_trywait): Use sparc_old_sem structure.
338         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
339         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
340         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
341         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
342         lll_futex_timed_wait.
343         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
344         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
345         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
346         lll_futex_wake.
347         (__old_sem_post): New function.
348         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
349         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
350         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
351         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
352         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
353         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
355 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
357         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
358         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
359         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
360         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
361         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
362         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
363         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
364         Use FUTEX_WAKE_OP.
365         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
366         kernel-features.h and tcb-offsets.h.
367         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
368         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
369         process private.
370         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
371         tcb-offsets.h.
372         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
373         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
374         process private.
375         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
376         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
377         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
378         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
379         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
380         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
381         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
383 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
385         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
386         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
387         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
388         lll_futex_timed_wait.
390         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
391         __lll_robust_unlock): Rewrite as macros instead of inline functions.
392         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
393         __lll_robust_unlock, __lll_wait_tid): Likewise.
395 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
397         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
398         Fix a pasto.
399         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
400         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
401         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
402         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
404         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
405         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
406         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
407         kernel-features.h.
408         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
409         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
410         process private.  Switch DW_CFA_advance_loc1 and some
411         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
412         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
413         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
414         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
415         process private.  Switch DW_CFA_advance_loc{1,2} and some
416         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
417         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
418         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
419         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
420         Likewise.
421         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
423         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
424         Likewise.
425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
426         (__pthread_cond_broadcast): Compare %r8 instead of
427         dep_mutex-cond_*(%rdi) with $-1.
428         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
429         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
430         of oring.
432 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
434         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
436 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
438         * allocatestack.c: Include kernel-features.h.
439         * pthread_create.c: Likewise.
440         * pthread_mutex_init.c: Likewise.
441         * init.c: Likewise.
442         * pthread_cond_timedwait.c: Likewise.
443         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
444         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
445         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
446         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
447         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
448         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
449         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
450         Likewise.
451         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
452         Likewise.
453         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
454         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
455         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
456         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
458 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
460         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
461         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
462         byte elements.  One of them is the new __shared element.
463         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
464         adjust names of other padding elements.
465         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
466         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
467         byte elements.  One of them is the new __shared element.
468         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
469         adjust names of other padding elements.
470         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
471         Renamed __pad1 element to __shared, adjust names of other padding
472         elements.
473         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
474         (pthread_rwlock_t): Likewise.
475         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
476         typo.
478 2007-08-09  Anton Blanchard  <anton@samba.org>
480         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
482 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
485         <kernel-features.h>.
486         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
488 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
490         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
491         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
492         dealing with robust mutexes.
493         * pthread_mutex_timedlock.c: Likewise.
494         * pthread_mutex_trylock.c: Likewise.
495         * pthread_mutex_unlock.c: Likewise.
496         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
498 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
500         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
501         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
502         (PTHREAD_MUTEX_PSHARED): Define.
503         * pthread_mutex_init.c (__pthread_mutex_init): Set
504         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
505         mutexes.
506         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
507         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
508         as second argument to lll_lock.
509         (LLL_MUTEX_TRYLOCK): Take mutex as argument
510         instead of its __data.__lock field.
511         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
512         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
513         to lll_robust_lock.
514         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
515         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
516         instead of mutex->__data.__kind directly, pass
517         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
518         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
519         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
520         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
521         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
522         to lll_timedlock, lll_robust_timedlock, lll_unlock and
523         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
524         of mutex->__data.__kind directly.
525         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
526         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
527         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
528         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
529         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
530         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
531         and lll_futex_wake.
532         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
533         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
534         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
535         directly.
536         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
537         Take mutex as argument instead of its __data.__lock field, pass
538         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
539         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
540         __data.__lock field.
541         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
542         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
543         to lll_robust_cond_lock.
544         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
545         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
546         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
547         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
548         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
549         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
550         lll_futex_wait.
551         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
552         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
553         lll_futex_wake.
554         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
555         pshared variable, pass it to lll_lock, lll_unlock,
556         lll_futex_timedwait and lll_futex_wake.
557         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
558         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
559         and lll_futex_wake.
560         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
561         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
562         macro.
563         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
564         lll_futex_wake_unlock): Likewise.
565         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
566         Likewise.
567         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
568         lll_futex_wake_unlock): Likewise.
569         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
570         Likewise.
571         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
572         lll_futex_wake_unlock): Likewise.
573         (lll_futex_wake): Fix a typo.
574         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
575         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
576         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
577         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
578         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
579         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
580         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
581         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
582         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
583         (__pthread_cond_timedwait): Likewise.
584         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
585         (__condvar_cleanup, __pthread_cond_wait): Likewise.
587 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
589         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
590         Don't use CGOTSETUP and CGOTRESTORE macros.
591         (CGOTSETUP, CGOTRESTORE): Remove.
592         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
593         @local symbol.
595 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
597         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
598         definitions for private futexes.
599         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
600         kernel-features.h and lowlevellock.h.  Use private futexes if
601         they are available.
602         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
603         (__lll_mutex_lock_wait): Rename to
604         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
605         (__lll_mutex_timedlock_wait): Rename to ...
606         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
607         Don't compile in for libc.so.
608         (__lll_mutex_unlock_wake): Rename to ...
609         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
610         (__lll_timedwait_tid): Use __NR_gettimeofday.
611         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
612         the header from assembler.  Renamed all lll_mutex_* resp.
613         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
614         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
615         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
616         Define.
617         (__lll_lock_wait_private): Add prototype.
618         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
619         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
620         __lll_unlock_wake): Likewise.
621         (lll_lock): Add private argument.  Call __lll_lock_wait_private
622         if private is constant LLL_PRIVATE.
623         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
624         lll_timedlock, lll_robust_timedlock): Add private argument.
625         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
626         if private is constant LLL_PRIVATE.
627         (lll_robust_unlock, lll_robust_dead): Add private argument.
628         (lll_lock_t): Remove.
629         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
630         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
631         lll_cond_wake, lll_cond_broadcast): Remove.
632         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
633         kernel-features.h and lowlevellock.h.
634         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
635         (LOAD_FUTEX_WAIT): Define.
636         (__lll_robust_mutex_lock_wait): Rename to ...
637         (__lll_robust_lock_wait): ... this.  Add private argument.
638         Use LOAD_FUTEX_WAIT macro.
639         (__lll_robust_mutex_timedlock_wait): Rename to ...
640         (__lll_robust_timedlock_wait): ... this.    Add private argument.
641         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
642         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
643         lowlevellock.h.
644         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
645         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
646         __lll_mutex_{lock,unlock}_*.
647         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
648         lowlevellock.h and pthread-errnos.h.
649         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
650         FUTEX_CMP_REQUEUE, EINVAL): Remove.
651         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
652         __lll_mutex_{lock,unlock}_*.
653         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
654         lowlevellock.h and pthread-errnos.h.
655         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
656         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
657         __lll_mutex_{lock,unlock}_*.
658         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
659         lowlevellock.h.
660         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
661         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
662         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
663         (__condvar_tw_cleanup): Likewise.
664         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
665         lowlevellock.h.
666         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
667         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
668         __lll_mutex_{lock,unlock}_*.
669         ( __condvar_w_cleanup): Likewise.
670         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
671         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
672         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
673         lowlevellock.h.
674         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
675         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
676         __lll_mutex_{lock,unlock}_*.
677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
678         lowlevellock.h.
679         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
680         FUTEX_PRIVATE_FLAG): Remove.
681         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
682         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
683         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
684         lowlevellock.h.
685         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
686         FUTEX_PRIVATE_FLAG): Remove.
687         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
688         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
689         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
690         lowlevellock.h.
691         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
692         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
693         __lll_mutex_{lock,unlock}_*.
694         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
695         lowlevellock.h.
696         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
697         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
698         __lll_mutex_{lock,unlock}_*.
699         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
700         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
701         (__new_sem_post): Use standard initial exec code sequences.
702         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
703         lowlevellock.h.
704         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
705         FUTEX_PRIVATE_FLAG): Remove.
706         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
707         exec code sequences.
708         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
709         (__new_sem_trywait): Use standard initial exec code sequences.
710         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
711         (__new_sem_wait): Use standard initial exec code sequences.
713 2007-07-31  Anton Blanchard  <anton@samba.org>
715         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
716         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
717         atomic_full_barrier.
719 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
721         * allocatestack.c (stack_cache_lock): Change type to int.
722         (get_cached_stack, allocate_stack, __deallocate_stack,
723         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
724         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
725         as second argument to lll_lock and lll_unlock macros on
726         stack_cache_lock.
727         * pthread_create.c (__find_in_stack_list): Likewise.
728         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
729         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
730         as second argument.
731         * descr.h (struct pthread): Change lock and setxid_futex field
732         type to int.
733         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
734         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
735         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
736         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
737         Likewise.
738         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
739         * pthread_cond_init.c (__pthread_cond_init): Likewise.
740         * pthreadP.h (__attr_list_lock): Change type to int.
741         * pthread_attr_init.c (__attr_list_lock): Likewise.
742         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
743         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
744         lll_{,un}lock.
745         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
746         also for lll_futex_{wake,wait}.
747         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
748         a pointer to const.
749         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
750         LLL_SHARED as second argument to lll_{,un}lock.
751         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
752         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
753         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
754         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
755         Likewise.
756         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
757         as second argument to lll_{,un}lock macros on pd->lock.
758         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
759         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
760         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
761         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
762         Likewise.
763         * sysdeps/pthread/createthread.c (do_clone, create_thread):
764         Likewise.
765         * pthread_once.c (once_lock): Change type to int.
766         (__pthread_once): Pass LLL_PRIVATE as second argument to
767         lll_{,un}lock macros on once_lock.
768         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
769         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
770         rwlock->__data.__shared as second argument to them and similarly
771         for lll_futex_w*.
772         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
773         Likewise.
774         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
775         Likewise.
776         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
777         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
778         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
779         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
780         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
781         to lll_{,un}lock macros on __sem_mappings_lock.
782         * sem_open.c (check_add_mapping): Likewise.
783         (__sem_mappings_lock): Change type to int.
784         * semaphoreP.h (__sem_mappings_lock): Likewise.
785         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
786         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
787         instead of lll_*mutex_*, pass LLL_SHARED as last
788         argument.
789         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
790         pass LLL_SHARED as last argument.
791         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
792         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
793         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
794         pass LLL_SHARED as last argument.
795         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
796         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
797         LLL_SHARED as last argument.
798         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
799         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
800         Similarly.
801         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
802         __libc_lock_lock_recursive, __libc_lock_unlock,
803         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
804         argument to lll_{,un}lock.
805         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
806         _IO_lock_unlock): Likewise.
807         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
808         compound literal.
809         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
810         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
811         __fork_lock.
812         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
813         free_mem): Likewise.
814         (__fork_lock): Change type to int.
815         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
816         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
817         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
818         lll_futex_wake.
819         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
820         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
821         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
822         New function.
823         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
824         pass it through to lll_futex_*wait, only compile in when
825         IS_IN_libpthread.
826         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
827         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
828         argument and pass it through to lll_futex_*wait.
829         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
830         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
831         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
832         inline functions to __lll_* resp. __lll_robust_*.
833         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
834         (lll_mutex_dead): Add private argument.
835         (__lll_lock_wait_private): New prototype.
836         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
837         __lll_robust_lock_timedwait): Add private argument to prototypes.
838         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
839         call __lll_lock_wait_private, otherwise pass private to
840         __lll_lock_wait.
841         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
842         __lll_robust_timedlock): Add private argument, pass it to
843         __lll_*wait functions.
844         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
845         call __lll_unlock_wake_private, otherwise pass private to
846         __lll_unlock_wake.
847         (__lll_robust_unlock): Add private argument, pass it to
848         __lll_robust_unlock_wake.
849         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
850         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
851         argument, pass it through to __lll_* inline function.
852         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
853         (lll_lock_t): Remove.
854         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
855         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
856         lll_cond_wake, lll_cond_broadcast): Remove.
857         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
858         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
859         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
860         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
861         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
862         the header from assembler.  Renamed all lll_mutex_* resp.
863         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
864         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
865         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
866         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
867         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
868         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
869         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
870         Remove prototype.
871         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
872         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
873         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
874         (lll_trylock): Likewise, use __lll_trylock_asm, pass
875         MULTIPLE_THREADS_OFFSET as another asm operand.
876         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
877         MULTIPLE_THREADS_OFFSET as last asm operand, call
878         __lll_lock_wait_private if private is constant LLL_PRIVATE,
879         otherwise pass private as another argument to __lll_lock_wait.
880         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
881         lll_timedlock, lll_robust_timedlock): Add private argument, pass
882         private as another argument to __lll_*lock_wait call.
883         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
884         MULTIPLE_THREADS_OFFSET as another asm operand, call
885         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
886         otherwise pass private as another argument to __lll_unlock_wake.
887         (lll_robust_unlock): Add private argument, pass private as another
888         argument to __lll_unlock_wake.
889         (lll_robust_dead): Add private argument, use __lll_private_flag
890         macro.
891         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
892         LLL_MUTEX_LOCK_INITIALIZER.
893         (lll_lock_t): Remove.
894         (LLL_LOCK_INITIALIZER_WAITERS): Define.
895         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
896         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
897         lll_cond_wake, lll_cond_broadcast): Remove.
898         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
899         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
900         2007-05-2{3,9} changes.
901         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
902         kernel-features.h and lowlevellock.h.
903         (LOAD_PRIVATE_FUTEX_WAIT): Define.
904         (LOAD_FUTEX_WAIT): Rewritten.
905         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
906         define.
907         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
908         (__lll_mutex_lock_wait): Rename to ...
909         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
910         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
911         (__lll_mutex_timedlock_wait): Rename to ...
912         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
913         contains private argument.  Don't compile in for libc.so.
914         (__lll_mutex_unlock_wake): Rename to ...
915         (__lll_unlock_wake): ... this.  %ecx contains private argument.
916         Don't compile in for libc.so.
917         (__lll_timedwait_tid): Use __NR_gettimeofday.
918         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
919         kernel-features.h and lowlevellock.h.
920         (LOAD_FUTEX_WAIT): Define.
921         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
922         define.
923         (__lll_robust_mutex_lock_wait): Rename to ...
924         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
925         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
926         macro.
927         (__lll_robust_mutex_timedlock_wait): Rename to ...
928         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
929         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
930         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
931         lowlevellock.h.
932         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
933         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
934         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
935         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
936         to __lll_lock_wait in %edx.
937         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
938         Include lowlevellock.h and pthread-errnos.h.
939         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
940         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
941         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
942         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
943         pass LLL_SHARED in %ecx to both __lll_lock_wait and
944         __lll_unlock_wake.
945         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
946         Include lowlevellock.h and pthread-errnos.h.
947         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
948         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
949         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
950         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
951         pass LLL_SHARED in %ecx to both __lll_lock_wait and
952         __lll_unlock_wake.
953         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
954         Include lowlevellock.h.
955         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
956         Don't define.
957         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
958         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
959         pass LLL_SHARED in %ecx to both __lll_lock_wait and
960         __lll_unlock_wake.  Use __NR_gettimeofday.
961         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
962         Include lowlevellock.h.
963         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
964         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
965         to __lll_*, pass cond_lock address in %edx rather than %ecx to
966         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
967         and __lll_unlock_wake.
968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
969         Include lowlevellock.h.
970         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
971         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
972         MUTEX(%ebx) address in %edx rather than %ecx to
973         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
974         and __lll_unlock_wake.  Move return value from %ecx to %edx
975         register.
976         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
977         Include lowlevellock.h.
978         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
979         Don't define.
980         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
981         MUTEX(%ebp) address in %edx rather than %ecx to
982         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
983         and __lll_unlock_wake.  Move return value from %ecx to %edx
984         register.  Use __NR_gettimeofday.
985         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
986         Include lowlevellock.h.
987         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
988         Don't define.
989         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
990         MUTEX(%ebp) address in %edx rather than %ecx to
991         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
992         and __lll_unlock_wake.  Move return value from %ecx to %edx
993         register.  Use __NR_gettimeofday.
994         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
995         Include lowlevellock.h.
996         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
997         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
998         MUTEX(%edi) address in %edx rather than %ecx to
999         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
1000         and __lll_unlock_wake.
1001         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
1002         Include lowlevellock.h.
1003         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1004         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
1005         MUTEX(%ebx) address in %edx rather than %ecx to
1006         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
1007         and __lll_unlock_wake.  Move return value from %ecx to %edx
1008         register.
1009         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
1010         lowlevellock.h.
1011         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1012         define.
1013         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
1014         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1015         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
1016         lowlevellock.h.
1017         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1018         (sem_timedwait): Use __NR_gettimeofday.
1019         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1020         lowlevellock.h.
1021         (LOCK): Don't define.
1022         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1023         lowlevellock.h.
1024         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1025         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1026         are waiters.
1027         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1028         2007-05-2{3,9} changes.
1029         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1030         kernel-features.h and lowlevellock.h.
1031         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1032         (LOAD_FUTEX_WAIT): Rewritten.
1033         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1034         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1035         (__lll_mutex_lock_wait): Rename to ...
1036         (__lll_lock_wait): ... this.  %esi is now private argument.
1037         Don't compile in for libc.so.
1038         (__lll_mutex_timedlock_wait): Rename to ...
1039         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1040         Don't compile in for libc.so.
1041         (__lll_mutex_unlock_wake): Rename to ...
1042         (__lll_unlock_wake): ... this.  %esi contains private argument.
1043         Don't compile in for libc.so.
1044         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1045         kernel-features.h and lowlevellock.h.
1046         (LOAD_FUTEX_WAIT): Define.
1047         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1048         (__lll_robust_mutex_lock_wait): Rename to ...
1049         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1050         Use LOAD_FUTEX_WAIT macro.
1051         (__lll_robust_mutex_timedlock_wait): Rename to ...
1052         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1053         private, use LOAD_FUTEX_WAIT macro.
1054         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1055         lowlevellock.h.
1056         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1057         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1058         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1059         __lll_lock_wait and __lll_unlock_wake.
1060         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1061         Include lowlevellock.h and pthread-errnos.h.
1062         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1063         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1064         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1065         pass LLL_SHARED in %esi to both __lll_lock_wait and
1066         __lll_unlock_wake.
1067         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1068         Include lowlevellock.h and pthread-errnos.h.
1069         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1070         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1071         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1072         pass LLL_SHARED in %esi to both __lll_lock_wait and
1073         __lll_unlock_wake.
1074         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1075         Include lowlevellock.h.
1076         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1077         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1078         pass LLL_SHARED in %esi to both __lll_lock_wait and
1079         __lll_unlock_wake.
1080         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1081         Include lowlevellock.h.
1082         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1083         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1084         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1085         and __lll_unlock_wake.
1086         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1087         Include lowlevellock.h.
1088         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1089         Don't define.
1090         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1091         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1092         and __lll_unlock_wake.
1093         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1094         Include lowlevellock.h.
1095         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1096         Don't define.
1097         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1098         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1099         and __lll_unlock_wake.
1100         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1101         Include lowlevellock.h.
1102         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1103         Don't define.
1104         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1105         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1106         and __lll_unlock_wake.
1107         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1108         Include lowlevellock.h.
1109         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1110         Don't define.
1111         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1112         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1113         and __lll_unlock_wake.
1114         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1115         Include lowlevellock.h.
1116         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1117         Don't define.
1118         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1119         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1120         and __lll_unlock_wake.
1121         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1122         lowlevellock.h.
1123         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1124         define.
1125         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1126         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1127         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1128         lowlevellock.h.
1129         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1130         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1131         lowlevellock.h.
1132         (LOCK): Don't define.
1133         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1134         lowlevellock.h.
1135         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1136         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1137         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1138         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1139         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1140         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1141         (__lll_lock_wait_private): New function.
1142         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1143         it to lll_futex_*wait.  Don't compile in for libc.so.
1144         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1145         Remove.
1146         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1147         (struct sparc_pthread_barrier): Remove.
1148         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1149         struct sparc_pthread_barrier.  Pass
1150         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1151         and lll_futex_wait macros.
1152         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1153         Remove.
1154         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1155         Include sparc pthread_barrier_wait.c instead of generic one.
1157 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1159         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1161         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1162         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1163         %ecx.
1164         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1165         (pthread_rwlock_timedwrlock): Likewise.
1166         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1167         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1169 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1171         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1173 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1175         * tst-locale2.c (useless): Add return statement.
1177 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1179         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1180         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1181         * pthread_create.c (start_thread): Likewise.
1182         * init.c (sighandler_setxid): Likewise.
1183         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1184         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1185         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1186         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1187         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1188         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1189         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1190         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1191         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1192         Likewise.
1193         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1194         Likewise.
1195         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1196         Likewise.
1197         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1198         __rtld_notify): Likewise.
1199         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1200         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1201         __pthread_once): Likewise.
1202         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1203         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1204         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1205         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1206         (lll_futex_wait): Add private argument, define as wrapper around
1207         lll_futex_timed_wait.
1208         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1209         use __lll_private_flag macro.
1210         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1211         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1212         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1213         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1214         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1215         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1216         (lll_futex_wait): Add private argument, define as wrapper around
1217         lll_futex_timed_wait.
1218         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1219         use __lll_private_flag macro.
1220         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1221         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1222         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1223         Define.
1224         (lll_futex_timed_wait, lll_futex_wake): Use it.
1225         (lll_private_futex_wait, lll_private_futex_timed_wait,
1226         lll_private_futex_wake): Removed.
1227         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1228         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1229         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1230         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1231         (lll_futex_wait): Add private argument, define as wrapper around
1232         lll_futex_timed_wait.
1233         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1234         use __lll_private_flag macro.
1235         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1236         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1237         to lll_futex_*.
1238         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1239         (lll_private_futex_wait, lll_private_futex_timed_wait,
1240         lll_private_futex_wake): Removed.
1241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1242         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1243         (lll_private_futex_wait, lll_private_futex_timed_wait,
1244         lll_private_futex_wake): Removed.
1245         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1246         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1247         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1248         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1249         (lll_futex_wait): Add private argument, define as wrapper around
1250         lll_futex_timed_wait.
1251         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1252         use __lll_private_flag macro.
1253         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1254         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1255         to lll_futex_*.
1256         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1257         Define.
1258         (lll_futex_timed_wait, lll_futex_wake): Use it.
1259         (lll_private_futex_wait, lll_private_futex_timed_wait,
1260         lll_private_futex_wake): Removed.
1262 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1264         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1265         of the structure for sparc32.
1267 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1269         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1271 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1273         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1274         code used when private futexes are assumed.
1275         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1276         Likewise.
1278 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1280         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1281         (__lll_private_flag): Define.
1282         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1283         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1284         __lll_private_flag.
1285         (lll_private_futex_wait, lll_private_futex_timedwait,
1286         lll_private_futex_wake): Define as wrapper around non-_private
1287         macros.
1288         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1289         (__lll_private_flag): Define.
1290         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1291         (lll_private_futex_wait, lll_private_futex_timedwait,
1292         lll_private_futex_wake): Define as wrapper around non-_private
1293         macros.
1295 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1297         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1298         parameter to lll_futex_wait call.
1299         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1301         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1302         Replace lll_futex_wait with lll_private_futex_wait.
1303         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1304         Add LLL_SHARED parameter to lll_futex_wake().
1306         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1307         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1308         lll_private_futex_wake.
1309         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1310         bit from private parm before syscall.
1311         (lll_futex_timed_wait): Likewise.
1312         (lll_futex_wake): Likewise.
1313         (lll_futex_wake_unlock): Likewise.
1314         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1315         (lll_robust_mutex_unlock): Likewise.
1316         (lll_mutex_unlock_force): Likewise.
1317         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1319 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1321         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1322         compilation when unconditionally using private futexes.
1323         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1324         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1325         Likewise.
1326         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1327         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1329 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1331         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1332         Define.
1334 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1336         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1337         kernel-features.h.
1339 2007-05-16  Roland McGrath  <roland@redhat.com>
1341         * init.c (__nptl_initial_report_events): New variable.
1342         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1343         to that.
1345 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1347         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1348         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1350 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1352         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1353         implementation.
1355 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1357         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1358         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1359         * pthread_mutex_timedlock.c: Likewise.
1360         * pthread_mutex_trylock.c: Likewise.
1361         * pthread_mutex_unlock.c: Likewise.
1363 2007-06-17  Andreas Schwab  <schwab@suse.de>
1365         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1366         sections.
1368 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1370         * allocatestack.c (allocate_stack): Make code compile if
1371         __ASSUME_PRIVATE_FUTEX is set.
1373 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1375         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1376         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1377         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1378         (__pthread_rwlock_wrlock): Likewise.
1379         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1380         (pthread_rwlock_timedrdlock): Likewise.
1381         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1382         (pthread_rwlock_timedwrlock): Likewise.
1383         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1384         (__pthread_rwlock_unlock): Likewise.
1386 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1388         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1389         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1390         Split __flags into __flags, __shared, __pad1 and __pad2.
1391         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1392         futexes if they are available.
1393         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1394         in libc-lowlevellock.S allow using private futexes.
1395         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1396         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1397         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1398         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1399         lll_private_futex_timed_wait and lll_private_futex_wake.
1400         (lll_robust_mutex_unlock): Fix typo.
1401         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1402         field in futex command setup.
1403         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1404         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1405         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1406         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1407         if they are available.  Remove clear_once_control.
1408         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1409         futexes if they are available.
1410         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1411         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1412         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1413         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1414         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1415         Wake only when there are waiters.
1416         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1417         support.  Indicate that there are waiters.  Remove unnecessary
1418         extra cancellation test.
1419         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1420         left-over duplication of __sem_wait_cleanup.
1422 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1424         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1425         parameter to lll_futex_wait, lll_futex_timed_wait, and
1426         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1427         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1428         lll_private_futex_wake.
1429         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1430         * allocatestack.c: Adjust use of lll_futex_* macros.
1431         * init.c: Likewise.
1432         * lowlevellock.h: Likewise.
1433         * pthread_barrier_wait.c: Likewise.
1434         * pthread_cond_broadcast.c: Likewise.
1435         * pthread_cond_destroy.c: Likewise.
1436         * pthread_cond_signal.c: Likewise.
1437         * pthread_cond_timedwait.c: Likewise.
1438         * pthread_cond_wait.c: Likewise.
1439         * pthread_create.c: Likewise.
1440         * pthread_mutex_lock.c: Likewise.
1441         * pthread_mutex_setprioceiling.c: Likewise.
1442         * pthread_mutex_timedlock.c: Likewise.
1443         * pthread_mutex_unlock.c: Likewise.
1444         * pthread_rwlock_timedrdlock.c: Likewise.
1445         * pthread_rwlock_timedwrlock.c: Likewise.
1446         * pthread_rwlock_unlock.c: Likewise.
1447         * sysdeps/alpha/tls.h: Likewise.
1448         * sysdeps/i386/tls.h: Likewise.
1449         * sysdeps/ia64/tls.h: Likewise.
1450         * sysdeps/powerpc/tls.h: Likewise.
1451         * sysdeps/pthread/aio_misc.h: Likewise.
1452         * sysdeps/pthread/gai_misc.h: Likewise.
1453         * sysdeps/s390/tls.h: Likewise.
1454         * sysdeps/sh/tls.h: Likewise.
1455         * sysdeps/sparc/tls.h: Likewise.
1456         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1457         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1458         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1459         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1460         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1461         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1462         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1463         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1464         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1465         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1466         Likewise.
1467         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1468         * sysdeps/x86_64/tls.h: Likewise.
1470 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1472         * pthread_getattr_np.c: No need to install a cancellation handler,
1473         this is no cancellation point.
1474         * pthread_getschedparam.c: Likewise.
1475         * pthread_setschedparam.c: Likewise.
1476         * pthread_setschedprio.c: Likewise.
1477         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1478         lll_unlock_wake_cb.
1479         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1480         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1481         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1482         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1483         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1484         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1485         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1486         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1487         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1488         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1489         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1490         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1492         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1493         whether there are more than one thread makes no sense here since
1494         we only call the slow path if the locks are taken.
1495         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1497         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1498         COND_NWAITERS_SHIFT.
1499         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1500         COND_CLOCK_BITS.
1501         * pthread_cond_init.c: Likewise.
1502         * pthread_cond_timedwait.c: Likewise.
1503         * pthread_cond_wait.c: Likewise.
1504         * pthread_condattr_getclock.c: Likewise.
1505         * pthread_condattr_setclock.c: Likewise.
1506         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1507         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1509         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1510         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1512 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1514         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1515         unistd.h.
1517         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1518         insn suffix.
1519         (THREAD_GSCOPE_GET_FLAG): Remove.
1520         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1521         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1522         changes.
1523         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1524         (THREAD_GSCOPE_GET_FLAG): Remove.
1525         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1526         instead of THREAD_GSCOPE_GET_FLAG.
1527         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1528         it.
1529         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1530         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1531         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1532         THREAD_GSCOPE_WAIT): Define.
1533         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1534         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1535         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1536         THREAD_GSCOPE_WAIT): Define.
1537         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1538         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1539         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1540         THREAD_GSCOPE_WAIT): Define.
1541         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1542         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1543         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1544         THREAD_GSCOPE_WAIT): Define.
1546 2007-05-24  Richard Henderson  <rth@redhat.com>
1548         * descr.h (struct pthread): Add header.gscope_flag.
1549         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1550         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1551         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1552         THREAD_GSCOPE_WAIT): Define.
1554 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1556         * init.c: Make it compile with older kernel headers.
1558         * tst-initializers1.c: Show through exit code which test failed.
1560         * pthread_rwlock_init.c: Also initialize __shared field.
1561         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1562         element in rwlock structure into four byte elements.  One of them is
1563         the new __shared element.
1564         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1565         Likewise.
1566         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1567         __shared, adjust names of other padding elements.
1568         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1569         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1570         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1571         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1572         FUTEX_PRIVATE_FLAG.
1573         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1574         futex to use private operations if possible.
1575         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1576         Likewise.
1577         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1578         Likewise.
1579         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1580         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1581         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1582         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1583         Likewise.
1584         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1585         Likewise.
1586         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1587         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1589 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1591         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1592         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1593         * pthread_rwlock_timedrdlock.c: Likewise.
1594         * pthread_rwlock_tryrdlock.c: Likewise.
1596         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1597         optimization.
1599         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1600         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1601         duplication of __sem_wait_cleanup.
1603         * allocatestack.c: Revert last change.
1604         * init.c: Likewise.
1605         * sysdeps/i386/tls.h: Likewise.
1606         * sysdeps/x86_64/tls.h: Likewise.
1607         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1608         header structure.
1609         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1611         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1612         Add private field.
1613         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1614         * pthread_barrier_init.c: Set private flag if pshared and private
1615         futexes are supported.
1616         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1617         private field in futex command setup.
1618         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1620 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1622         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1623         support.
1624         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1625         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1626         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1627         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1628         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1630         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1631         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1632         fields in the structure.
1633         (__old_sem_init): New function.
1634         * sem_open.c: Initialize all fields of the structure.
1635         * sem_getvalue.c: Adjust for renamed element.
1636         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1637         (gen-as-const-headers): Add structsem.sym.
1638         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1639         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1640         struct new_sem.  Add struct old_sem.
1641         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1642         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1643         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1644         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1645         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1646         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1647         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1648         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1649         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1650         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1651         * tst-sem10.c: New file.
1652         * tst-sem11.c: New file.
1653         * tst-sem12.c: New file.
1654         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1655         of struct sem.
1657 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1658             Jakub Jelinek  <jakub@redhat.com>
1660         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1661         Move __pthread_enable_asynccancel right before futex syscall.
1662         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1663         Likewise.
1665 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1667         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1668         THREAD_COPY_PRIVATE_FUTEX): Define.
1669         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1670         THREAD_COPY_PRIVATE_FUTEX): Define.
1671         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1672         * init.c (__pthread_initialize_minimal_internal): Use
1673         THREAD_SET_PRIVATE_FUTEX.
1675         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1676         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1677         THREAD_GSCOPE_FLAG_WAIT): Define.
1678         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1679         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1680         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1681         PTR_DEMANGLE.
1682         (THREAD_GSCOPE_GET_FLAG): Define.
1683         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1684         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1685         instead of ->header.gscope_flag directly.
1687 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1689         * init.c (__pthread_initialize_minimal_internal): Check whether
1690         private futexes are available.
1691         * allocatestack.c (allocate_stack): Copy private_futex field from
1692         current thread into the new stack.
1693         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1694         futexes if they are available.
1695         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1697         in libc-lowlevellock.S allow using private futexes.
1698         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1699         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1700         FUTEX_PRIVATE_FLAG.
1701         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1702         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1703         if they are available.
1704         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1705         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1706         * sysdeps/i386/tcb-offsets.sym: Likewise.
1707         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1708         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1710 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1712         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1713         Remove ptr_wait_lookup_done again.
1714         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1715         (__pthread_initialize_minimal_internal): Initialize
1716         _dl_wait_lookup_done pointer in _rtld_global directly.
1717         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1718         Remove code to code _dl_wait_lookup_done.
1719         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1720         encrypted for now.
1722 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1724         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1725         pthread_mutex_init failed with ENOTSUP.
1727 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1729         * allocatestack.c (__wait_lookup_done): New function.
1730         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1731         Add ptr_wait_lookup_done.
1732         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1733         * pthreadP.h: Declare __wait_lookup_done.
1734         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1735         Define macros to implement reference handling of global scope.
1736         * sysdeps/x86_64/tls.h: Likewise.
1737         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1738         Initialize GL(dl_wait_lookup_done).
1740 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1742         [BZ #4512]
1743         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1744         is detected.
1745         * pthread_mutex_timedlock.c: Likewise.
1746         * pthread_mutex_trylock.c: Likewise.
1747         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1749         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1750         * tst-robust9.c: New file.
1751         * tst-robustpi9.c: New file.
1753         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1754         unnecessary extra cancellation test.
1756 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1758         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1759         extra cancellation test.
1760         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1762 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1764         * descr.h (struct pthread): Rearrange members to fill hole in
1765         64-bit layout.
1767         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1768         (__pthread_setaffinity_new): If syscall was successful and
1769         RESET_VGETCPU_CACHE is defined, use it before returning.
1770         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1772 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1774         [BZ #4455]
1775         * tst-align2.c: Include stackinfo.h.
1776         * tst-getpid1.c: Likewise.
1778 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1780         [BZ #4455]
1781         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1782         * tst-getpid1.c (do_test): Likewise.
1784         [BZ #4456]
1785         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1786         (allocate_stack): Likewise.
1788 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1790         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1791         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1792         (__lll_robust_timedlock_wait): Likewise.
1793         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1795 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1797         [BZ #4465]
1798         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1799         * tst-cancel4.c (tf_fdatasync): New test.
1801 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1803         [BZ #4392]
1804         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1805         check mutexes like normal mutexes.
1807         [BZ #4306]
1808         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1809         Initialize the whole sigevent structure to appease valgrind.
1811 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1813         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1814         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1816 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1818         * tst-locale1.c: Avoid warnings.
1819         * tst-locale2.c: Likewise.
1821 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1823         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1824         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1826 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1828         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1829         __extern_always_inline where appropriate.
1830         * sysdeps/pthread/pthread.h: Likewise.
1832 2007-03-13  Richard Henderson  <rth@redhat.com>
1834         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1835         separate cfi regions for the two subsections.
1837 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1839         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1840         new thread, don't just decrement it.
1841         Patch by Suzuki K P <suzuki@in.ibm.com>.
1843 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1845         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1846         PTHFCT_CALL definition.
1848 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1850         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1851         available, don't use it.
1853 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1855         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1856         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1857         call into the kernel to delay.
1859 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1861         * tst-initializers1.c: We want to test the initializers as seen
1862         outside of libc, so undefined _LIBC.
1864         * pthread_join.c (cleanup): Avoid warning.
1866 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1868         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1869         (__lll_timedwait_tid): Add unwind info.
1871         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1872         function table, mangle the pointers.
1873         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1874         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1875         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1876         demangle pointers before use.
1877         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1878         demangle pointer.
1879         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1880         * sysdeps/pthread/setxid.h: Likewise.
1882 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1884         * tst-rwlock7.c: Show some more information in case of correct
1885         behavior.
1887 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1889         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1890         (lll_futex_timed_wait): Undo part of last change, don't negate
1891         return value.
1893 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1895         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1896         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1898 2006-12-28  David S. Miller  <davem@davemloft.net>
1900         * shlib-versions: Fix sparc64 linux target specification.
1902 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1904         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1905         Adjust include path for pthread_barrier_wait.c move.
1907 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1909         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1910         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1912 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1914         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1915         6 argument cancellable syscalls.
1916         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1917         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1918         6 argument cancellable syscalls.
1919         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1921 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1923         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1924         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1926 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1928         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1929         __sync_lock_release instead of __sync_lock_release_si.
1931 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1933         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1934         Define.
1935         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1936         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1937         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1938         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1939         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1940         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1941         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1942         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1943         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1944         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1945         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1947 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1949         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1950         * pthread_barrier_wait.c: ...here.
1951         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1952         * pthread_cond_broadcast.c: ...here.
1953         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1954         * pthread_cond_signal.c: ...here.
1955         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1956         * pthread_cond_timedwait.c: ...here.
1957         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1958         * pthread_cond_wait.c: ...here.
1959         * sysdeps/pthread/pthread_once.c: Move to...
1960         * pthread_once.c: ...here.
1961         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1962         * pthread_rwlock_rdlock.c: ...here.
1963         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1964         * pthread_rwlock_timedrdlock.c: ...here.
1965         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1966         * pthread_rwlock_timedwrlock.c: ...here.
1967         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1968         * pthread_rwlock_unlock.c: ...here.
1969         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1970         * pthread_rwlock_wrlock.c: ...here.
1971         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1972         * pthread_spin_destroy.c: ...here.
1973         * sysdeps/pthread/pthread_spin_init.c: Move to...
1974         * pthread_spin_init.c: ...here.
1975         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1976         * pthread_spin_unlock.c: ...here.
1977         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1978         * pthread_getcpuclockid.c: ...here.
1980         * init.c: USE_TLS support is now always enabled.
1981         * tst-tls5.h: Likewise.
1982         * sysdeps/alpha/tls.h: Likewise.
1983         * sysdeps/i386/tls.h: Likewise.
1984         * sysdeps/ia64/tls.h: Likewise.
1985         * sysdeps/powerpc/tls.h: Likewise.
1986         * sysdeps/s390/tls.h: Likewise.
1987         * sysdeps/sh/tls.h: Likewise.
1988         * sysdeps/sparc/tls.h: Likewise.
1989         * sysdeps/x86_64/tls.h: Likewise.
1991 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1993         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1994         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1995         failed.
1997         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1998         Define to THREAD_SELF->header.multiple_threads.
1999         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
2000         Likewise.
2001         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
2002         Likewise.
2003         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
2004         (SINGLE_THREAD_P): Likewise.
2005         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
2006         (SINGLE_THREAD_P): Likewise.
2007         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2008         (SINGLE_THREAD_P): Likewise.
2009         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
2010         (SINGLE_THREAD_P): Likewise.
2011         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
2012         Likewise.
2013         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
2014         (SINGLE_THREAD_P): Likewise.
2015         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
2016         (SINGLE_THREAD_P): Likewise.
2017         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2018         Likewise.
2020 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2022         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2023         by default rather than 2_3_3.
2025 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2027         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2028         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2029         atomic_* instead of catomic_* macros.
2031 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2033         [BZ #3285]
2034         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2035         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2036         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2037         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2038         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2039         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2040         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2041         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2042         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2043         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2044         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2045         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2046         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2048 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2050         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2051         cancelable syscalls with six parameters.
2053         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2054         operations instead of atomic_*.
2056 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2058         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2060 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2062         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2063         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2064         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2065         New file.
2066         * pthread_attr_setstack.c: Allow overwriting the version number of the
2067         new symbol.
2068         * pthread_attr_setstacksize.c: Likewise.
2069         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2070         it.
2071         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2072         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2074 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2076         [BZ #3251]
2077         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2078         Patch by Petr Baudis.
2080 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2082         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2084         * tst-cancel2.c (tf): Loop as long as something was written.
2086 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2088         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2089         mutexes wake all mutexes.
2090         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2091         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2092         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2094 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2096         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2097         to guarantee the thread is always canceled.
2099 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2101         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2102         Include stdlib.h.
2103         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2104         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2105         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2106         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2107         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2109 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2111         [BZ #3123]
2112         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2113         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2114         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2115         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2116         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2117         * Makefile (tests): Add tst-cond22.
2118         * tst-cond22.c: New file.
2120 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2122         [BZ #3124]
2123         * descr.h (struct pthread): Add parent_cancelhandling.
2124         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2125         cancelhandling value to child.
2126         * pthread_create.c (start_thread): If parent thread was canceled
2127         reset the SIGCANCEL mask.
2128         * Makefile (tests): Add tst-cancel25.
2129         * tst-cancel25.c: New file.
2131 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2132             Ulrich Drepper  <drepper@redhat.com>
2134         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2135         counterp if it is already zero.
2136         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2138 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2139             Roland McGrath  <roland@redhat.com>
2141         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2142         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2143         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2144         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2145         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2146         lll_robust_mutex_timedlock, lll_mutex_unlock,
2147         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2148         Add _L_*_ symbols around the subsection.
2149         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2150         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2152 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2153             Roland McGrath  <roland@redhat.com>
2155         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2156         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2157         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2158         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2159         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2160         lll_robust_mutex_timedlock, lll_mutex_unlock,
2161         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2162         Add _L_*_ symbols around the subsection.
2163         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2164         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2166 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2168         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2169         change because it can disturb too much existing code.  If real hard
2170         reader preference is needed we'll introduce another type.
2171         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2172         (pthread_rwlock_timedwrlock): Likewise.
2173         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2174         Likewise.
2176 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2178         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2179         reader preference.
2180         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2181         (pthread_rwlock_timedwrlock): Likewise.
2182         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2183         Likewise.
2185 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2187         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2188         Only define ifdef SHARED.
2190 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2192         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2193         (free_stacks): ...here.
2194         (__free_stack_cache): New function.
2195         * pthreadP.h: Declare __free_stack_cache.
2196         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2197         ptr_freeres.
2198         * init.c (pthread_functions): Initialize ptr_freeres.
2199         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2200         New freeres function.
2202 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2204         [BZ #3018]
2205         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2207 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2209         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2210         _XOPEN_REALTIME_THREADS.
2212 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2214         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2215         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2216         HAVE_CLOCK_GETTIME_VSYSCALL.
2217         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2219 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2221         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2222         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2223         * descr.h (struct priority_protection_data): New type.
2224         (struct pthread): Add tpp field.
2225         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2226         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2227         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2228         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2229         TPP mutexes.
2230         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2231         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2232         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2233         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2234         * tpp.c: New file.
2235         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2236         boosted by TPP.
2237         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2238         * pthread_mutexattr_getprioceiling.c
2239         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2240         in the SCHED_FIFO priority range.
2241         * pthread_mutexattr_setprioceiling.c
2242         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2243         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2244         if mutex is not TPP.  Ceiling is now in __data.__lock.
2245         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2246         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2247         is now in __data.__lock.  Add locking.
2248         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2249         * Makefile (libpthread-routines): Add tpp.
2250         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2251         * tst-tpp.h: New file.
2252         * tst-mutexpp1.c: New file.
2253         * tst-mutexpp6.c: New file.
2254         * tst-mutexpp10.c: New file.
2255         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2256         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2258 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2260         [BZ #2843]
2261         * pthread_join.c (pthread_join): Account for self being canceled
2262         when checking for deadlocks.
2263         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2264         (tf1): Don't print anything after pthread_join returns, this would be
2265         another cancellation point.
2266         (tf2): Likewise.
2267         * tst-join6.c: New file.
2268         * Makefile (tests): Add tst-join6.
2270 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2272         [BZ #2892]
2273         * pthread_setspecific.c (__pthread_setspecific): Check
2274         out-of-range index before checking for unused key.
2276         * sysdeps/pthread/gai_misc.h: New file.
2278 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2280         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2281         file.  Don't use sysctl.
2282         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2283         overwrite the file if this is likely not true.
2285 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2287         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2288         * Makefile (tests): Add tst-getpid3.
2289         * tst-getpid3.c: New file.
2291 2006-07-30  Roland McGrath  <roland@redhat.com>
2293         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2295         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2296         (pause_not_cancel): New macro.
2297         (nanosleep_not_cancel): New macro.
2298         (sigsuspend_not_cancel): New macro.
2299         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2300         nanosleep_not_cancel macro from <not-cancel.h>.
2301         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2302         macro from <not-cancel.h>.
2304 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2305             Jakub Jelinek  <jakub@redhat.com>
2307         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2308         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2309         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2310         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2311         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2312         * pthread_mutex_lock.c: Likewise.
2313         * pthread_mutex_timedlock.c: Likewise.
2314         * pthread_mutex_trylock.c: Likewise.
2315         * pthread_mutex_unlock.c: Likewise.
2316         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2317         all mutexes.
2318         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2319         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2320         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2321         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2322         pthread-pi-defines.sym.
2323         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2324         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2325         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2326         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2327         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2328         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2329         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2330         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2331         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2332         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2333         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2334         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2335         * tst-mutex2.c: Likewise.
2336         * tst-mutex3.c: Likewise.
2337         * tst-mutex4.c: Likewise.
2338         * tst-mutex5.c: Likewise.
2339         * tst-mutex6.c: Likewise.
2340         * tst-mutex7.c: Likewise.
2341         * tst-mutex7a.c: Likewise.
2342         * tst-mutex8.c: Likewise.
2343         * tst-mutex9.c: Likewise.
2344         * tst-robust1.c: Likewise.
2345         * tst-robust7.c: Likewise.
2346         * tst-robust8.c: Likewise.
2347         * tst-mutexpi1.c: New file.
2348         * tst-mutexpi2.c: New file.
2349         * tst-mutexpi3.c: New file.
2350         * tst-mutexpi4.c: New file.
2351         * tst-mutexpi5.c: New file.
2352         * tst-mutexpi6.c: New file.
2353         * tst-mutexpi7.c: New file.
2354         * tst-mutexpi7a.c: New file.
2355         * tst-mutexpi8.c: New file.
2356         * tst-mutexpi9.c: New file.
2357         * tst-robust1.c: New file.
2358         * tst-robust2.c: New file.
2359         * tst-robust3.c: New file.
2360         * tst-robust4.c: New file.
2361         * tst-robust5.c: New file.
2362         * tst-robust6.c: New file.
2363         * tst-robust7.c: New file.
2364         * tst-robust8.c: New file.
2365         * Makefile (tests): Add the new tests.
2367         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2368         * pthread_mutex_destroy.c: Remove unneeded label.
2370 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2372         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2373         computations to compile time.
2375 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2377         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2379 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2381         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2383 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2385         * pthread_key_create.c (__pthread_key_create): Do away with
2386         __pthread_keys_lock.
2388         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2389         (__kernel_cpumask_size): Mark as hidden.
2390         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2392         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2393         * semaphoreP.h (__sem_mappings_lock): Likewise.
2395 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2397         * pthread_atfork.c: Mark __dso_handle as hidden.
2399 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2401         [BZ #2644]
2402         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2403         the reload problem.  Change the one path in pthread_cancel_init
2404         which causes the problem.  Force gcc to reload.  Simplify callers.
2405         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2406         (_Unwind_GetBSP): Undo last patch.
2408 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2410         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2411         function pointer is reloaded after pthread_cancel_init calls.
2413         [BZ #2644]
2414         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2415         pointers are reloaded after pthread_cancel_init calls.
2417 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2419         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2420         __always_inline.
2422 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2424         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2425         Allocate new object which is passed to timer_sigev_thread so that
2426         the timer can be deleted before the new thread is scheduled.
2428 2006-04-26  Roland McGrath  <roland@redhat.com>
2430         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2432 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2434         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2435         suffix for conditional jumps.
2436         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2437         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2438         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2439         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2440         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2441         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2443         * init.c (sigcancel_handler): Compare with correct PID even if the
2444         thread is in the middle of a fork call.
2445         (sighandler_setxid): Likewise.
2446         Reported by Suzuki K P <suzuki@in.ibm.com> .
2448 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2450         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2452 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2454         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2455         fails [Coverity CID 105].
2457 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2459         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2461 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2463         [BZ #2505]
2464         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2465         Define __lll_rel_instr using lwsync.
2467 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2469         * allocatestack.c (allocate_stack): Always initialize robust_head.
2470         * descr.h: Define struct robust_list_head.
2471         (struct pthread): Use robust_list_head in robust mutex list definition.
2472         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2473         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2474         (__pthread_initialize_minimal_internal): Register robust_list with
2475         the kernel.
2476         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2477         Declare __set_robust_list_avail.
2478         * pthread_create.c (start_thread): Register robust_list of new thread.
2479         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2480         waiters.
2481         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2482         number of users, it's unreliable.
2483         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2484         set_robust_list syscall is available.
2485         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2486         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2487         Set robust_head.list_op_pending before trying to lock a robust mutex.
2488         * pthread_mutex_timedlock.c: Likewise.
2489         * pthread_mutex_trylock.c: Likewise.
2490         * pthread_mutex_unlock.c: Likewise for unlocking.
2491         * Makefile (tests): Add tst-robust8.
2492         * tst-robust8.c: New file.
2494 2006-03-08  Andreas Schwab  <schwab@suse.de>
2496         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2497         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2499 2006-03-05  Roland McGrath  <roland@redhat.com>
2501         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2502         and $config_os doesn't match *linux*.
2504 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2506         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2507         Use __syscall_error.
2508         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2509         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2510         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2511         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2512         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2513         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2515 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2517         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2519 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2521         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2522         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2523         mutex.
2524         (__lll_robust_timedlock_wait): Likewise.
2525         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2526         (__lll_robust_lock_wait): Likewise.
2527         (__lll_robust_timedlock_wait): Likewise.
2528         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2529         (__lll_robust_lock_wait): Likewise.
2530         (__lll_robust_timedlock_wait): Likewise.
2532 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2534         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2535         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2536         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2537         lll_robust_mutex_unlock): Define.
2538         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2540 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2542         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2543         instead of <clone.S>.
2545 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2547         * Makefile (libpthread-routines): Add
2548         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2549         and pthread_mutex_[sg]etprioceiling.
2550         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2551         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2552         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2553         pthread_mutex_setprioceiling.
2554         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2555         PTHREAD_PRIO_PROTECT): New enum values.
2556         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2557         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2558         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2559         prototypes.
2560         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2561         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2562         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2563         Define.
2564         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2565         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2566         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2567         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2568         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2569         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2570         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2571         protocol mutexes.
2572         * pthread_mutex_getprioceiling.c: New file.
2573         * pthread_mutex_setprioceiling.c: New file.
2574         * pthread_mutexattr_getprioceiling.c: New file.
2575         * pthread_mutexattr_setprioceiling.c: New file.
2576         * pthread_mutexattr_getprotocol.c: New file.
2577         * pthread_mutexattr_setprotocol.c: New file.
2579 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2581         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2583 2006-02-27  Roland McGrath  <roland@redhat.com>
2585         * sysdeps/pthread/Subdirs: List nptl here too.
2586         * configure (libc_add_on_canonical): New variable.
2588         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2590         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2591         self to get main source tree's file.
2592         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2593         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2594         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2595         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2596         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2597         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2598         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2599         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2600         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2601         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2602         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2603         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2604         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2606         * Makefile: Use $(sysdirs) in vpath directive.
2608         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2609         (CPPFLAGS-timer_routines.c): Likewise.
2611         * Makeconfig (includes): Variable removed.
2613 2006-02-26  Roland McGrath  <roland@redhat.com>
2615         * sysdeps/generic/pt-raise.c: Moved to ...
2616         * pt-raise.c: ... here.
2617         * sysdeps/generic/lowlevellock.h: Moved to ...
2618         * lowlevellock.h: ... here.
2620 2006-02-23  Roland McGrath  <roland@redhat.com>
2622         * descr.h (struct pthread): Add final member `end_padding'.
2623         (PTHREAD_STRUCT_END_PADDING): Use it.
2625 2006-02-20  Roland McGrath  <roland@redhat.com>
2627         * sysdeps/mips: Directory removed, saved in ports repository.
2628         * sysdeps/unix/sysv/linux/mips: Likewise.
2630 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2632         * tst-robust1.c: Add second mutex to check that the mutex list is
2633         handled correctly.
2635 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2637         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2638         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2639         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2640         lll_robust_mutex_unlock): New macros.
2641         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2642         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2643         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2644         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2645         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2647 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2649         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2650         definitions.
2651         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2653 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2655         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2656         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2657         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2658         (lll_robust_mutex_unlock): Likewise.
2660 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2662         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2663         Set robust_list.__next rather than robust_list.
2664         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2665         (__pthread_list_t): New typedef.
2666         (pthread_mutex_t): Replace __next and __prev fields with __list.
2667         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2668         (__pthread_list_t): New typedef.
2669         (pthread_mutex_t): Replace __next and __prev fields with __list.
2670         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2671         (__pthread_list_t, __pthread_slist_t): New typedefs.
2672         (pthread_mutex_t): Replace __next and __prev fields with __list.
2673         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2674         (__pthread_list_t, __pthread_slist_t): New typedefs.
2675         (pthread_mutex_t): Replace __next and __prev fields with __list.
2676         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2677         (__pthread_list_t, __pthread_slist_t): New typedefs.
2678         (pthread_mutex_t): Replace __next and __prev fields with __list.
2679         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2680         (__pthread_slist_t): New typedef.
2681         (pthread_mutex_t): Replace __next field with __list.
2683 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2685         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2686         PTHREAD_MUTEX_OWNERDEAD.
2687         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2688         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2689         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2690         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2691         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2692         to PTHREAD_MUTEX_INCONSISTENT.
2693         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2694         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2695         * pthread_mutex_trylock.c: Likewise.
2696         * pthread_mutex_timedlock.c: Likewise.
2697         * pthread_mutex_unlock.c: Likewise.
2698         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2699         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2700         lowlevelrobustlock.sym.
2701         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2702         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2703         definitions.
2704         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2705         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2706         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2707         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2708         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2710 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2712         * allocatestack.c (allocate_stack): Initialize robust_list.
2713         * init.c (__pthread_initialize_minimal_internal): Likewise.
2714         * descr.h (struct xid_command): Pretty printing.
2715         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2716         robust_list.  Adjust macros.
2717         * pthread_create.c (start_thread): Adjust robust_list handling.
2718         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2719         but the owner for all robust mutex types.
2720         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2721         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2722         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2723         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2725         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2726         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2728 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2730         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2731         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2733 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2735         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2736         Return status.
2737         (lll_futex_timed_wait): Define.
2739 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2741         * tst-cancel4.c: Test ppoll.
2743 2006-01-18  Andreas Jaeger  <aj@suse.de>
2745         [BZ #2167]
2746         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2747         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2748         by Jim Gifford <patches@jg555.com>.
2750 2006-01-13  Richard Henderson  <rth@redhat.com>
2752         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2754 2006-01-10  Roland McGrath  <roland@redhat.com>
2756         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2757         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2758         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2759         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2760         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2761         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2762         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2763         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2764         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2765         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2767 2006-01-09  Roland McGrath  <roland@redhat.com>
2769         * tst-initializers1-c89.c: New file.
2770         * tst-initializers1-c99.c: New file.
2771         * tst-initializers1-gnu89.c: New file.
2772         * tst-initializers1-gnu99.c: New file.
2773         * Makefile (tests): Add them.
2774         (CFLAGS-tst-initializers1-c89.c): New variable.
2775         (CFLAGS-tst-initializers1-c99.c): New variable.
2776         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2777         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2779         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2780         Use __extension__ on anonymous union definition.
2781         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2782         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2783         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2784         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2785         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2787 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2789         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2790         Don't give the union a name because it changes the mangled name.
2791         Instead name the struct for __data.
2792         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2793         Likewise.
2794         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2795         Likewise.
2797 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2799         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2800         stack bias to mc_ftp field.
2802 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2804         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2805         being too clever and reloading the futex value where it shouldn't.
2807 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2809         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2810         correct type.
2812 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2814         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2815         Add cfi directives.
2817 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2819         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2820         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2821         rename in tcbhead_t.
2823         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2824         Don't give the union a name because it changes the mangled name.
2825         Instead name the struct for __data.
2826         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2827         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2828         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2829         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2830         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2831         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2833 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2835         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2836         Return status.
2837         (lll_futex_timed_wait): Define.
2838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2839         * sysdeps/pthread/aio_misc.h: New file.
2841 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2843         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2845 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2847         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2848         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2849         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2851 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2853         * tst-cancel24.cc: Use C headers instead of C++ headers.
2855 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2857         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2858         sparc-linux configured glibc.
2859         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2860         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2861         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2862         atomic_compare_and_exchange_val_24_acq instead of
2863         atomic_compare_and_exchange_val_acq.
2864         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2865         instead of atomic_exchange_rel.
2866         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2867         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2868         file.
2869         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2870         file.
2871         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2872         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2873         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2874         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2875         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2876         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2877         New file.
2878         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2879         New file.
2880         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2881         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2882         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2883         file.
2884         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2885         file.
2886         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2888 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2890         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2891         mutex initializers.
2893 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2895         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2896         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2897         THREAD_COPY_POINTER_GUARD): Define.
2898         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2899         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2901 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2903         * version.c: Update copyright year.
2905 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2907         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2908         .eh_frame section, use cfi_* directives.
2909         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2911 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2913         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2914         now.
2916 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2918         * sysdeps/pthread/sigaction.c: Removed.
2919         * sigaction.c: New file.
2920         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2922 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2924         * Makefile (tests): Add tst-signal7.
2925         * tst-signal7.c: New file.
2927 2005-12-27  Roland McGrath  <roland@redhat.com>
2929         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2930         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2931         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2932         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2933         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2934         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2935         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2936         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2937         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2938         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2939         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2941 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2943         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2944         and __prev field to pthread_mutex_t.
2945         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2946         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2947         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2948         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2949         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2950         to pthread_mutex_t.
2952 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2954         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2955         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2956         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2957         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2958         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2959         and PTHREAD_MUTEXATTR_FLAG_BITS.
2960         * descr.h (struct pthread): Add robust_list field and define
2961         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2962         * pthread_mutexattr_getrobust.c: New file.
2963         * pthread_mutexattr_setrobust.c: New file.
2964         * pthread_mutex_consistent.c: New file.
2965         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2966         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2967         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2968         Adjust pthread_mutex_t initializers.
2969         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2970         field to pthread_mutex_t.
2971         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2972         and __prev field to pthread_mutex_t.
2973         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2974         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2975         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2976         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2977         * pthread_mutexattr_gettype.c: Likewise.
2978         * pthread_mutexattr_setpshared.c: Likewise.
2979         * pthread_mutexattr_settype.c: Likewise.
2980         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2981         Initialize mutex kind according to robust flag.
2982         * pthread_mutex_lock.c: Implement local robust mutex.
2983         * pthread_mutex_timedlock.c: Likewise.
2984         * pthread_mutex_trylock.c: Likewise.
2985         * pthread_mutex_unlock.c: Likewise.
2986         * pthread_create.c (start_thread): Mark robust mutexes which remained
2987         locked as dead.
2988         * tst-robust1.c: New file.
2989         * tst-robust2.c: New file.
2990         * tst-robust3.c: New file.
2991         * tst-robust4.c: New file.
2992         * tst-robust5.c: New file.
2993         * tst-robust6.c: New file.
2994         * tst-robust7.c: New file.
2995         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2996         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2997         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2998         tst-robust5, tst-robust6, and tst-robust7.
3000         * tst-typesizes.c: New file.
3001         * Makefile (tests): Add tst-typesizes.
3003         * tst-once3.c: More debug output.
3005 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
3007         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
3008         missing after last change.
3010         * version.c: Update copyright year.
3012 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
3014         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
3015         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
3016         * pthread_mutex_trylock.c: Likewise.
3017         * pthread_mutex_timedlock.c: Likewise.
3018         * pthread_mutex_unlock.c: Likewise.
3020 2005-12-22  Roland McGrath  <roland@redhat.com>
3022         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3023         so that #include_next's search location is not reset to the -I..
3024         directory where <nptl/...> can be found.
3026 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3028         [BZ #1913]
3029         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3030         Fix unwind info.  Remove useless branch prediction prefix.
3031         * tst-cancel24.cc: New file.
3032         * Makefile: Add rules to build and run tst-cancel24.
3034 2005-12-21  Roland McGrath  <roland@redhat.com>
3036         * libc-cancellation.c: Use <> rather than "" #includes.
3037         * pt-cleanup.c: Likewise.
3038         * pthread_create.c: Likewise.
3039         * pthread_join.c: Likewise.
3040         * pthread_timedjoin.c: Likewise.
3041         * pthread_tryjoin.c: Likewise.
3042         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3043         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3044         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3045         * unwind.c: Likewise.
3047 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3049         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3050         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3051         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3052         THREAD_COPY_POINTER_GUARD): Define.
3054 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3056         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3057         rather than one.
3058         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3059         THREAD_COPY_POINTER_GUARD): Define.
3060         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3061         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3062         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3063         THREAD_COPY_POINTER_GUARD): Define.
3064         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3065         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3066         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3067         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3068         Use PTR_DEMANGLE for B0 if defined.
3070 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3072         * pthread_create.c (__pthread_create_2_1): Use
3073         THREAD_COPY_POINTER_GUARD if available.
3074         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3075         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3076         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3077         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3078         * sysdeps/x86_64/tls.h: Likewise.
3080 2005-12-15  Roland McGrath  <roland@redhat.com>
3082         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3084 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3086         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3087         sysdeps/generic.
3088         * errno-loc.c: New file.
3090 2005-12-12  Roland McGrath  <roland@redhat.com>
3092         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3093         adjustments before choosing stack size.  Update minimum stack size
3094         calculation to match allocate_stack change.
3096 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3098         * allocatestack.c (allocate_stack): Don't demand that there is an
3099         additional full page available on the stack beside guard, TLS, the
3100         minimum stack.
3102 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3104         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3105         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3107         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3108         compiling 32-bit code we must define __cleanup_fct_attribute.
3110 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3112         [BZ #1920]
3113         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3114         __attribute__ instead of __attribute.
3115         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3116         (__cleanup_fct_attribute): Likewise.
3118 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3120         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3121         a write barrier before writing libgcc_s_getcfa.
3123 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3125         * sysdeps/unix/sysv/linux/configure: Removed.
3127 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3129         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3130         optional init_array/fini_array support.
3132 2005-10-24  Roland McGrath  <roland@redhat.com>
3134         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3135         versioned_symbol use.
3137 2005-10-16  Roland McGrath  <roland@redhat.com>
3139         * init.c (__pthread_initialize_minimal_internal): Even when using a
3140         compile-time default stack size, apply the minimum that allocate_stack
3141         will require, and round up to page size.
3143 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3145         * Makefile ($(test-modules)): Remove static pattern rule.
3147 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3148             Ulrich Drepper  <drepper@redhat.com>
3150         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3151         alignment in callback function.
3152         * Makefile: Add rules to build and run tst-align3.
3153         * tst-align3.c: New file.
3155 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3157         * allocatestack.c (setxid_signal_thread): Add
3158         INTERNAL_SYSCALL_DECL (err).
3160 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3162         * allocatestack.c (setxid_signal_thread): Need to use
3163         atomic_compare_and_exchange_bool_acq.
3165 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3166             Jakub Jelinek  <jakub@redhat.com>
3168         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3169         CANCEL_RESTMASK.
3170         (struct pthread): Move specific_used field to avoid padding.
3171         Add setxid_futex field.
3172         * init.c (sighandler_setxid): Reset setxid flag and release the
3173         setxid futex.
3174         * allocatestack.c (setxid_signal_thread): New function.  Broken
3175         out of the bodies of the two loops in __nptl_setxid.  For undetached
3176         threads check whether they are exiting and if yes, don't send a signal.
3177         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3178         * pthread_create.c (start_thread): For undetached threads, check
3179         whether setxid bit is set.  If yes, wait until signal has been
3180         processed.
3182         * allocatestack.c (STACK_VARIABLES): Initialize them.
3183         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3185 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3187         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3188         waiters, awake all waiters on the associated mutex.
3190 2005-09-22  Roland McGrath  <roland@redhat.com>
3192         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3193         ../sysdeps/x86_64/hp-timing.h).
3195 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3197         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3198         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3199         (lll_futex_wake_unlock): Define.
3200         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3201         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3202         (lll_futex_wake_unlock): Define.
3203         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3204         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3205         (lll_futex_wake_unlock): Define.
3206         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3207         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3208         (lll_futex_wake_unlock): Define.
3209         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3210         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3211         (lll_futex_wake_unlock): Define.
3212         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3213         lll_futex_wake_unlock.
3214         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3215         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3216         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3217         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3218         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3219         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3221 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3223         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3224         Fix typo in register name.
3226 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3228         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3229         Use __sigfillset.  Document that sigfillset does the right thing wrt
3230         to SIGSETXID.
3232 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3234         [BZ #1102]
3235         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3236         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3237         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3238         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3239         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3240         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3241         in the structure.
3242         * Makefile (tests): Add tst-initializers1.
3243         (CFLAGS-tst-initializers1.c): Set.
3244         * tst-initializers1.c: New test.
3246 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3248         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3249         Make sure __flags are located at offset 48 from the start of the
3250         structure.
3252 2005-07-02  Roland McGrath  <roland@redhat.com>
3254         * Makeconfig: Comment fix.
3256 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3258         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3259         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3260         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3261         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3262         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3263         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3264         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3265         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3266         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3267         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3269 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3271         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3272         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3273         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3274         fields.
3275         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3276         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3277         field.  Put in sysinfo field unconditionally.
3278         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3279         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3280         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3281         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3282         fields.
3283         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3284         * pthread_create.c (__pthread_create_2_1): Use
3285         THREAD_COPY_STACK_GUARD macro.
3286         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3287         tests.
3288         * tst-stackguard1.c: New file.
3289         * tst-stackguard1-static.c: New file.
3291 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3293         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3294         Invoke CGOTSETUP and CGOTRESTORE.
3295         (CGOTSETUP, CGOTRESTORE): Define.
3297 2005-05-29  Richard Henderson  <rth@redhat.com>
3299         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3300         (tf_write, tf_writev): Use it.
3301         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3302         the system minimum.
3304 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3306         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3307         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3308         __librt_*_asynccancel@local.
3310 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3312         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3313         all occurrences of JUMPTARGET.  Instead append @local to labels.
3315 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3317         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3318         size/alignment of struct pthread rather than tcbhead_t.
3319         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3320         Likewise.
3321         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3322         Likewise.
3323         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3324         Likewise.
3326 2005-05-19  Richard Henderson  <rth@redhat.com>
3328         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3329         __sync_val_compare_and_swap, not explicit _si variant.
3330         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3332 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3334         [BZ #915]
3335         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3337 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3339         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3340         .eh_frame section, use cfi_* directives.
3342 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3344         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3345         of "" includes.
3347 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3349         [BZ #1075]
3350         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3351         aio_write blocks.
3353 2005-04-27  Roland McGrath  <roland@redhat.com>
3355         * Makefile (tests): Remove tst-clock2.
3357         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3358         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3359         translating to the kernel clockid_t for our own process/thread clock.
3361         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3363 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3365         * old_pthread_cond_init.c: Include <errno.h>.
3366         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3367         process shared or uses clock other than CLOCK_REALTIME.
3368         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3370 2005-04-13  David S. Miller  <davem@davemloft.net>
3372         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3373         * sysdeps/sparc/sparc64/clone.S: New file.
3375 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3377         [BZ #1102]
3378         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3379         __inline instead of inline.
3380         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3382 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3384         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3385         functionally equivalent, but shorter instructions.
3386         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3387         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3388         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3389         Likewise.
3390         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3391         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3392         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3393         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3395         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3396         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3397         Likewise.
3398         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3399         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3400         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3401         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3402         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3404 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3406         * sysdeps/mips/Makefile: New file.
3407         * sysdeps/mips/nptl-sysdep.S: New file.
3408         * sysdeps/mips/tcb-offsets.sym: New file.
3409         * sysdeps/mips/pthread_spin_lock.S: New file.
3410         * sysdeps/mips/pthread_spin_trylock.S: New file.
3411         * sysdeps/mips/pthreaddef.h: New file.
3412         * sysdeps/mips/tls.h: New file.
3413         * sysdeps/mips/jmpbuf-unwind.h: New file.
3414         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3415         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3416         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3417         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3418         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3419         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3420         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3421         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3422         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3423         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3425 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3427         [BZ #1112]
3428         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3429         variable to scerr.
3431 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3433         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3435 2005-02-25  Roland McGrath  <roland@redhat.com>
3437         * alloca_cutoff.c: Correct license text.
3438         * tst-unload.c: Likewise.
3439         * sysdeps/pthread/allocalim.h: Likewise.
3440         * sysdeps/pthread/pt-initfini.c: Likewise.
3441         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3442         * sysdeps/pthread/bits/sigthread.h: Likewise.
3443         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3444         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3446 2005-02-16  Roland McGrath  <roland@redhat.com>
3448         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3449         Use unsigned int * for ptr_nthreads.
3451 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3453         [BZ #721]
3454         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3455         gcc4.
3457 2005-02-07  Richard Henderson  <rth@redhat.com>
3459         [BZ #787]
3460         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3461         argument.
3463 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3465         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3466         order of arguments in invocation of atomic_add_zero.
3468 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3470         [BZ #737]
3471         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3472         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3473         at least gotntpoff relocation and addition.
3474         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3475         Likewise.
3476         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3477         Likewise.
3478         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3479         Likewise.
3481 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3483         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3484         entry for static tls deallocation fix.
3485         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3486         also contains information whether the memory pointed to is static
3487         TLS or not.
3488         * sysdeps/i386/tls.h: Likewise.
3489         * sysdeps/ia64/tls.h: Likewise.
3490         * sysdeps/powerpc/tls.h: Likewise.
3491         * sysdeps/s390/tls.h: Likewise.
3492         * sysdeps/sh/tls.h: Likewise.
3493         * sysdeps/sparc/tls.h: Likewise.
3494         * sysdeps/x86_64/tls.h: Likewise.
3496 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3498         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3500 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3502         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3503         %esp.
3504         * Makefile (tests): Add tst-align2.
3505         * tst-align2.c: New test.
3506         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3507         -mpreferred-stack-boundary=4.
3509 2004-12-18  Roland McGrath  <roland@redhat.com>
3511         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3512         New file removed withdrawn for the moment.
3514 2004-12-17  Richard Henderson  <rth@redhat.com>
3516         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3517         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3519 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3521         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3522         Increased PTHREAD_STACK_MIN.
3524         * tst-context1.c (stacks): Use bigger stack size.
3526 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3528         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3529         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3531 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3533         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3534         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3535         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3537 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3539         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3541 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3543         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3544         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3546         * tst-getpid1.c: If child crashes, report this first.  Print which
3547         signal.
3549 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3551         * init.c (__pthread_initialize_minimal_internal): Also unblock
3552         SIGSETXID.
3554 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3556         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3557         _POSIX_THREAD_CPUTIME): Define to 0.
3558         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3559         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3560         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3561         __timer_signal_thread_tclk): Remove.
3562         (init_module): Remove their initialization.
3563         (thread_cleanup): Remove their cleanup assertions.
3564         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3565         __timer_signal_thread_tclk): Remove.
3566         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3567         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3568         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3570 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3572         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3573         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3575         * Makefile (tests): Add tst-getpid2.
3576         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3577         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3578         * tst-getpid2.c: New test.
3580 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3582         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3584 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3586         * Makefile (tests): Add tst-getpid1.
3587         * tst-getpid1.c: New file.
3588         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3589         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3591 2004-12-02  Roland McGrath  <roland@redhat.com>
3593         * Makefile (libpthread-nonshared): Variable removed.
3594         ($(objpfx)libpthread_nonshared.a): Target removed.
3595         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3596         These are now handled by generic magic from
3597         libpthread-static-only-routines being set.
3599 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3601         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3602         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3603         _POSIX_THREAD_PRIO_PROTECT): Define.
3604         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3605         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3606         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3608 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3610         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3611         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3612         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3613         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3614         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3615         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3616         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3618 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3620         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3622         * Makefile (libpthread-routines): Add pthread_setschedprio.
3623         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3624         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3625         * pthread_setschedprio.c: New file.
3627 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3629         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3630         * pthread_cancel.c (pthread_create): Likewise.
3632         * Makefile (libpthread-routines): Add vars.
3633         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3634         * init.c (__default_stacksize, __is_smp): Remove.
3635         * vars.c: New file.
3636         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3637         and define a wrapper macro.
3638         (PTHREAD_STATIC_FN_REQUIRE): Define.
3639         * allocatestack.c (__find_thread_by_id): Undefine.
3640         * pthread_create (__pthread_keys): Remove.
3641         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3642         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3643         PTHREAD_STATIC_FN_REQUIRE.
3645 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3647         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3648         parameter to REGISTER macro.
3650 2004-11-17  Roland McGrath  <roland@redhat.com>
3652         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3653         Make sure SIGCANCEL is blocked as well.
3655 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3657         * sysdeps/pthread/setxid.h: New file.
3658         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3659         (struct xid_command): Add forward decl.
3660         (struct pthread_functions): Change return type of __nptl_setxid hook
3661         to int.
3662         * pthreadP.h (__nptl_setxid): Change return type to int.
3663         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3664         calling thread, return its return value and set errno on failure.
3665         * descr.h (struct xid_command): Change id type to long array.
3667         * Makefile: Add rules to build and test tst-setuid1 and
3668         tst-setuid1-static.
3669         * tst-setuid1.c: New test.
3670         * tst-setuid1-static.c: New test.
3672 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3674         * Makefile (tests): Add tst-exit3.
3675         * tst-exit3.c: New test.
3677 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3679         * Makefile (tests): Add tst-exit2.
3680         * tst-exit2.c: New file.
3682 2004-11-09  Roland McGrath  <roland@redhat.com>
3684         [BZ #530]
3685         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3686         here, before calling clone.
3687         * pthread_create.c (start_thread): Don't do it here.
3689 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3691         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3693 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3695         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3696         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3697         assembler warning.
3699 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3701         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3702         if sched_priority is not between minprio and maxprio.
3704 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3706         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3707         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3709         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3710         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3712 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3714         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3715         not-cancelable I/O functions.
3717 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3719         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3720         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3721         make sure 2 is stored in the futex and we looked at the old value.
3722         Fix a few other problems to return the correct value.
3724 2004-10-14  Richard Henderson  <rth@redhat.com>
3726         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3727         make gcc4 happy.
3729 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3731         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3732         of pthread-functions.h and pthreaddef.h.
3733         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3735         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3736         Change __data.__nwaiters from int to unsigned int.
3738         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3739         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3741         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3742         before return type.
3744         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3745         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3747 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3749         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3750         test fails, remove message queue.
3751         (tf_msgsnd): Likewise.
3753 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3755         * tst-clock1.c: Change #ifdef to #if defined.
3756         * tst-clock2.c: Likewise.
3757         * tst-cond11.c: Likewise.
3759         * sysdeps/pthread/timer_create.c (timer_create): Use
3760         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3761         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3762         THREAD_CPUTIME.
3764 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3766         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3767         _POSIX_THREAD_CPUTIME): Define to 0.
3769 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3771         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3772         and _POSIX_THREAD_CPUTIME to zero.
3773         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3774         * tst-barrier2.c: Fix testing for POSIX feature.
3775         * tst-clock1.c: Likewise.
3776         * tst-clock2.c: Likewise.
3777         * tst-cond11.c: Likewise.
3778         * tst-cond4.c: Likewise.
3779         * tst-cond6.c: Likewise.
3780         * tst-flock2.c: Likewise.
3781         * tst-mutex4.c: Likewise.
3782         * tst-mutex9.c: Likewise.
3783         * tst-rwlock12.c: Likewise.
3784         * tst-rwlock4.c: Likewise.
3785         * tst-signal1.c: Likewise.
3786         * tst-spin2.c: Likewise.
3787         * sysdeps/pthread/posix-timer.h: Likewise.
3788         * sysdeps/pthread/timer_create.c: Likewise.
3789         * sysdeps/pthread/timer_routines.c: Likewise.
3791 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3793         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3794         (__lll_mutex_timedlock_wait): Address futex correctly.
3796         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3797         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3798         make sure 2 is stored in the futex and we looked at the old value.
3799         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3800         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3801         which might very well made the code not working at all before.
3802         [BZ #417]
3804 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3806         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3807         allow SIGSETXID to be sent.
3808         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3809         for SIGSETXID to be defined.
3810         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3811         SIGSETXID cannot be blocked.
3813         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3814         Add __extension__ to long long types.
3815         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3816         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3817         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3818         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3819         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3820         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3821         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3823 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3825         * descr.h (struct pthread): Add stopped_start field.
3826         * sysdeps/pthread/createthread.c (create_thread): Set
3827         start_stopped flag in descriptor for new thread appropriately.
3828         * pthread_create.c (start_thread): Only take lock to be stopped on
3829         startup if stopped_start flag says so.
3831 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3833         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3834         is created detached and if yes, do not try to free the stack in case
3835         the thread creation failed.
3836         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3837         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3838         case there has been no error.  [BZ #405]
3840         * pthread_create.c (start_thread): Don't wait for scheduler data
3841         etc to be set at the beginning of the function.  The cancellation
3842         infrastructure must have been set up.  And enable async
3843         cancellation before potentially going to sleep.  [BZ #401]
3845 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3847         * Versions: Remove exports for pthread_set*id_np functions.
3848         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3849         for now.
3850         * Makefile: Don't build pthread_set*id code for now.
3852 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3854         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3855         internal use.
3856         * allocatestack.c (__nptl_setxid): New function.
3857         * descr.h (struct xid_command): Define type.
3858         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3859         (sighandler_setxid): New function.
3860         (__pthread_initialize_minimal): Register sighandler_setxid for
3861         SIGCANCEL.
3862         * pt-allocrtsig.c: Update comment.
3863         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3864         Declare __nptl_setxid.
3865         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3866         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3867         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3868         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3869         and pthread_setresuid_np.
3870         * pthread_setgid_np.c: New file.
3871         * pthread_setuid_np.c: New file.
3872         * pthread_setegid_np.c: New file.
3873         * pthread_seteuid_np.c: New file.
3874         * pthread_setregid_np.c: New file.
3875         * pthread_setreuid_np.c: New file.
3876         * pthread_setresgid_np.c: New file.
3877         * pthread_setresuid_np.c: New file.
3878         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3879         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3880         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3881         and pthread_setresuid_np.
3882         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3883         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3884         pthread_setregid, and pthread_setresgid.
3886 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3888         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3889         ENOMEM when out of memory.
3891 2004-09-10  Roland McGrath  <roland@redhat.com>
3893         [BZ #379]
3894         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3895         code, since we don't try to use the broken CLONE_STOPPED any more.
3896         * pthread_create.c (start_thread): Likewise.
3898 2004-09-15  Richard Henderson  <rth@redhat.com>
3900         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3902 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3904         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3905         (__libc_unwind_longjmp): Delete macro and declare as function.
3906         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3907         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3908         nptl directory.
3909         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3910         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3911         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3913 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3915         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3916         for __USE_XOPEN2K.
3917         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3918         types also for __USE_XOPEN2K.
3919         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3920         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3921         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3922         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3923         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3924         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3925         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3926         [BZ #320]
3928 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3930         * sysdeps/pthread/pthread.h
3931         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3932         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3933         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3934         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3935         [BZ #375]
3937 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3939         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3940         PSEUDO to be used with . prefix.
3942         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3943         Use atomic_increment instead of atomic_exchange_and_add.
3944         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3945         Likewise.
3946         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3947         Likewise.
3948         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3949         Likewise.
3951         * allocatestack.c (allocate_stack): Use atomic_increment_val
3952         instead of atomic_exchange_and_add.
3953         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3954         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3955         Likewise.
3956         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3957         Likewise.
3959         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3960         the initialization function might throw.
3962 2005-09-05  Richard Henderson  <rth@redhat.com>
3964         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3965         Move definition inside libpthread, libc, librt check.  Provide
3966         definition for rtld.
3968 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3970         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3971         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3972         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3973         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3974         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3975         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3976         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3977         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3978         * unwind.c: Use it.
3980         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3981         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3982         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3983         Likewise.
3984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3985         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3986         this is the last waiter, signal pthread_cond_destroy caller and
3987         avoid using the pthread_cond_t structure after unlock.
3988         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3989         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3990         Read clock type from the least significant bits of __nwaiters instead
3991         of __clock.
3992         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3993         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3995 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3997         [BZ #342]
3998         * Makefile (tests): Add tst-cond20 and tst-cond21.
3999         * tst-cond20.c: New test.
4000         * tst-cond21.c: New test.
4001         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
4002         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
4003         it unsigned int.
4004         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4005         Likewise.
4006         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4007         (pthread_cond_t): Likewise.
4008         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4009         Likewise.
4010         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4011         Likewise.
4012         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4013         Likewise.
4014         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
4015         (cond_nwaiters): New.
4016         (clock_bits): New.
4017         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4018         if there are waiters not signalled yet.
4019         Wait until all already signalled waiters wake up.
4020         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4021         __nwaiters.  If pthread_cond_destroy has been called and this is the
4022         last waiter, signal pthread_cond_destroy caller and avoid using
4023         the pthread_cond_t structure after unlock.
4024         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4025         decrement it when leaving.  If pthread_cond_destroy has been called
4026         and this is the last waiter, signal pthread_cond_destroy caller.
4027         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4028         Likewise.  Read clock type from the least significant bits of
4029         __nwaiters instead of __clock.
4030         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4031         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4032         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4033         clock type just from the last COND_CLOCK_BITS bits of value.
4034         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4035         instead of __clock, just from second bit of condattr's value.
4037 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4039         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4040         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4041         != 64.
4042         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4044 2004-08-15  Roland McGrath  <roland@frob.com>
4046         * pthread_atfork.c: Update copyright terms including special exception
4047         for these trivial files, which are statically linked into executables
4048         that use dynamic linking for the significant library code.
4050 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4052         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4053         pthread_rwlock_rdlock.
4054         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4055         Decrease __nr_readers_queued after reacquiring lock.
4056         * sysdeps/pthread/pthread_rwlock_timedrdlock
4057         (pthread_rwlock_timedrdlock): Likewise.
4058         Reported by Bob Cook <bobcook47@hotmail.com>.
4060 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4062         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4063         before pthread_barrier_wait.
4065 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4067         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4068         Remove unnecessary exception handling data.
4070 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4072         [BZ #284]
4073         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4074         instead of clockid_t.
4076 2004-07-21  Roland McGrath  <roland@redhat.com>
4078         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4080 2004-07-19  Roland McGrath  <roland@redhat.com>
4082         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4084 2004-07-02  Roland McGrath  <roland@redhat.com>
4086         * configure: Don't exit.
4088 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4090         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4091         (__pthread_cond_timedwait): Check for invalid nanosecond in
4092         timeout value.
4094 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4096         * Makefile: Add rules to build and run tst-fini1.
4097         * tst-fini1.c: New file.
4098         * tst-fini1mod.c: New file.
4100 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4102         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4103         if no cancellation support is needed.
4104         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4105         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4106         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4107         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4108         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4109         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4110         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4111         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4112         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4114         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4115         only if not already defined.
4117 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4119         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4120         constraint "m" instead of "0" for futex.
4122         * shlib-versions: Add powerpc64-.*-linux.*.
4124 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4126         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4127         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4128         for valid tv_nsec.
4129         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4130         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4131         bits.
4133 2004-06-29  Roland McGrath  <roland@redhat.com>
4135         * Banner: NPTL no longer has its own version number.
4136         * Makefile (nptl-version): Variable removed.
4137         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4138         using $(version), the glibc version number.
4140 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4142         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4143         Fix branch offset for a PLT entry.
4144         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4145         Likewise.
4146         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4147         Likewise.
4148         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4149         Likewise.
4150         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4151         Likewise.
4153 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4155         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4156         unconditionally.
4158 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4160         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4161         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4162         instead of tv_sec.
4163         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4164         (pthread_rwlock_timedrdlock): Likewise.
4166 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4168         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4169         Set __r7 to val, not mutex.
4171 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4173         * Makefile: Add rules to build tst-rwlock14.
4174         * tst-rwlock14.c: New file.
4176 2004-06-24  Boris Hu  <boris.hu@intel.com>
4178         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4179         check.
4180         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4182 2004-06-19  Andreas Jaeger  <aj@suse.de>
4184         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4185         assembler in last patch.
4187 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4189         * sysdeps/pthread/pthread_cond_timedwait.c
4190         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4191         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4192         (__pthread_cond_timedwait): Check for invalid nanosecond in
4193         timeout value.
4194         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4195         * tst-cond19.c: New file.
4196         * Makefile: Add rules to build and run tst-cond19.
4198 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4200         * tst-context1.c (GUARD_PATTERN): Defined.
4201         (tst_context_t): Define struct containing ucontext_t & guard words.
4202         (ctx): Declare as an array of tst_context_t.
4203         (fct): Verify uc_link & guard words are still valid.
4204         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4206 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4208         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4209         Add __data.__futex field, reshuffle __data.__clock.
4210         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4211         (__pthread_cond_signal): Increment __futex at the same time as
4212         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4213         address of low 32-bits of __wakeup_seq to futex syscall.
4214         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4215         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4216         releasing internal lock to FUTEX_WAIT.
4217         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4218         (__pthread_cond_timedwait): Likewise.
4219         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4220         (FUTEX_CMP_REQUEUE): Define.
4221         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4222         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4223         Pass __futex value from before the unlock and __futex address instead
4224         of address of low 32-bits of __wakeup_seq to futex syscall.
4225         Fallback to FUTEX_WAKE all on any errors.
4227 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4229         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4230         comment typo.
4231         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4232         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4233         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4234         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4235         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4237 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4239         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4240         Add memory clobber to inline assembly.
4241         (__lll_mutex_trylock): Likewise.
4242         (__lll_mutex_cond_trylock): Likewise.
4244 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4246         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4247         Pass val argument as 6th system call argument in %r7.
4249 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4251         * Makefile (tests): Add tst-cond16.
4252         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4253         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4254         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4255         Add __data.__futex field, reshuffle __data.__clock.
4256         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4257         (__pthread_cond_signal): Increment __futex at the same time as
4258         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4259         address of low 32-bits of __wakeup_seq to futex syscall.
4260         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4261         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4262         releasing internal lock to FUTEX_WAIT.
4263         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4264         (__pthread_cond_timedwait): Likewise.
4265         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4266         (FUTEX_CMP_REQUEUE): Define.
4267         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4268         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4269         Pass __futex value from before the unlock and __futex address instead
4270         of address of low 32-bits of __wakeup_seq to futex syscall.
4271         Fallback to FUTEX_WAKE all on any errors.
4272         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4273         Define.
4274         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4275         internally.  Return non-zero if error, zero if success.
4276         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4277         Add __data.__futex field, reshuffle __data.__clock.
4278         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4279         Define.
4280         (lll_futex_requeue): Add val argument, return 1 unconditionally
4281         for the time being.
4282         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4283         Add __data.__futex field, reshuffle __data.__clock.
4284         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4285         Define.
4286         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4287         internally.  Return non-zero if error, zero if success.
4288         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4289         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4290         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4291         Define.
4292         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4293         internally.  Return non-zero if error, zero if success.
4294         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4295         Add __data.__futex field, reshuffle __data.__clock.
4296         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4297         Define.
4298         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4299         internally.  Return non-zero if error, zero if success.
4300         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4301         Add __data.__futex field, reshuffle __data.__clock.
4302         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4303         Add __data.__futex field, reshuffle __data.__clock.
4304         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4305         Increment __futex at the same time as __wakeup_seq or __total_seq.
4306         Pass address of __futex instead of address of low 32-bits of
4307         __wakeup_seq to futex syscall.
4308         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4309         Pass __futex value from before releasing internal lock
4310         to FUTEX_WAIT.
4311         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4312         Likewise.  Avoid unnecessary shadowing of variables.
4313         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4314         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4315         unlock and __futex address instead of address of low 32-bits of
4316         __wakeup_seq to futex_requeue macro, adjust for new return value
4317         meaning.
4318         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4319         (__pthread_cond_signal): Increment __futex at the same time as
4320         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4321         address of low 32-bits of __wakeup_seq to futex syscall.
4322         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4323         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4324         releasing internal lock to FUTEX_WAIT.
4325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4326         (__pthread_cond_timedwait): Likewise.
4327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4328         (FUTEX_CMP_REQUEUE): Define.
4329         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4330         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4331         Pass __futex value from before the unlock and __futex address instead
4332         of address of low 32-bits of __wakeup_seq to futex syscall.
4333         Fallback to FUTEX_WAKE all on any errors.
4335 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4337         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4338         Add nop to align the end of critical section.
4339         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4341 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4343         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4344         Add __broadcast_seq field.
4345         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4346         all waiters as woken with woken_seq and bump broadcast counter.
4347         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4348         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4349         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4350         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4352 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4354         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4355         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4356         Reported by Kaz Kojima.
4358 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4360         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4362 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4364         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4365         __broadcast_seq with bc_seq after acquiring internal lock instead of
4366         before it.
4368 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4370         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4371         compilation.
4372         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4373         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4374         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4375         (pthread_cond_t): Add __data.__broadcast_seq field.
4376         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4377         (FRAME_SIZE): Define.
4378         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4379         Comment typo fixes.
4380         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4381         Define.
4382         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4383         typo fixes.
4384         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4385         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4386         fixes.
4388 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4390         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4391         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4392         Add __broadcast_seq field.
4393         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4394         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4395         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4396         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4397         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4398         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4399         all waiters as woken with woken_seq and bump broadcast counter.
4400         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4402         __broadcast_seq field.
4403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4404         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4405         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4406         * pthread_cond_init.c: Initialize __broadcast_seq field.
4407         * Makefile (tests): Add tst-cond17 and tst-cond18.
4408         Add .NOTPARALLEL goal.
4409         * tst-cond16.c: New file.  From Jakub.
4410         * tst-cond17.c: New file.  From Jakub.
4411         * tst-cond18.c: New file.  From Jakub.
4413 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4415         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4416         unwind info.
4418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4419         Parametrize frame size.  Correct some unwind info.
4420         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4422 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4424         * tst-stack3.c: Note testing functionality beyond POSIX.
4426 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4428         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4429         Change conditional from ifdef to if.
4431 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4433         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4434         SYSDEP_CANCEL_ERROR): Define.
4435         (PSEUDO): Use it.
4437 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4439         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4441 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4443         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4445 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4447         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4448         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4449         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4450         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4452 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4454         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4455         thread has all signals blocked.
4457 2004-04-18  Andreas Jaeger  <aj@suse.de>
4459         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4460         (SEM_VALUE_MAX): Add missing brace.
4462 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4464         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4465         in rt subdir.
4466         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4467         * sysdeps/pthread/tst-mqueue8x.c: New test.
4468         * tst-cancel4.c: Update comment about message queues.
4470         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4471         return it_value { 0, 0 }.
4472         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4473         like SIGEV_SIGNAL.
4474         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4475         assertion for SIGEV_NONE.
4476         (thread_attr_compare): Compare all attributes, not just a partial
4477         subset.
4479 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4481         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4483 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4485         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4486         Just use a plain number.
4487         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4488         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4489         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4490         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4491         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4492         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4493         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4495 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4497         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4498         frame info.
4499         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4501 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4503         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4504         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4505         of calling sigwaitinfo.
4507 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4509         * allocatestack.c (allocate_stack): Set reported_guardsize
4510         unconditionally.
4511         * pthread_getattr_np.c (pthread_getattr_np): Use
4512         reported_guardsize instead of guardsize.
4513         * descr.h (struct pthread): Add reported_guardsize field.
4515 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4517         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4519 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4521         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4523 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4525         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4526         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4527         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4528         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4529         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4530         Define.
4531         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4532         (_POSIX_MESSAGE_PASSING): Define.
4533         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4534         (_POSIX_MESSAGE_PASSING): Define.
4535         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4536         (_POSIX_MESSAGE_PASSING): Define.
4538 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4540         * tst-context1.c (fct): Check whether correct stack is used.
4542 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4544         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4545         matching constraints for asm mem parameters.
4547         * tst-clock2.c (tf): Don't define unless needed.
4549 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4551         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4552         $(gnulib).
4554 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4556         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4557         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4558         * pthreadP.h: Declare __nptl_deallocate_tsd.
4559         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4560         Adjust caller.
4562         * Makefile (tests): Add tst-tsd5.
4563         * tst-tsd5.c: New file.
4565 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4567         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4568         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4569         is SHLIB_COMPAT check.
4570         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4571         (__pthread_attr_getaffinity_old): Likewise.
4572         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4573         (__pthread_getaffinity_old): Likewise.
4574         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4575         (__pthread_setaffinity_old): Likewise.
4577 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4579         * allocatestack.c (_make_stacks_executable): Call
4580         _dl_make_stack_executable first.
4582 2004-03-24  Roland McGrath  <roland@redhat.com>
4584         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4585         constraint instead of "0".
4587 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4589         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4590         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4592         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4593         code to avoid warning.
4595 2004-03-24  Andreas Jaeger  <aj@suse.de>
4597         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4598         (__pthread_attr_setaffinity_old): Remove const.
4600 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4602         * sysdeps/unix/sysv/linux/smp.h: New file.
4603         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4604         * init.c: Define __is_smp.
4605         (__pthread_initialize_minimal_internal): Call is_smp_system to
4606         initialize __is_smp.
4607         * pthreadP.h: Declare __is_smp.
4608         Define MAX_ADAPTIVE_COUNT is necessary.
4609         * pthread_mutex_init.c: Add comment regarding __spins field.
4610         * pthread_mutex_lock.c: Implement adaptive mutex type.
4611         * pthread_mutex_timedlock.c: Likewise.
4612         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4613         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4614         Add __spins field.
4615         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4616         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4617         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4618         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4619         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4620         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4621         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4622         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4623         lll_mutex_cond_trylock.
4624         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4625         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4626         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4627         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4628         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4629         Define BUSY_WAIT_NOP.
4630         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4631         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4633         * tst-mutex5.c: Add support for testing adaptive mutexes.
4634         * tst-mutex7.c: Likewise.
4635         * tst-mutex5a.c: New file.
4636         * tst-mutex7a.c: New file.
4637         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4639         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4640         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4641         vgettimeofday call might destroy the content.
4643         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4644         @pause in the loop.
4646         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4647         No need to restrict type of ret.  Make it int.  Add comment.
4649         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4650         Remove unnecessary setne instruction.
4652 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4654         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4655         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4656         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4657         If realloc fails, break out of the loop.
4659 2004-03-20  Andreas Jaeger  <aj@suse.de>
4661         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4662         (__pthread_setaffinity_old): Fix interface.
4663         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4664         (__pthread_getaffinity_old): Likewise.
4666         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4667         (__pthread_setaffinity_new): Remove duplicate declaration.
4669 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4671         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4672         the return value to a safe register.
4673         (CDISABLE): Set the function argument correctly.
4675 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4677         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4678         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4679         Rewrite so that only one locked memory operation per round is needed.
4680         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4681         (pthread_barrier_wait): After wakeup, release lock only when the
4682         last thread stopped using the barrier object.
4683         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4684         (__pthread_cond_wait): Don't store mutex address if the current
4685         value is ~0l.  Add correct cleanup support and unwind info.
4686         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4687         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4688         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4689         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4690         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4691         Add correct cleanup support and unwind info.
4692         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4693         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4694         information for syscall wrappers.
4696 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4698         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4699         cpusetsize field, remove next.
4700         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4701         parameter for size of the CPU set.
4702         (pthread_setaffinity_np): Likewise.
4703         (pthread_attr_getaffinity_np): Likewise.
4704         (pthread_attr_setaffinity_np): Likewise.
4705         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4706         interface change, keep compatibility code.
4707         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4708         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4709         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4710         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4711         __pthread_getaffinity_np.
4712         * Versions: Add version for changed interfaces.
4713         * tst-attr3.c: Adjust test for interface change.
4714         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4715         increasing buffer sizes.
4716         * pthread_attr_destroy.c: Remove unused list handling.
4717         * pthread_attr_init.c: Likewise.
4719 2004-03-17  Roland McGrath  <roland@redhat.com>
4721         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4722         first argument to clock_getres so we ever enable kernel timers.
4724 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4726         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4728 2004-03-12  Richard Henderson  <rth@redhat.com>
4730         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4731         oldvalue from CENABLE to CDISABLE.
4733 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4735         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4736         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4737         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4738         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4740 2004-03-11  Richard Henderson  <rth@redhat.com>
4742         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4743         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4744         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4746 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4748         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4749         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4750         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4752 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4754         * forward.c (__pthread_cond_broadcast_2_0,
4755         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4756         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4757         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4759 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4761         * sysdeps/sh/tcb-offsets.sym: Add PID.
4762         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4763         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4765 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4767         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4768         include <sysdep-cancel.h>, vfork is no cancellation point.
4769         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4770         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4771         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4773 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4775         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4776         libc_hidden_def.
4777         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4778         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4779         Likewise.
4780         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4781         Likewise.
4782         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4783         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4784         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4785         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4786         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4788         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4789         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4790         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4791         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4792         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4793         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4795         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4796         a local register for saving old PID.  Negate PID in parent upon exit.
4798         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4799         tcb-offsets.h.
4800         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4801         before syscall, set to the old value in the parent afterwards.
4802         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4803         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4804         tcb-offsets.h.
4805         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4806         before syscall, set to the old value in the parent afterwards.
4807         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4808         * sysdeps/s390/tcb-offsets.sym: Add PID.
4810         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4811         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4812         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4813         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4814         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4815         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4817 2004-03-10  Andreas Schwab  <schwab@suse.de>
4819         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4820         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4821         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4823 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4825         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4826         * tst-cancel21.c (do_one_test): Likewise.
4827         Reported by Gordon Jin <gordon.jin@intel.com>.
4829 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4831         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4832         if non-zero and set to INT_MIN if zero.
4833         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4834         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4835         (SAVE_PID, RESTORE_PID): Define.
4836         (__vfork): Use it.
4837         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4838         Use relative path to avoid including NPTL i386/vfork.S.
4839         (SAVE_PID, RESTORE_PID): Define.
4840         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4841         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4842         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4843         tst-vfork2x.
4844         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4845         * tst-vfork1.c: New test.
4846         * tst-vfork2.c: New test.
4847         * tst-vfork1x.c: New test.
4848         * tst-vfork2x.c: New test.
4850 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4852         * sysdeps/i386/tcb-offsets.sym: Add PID.
4853         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4854         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4855         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4857 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4859         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4861 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4863         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4864         _rtld_global_ro.
4866 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4868         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4869         _rtld_global_ro.
4871         * tst-once4.c: Remove unnecessary macro definition.
4873         * tst-mutex7.c (do_test): Limit thread stack size.
4874         * tst-once2.c (do_test): Likewise.
4875         * tst-tls3.c (do_test): Likewise.
4876         * tst-tls1.c (do_test): Likewise.
4877         * tst-signal3.c (do_test): Likewise.
4878         * tst-kill6.c (do_test): Likewise.
4879         * tst-key4.c (do_test): Likewise.
4880         * tst-join4.c (do_test): Likewise.
4881         * tst-fork1.c (do_test): Likewise.
4882         * tst-context1.c (do_test): Likewise.
4883         * tst-cond2.c (do_test): Likewise.
4884         * tst-cond10.c (do_test): Likewise.
4885         * tst-clock2.c (do_test): Likewise.
4886         * tst-cancel10.c (do_test): Likewise.
4887         * tst-basic2.c (do_test): Likewise.
4888         * tst-barrier4.c (do_test): Likewise.
4890 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4892         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4894 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4896         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4897         (__pthread_cond_timedwait): Optimize wakeup test.
4898         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4899         (__pthread_cond_wait): Likewise.
4900         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4901         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4902         Likewise.
4904 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4906         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4907         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4908         the atomic instruction needed.
4909         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4910         (__lll_mutex_lock_wait): Likewise.
4912 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4914         * Makefile (tests): Add tst-cond14 and tst-cond15.
4915         * tst-cond14.c: New file.
4916         * tst-cond15.c: New file.
4918 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4920         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4921         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4922         needs to be implemented differently to be useful.
4924 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4926         * pthread_attr_setschedparam.c: Don't test priority against limits
4927         here.  Set ATTR_FLAG_SCHED_SET flag.
4928         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4929         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4930         from parent thread to child.  If attribute is used and scheduling
4931         parameters are not inherited, copy parameters from attribute or
4932         compute them.  Check priority value.
4933         * pthread_getschedparam.c: If the parameters aren't known yet get
4934         them from the kernel.
4935         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4936         ATTR_FLAG_POLICY_SET flag for thread.
4937         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4938         and ATTR_FLAG_POLICY_SET.
4940         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4942         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4943         fail if stack address hasn't been set.  Just return 0.
4945 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4947         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4948         libpthread for the files in this list.
4949         (CFLAGS-tst-unload): Removed.
4950         * tst-unload.c (do_test): Don't use complete path for
4951         LIBPHREAD_SO.
4953         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4954         tst-_res1mod2.
4956 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4958         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4959         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4960         operation per round is needed.
4961         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4962         (__lll_mutex_lock_wait): Likewise.
4964 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4966         * tst-cancel9.c (cleanup): Don't print to stderr.
4968 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4970         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4972 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4974         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4975         (__syscall_error_handler2): Call CDISABLE.
4976         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4977         (__syscall_error_handler2): Call CDISABLE.
4979         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4980         Release lock before the loop, don't reacquire it.
4982         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4984 2004-02-19  Andreas Schwab  <schwab@suse.de>
4986         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4987         Fix last change.
4989 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4991         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4992         (pthread_barrier_wait): After wakeup, release lock only when the
4993         last thread stopped using the barrier object.
4994         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4995         (pthread_barrier_wait): Likewise.
4996         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4997         Likewise.
4998         * Makefile (tests): Add tst-barrier4.
4999         * tst-barrier4.c: New file.
5001         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5002         (__pthread_cond_timedwait): Perform timeout test while holding
5003         internal lock to prevent wakeup race.
5004         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5005         * sysdeps/pthread/pthread_cond_timedwait.c
5006         (__pthread_cond_timedwait): Likewise.
5007         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5008         (__pthread_cond_timedwait): Likewise.
5010 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
5012         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
5013         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
5014         * Makefile (tests): Add tst-rwlock13.
5015         * tst-rwlock13.c: New test.
5017 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5019         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5020         (__condvar_tw_cleanup): Little optimization.
5021         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5023 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5025         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5026         libpthread as "lib" parameter to SHLIB_COMPAT.
5027         (__novmx_siglongjmp): Fix typo in function name.
5028         (__novmx_longjmp): Fix typo in function name.
5030 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5032         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5033         __builtin_expect.
5035         * sysdeps/generic/pt-longjmp.c: Moved to...
5036         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5038 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5040         * Makefile (libpthread-routines): Add pt-cleanup.
5041         * pt-longjmp.c: Removed.
5042         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5043         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5044         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5045         Version longjmp, siglongjmp for GLIBC_2.3.4.
5046         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5048 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5050         * sysdeps/pthread/pthread_cond_timedwait.c
5051         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5052         Reuse code.  Add __builtin_expects.
5054         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5055         (__pthread_cond_timedwait): Get internal lock in case timeout has
5056         passed before the futex syscall.
5057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5059 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5061         * allocatestack.c: Pretty printing.
5063         * sysdeps/pthread/createthread.c (create_thread): Don't add
5064         CLONE_DETACHED bit if it is not necessary.
5066 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5068         * pthread_getattr_np.c: Include ldsodefs.h.
5070 2004-01-16  Richard Henderson  <rth@redhat.com>
5072         * allocatestack.c: Don't declare __libc_stack_end.
5073         * init.c (__pthread_initialize_minimal_internal): Likewise.
5074         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5076 2004-01-15  Richard Henderson  <rth@redhat.com>
5078         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5079         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5080         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5081         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5082         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5083         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5084         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5085         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5087 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5089         * init.c (pthread_functions): Make array const.
5091 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5093         * allocatestack.c (__make_stacks_executable): Change interface.
5094         Check parameters.  Pass parameter on to libc counterpart.
5095         * pthreadP.h: Change declaration.
5097 2004-01-13  Richard Henderson  <rth@redhat.com>
5099         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5100         prototype form.
5101         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5102         Likewise.
5104         * sysdeps/alpha/Makefile: New file.
5105         * sysdeps/alpha/tcb-offsets.sym: New file.
5106         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5107         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5109         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5110         on powerpc version.
5112 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5114         * Makefile (tests): Add tst-backtrace1.
5115         * tst-backtrace1.c: New test.
5117 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5119         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5120         register as second parameter to the REGISTER macro.
5121         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5122         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5123         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5124         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5125         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5126         of thread register as second parameter to REGISTER macro in 64 case.
5128 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5130         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5131         (CFLAGS-getpid.o): Defined.
5132         (CFLAGS-getpid.os): Defined.
5134 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5136         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5137         returned for main thread does not overlap with any other VMA.
5138         Patch by Jakub Jelinek.
5140 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5142         * tst-raise1.c: Include stdio.h.
5144 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5146         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5147         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5148         If pid is 0, set it to selftid.
5149         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5150         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5151         != 0, return self->tid without doing a syscall.
5152         * descr.h (struct pthread): Move pid field after tid.
5154         * Makefile (tests): Add tst-raise1.
5155         * tst-raise1.c: New file.
5157 2003-12-23  Roland McGrath  <roland@redhat.com>
5159         * tst-oddstacklimit.c: New file.
5160         * Makefile (tests): Add it.
5161         (tst-oddstacklimit-ENV): New variable.
5163         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5164         value up to page size for __default_stacksize.
5166 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5168         * Makefile (tests): Add tst-eintr5.
5169         * tst-eintr5.c: New file.
5171         * eintr.c (eintr_source): Prevent sending signal to self.
5173         * tst-eintr2.c (tf1): Improve error message.
5175 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5177         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5178         * sysdeps/unix/sysv/linux/getpid.c: New file.
5179         * pthread_cancel.c: Add comment explaining use of PID field.
5180         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5181         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5182         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5183         temporarily to signal the field must not be relied on and updated
5184         by getpid().
5185         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5186         temporarily negative.
5187         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5189 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5191         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5192         (eintr_source): If ARG != NULL, use pthread_kill.
5193         * tst-eintr1.c: Adjust for this change.
5194         * tst-eintr2.c: Likewise.
5195         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5196         * tst-eintr3.c: New file.
5197         * tst-eintr4.c: New file.
5199 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5201         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5202         if CANCELSTATE_BITMASK is set.
5203         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5204         Likewise.
5206         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5207         (tests-reverse): Add tst-cancel23.
5208         * tst-cancel22.c: New test.
5209         * tst-cancel23.c: New test.
5211 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5213         * tst-eintr1.c: Better error messages.
5215         * Makefile (tests): Add tst-eintr2.
5216         * tst-eintr2.c: New file.
5218 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5220         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5221         (CFLAGS-tst-cancelx21.c): Set.
5222         * tst-cancel21.c: New test.
5223         * tst-cancelx21.c: New test.
5225         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5226         comparison operand.
5227         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5228         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5229         * pt-longjmp.c: Include jmpbuf-unwind.h.
5230         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5231         _JMPBUF_UNWINDS.  Adjust compared pointers.
5232         * init.c (__pthread_initialize_minimal_internal): Initialize
5233         pd->stackblock_size.
5234         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5235         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5236         * sysdeps/i386/jmpbuf-unwind.h: New file.
5237         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5238         * sysdeps/s390/jmpbuf-unwind.h: New file.
5239         * sysdeps/sh/jmpbuf-unwind.h: New file.
5240         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5241         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5242         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5243         (_JMPBUF_CFA_UNWINDS): Remove.
5244         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5246 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5248         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5249         (CFLAGS-tst-cancelx20.c): Set.
5250         * tst-cancel20.c: New test.
5251         * tst-cancelx20.c: New test.
5253 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5255         * init.c (__pthread_initialize_minimal_internal): Don't treat
5256         architectures with separate register stack special here when
5257         computing default stack size.
5259 2003-12-17  Roland McGrath  <roland@redhat.com>
5261         * Makefile (tst-cancelx7-ARGS): New variable.
5262         Reportd by Greg Schafer <gschafer@zip.com.au>.
5264 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5266         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5267         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5268         (tst-stack3-ENV): Set.
5269         ($(objpfx)tst-stack3-mem): New.
5270         * tst-stack3.c: New test.
5272 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5274         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5275         Add unwind directives.  Drop unused .regstk directive.
5276         (_fini_EPILOG_BEGINS): Add unwind directives.
5278 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5280         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5281         Assume parameter is a pointer.
5282         (lll_futex_wake): Likewise.
5283         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5284         Likewise.
5285         (lll_futex_wake): Likewise.
5286         Reported by Boris Hu.
5287         * sysdeps/unix/sysv/linux/unregister-atfork.c
5288         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5290         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5292 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5294         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5295         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5296         __rtld_lock_initialize for ld.so lock.
5297         Patch in part by Adam Li <adam.li@intel.com>.
5299 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5301         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5302         in $(gnulib).  Also, remove stale comment.
5304 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5306         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5307         advantage of new syscall stub and optimize accordingly.
5309         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5310         from SYS_futex, to match expectations of
5311         sysdep.h:DO_INLINE_SYSCALL.
5312         (lll_futex_clobbers): Remove.
5313         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5314         (lll_futex_wake): Likewise.
5315         (lll_futex_requeue): Likewise.
5316         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5317         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5318         Jelinek).
5319         (__lll_mutex_lock): Likewise.
5320         (__lll_mutex_cond_lock): Likewise.
5321         (__lll_mutex_timed_lock): Likewise.
5322         (__lll_mutex_unlock): Likewise.
5323         (__lll_mutex_unlock_force): Likewise.
5325         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5326         comes before the include of <sysdep.h>.
5327         (THREAD_SELF_SYSINFO): New macro.
5328         (THREAD_SYSINFO): Likewise.
5329         (INIT_SYSINFO): New macro.
5330         (TLS_INIT_TP): Call INIT_SYSINFO.
5332         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5334         * sysdeps/pthread/createthread.c (create_thread): Use
5335         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5336         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5337         THREAD_SELF_SYSINFO instead of open code.
5338         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5339         (THREAD_SYSINFO): Likewise.
5341         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5343         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5345 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5347         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5348         instead of .init.  Patch by David Mosberger.
5350 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5352         * sysdeps/pthread/configure.in: Remove broken declaration in C
5353         cleanup handling check.
5355 2003-11-30  Andreas Jaeger  <aj@suse.de>
5357         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5358         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5359         Likewise.
5361 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5363         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5364         * pthread_attr_destroy.c: Include shlib-compat.h.
5365         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5366         is set in iattr->flags.
5367         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5369 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5371         * Makefile (distribute): Add tst-cleanup4aux.c.
5373         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5374         include.
5376 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5378         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5379         pthread_cond_signal.
5381         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5382         store mutex address if the current value is ~0l.
5383         * sysdeps/pthread/pthread_cond_timedwait.c
5384         (__pthread_cond_timedwait): Likewise.
5385         * sysdeps/pthread/pthread_cond_broadcast.c
5386         (__pthread_cond_broadcast): Don't use requeue for pshared
5387         condvars.
5389         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5390         (__pthread_cond_wait): Don't store mutex address if the current
5391         value is ~0l.
5392         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5393         (__pthread_cond_timedwait): Likewise.
5394         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5395         (__pthread_cond_broadcast): Don't use requeue for pshared
5396         condvars.
5398         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5399         element with ~0l for pshared condvars, with NULL otherwise.
5401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5402         (__pthread_cond_wait): Don't store mutex address if the current
5403         value is ~0l.
5404         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5405         (__pthread_cond_timedwait): Likewise.
5406         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5407         (__pthread_cond_broadcast): Don't use requeue for pshared
5408         condvars.
5410         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5411         * tst-cond12.c: New file.
5412         * tst-cond13.c: New file.
5414 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5416         * sysdeps/pthread/configure.in: Make missing forced unwind support
5417         fatal.
5419 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5421         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5423 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5425         * Makefile: Add magic to clean up correctly.
5427 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5429         * unwind.c (FRAME_LEFT): Define.
5430         (unwind_stop): Handle old style cleanups here.
5431         (__pthread_unwind): Handle old style cleanups only if
5432         !HAVE_FORCED_UNWIND.
5433         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5434         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5435         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5436         ($(objpfx)tst-cleanupx4): Likewise.
5437         * tst-cleanup4.c: New test.
5438         * tst-cleanup4aux.c: New.
5439         * tst-cleanupx4.c: New test.
5441 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5443         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5444         lll_mutex_*lock macros to skip atomic operations on some archs.
5446 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5448         * sysdeps/pthread/tst-timer.c (main): Initialize
5449         sigev2.sigev_value as well.
5451 2003-10-15  Roland McGrath  <roland@redhat.com>
5453         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5454         is missing.
5455         * sysdeps/pthread/configure: Regenerated.
5457 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5459         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5460         locking macros.  No distinction between normal and mutex locking
5461         anymore.
5462         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5463         Merge bits from lowlevelmutex.S we still need.
5464         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5465         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5466         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5467         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5468         new mutex implementation.
5469         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5470         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5471         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5472         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5473         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5474         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5475         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5476         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5477         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5478         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5479         symbol for entry point to avoid cancellation.
5481 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5483         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5484         changes.
5485         (SAVE_OLDTYPE_0): Fix a typo.
5487 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5489         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5490         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5492 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5494         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5495         correct offset.
5497 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5499         * Makefile (tests): Add tst-cancel19.
5500         * tst-cancel19.c: New test.
5502 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5504         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5505         restoring of the old cancellation type.
5507 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5509         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5511 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5513         * sysdeps/pthread/malloc-machine.h: New file
5515 2003-09-24  Roland McGrath  <roland@redhat.com>
5517         * allocatestack.c (__make_stacks_executable): Don't ignore return
5518         value from _dl_make_stack_executable.
5520 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5522         * allocatestack.c (__make_stacks_executable): Also change
5523         permission of the currently unused stacks.
5525         * allocatestack.c (change_stack_perm): Split out from
5526         __make_stacks_executable.
5527         (allocate_stack): If the required permission changed between the time
5528         we started preparing the stack and queueing it, change the permission.
5529         (__make_stacks_executable): Call change_stack_perm.
5531         * Makefile: Build tst-execstack-mod locally.
5532         * tst-execstack-mod.c: New file.
5534 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5536         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5538 2003-09-23  Roland McGrath  <roland@redhat.com>
5540         * tst-execstack.c: New file.
5541         * Makefile (tests): Add it.
5542         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5543         (LDFLAGS-tst-execstack): New variable.
5545         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5546         whether to use PROT_EXEC for stack mmap.
5547         (__make_stacks_executable): New function.
5548         * pthreadP.h: Declare it.
5549         * init.c (__pthread_initialize_minimal_internal): Set
5550         GL(dl_make_stack_executable_hook) to that.
5552 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5554         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5555         recommendation from AMD re avoidance of lock prefix.
5557 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5559         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5560         lll_futex_timed_wait instead of lll_futex_wait.
5561         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5562         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5563         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5564         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5565         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5566         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5567         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5568         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5569         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5570         Completely revamp the locking macros.  No distinction between
5571         normal and mutex locking anymore.
5572         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5573         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5574         __lll_lock_timedwait): Fix prototypes.
5575         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5576         __lll_lock_timedwait): Likewise.
5577         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5578         macros, add __builtin_expect.
5579         (lll_mutex_timedlock): Likewise.  Fix return value.
5580         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5581         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5582         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5583         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5584         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5585         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5586         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5587         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5589 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5591         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5592         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5593         operation if possible.
5595         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5596         like jumping over the lock prefix.
5598 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5600         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5601         locking macros.  No distinction between normal and mutex locking
5602         anymore.
5603         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5604         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5605         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5606         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5607         locking.  Merge bits from lowlevelmutex.S we still need.
5608         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5609         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5610         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5611         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5612         * Makefile (routines): Remove libc-lowlevelmutex.
5613         (libpthread-rountines): Remove lowlevelmutex.
5614         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5615         for new mutex implementation.
5616         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5617         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5618         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5619         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5620         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5621         Likewise.
5622         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5623         Likewise.
5624         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5625         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5626         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5627         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5628         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5629         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5630         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5631         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5632         Likewise.
5633         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5634         Likewise.
5635         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5636         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5637         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5638         Don't use requeue.
5639         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5640         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5642 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5644         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5645         in parameters of asm with output parameters.
5647         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5648         type of DECR parameter to int.
5649         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5651 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5653         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5654         guardsize for each thread.
5656 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5658         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5659         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5660         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5662         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5663         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5664         NULL.
5665         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5666         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5667         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5668         (pthread_getaffinity_np): Add hidden_def.
5670         * Makefile (tests): Add tst-attr3.
5671         * tst-attr3.c: New test.
5673         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5675 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5677         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5678         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5680 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5682         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5683         * tst-align.c: Include tst-stack-align.h.
5684         (tf, do_test): Use TEST_STACK_ALIGN macro.
5686 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5688         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5689         variable.
5691 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5693         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5694         stack-related values for the initial thread.
5696 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5698         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5700 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5702         * pthread_mutex_lock.c: Minor code rearrangements.
5704 2003-09-05  Roland McGrath  <roland@redhat.com>
5706         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5707         Instead, include ../nptl_db/db_info.c to do its magic.
5708         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5709         (__pthread_pthread_key_2ndlevel_size): Likewise.
5710         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5711         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5712         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5713         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5714         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5715         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5716         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5717         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5718         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5719         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5720         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5721         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5722         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5723         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5724         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5725         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5726         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5728 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5730         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5731         of pthread_t to be compatible with LT.
5732         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5733         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5734         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5735         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5736         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5737         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5738         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5740 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5742         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5744 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5746         * unwind-forcedunwind.c: Move to...
5747         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5748         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5749         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5750         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5751         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5752         * unwind.c: Include jmpbuf-unwind.h.
5753         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5755 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5757         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5758         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5759         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5760         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5761         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5762         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5763         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5764         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5765         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5766         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5767         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5768         function.
5769         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5770         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5771         * Makefile (tests): Add tst-stack2.
5772         * tst-stack2.c: New test.
5773         * tst-stack1.c: Include limits.h and sys/param.h.
5774         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5776         * pthread_condattr_setpshared.c: Include errno.h.
5777         (pthread_condattr_setpshared): Return EINVAL if pshared
5778         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5780         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5781         defined symbol for entry point to avoid cancellation.
5782         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5783         Likewise.
5784         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5785         Likewise.
5786         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5787         Likewise.
5788         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5789         Likewise.
5790         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5791         Likewise.
5792         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5793         __close_nocancel, __read_nocancel, __write_nocancel,
5794         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5795         libpthread.so or librt.so, define to corresponding function
5796         without _nocancel suffix.
5797         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5798         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5799         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5801         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5803 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5805         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5806         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5808         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5809         in subsections has a symbol associated with it.
5811         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5812         defined symbol for entry point to avoid cancellation.
5813         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5815 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5817         * Makefile (tests): Add tst-tls5.
5818         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5819         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5820         ($(objpfx)tst-tls5): New.
5821         ($(objpfx)tst-tls6.out): Likewise.
5822         (tests): Depend on $(objpfx)tst-tls6.out.
5823         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5824         (do_test): Check pthread_self () return value alignment.
5825         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5826         (tf): Check pthread_self () return value alignment.
5827         * tst-tls5.c: New test.
5828         * tst-tls5.h: New.
5829         * tst-tls5mod.c: New.
5830         * tst-tls5moda.c: New.
5831         * tst-tls5modb.c: New.
5832         * tst-tls5modc.c: New.
5833         * tst-tls5modd.c: New.
5834         * tst-tls5mode.c: New.
5835         * tst-tls5modf.c: New.
5836         * tst-tls6.sh: New test.
5838         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5839         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5840         * init.c (pthread_functions): Initialize them.
5841         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5842         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5843         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5844         pthread_cond_timedwait@@GLIBC_2.3.2.
5846 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5848         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5849         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5850         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5851         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5852         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5853         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5855         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5857         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5858         _POSIX_THREAD_PRIORITY_SCHEDULING.
5859         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5861 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5863         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5864         nested function, use static inline function from libio.h.
5865         Code by Richard Henderson.
5867         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5868         weak.
5870 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5872         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5873         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5874         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5875         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5876         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5877         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5878         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5879         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5880         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5881         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5882         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5883         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5884         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5885         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5886         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5887         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5888         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5889         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5890         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5891         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5892         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5893         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5894         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5895         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5896         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5897         * sysdeps/sparc/tls.h: New file.
5898         * sysdeps/sparc/tcb-offsets.sym: New file.
5899         * sysdeps/sparc/Makefile: New file.
5900         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5901         * init.c [__sparc__] (__NR_set_tid_address): Define.
5903 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5905         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5906         _IO_release_lock): Define.
5908 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5910         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5911         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5913 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5915         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5916         (__pthread_cleanup_class): Add missing return types of member
5917         functions.
5919 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5921         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5922         (lll_mutex_unlock_force): Add memory barrier between store and futex
5923         syscall.
5925 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5927         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5928         tempmsg in first loop.
5930 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5932         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5933         _POSIX_THREAD_PRIORITY_SCHEDULING.
5934         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5936 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5938         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5939         (__rtld_lock_default_lock_recursive,
5940         __rtld_lock_default_unlock_recursive): Define.
5941         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5942         __rtld_lock_unlock_recursive): Define using
5943         GL(_dl_rtld_*lock_recursive).
5944         * init.c (__pthread_initialize_minimal_internal): Initialize
5945         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5946         Lock GL(_dl_load_lock) the same number of times as
5947         GL(_dl_load_lock) using non-mt implementation was nested.
5949         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5950         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5952 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5954         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5955         PIPE_BUF.
5957 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5959         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5961 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5963         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5964         to first syscall error check.  Move syscall error check for tkill
5965         into __ASSUME_CLONE_STOPPED #ifdef.
5967 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5969         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5970         is not defined, do explicit synchronization.
5971         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5972         is not defined also unlock pd->lock for non-debugging case in case
5973         it is necessary.
5974         * pthread_create.c (start_thread): Always get and release pd->lock
5975         if __ASSUME_CLONE_STOPPED is not defined.
5976         (start_thread_debug): Removed.  Adjust users.
5977         * allocatestack.c (allocate_stack): Always initialize lock if
5978         __ASSUME_CLONE_STOPPED is not defined.
5979         * Makefile (tests): Add tst-sched1.
5980         * tst-sched1.c: New file.
5982         * sysdeps/pthread/createthread.c (do_clone): Only use
5983         sched_setschduler and pass correct parameters.
5985 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5987         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5988         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5989         PTHREAD_STACK_MIN in comments.
5991 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5993         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5994         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5995         argument.
5996         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5997         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5998         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5999         (__pthread_cleanup_upto): Fix prototype.
6000         (_longjmp_unwind): Adjust caller.
6001         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
6002         Change second argument to const struct pointer.
6003         * tst-sem8.c (main): Remove unused s2 and s3 variables.
6004         * tst-sem9.c (main): Likewise.
6005         * unwind.c: Include string.h for strlen prototype.
6007 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
6009         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
6010         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
6011         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
6012         Define HAVE_CMOV.
6013         Patch by Nicholas Miell <nmiell@attbi.com>.
6015 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6017         * init.c (__pthread_initialize_minimal_internal): Initialize
6018         GL(dl_init_static_tls).
6019         * pthreadP.h (__pthread_init_static_tls): New prototype.
6020         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6021         New functions.
6022         * Makefile (tests): Add tst-tls4.
6023         (modules-names): Add tst-tls4moda and tst-tls4modb.
6024         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6025         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6026         tst-tls4modb.so.
6027         * tst-tls4.c: New file.
6028         * tst-tls4moda.c: New file.
6029         * tst-tls4modb.c: New file.
6031 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6033         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6034         before __timer_dealloc.
6035         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6036         Don't call list_unlink.
6038 2003-07-29  Roland McGrath  <roland@redhat.com>
6040         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6042 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6044         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6045         Don't reuse struct aiocb A if it failed.
6046         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6047         not just one byte, as that does not block.
6049 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6051         * sysdeps/pthread/unwind-resume.c: New file.
6052         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6053         unwind-resume in csu subdir.
6054         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6055         exceptions.
6056         (librt-sysdep_routines, librt-shared-only-routines): Add
6057         rt-unwind-resume.
6058         * sysdeps/pthread/rt-unwind-resume.c: New file.
6059         * unwind-forcedunwind.c: New file.
6060         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6061         (libpthread-shared-only-routines): Likewise.
6062         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6063         * pthreadP.h (pthread_cancel_init): New prototype.
6064         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6066         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6067         attr argument const struct pthread_attr *.
6069         * res.c (__res_state): Return __resp.
6070         * descr.h: Include resolv.h.
6071         (struct pthread): Add res field.
6072         * pthread_create.c: Include resolv.h.
6073         (start_thread): Initialize __resp.
6074         * Makefile (tests): Add tst-_res1.
6075         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6076         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6077         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6078         libpthread.
6079         * tst-_res1.c: New file.
6080         * tst-_res1mod1.c: New file.
6081         * tst-_res1mod2.c: New file.
6083 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6085         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6087         * Makefile: Define various *-no-z-defs variables for test DSOs
6088         which has undefined symbols.
6090 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6092         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6093         Retry if the stwcx fails to store once_control.
6095 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6097         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6098         pthread_attr_setaffinity.
6099         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6100         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6101         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6102         * pthread_attr_destroy.c: Free cpuset element if allocated.
6103         * pthread_create.c: Pass iattr as additional parameter to
6104         create_thread.
6105         * sysdeps/pthread/createthread.c: If attribute is provided and
6106         a new thread is created with affinity set or scheduling parameters,
6107         start thread with CLONE_STOPPED.
6108         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6109         pthread_attr_setaffinity.
6110         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6111         cpuset element.
6113 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6115         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6117 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6119         * sysdeps/pthread/configure.in: Require CFI directives also for
6120         ppc and s390.
6122 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6124         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6125         Add cfi directives.
6127 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6129         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6130         CLEANUP_JMP_BUF.
6131         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6132         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6133         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6134         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6135         not self pointer in __writer.  Compare with TID to determine
6136         deadlocks.
6137         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6138         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6139         Likewise.
6140         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6141         Likewise.
6142         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6143         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6144         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6145         macros also when compiling librt.
6147 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6149         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6150         -fasynchronous-unwind-tables.
6151         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6152         (PSEUDO): Add cfi directives.
6153         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6154         Likewise.
6155         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6156         Likewise.
6158 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6160         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6161         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6162         * unwind.c (__pthread_unwind_next): Add hidden_def.
6163         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6164         Likewise.
6165         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6166         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6167         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6168         Likewise.
6169         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6170         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6171         Likewise.
6172         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6173         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6174         __pthread_unregister_cancel and __pthread_unwind_next.
6176 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6178         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6179         different symbol for the cancellation syscall wrapper and
6180         non-cancellation syscall wrapper.
6181         (PSEUDO_END): Define.
6183 2003-07-05  Richard Henderson  <rth@redhat.com>
6185         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6186         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6187         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6188         return actual return value from the syscall, not 0.
6190 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6192         * descr.h (struct pthread): Add pid field.
6193         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6194         (__reclaim_stacks): Likewise.
6195         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6196         also check for PID of the signal source.
6197         (__pthread_initialize_minimal_internal): Also initialize pid field
6198         of initial thread's descriptor.
6199         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6200         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6201         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6202         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6203         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6205 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6207         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6208         Fix use of parameter.
6209         (__libc_cleanup_pop): Likewise.
6211 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6213         * init.c (sigcancel_handler): Change parameters to match handler
6214         for SA_SIGACTION.  Check signal number and code to recognize
6215         invalid invocations.
6217 2003-07-03  Roland McGrath  <roland@redhat.com>
6219         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6220         Apply sizeof (struct pthread) bias to r13 value.
6222 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6224         * sysdeps/pthread/configure.in: Require CFI directives.
6226         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6227         definition.
6228         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6229         libpthread compilation.
6230         * unwind.c (__pthread_unwind): Add hidden_def.
6231         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6233 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6235         * libc-cancellation.c (__libc_cleanup_routine): Define.
6236         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6237         (__pthread_cleanup_pop): Define.
6239 2003-07-01  Richard Henderson  <rth@redhat.com>
6241         * sysdeps/alpha/elf/pt-initfini.c: New file.
6242         * sysdeps/alpha/pthread_spin_lock.S: New file.
6243         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6244         * sysdeps/alpha/pthreaddef.h: New file.
6245         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6246         * sysdeps/alpha/tls.h: New file.
6247         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6248         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6249         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6250         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6251         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6252         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6253         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6254         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6255         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6256         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6258 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6261         cleanup support and unwind info.
6263 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6265         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6266         Use correct cleanup handler registration.  Add unwind info.
6267         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6268         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6269         * tst-once3.c: Add cleanup handler and check it is called.
6270         * tst-once4.c: Likewise.
6271         * tst-oncex3.c: New file.
6272         * tst-oncex4.c: New file.
6273         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6275 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6277         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6279 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6281         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6282         (tf_msgsnd): Likewise.
6284         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6285         premature returns a bit more.
6287 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6289         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6290         definition to the front.
6292         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6293         the cleanup functions to make the names unique.  Fix dwarf opcode
6294         un unwind table.
6295         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6296         functions to make the names unique.  Fix CFA offset for two blocks.
6298 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6300         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6301         missing closing braces.
6302         Patch by Christophe Saout <christophe@saout.de>.
6304 2003-06-24  Roland McGrath  <roland@redhat.com>
6306         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6308 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6310         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6311         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6313         * pthreadP.h: Declare __find_thread_by_id.
6314         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6315         * pthread_clock_gettime.c: Allow using other thread's clock.
6316         * pthread_clock_settime.c: Likewise.
6317         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6318         * Makefile: Add rules to build and run tst-clock2.
6319         * tst-clock2.c: New file.
6321 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6323         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6324         to use exception-based cleanup handler.
6325         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6327         * tst-cond8.c (ch): Announce that we are done.
6329         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6331         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6332         Also test aio_suspend with timeout value.
6334 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6336         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6337         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6338         attribute_hidden.
6340         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6341         (__pthread_mutex_lock_internal): Likewise.
6342         (__pthread_mutex_unlock_internal): Likewise.
6343         (__pthread_mutex_unlock_usercnt): Declare.
6344         * pthread_mutex_destroy.c: Always fail if used in any way.
6345         * pthread_mutex_init.c: Update comment.
6346         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6347         * pthread_mutex_timedlock.c: Adjust __nusers.
6348         * pthread_mutex_trylock.c: Adjust __nusers.
6349         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6350         and public interfaces are wrapper with pass additional parameter.
6351         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6352         parameter zero.
6353         * tst-mutex8.c: New file.
6354         * Makefile (tests): Add tst-mutex8.
6355         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6356         __pthread_mutex_unlock_usercnt.
6357         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6358         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6359         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6360         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6361         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6362         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6363         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6364         Add __nusers.
6365         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6366         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6367         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6368         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6369         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6371         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6372         * pthread_mutex_timedlock.c: Likewise.
6373         * pthread_mutex_trylock.c: Adjust __nusers.
6374         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6375         * tst-mutex9.c: New file.
6376         * Makefile (tests): Add tst-mutex9.
6377         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6378         * sysdeps/ia64/tls.h: Likewise.
6379         * sysdeps/powerpc/tls.h: Likewise.
6380         * sysdeps/s390/tls.h: Likewise.
6381         * sysdeps/sh/tls.h: Likewise.
6382         * sysdeps/x86_64/tls.h: Likewise.
6383         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6384         Change type of __owner.
6385         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6386         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6387         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6388         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6389         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6391 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6393         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6394         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6396         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6397         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6398         instead of nr to lll_futex_wake.  Only set errno and return -1
6399         if err < 0.
6401         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6402         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6403         return actual return value from the syscall, not 0.
6405 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6407         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6408         find a random value.
6409         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6410         errno==EIDRM.
6412         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6413         compat_timer_settime.
6414         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6415         compat_timer_gettime.
6416         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6417         compat_timer_getoverrun.
6418         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6419         compat_timer_delete.
6421         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6422         error-checking mutex detect busy mutexes.
6424 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6426         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6427         Add ax to clobber list.
6428         (lll_mutex_cond_lock): Likewise.
6429         (lll_mutex_unlock): Likewise.
6430         (lll_lock): Likewise.
6431         (lll_unlock): Likewise.
6433         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6434         * tst-cancel18.c: New file.
6435         * tst-cancelx18.c: New file.
6437         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6438         and tcdrain.
6440         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6441         * tst-cancel17.c: New file.
6442         * tst-cancelx17.c: New file.
6444         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6445         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6446         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6448         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6450 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6452         * sysdeps/pthread/createthread.c (create_thread): Set
6453         header.multiple_threads unconditionally.
6454         * allocatestack.c (allocate_stack): Likewise.
6455         * descr.h (struct pthread): Add header.multiple_threads
6456         unconditionally.
6457         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6458         Define for librt.  #error if neither libpthread, libc nor librt.
6459         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6460         Likewise.
6461         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6462         CDISABLE): Likewise.
6463         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6464         CDISABLE): Likewise.
6465         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6466         CDISABLE): Likewise.
6467         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6468         CDISABLE): Likewise.  Access header.multiple_threads outside of
6469         libc and libpthread.
6470         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6471         Likewise.
6472         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6473         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6475 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6477         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6478         Also test early cancellation before the thread reaches the cancellation
6479         point.
6481         * Makefile: Compile forward.c with exceptions.
6483         * sysdeps/unix/sysv/linux/sleep.c: New file.
6485 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6487         * Makefile: Add CFLAGS definition to compile function wrappers
6488         duplicated from libc with exceptions.
6489         * tst-cancel4.c: Also check cancellation handlers.
6491         * Makefile: Add rules to build and run tst-cancel16 and
6492         tst-cancelx16.  Add missing CFLAGS definitions.
6493         * tst-cancel16.c: New file.
6494         * tst-cancelx16.c: New file.
6496 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6498         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6499         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6500         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6501         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6503         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6504         (LIBC_CANCEL_RESET): Likewise.
6505         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6506         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6507         librt-cancellation.
6508         (CFLAGS-libcrt-cancellation.c): Define.
6509         * sysdeps/pthread/librt-cancellation.c: New file.
6510         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6511         macros also when compiling librt.
6512         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6513         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6514         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6515         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6516         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6517         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6518         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6520         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6521         compat_timer_create.
6523 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6525         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6527         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6528         __register_atfork.
6529         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6530         Add libc_hidden_def.
6532 2003-06-13  Roland McGrath  <roland@redhat.com>
6534         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6535         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6537 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6539         * allocatestack.c (queue_stack): Always inline.
6540         * ptreadhP.h (__do_cancel): Likewise.
6542 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6544         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6545         a typo.
6547 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6549         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6550         (__pthread_cond_signal): Remove incorrect second addition for
6551         cond_lock!=0.
6553 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6555         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6556         (__pthread_cond_signal): Use correct futex pointer in
6557         __lll_mutex_lock_wait call.
6559         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6560         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6562 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6564         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6565         cancelable.
6566         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6567         Likewise.
6569         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6570         hand-written CFI generation code.  Since ENTRY/END also initiated
6571         CFI frames this caused two CFI sets to be generated.
6573 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6575         * cleanup_routine.c: New file.
6576         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6577         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6578         cleanup handling.
6579         * Makefile (libpthread-routines): Add cleanup_routine.
6580         Add more CFLAGS variables to compile with exceptions.  Add comments
6581         why which file needs unwind tables.
6582         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6583         tests.
6584         * tst-cancelx1.c: New file.
6585         * tst-cancelx2.c: New file.
6586         * tst-cancelx3.c: New file.
6587         * tst-cancelx4.c: New file.
6588         * tst-cancelx5.c: New file.
6589         * tst-cancelx6.c: New file.
6590         * tst-cancelx7.c: New file.
6591         * tst-cancelx8.c: New file.
6592         * tst-cancelx9.c: New file.
6593         * tst-cancelx10.c: New file.
6594         * tst-cancelx11.c: New file.
6595         * tst-cancelx12.c: New file.
6596         * tst-cancelx13.c: New file.
6597         * tst-cancelx14.c: New file.
6598         * tst-cancelx15.c: New file.
6599         * tst-cleanupx0.c: New file.
6600         * tst-cleanupx0.expect: New file.
6601         * tst-cleanupx1.c: New file.
6602         * tst-cleanupx2.c: New file.
6603         * tst-cleanupx3.c: New file.
6605         * tst-cleanup0.c: Make standard compliant.
6606         * tst-cleanup1.c: Likewise.
6608         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6609         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6610         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6611         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6612         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6613         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6614         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6615         CLEANUP_JMP_BUF.
6616         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6617         * tst-cancel12.c: New file.
6618         * tst-cancel13.c: New file.
6619         * tst-cancel14.c: New file.
6620         * tst-cancel15.c: New file.
6621         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6622         and tst-cancel15.
6624         * tst-cancel1.c: Add some comments.
6626         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6627         timeout correctly.
6629 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6631         * Makefile (CFLAGS-pthread_cancel.c): Define.
6633 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6635         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6636         Change type of __writer element to int.
6637         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6638         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6639         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6640         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6641         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6642         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6643         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6644         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6645         Compare with TID to determine deadlocks.
6646         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6647         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6648         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6649         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6650         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6651         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6652         Likewise.
6653         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6654         Likewise.
6655         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6656         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6657         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6658         Likewise.
6659         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6660         Likewise.
6661         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6662         * Makefile (tests): Add tst-rwlock12.
6663         * tst-rwlock12.c: New file.
6665 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6667         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6668         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6669         Remove bogus hidden_proto.
6670         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6671         Likewise.
6672         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6673         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6674         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6675         ___lll_mutex_timedlock): Likewise.
6677 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6680         (__pthread_cond_signal): Add some code to eventually handle
6681         cond_lock!=0.
6683 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6685         * Makefile (tests): Add tst-exec4.
6686         (tst-exec4-ARGS): Define.
6687         * tst-exec4.c: New file.
6689 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6691         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6692         Also fail if tv_nsec < 0.
6693         (__lll_timedwait_tid): Likewise.
6694         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6695         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6696         Likewise.
6697         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6698         Likewise.
6699         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6700         Likewise.
6701         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6702         Likewise.
6703         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6704         Likewise.
6705         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6706         Likewise.
6708         * Makefile (tests): Add tst-sem8 and tst-sem9.
6709         * tst-sem8.c: New file.
6710         * tst-sem9.c: New file.
6711         * sem_open.c: Fix creation of in_use record if the file exists but
6712         no internal record.
6714         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6715         definitions.
6717         * sysdeps/pthread/timer_create.c (timer_create): In case
6718         evp==NULL, assign timer ID to sival_ptr.
6720         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6721         struct pthread_unwind_buf *.
6722         (struct pthread): Likewise for cleanup_jmp_buf element.
6724         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6725         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6726         * unwind.c (__pthread_unwind_next): Likewise.
6728 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6730         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6731         (lll_futex_timed_wait): Use int for futex value parameter.
6732         (lll_futex_wake): Likewise.
6733         (lll_futex_requeue): Likewise.
6735         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6736         Replace one memory operation with one register operation.
6738         * tst-join4.c (do_test): Fix error message.
6740         * tst-rwlock6.c (do_test): Use correct format specifier.
6742         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6743         (__lll_mutex_lock_wait): Replace one memory operation with one
6744         register operation.
6745         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6746         (__lll_mutex_lock_wait): Likewise.
6748         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6749         (__lll_mutex_cond_lock): Add one to value parameter of
6750         __lll_lock_wait to reflect reality in the futex syscall.
6751         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6752         (lll_mutex_cond_lock): Likewise.
6754 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6756         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6757         New function.
6758         (lll_mutex_cond_lock): Define.
6760 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6762         * Makefile (tests): Add tst-signal6.
6763         * tst-signal6.c: New file.
6765         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6766         (__lll_mutex_unlock_force): New function
6767         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6769         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6770         (__lll_mutex_unlock_force): New function.
6771         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6773         * tst-rwlock7.c (do_test): Use correct format specifier.
6775         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6776         Find break parameter in correct asm argument.
6778 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6780         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6781         Remove out4.
6782         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6783         error occured.
6784         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6785         Add __mutex.
6786         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6787         lll_futex_requeue, lll_mutex_unlock_force): Define.
6789 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6791         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6792         (pthread_cond_t): Add __mutex.
6793         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6794         lll_futex_requeue, lll_mutex_unlock_force): Define.
6796 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6798         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6799         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6800         Add __mutex field.
6801         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6802         Define.
6803         (lll_futex_wait, lll_futex_wake): Define.
6804         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6805         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6806         FUTEX_REQUEUE instead of FUTEX_WAIT.
6807         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6808         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6809         mutex which was used in condvar structure.  Call
6810         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6811         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6813         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6814         include tcb-offsets.h.  Read wakeup value in locked region.
6815         Use the value of gbr register as THREAD_ID.
6816         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6817         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6818         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6820         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6821         macros.
6823 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6825         * sysdeps/pthread/pthread_cond_broadcast.c
6826         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6828 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6831         typo in register name.
6832         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6833         correctly.  Actually use requeue.  Little optimization.
6834         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6835         mutex address early.  Handle cancellation state as 32-bit value.
6836         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6837         Remove unnecessary label.
6839 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6841         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6842         instead of FUTEX_WAIT.
6843         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6845         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6846         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6848         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6849         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6850         of __pthread_mutex_lock_internal.
6851         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6852         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6853         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6854         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6855         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6856         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6857         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6858         Add pthread_mutex_cond_lock.
6859         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6860         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6861         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6862         lll_mutex_cond_lock.
6863         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6864         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6865         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6866         Add __mutex field.
6867         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6868         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6870         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6871         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6873         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6874         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6875         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6876         macro don't define aliases.
6878         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6879         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6880         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6881         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6882         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6883         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6884         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6885         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6886         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6888 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6890         * sem_open.c: Fix one endless loop.  Implement correct semantics
6891         wrt opening the same semaphore more then once.
6892         * sem_close.c: Adjust for sem_open change.
6893         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6894         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6895         * Makefile (tests): Add tst-sem7.
6896         * tst-sem7.c: New file.
6898 2003-05-16  Roland McGrath  <roland@redhat.com>
6900         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6901         uninitialized variable braino.
6903 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6905         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6906         test for syscall availability.
6908         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6909         __no_posix_timers to -1 if the syscalls don't exist.
6911         * pthread_join.c (pthread_join): Set tid field of the joined
6912         thread to -1.  This isn't necessary but helps to recognize some
6913         error conditions with almost no cost.
6915         * allocatestack.c (FREE_P): Also negative values indicate an
6916         unused stack.
6918         * unwind.c: Include <unistd.h>.
6920 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6922         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6924 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6926         * Makefile (crti-objs, crtn-objs): New variables.
6927         (omit-deps, extra-objs): Add crtn.
6928         ($(objpfx)libpthread.so): Depend on both crti and crtn
6929         and links to them in multidir.
6930         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6932 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6934         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6935         (lll_mutex_unlock): Use atomic_exchange_rel.
6937 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6939         * cond-perf.c (cons): Add missing locking around setting of alldone.
6941 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6943         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6944         related macros.
6945         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6947 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6949         * tst-sem6.c: New file.
6950         * Makefile (tests): Add tst-sem6.
6952         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6953         Use atomic_exchange_rel instead of atomic_exchange.
6954         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6955         Likewise.
6957         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6958         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6959         vsyscall is possible.
6961         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6962         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6963         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6964         pthread_setaffinity_np.
6965         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6966         and pthread_setaffinity_np.
6967         * Makefile (libpthread-routines): Add pthread_getaffinity and
6968         pthread_setaffinity.
6970         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6971         use it in case mmap to allocate the stack fails.
6972         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6973         ARCH_MAP_FLAGS here.
6974         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6975         ARCH_RETRY_MMAP.
6977 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6979         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6980         handler implementation.  It is now lockless in fork().
6981         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6982         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6983         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6984         declare the __fork_*_lists.
6985         (struct fork_handler): Include pointers to all three functions.
6986         Add next, refcntr and need_signal elements.
6987         (__fork_handlers): New declaration.
6988         (__register_atfork_malloc): Remove declaration.
6989         (HAVE_register_atfork_malloc): Remove definition.
6990         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6991         __pthread_child_handler variable.
6992         (__libc_pthread_init): Use __register_atfork instead of explicitly
6993         adding to the list.
6994         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6995         and lll_futex_wake.
6996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6998         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6999         function must never be reached.
7001         * cond-perf.c: New file.
7003 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
7005         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
7007 2003-05-04  Roland McGrath  <roland@redhat.com>
7009         * Makefile ($(objpfx)../libc.so): New target.
7011 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
7013         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7014         (pthread_condattr_t): Size is only an int, don't use long for
7015         alignment.
7016         (pthread_mutexattr_t): Likewise.
7017         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7018         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7019         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7021 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7023         * sysdeps/i386/tls.h: Define THREAD_ID.
7024         * sysdeps/ia64/tls.h: Likewise.
7025         * sysdeps/powerpc/tls.h: Likewise.
7026         * sysdeps/s390/tls.h: Likewise.
7027         * sysdeps/sh/tls.h: Likewise.
7028         * sysdeps/x86_64/tls.h: Likewise.
7029         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7030         record ownership.
7031         * pthread_mutex_timedlock.c: Likewise.
7032         * pthread_mutex_trylock.c: Likewise.
7033         * pthread_mutex_unlock.c: Likewise.
7034         * pthread_rwlock_trywrlock.c: Likewise.
7035         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7036         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7037         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7038         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7040         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7041         flag.
7043 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7045         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7046         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7047         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7048         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7049         Make __align long long instead of long.
7050         (pthread_rwlock_t): Formatting.
7051         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7052         (pthread_rwlock_t): Formatting.
7053         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7054         (pthread_cond_t): Make __align long long instead of long.
7055         (pthread_rwlock_t): Move __flags field to the same position as in
7056         linuxthreads.
7058 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7060         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7061         * tst-rwlock7.c (do_test): Likewise.
7063 2003-04-26  Roland McGrath  <roland@redhat.com>
7065         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7067 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7069         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7070         sizeof (struct pthread).
7071         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7072         1 struct pthread.
7073         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7074         to 0.
7075         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7076         struct pthread.
7077         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7078         to 32-bit bytes.
7079         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7080         tcbp.
7081         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7082         unneccessarily.
7083         (NO_TLS_OFFSET): Define.
7084         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7085         add TLS_TCB_SIZE unnecessarily.
7087 2003-04-22  Roland McGrath  <roland@redhat.com>
7089         * Makeconfig (shared-thread-library): Reverse link order to work
7090         around linker bug.
7092 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7094         * semaphore.h: Fix typo in comment.
7096 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7098         * sysdeps/pthread/sigfillset.c: New file.
7100         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7101         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7102         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7103         * sysdeps/pthread/sigaction.c: Likewise.
7104         * sysdeps/pthread/sigprocmask.c: New file.
7105         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7106         __SIGRTMIN+1.
7107         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7108         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7109         in this case.
7111 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7113         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7114         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7116         * sysdeps/unix/sysv/linux/unregister-atfork.c
7117         (__unregister_atfork): Don't free memory not allocated dynamically.
7119         * semaphore.h: Remove __THROW marker from cancellation points.
7120         * nptl/sysdeps/pthread/pthread.h: Likewise.
7122 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7124         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7125         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7126         __THROW.
7128 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7130         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7132 2003-04-15  Roland McGrath  <roland@redhat.com>
7134         * forward.c (__pthread_unwind): Tweak to avoid warning.
7136 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7138         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7140 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7142         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7143         overflow CFA advance instructions.
7144         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7146 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7148         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7149         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7150         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7151         defined.
7153         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7154         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7156         DW_CFA_advance_loc for .Laddl-.Lsubl.
7158 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7160         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7161         position-independent unwind data for static libraries.
7162         Add missing unwind info.  Add comments.
7164         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7165         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7166         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7167         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7169 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7171         * Makefile: Make sure all cancellation points are compiled with
7172         exception and asynchronous unwind tables.
7174         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7175         which mishandles loading of global object addresses in PIC.
7176         (THREAD_SETMEM_NC): Likewise.
7178 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7180         * pthread.h: Define new data structure for cleanup buffer.  Declare
7181         new cleanup handler interfaces.
7182         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7183         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7184         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7185         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7186         it.  Declare old cleanup handler installation functions.
7187         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7188         handling.
7189         * cleanup_defer.c: Likewise.
7190         * cleanup_compat.c: New file.  Old cleanup code.
7191         * cleanup_def_compat.c: New file.  Old cleanup code.
7192         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7193         if own thread descriptor.
7194         * unwind.c: New file.
7195         * forward.c: Add __pthread_unwind.
7196         * init.c (pthread_functions): Add __pthread_unwind.
7197         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7198         Add ptr___pthread_unwind.
7199         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7200         and unwind function.
7201         * Makefile (libpthread-routines): Add cleanup_compat,
7202         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7203         table generation if necessary.
7204         * version.c: Record whether unwind support is compiled in.
7205         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7206         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7207         handler interfaces.
7208         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7209         complication to generate unwind information for syscall wrappers.
7210         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7211         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7212         __cleanup_fct_attribute.
7214         * Makefile: Add rules to build and run tst-cleanup0.
7215         * tst-cleanup0.c: New file.
7216         * tst-cleanup0.expect: New file.
7218         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7219         caller.  Optimize to avoid often unecessary local variable.
7221 2003-04-11  Roland McGrath  <roland@redhat.com>
7223         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7224         sets variable `multidir'; include that.
7225         (generated): Add it.
7226         ($(objpfx)$(multidir)/crti.o): New target.
7227         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7229 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7231         * tst-attr2.c (do_test): Add cast to avoid warning.
7232         * tst-mutex4.c (do_test): Likewise.
7234 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7236         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7237         in child.
7239 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7241         * Makefile (tests): Add tst-detach1.
7242         * tst-detach1.c: New file.
7244 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7246         * sysdeps/pthread/pthread.h: Remove duplicate
7247         pthread_cleanup_{push,pop} definitions.
7249         * tst-barrier2.c: Eliminate warnings.
7250         * tst-cancel4.c: Likewise.
7251         * tst-cond4.c: Likewise.
7252         * tst-cond6.c: Likewise.
7253         * tst-detach1.c: Likewise.
7254         * tst-rwlock4.c: Likewise.
7255         * tst-rwlock6.c: Likewise.
7256         * tst-rwlock7.c: Likewise.
7257         * tst-sem3.c: Likewise.
7258         * tst-spin2.c: Likewise.
7259         * tst-umask1.c: Likewise.
7261 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7263         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7265 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7267         * descr.h (struct pthread): Move cancelhandling member to the front.
7269 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7271         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7272         malloc_parent, and malloc_child statically.
7273         (__register_atfork_malloc): New function.
7274         (free_mem): Don't free any of the malloc_* variables on the list.
7275         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7276         Define HAVE_register_atfork_malloc.
7278 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7280         * sysdeps/pthread/createthread.c (create_thread): Add some more
7281         comments explaining when to set multiple_threads and when not.
7283         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7284         THREAD_ATOMIC_BIT_SET if not already defined.
7285         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7286         THREAD_ATOMIC_BIT_SET:
7287         * sysdeps/x86_64/tls.h: Likewise.
7288         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7289         THREAD_ATOMIC_CMPXCHG_VAL.
7290         (_pthread_cleanup_pop_restore): Likewise.
7291         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7292         (__pthread_enable_asynccancel_2): Likewise.
7293         (__pthread_disable_asynccancel): Likewise.
7294         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7295         (__libc_disable_asynccancel): Likewise.
7296         * init.c (sigcancel_handler): Likewise.
7297         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7298         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7300 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7302         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7303         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7304         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7305         * Makefile (tests): Add tst-cancel11.
7306         * tst-cancel11.c: New file.
7308 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7310         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7311         round, not the first.  Use specific_used flag instead of local
7312         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7313         (__free_tcb): Don't call deallocate_tsd here.
7314         (start_thread): Call deallocate_tsd here.
7315         * pthread_setspecific.c: Set specific_used flag really only when
7316         needed.
7317         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7318         * tst-tsd3.c: New file.
7319         * tst-tsd4.c: New file.
7321 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7323         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7324         Use atomic_exchange_and_add instead of __lll_add.
7325         (__lll_mutex_timedlock): Likewise.
7326         Patch by Ian Wienand.
7328 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7330         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7331         (SINGLE_THREAD_P): Fix typo.
7332         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7334 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7336         * Makefile (tests): Add tst-align.
7337         * tst-align.c: New file.
7338         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7340         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7341         function correctly.
7343         * tst-tsd2.c: Add casts to avoid warnings.
7345 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7347         * descr.h (struct pthread): Move most often used elements to the front.
7349 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7351         * Makefile (libpthread-routines): Add pthread_atfork.
7352         (libpthread-static-only-routines): Add pthread_atfork.
7354 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7356         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7357         of TLS_DTV_AT_TP.
7358         (INSTALL_DTV): Add parens.
7359         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7360         Use passed descr instead of THREAD_SELF.
7361         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7362         (__lll_mutex_timedlock_wait): Correct expected value after
7363         spurious wakeup.
7364         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7365         Release lock before waking up the waiters.
7366         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7367         criteria.  Reorderstruct passed to cleanup handler.  Fix
7368         handling of cancellation and failung pthread_mutex_unlock call.
7369         Use __pthread_enable_asynccancel_2 instead of
7370         __pthread_enable_asynccancel.
7371         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7372         Return result of lock re-get if it fails.
7373         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7374         for __pthread_cleanup_push.
7375         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7376         completely broken rwlock implementation.
7377         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7378         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7379         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7380         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7381         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7382         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7383         versioned_symbol macro.
7384         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7385         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7387 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7389         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7390         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7391         and __helper_tid.
7392         (struct timer): Remove th and bar field.
7393         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7394         debugging code.  Create only one helper thread.
7395         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7396         helper thread.
7397         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7398         Renamed.  Define statically.  Use thread info from siginfo.
7399         (__helper_once): New variable.
7400         (__helper_tid): New variable.
7401         (__reset_helper_control): New function.
7402         (__start_helper_thread): New function.
7404         * pthread_create.c (start_thread): Don't use setjmp inside
7405         __builtin_expect to work around gcc bug.
7407         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7408         timer_delete syscall fails, but not with ENOSYS, set
7409         __no_posix_timers.
7411         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7412         (timer_settime): Fix typo.
7413         * sysdeps/unix/sysv/linux/timer_getoverr.c
7414         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7416 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7418         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7419         offset of cleanupbuf.__prev.
7421 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7423         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7424         of included file.
7426 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7428         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7429         NULL provide default definition to syscall.
7431 2003-03-25  Roland McGrath  <roland@redhat.com>
7433         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7434         (timer_id2ptr): Fix typo.
7436 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7438         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7439         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7440         * sysdeps/ia64/pthreaddef.h: Likewise.
7441         * sysdeps/powerpc/pthreaddef.h: Likewise.
7442         * sysdeps/s390/pthreaddef.h: Likewise.
7443         * sysdeps/sh/pthreaddef.h: Likewise.
7444         * sysdeps/x86_64/pthreaddef.h: Likewise.
7445         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7446         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7447         being changed.
7448         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7449         SIGTIMER is not unblocked.
7450         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7451         RT signal taken.
7452         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7453         be send.
7454         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7455         pass pointer through as ID.
7456         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7457         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7458         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7459         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7460         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7461         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7462         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7463         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7464         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7465         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7466         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7467         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7468         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7469         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7470         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7471         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7472         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7473         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7474         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7475         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7476         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7477         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7478         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7479         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7480         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7481         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7482         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7483         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7484         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7485         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7486         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7487         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7488         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7490         * pthreadP.h: Remove FRAME_LEFT definition.
7491         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7492         already left frame.  Programs which have this problem are not POSIX
7493         compliant.
7494         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7496 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7498         * sysdeps/pthread/tst-timer.c: Check return values of the
7499         functions we test.
7501 2003-03-23  Roland McGrath  <roland@redhat.com>
7503         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7504         * tst-tls3mod.c: Likewise.
7505         * tst-tls1.c: Likewise.
7506         * tst-tls2.c: Likewise.
7508         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7509         undefined behavior.
7511         * tst-join5.c (tf1, tf2): Add a cast.
7513         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7515         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7516         Don't test anything.
7517         * tst-cond4.c: Likewise.
7518         * tst-cond6.c: Likewise.
7519         * tst-flock2.c: Likewise.
7520         * tst-mutex4.c: Likewise.
7521         * tst-rwlock4.c: Likewise.
7522         * tst-signal1.c: Likewise.
7523         * tst-spin2.c: Likewise.
7524         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7526         * tst-mutex4.c: Use test-skeleton.c.
7527         * tst-spin2.c: Likewise.
7528         * tst-sysconf.c: Likewise.
7529         * tst-barrier2.c: Likewise.
7530         * tst-cond4.c: Likewise.
7531         * tst-cond6.c: Likewise.
7532         * tst-rwlock4.c: Likewise.
7533         * tst-unload.c: Likewise.
7534         * tst-flock2.c (do_test): Use return instead of exit.
7536 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7538         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7540 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7542         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7543         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7544         instead of __lll_compare_and_swap.
7545         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7546         Likewise.
7547         Removed definition if __lll_compare_and_swap.
7549         * cancellation.c: Adjust for new form of compare&exchange macros.
7550         * cleanup_defer.c: Likewise.
7551         * init.c: Likewise.
7552         * libc-cancellation.c: Likewise.
7553         * old_pthread_cond_broadcast.c: Likewise.
7554         * old_pthread_cond_signal.c: Likewise.
7555         * old_pthread_cond_timedwait.c: Likewise.
7556         * old_pthread_cond_wait.c: Likewise.
7557         * pthread_cancel.c: Likewise.
7558         * pthread_create.c: Likewise.
7559         * pthread_detach.c: Likewise.
7560         * pthread_join.c: Likewise.
7561         * pthread_key_delete.c: Likewise.
7562         * pthread_setcancelstate.c: Likewise.
7563         * pthread_setcanceltype.c: Likewise.
7564         * pthread_timedjoin.c: Likewise.
7565         * pthread_tryjoin.c: Likewise.
7566         * sysdeps/pthread/createthread.c: Likewise.
7568 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7570         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7571         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7572         definitions.  Replace uses with calls to atomic_* functions.
7573         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7574         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7575         __lll_test_and_set calls with atomic_exchange_and_add and
7576         atomic_exchange calls respectively.
7577         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7578         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7579         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7580         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7581         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7582         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7583         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7585         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7586         returns the old value.
7588 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7590         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7591         int for variable OLDVAL and correct inline assembler contraint.
7592         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7593         type int for variable OLD.
7595         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7596         only for s390-32.
7597         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7598         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7599         instead of multiple_threads field in the TCB.
7601 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7603         * sysdeps/i386/i686/bits/atomic.h: Removed.
7604         * sysdeps/i386/i586/bits/atomic.h: Removed.
7605         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7606         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7607         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7608         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7609         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7610         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7611         * atomic.h: Removed.  Moved to glibc.
7613         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7614         support for clock selection.
7616         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7617         signalling waiters.
7619 2003-03-18  Roland McGrath  <roland@redhat.com>
7621         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7622         Add __lll_rel_instr first.  Add memory clobber.
7623         (lll_mutex_unlock): Use __lll_test_and_set.
7624         From Paul Mackerras <paulus@samba.org>.
7626         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7627         unconditionally.
7628         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7629         (SINGLE_THREAD_P):  Add `header.' prefix.
7630         From Paul Mackerras <paulus@samba.org>.
7632         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7633         pthread_timedjoin_np to ...
7634         (libpthread: GLIBC_2.3.3): ... here.
7635         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7637         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7638         Avoid shadowing VAL variable.
7640         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7641         New macro.
7643 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7645         * Makefile (tests): Add tst-cond11.
7646         * tst-cond11.c: New file.
7648         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7649         struct passed to cleanup handler to eliminate one more
7650         instruction.
7651         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7653         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7654         (pthrad_cond_t): Replace __unused field with __clock.
7656         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7657         waken all waiters in cleanup handler.
7658         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7659         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7661         * pthread_condattr_getclock.c: New file.
7662         * pthread_condattr_setclock.c: New file.
7663         * sysdeps/pthread/pthread.h: Declare these new functions.
7664         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7665         * Makefile (libpthread-routines): Add the new functions.
7666         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7667         Renamed field to value.  Document use of the bits.
7668         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7669         change.
7670         * pthread_condattr_setpshared.c: Likewise.
7671         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7672         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7673         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7674         Add __clock field.
7675         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7676         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7677         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7678         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7679         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7680         Implement clock selection.
7681         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7682         * pthread-errnos.sym: Add ENOSYS.
7683         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7684         _POSIX_CLOCK_SELECTION.
7685         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7687         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7688         invalid .size directive.
7690 2003-03-17  Roland McGrath  <roland@redhat.com>
7692         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7693         Formatting tweaks.
7695 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7697         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7698         Use __lll_add instead of spelling it out.  Use protected symbol names.
7699         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7700         Use __lll_add.
7701         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7702         Renamed from lll_compare_and_swap.  Use new name where necessary.
7703         (__lll_add): Defined.
7704         (__lll_dec_if_positive): Defined.
7705         (__lll_test_and_set): Defined.
7706         * sysdeps/ia64/pthread_spin_init.c: Removed.
7707         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7708         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7709         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7710         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7711         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7712         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7713         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7714         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7715         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7716         __sync_lock_release_si.
7717         Patch by Jakub Jelinek.
7719         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7720         Fix timeout handling.
7721         (__lll_timedwait_tid): Likewise.
7722         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7723         Patch by Jakub Jelinek.
7725         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7727 2003-03-17  Roland McGrath  <roland@redhat.com>
7729         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7730         * sysdeps/pthread/pthread_spin_init.c: New file.
7731         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7732         * sysdeps/powerpc/Makefile: New file.
7733         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7734         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7735         * sysdeps/powerpc/pthreaddef.h: New file.
7736         * sysdeps/powerpc/tcb-offsets.sym: New file.
7737         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7738         * sysdeps/powerpc/tls.h: New file.
7739         * sysdeps/powerpc/bits/atomic.h: New file.
7740         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7741         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7742         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7744         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7745         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7746         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7747         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7748         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7749         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7750         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7751         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7752         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7753         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7754         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7755         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7756         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7757         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7758         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7760         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7761         not gettimeofday.
7762         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7763         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7764         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7765         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7766         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7768 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7770         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7771         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7772         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7774         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7776 2003-03-16  Roland McGrath  <roland@redhat.com>
7778         * tst-fork4.c: Include <string.h>.
7779         * tst-signal2.c: Likewise.
7780         * tst-mutex5.c (do_test): exit -> return.
7781         * tst-mutex2.c: Include <stdlib.h>.
7783 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7785         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7786         (__lll_mutex_timedlock_wait): Correct expected value after
7787         spurious wakeup.  Otherwise we would never wait again.
7789         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7790         zone versus inline asm stupidity.  Use correct instructions.
7792         * tst-rwlock6.c: Add some more status output.
7794 2003-03-15  Roland McGrath  <roland@redhat.com>
7796         * sysdeps/pthread/configure.in: New file.
7797         * sysdeps/pthread/configure: New file (generated).
7799 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7801         * allocatestack.c (allocate_stack): Store the exact stack size of
7802         user allocated stacks.
7804 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7806         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7807         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7808         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7809         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7810         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7811         Use `header.' prefix.
7812         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7814 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7816         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7817         __builtin_frame_address, use stack pointer.
7819         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7820         instead of __builtin_frame_pointer.
7822 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7824         * tst-basic1.c (do_test): Add cast to avoid warning.
7825         * tst-basic2.c (do_test): Likewise.
7827         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7828         amount of stack correction.
7830         * tst-fork4.c: Use test-skeleton.c.
7832 2003-03-14  Roland McGrath  <roland@redhat.com>
7834         * init.c: Fix typo "#eli" for "#else".
7836 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7838         * allocatestack.c (__stack_user): Use hidden_data_def.
7839         * pthread_create.c (__pthread_keys): Likewise.
7841         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7843 2003-03-14  Roland McGrath  <roland@redhat.com>
7845         * tst-fork4.c: New file.
7846         * Makefile (tests): Add it.
7848         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7849         we always define the padding space.
7850         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7851         stopped supporting its own extensions fully.
7852         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7853         struct also called `header', so `header.multiple_threads' is the field
7854         name to use on all machines.
7855         * allocatestack.c (allocate_stack): Use `header.' prefix.
7856         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7857         * pthread_create.c (__pthread_create_2_1): Likewise.
7858         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7859         (THREAD_SELF): Likewise.
7860         * sysdeps/x86_64/tls.h: Likewise.
7861         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7862         (SINGLE_THREAD_P): Likewise.
7863         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7864         (SINGLE_THREAD_P): Likewise.
7865         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7866         (SINGLE_THREAD_P): Likewise.
7868         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7869         value directly.
7871 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7873         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7874         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7876         * pthread_create.c (start_thread): setjmp is expected to return 0.
7878         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7879         (THREAD_GETMEM_NC): Likewise.
7881 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7883         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7884         and the size of the stack which must be allocated is a multiple,
7885         allocate one more page.
7886         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7887         MULTI_PAGE_ALIASING.
7889 2003-03-13  Roland McGrath  <roland@redhat.com>
7891         * pthread_create.c (start_thread): Set EXITING_BIT after the
7892         event-reporting (and destructors), not before.
7894 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7896         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7897         lll_futex_wake): Declare register variables as long int instead of
7898         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7899         Make syscall arguments clobbered by the syscall.
7900         (lll_futex_wait): Define using lll_futex_timed_wait.
7902         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7903         to void *.
7905         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7906         PPID if [! NDEBUG].
7908         * allocatestack.c (nptl_ncreated): Only declare if
7909         COLORING_INCREMENT != 0.
7911         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7912         (__libc_enable_asynccancel_2): Remove prototype.
7914         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7915         ctid to match kernel.
7917 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7919         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7920         libc_multiple_threads.
7921         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7922         __libc_multiple_threads to...
7923         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7925         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7926         versioning.
7927         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7928         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7930         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7931         (__pthread_once_internal): Define.
7933         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7934         macros instead of .symver directly.
7935         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7936         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7938         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7939         * sysdeps/x86_64/tcb-offsets.sym: New file.
7940         * sysdeps/x86_64/Makefile: New file.
7942         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7943         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7944         to access own pthread_t in TCB.
7945         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7946         Likewise.
7947         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7948         Likewise.
7949         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7951 2003-03-12  Roland McGrath  <roland@redhat.com>
7953         * pthread-errnos.sym: New file.
7954         * Makefile (gen-as-const-headers): New variable, list that file.
7955         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7956         header <pthread-errnos.h> instead of defining errno values here.
7957         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7958         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7959         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7960         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7961         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7962         Likewise.
7963         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7964         Likewise.
7965         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7966         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7967         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7968         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7969         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7970         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7971         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7972         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7973         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7974         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7975         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7976         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7977         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7978         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7979         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7980         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7981         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7982         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7983         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7984         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7985         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7986         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7987         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7988         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7989         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7990         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7991         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7993         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7994         CLONE_CHILD_SETTID worked.
7996 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7998         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7999         file.
8000         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
8001         file.
8003         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
8004         (pthread_cond_t): Add padding.
8006         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
8007         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
8008         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
8010         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
8011         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
8012         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
8013         (__pthread_rwlock_timedrdlock): Likewise.
8014         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
8015         (__pthread_rwlock_wrlock): Likewise.
8016         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8017         (__pthread_rwlock_rdlock): Likewise.
8019         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8021         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8022         result of lock re-get if it fails.
8024 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8026         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8027         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8028         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8029         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8030         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8031         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8032         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8033         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8034         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8035         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8037         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8038         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8040         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8041         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8042         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8043         (create_thread): Likewise.
8044         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8045         * init.c (__pthread_initialize_minimal_internal): Initialize
8046         __libc_multiple_threads_ptr if necessary.
8047         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8048         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8049         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8050         __libc_multiple_threads.
8051         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8052         necessary.
8054         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8055         (THREAD_SETMEM_NC): Likewise.
8057         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8058         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8059         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8060         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8062         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8063         Eliminate one entire instruction.
8065         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8066         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8067         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8068         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8069         instead of __pthread_enable_asynccancel.
8070         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8071         (__pthread_cond_wait): Likewise.
8072         * sysdeps/pthread/pthread_cond_timedwait.c
8073         (__pthread_cond_timedwait): Likewise.
8074         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8076         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8077         (__condvar_cleanup): Wake up all waiters in case we got signaled
8078         after being woken up but before disabling asynchronous
8079         cancellation.
8080         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8081         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8082         (__condvar_cleanup): Likewise.
8084         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8085         Make it an error if architecture has no #if case.  Add x86-64.
8087         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8088         pt-initfini.s generation.
8090         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8091         (TLS_INIT_TP): Fix typo.
8093 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8095         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8096         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8098         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8099         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8100         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8101         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8102         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8103         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8104         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8105         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8107 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8109         * sysdeps/pthread/pthread_cond_timedwait.c
8110         (__pthread_cond_timedwait): Return the result of the final
8111         locking.  If it succeeds, the regular function return value.
8113         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8114         Return result of the final locking.
8115         * version.c (__nptl_main): Work around problems with the strange
8116         INTERNAL_SYSCALL macro on ppc32.
8117         * init.c (__pthread_initialize_minimal_internal): Unblock
8118         SIGCANCEL in case the parent blocked it.
8119         Reported by Paul Mackerras <paulus@samba.org>.
8121         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8122         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8123         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8125 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8127         * sysdeps/pthread/pthread_cond_timedwait.c
8128         (__pthread_cond_timedwait): Unlock and fail if
8129         __pthread_mutex_unlock_internal failed.
8131         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8132         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8133         Use ARCH_CLONE.
8134         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8135         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8136         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8137         ALLOCATE_STACK): New macros.
8138         (TLS_TPADJ): New macro.
8139         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8140         (allocate_stack): Handle TLS_DTV_AT_TP and
8141         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8142         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8143         Don't set PD->self.
8144         * init.c [__ia64__] (__NR_set_tid_address): Define.
8146         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8147         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8148         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8149         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8150         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8151         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8152         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8153         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8154         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8155         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8156         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8157         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8158         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8159         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8160         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8161         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8162         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8163         * sysdeps/ia64/bits/atomic.h: New file.
8164         * sysdeps/ia64/Makefile: New file.
8165         * sysdeps/ia64/pthread_spin_init.c: New file.
8166         * sysdeps/ia64/pthread_spin_lock.c: New file.
8167         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8168         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8169         * sysdeps/ia64/pthreaddef.h: New file.
8170         * sysdeps/ia64/tcb-offsets.sym: New file.
8171         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8172         * sysdeps/ia64/tls.h: New file.
8174         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8175         to syscall instead of no arguments.
8177 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8179         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8180         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8181         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8182         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8184         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8185         unused code.
8187         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8189         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8190         lowlevelbarrier.sym.
8191         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8192         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8193         Include lowlevelbarrier.h and don't define offsets locally.
8194         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8196         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8197         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8198         (__lll_mutex_timedlock_wait): Likewise.
8199         (lll_mutex_lock): Adjust asm for that.
8200         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8201         (lll_lock): Adjust asm for operand order change.
8202         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8203         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8205         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8206         Reverse order of parameters.
8207         (__lll_timedwait_tid): Remove regparms attribute.
8208         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8209         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8211         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8212         (__lll_timedwait_tid): Remove one unnecessary instruction.
8214         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8215         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8216         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8217         lowlevelmutex.S.
8219         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8220         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8221         for NOT_IN_libc.
8222         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8223         lowlevellock.S.
8225         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8226         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8227         for libc.so.
8228         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8229         define LOCK here (if UP is not defined).  The actual code is in
8230         lowlevelmutex.S.
8232         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8233         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8234         __lll_timedwait_tid for libc.so.
8235         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8236         define LOCK here (if UP is not defined).  The actual code is in
8237         lowlevellock.S.
8239         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8240         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8241         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8242         instead of lowlevelsem.h.
8243         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8244         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8245         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8247         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8248         lowlevelrwlock.sym.
8249         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8250         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8251         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8253         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8254         register loading.
8255         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8256         last changed.  D'oh.
8258         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8260         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8261         of __libc_locking_needed.
8262         (lll_trylock): Initialize %eax to zero.
8264         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8265         pthread_cond_t definition.
8267 2003-03-10  Roland McGrath  <roland@redhat.com>
8269         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8270         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8271         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8272         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8273         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8275         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8276         Instead of setting PD->multiple_threads, set globals
8277         __pthread_multiple_threads and __libc_multiple_threads.
8278         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8279         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8280         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8282         * descr.h (struct pthread): Conditionalize first member on
8283         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8284         containing an anonymous tcbhead_t.  Move `list' member out.
8285         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8286         * allocatestack.c: Remove use of `header.data.' prefix.
8287         * pthread_create.c: Likewise.
8288         * init.c (__pthread_initialize_minimal_internal): Likewise.
8289         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8290         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8291         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8292         * sysdeps/x86_64/tls.h: Likewise.
8293         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8294         (SINGLE_THREAD_P): Likewise.
8295         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8296         (SINGLE_THREAD_P): Likewise.
8297         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8298         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8300 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8302         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8304         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8305         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8307         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8308         leftovers from the ia32 code.
8310         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8311         memory load.
8312         (clear_once_control): Don't load %esi.
8314         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8315         handling.
8317         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8319         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8320         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8322         * Makefile (tests): Add tst-cond10.
8323         * tst-cond10.c: New file.
8325 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8327         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8328         * tst-signal3.c (do_test): Likewise.
8329         * tst-sem5.c (do_test): Likewise.
8330         * tst-kill6.c (do_test): Likewise.
8331         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8333         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8334         of inc/dec.
8335         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8336         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8337         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8338         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8339         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8340         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8341         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8342         Likewise.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8344         Likewise.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8346         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8347         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8348         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8349         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8350         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8351         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8352         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8354         * allocatestack.c (allocate_stack): If mprotect() fails free the
8355         TLS memory.
8357 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8359         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8361         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8362         lll_wake_tid.  This was used only to work around kernel limits in
8363         the early days.
8364         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8365         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8366         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8367         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8369         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8370         (__pthread_initialize_minimal_internal): Change initialization of
8371         __static_tls_align_m1 appropriately.
8372         * pthreadP.h (__static_tls_align_m1): Renamed from
8373         __static_tls_align.
8374         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8375         instead of __static_tls_align-1.
8377 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8379         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8381         * pthread_create.c: Define __pthread_keys using nocommon
8382         attribute, not by placing it explicitly in bss.
8383         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8385         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8386         Use it in mmap call to allocate stacks.
8388         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8390         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8391         result of the thread function.
8393 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8395         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8396         version is just fine.
8398         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8399         (__pthread_child_handler): Renamed from pthread_child_handler,
8400         exported, and marked hidden.  Change all users.
8401         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8402         free __pthread_child_handler from child list.
8404 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8406         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8408         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8409         Fix handling of cancellation and failing pthread_mutex_unlock call.
8410         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8411         (__pthread_cond_wait): Likewise.
8413         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8414         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8415         lll_futex_timed_wait call.
8416         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8417         (pthread_rwlock_timedwrlock): Likewise.
8419         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8420         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8421         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8423         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8424         check of lll_futex_wake return value.
8426 2003-03-03  Roland McGrath  <roland@redhat.com>
8428         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8430         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8431         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8432         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8434 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8436         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8437         error for CPU clocks.
8439         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8440         _POSIX_MONOTONIC_CLOCK.
8441         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8443         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8444         recent kernels.
8446 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8448         * descr.h (struct pthread): Move cleanup field to the front.
8450 2003-03-01  Roland McGrath  <roland@redhat.com>
8452         * sem_open.c (sem_open): Braino fix.
8454 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8456         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8457         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8458         __pthread_cleanup_pop functionality.
8459         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8461         * descr.h (struct pthread): Move tid field to the front now that
8462         it is often used.
8464         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8465         (__lll_mutex_timedlock_wait): Remove.
8466         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8467         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8468         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8469         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8470         (lll_unlock_wake_cb): Don't save and restore %esi.
8471         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8472         %esi.
8473         (__lll_timedwait_tid): Add alignment.
8474         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8475         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8476         %esi.
8477         (__lll_timedwait_tid): Removed.
8478         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8479         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8480         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8481         (pthread_barrier_wait): Don't save, load, and restore %esi for
8482         last thread.
8483         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8484         (__pthread_cond_signal): Don't save, load, and restore %esi.
8485         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8486         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8487         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8488         Don't save, load, and restore %esi.
8490 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8493         Release lock before waking up the waiters.
8495         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8497         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8498         (reader_thread): Likewise.
8500         * sysdeps/pthread/pthread_rwlock_unlock.c
8501         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8502         to wake up readers if there are none.
8504         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8505         Release internal lock before wake threads.
8507 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8509         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8510         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8511         predefined.
8512         * tst-rwlock9.c: Likewise.
8513         * tst-rwlock10.c: New file.
8514         * tst-rwlock11.c: New file.
8516         * Makefile (tests): Add tst-dlsym1.
8517         * tst-dlsym1.c: New file.
8519         * init.c (__pthread_initialize_minimal_internal): Set
8520         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8521         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8523 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8525         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8527         * tst-cond2.c: Fix sychronization with child.
8529         * tst-rwlock8.c (reader_thread): Remove unused variable.
8531         * Makefile: Add rules to build and run tst-tls3.
8532         * tst-tls3.c: New file.
8533         * tst-tls3mod.c: New file.
8535         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8536         * tst-rwlock8.c: New file.
8537         * tst-rwlock9.c: New file.
8538         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8539         complete broken rwlock implementation.
8540         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8541         Likewise.
8542         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8543         Likewise.
8544         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8545         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8546         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8547         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8548         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8549         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8550         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8552 2003-02-23  Roland McGrath  <roland@redhat.com>
8554         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8556 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8558         * Makefile (tests): Add tst-context1.
8559         * tst-context1.c: New file.
8561         * Makefile (tests): Add tst-tls1 and tst-tls2.
8562         * tst-tls1.c: New file.
8563         * tst-tls2.c: New file.
8565         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8566         for failed cmpxchg.
8568         * pthread_create.c (start_thread): Set EXITING_BIT early.
8570         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8571         (THREAD_GETMEM_NC): Likewise.
8573 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8575         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8576         off 3 more bytes by using offset-less instructions when possible.
8578         * Makefile: Add dependency for $(objpfx)version.d.
8580         * eintr.c (eintr_source): Add unnecessary return but the compiler
8581         insists.
8583         * tst-kill3.c: Include <unistd.h>.
8585 2003-02-21  Roland McGrath  <roland@redhat.com>
8587         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8589 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8591         * Makefile (tests): Add tst-eintr1.
8592         (distribute): Add eintr.c.
8593         * tst-eintr1.c: New file.
8594         * eintr.c: New file.
8596         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8598         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8599         Disallow sending SIGCANCEL.
8601         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8602         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8603         * tst-kill1.c: New file.
8604         * tst-kill2.c: New file.
8605         * tst-kill3.c: New file.
8606         * tst-kill5.c: New file.
8607         * tst-kill6.c: New file.
8608         * tst-basic7.c: Renamed to...
8609         * tst-kill4.c: ...this.
8611 2003-02-21  Roland McGrath  <roland@redhat.com>
8613         * Makefile (install-lib-ldscripts): New variable.
8615 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8617         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8618         * pthread_cancel.c: Use INVALID_TD_P.
8619         * pthread_detach.c: Likewise.
8620         * pthread_getschedparam.c: Likewise.
8621         * pthread_setschedparam.c: Likewise.
8622         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8623         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8624         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8625         * pthread_timedjoin.c: Likewise.
8627         * tst-basic7.c: Include <signal.h>.
8629         * pthread_join.c (pthread_join): Limited checking for invalid
8630         descriptors.
8631         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8633 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8635         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8636         beginning of the loop.  Clear the entire first block of TSD.
8637         * Makefile (tests): Add tst-key4.
8638         * tst-key4.c: New file.
8640 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8642         * Makefile (tests): Add tst-basic7.
8643         * tst-basic7.c: New file.
8645         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8646         Add some more __builtin_expect.
8648         * pthreadP.h: Define dummy version of DEBUGGING_P.
8650 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8652         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8653         _POSIX_THREAD_PRIORITY_SCHEDULING.
8654         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8655         _XOPEN_REALTIME_THREADS.
8656         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8658         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8659         kernel returns EINVAL for PID <= 0, work around it.
8661         * Makefile (tests): Add tst-signal5.
8662         * tst-signal5.c: New file.
8664         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8665         and LOGIN_NAME_MAX.
8667         * tst-cancel1.c (tf): Block all signals.
8669         * Makefile (tests): Add tst-basic6.
8670         * tst-basic6.c: New file.
8672         * tst-basic1.c: Add test for process ID.
8674         * Makefile (tests): Add tst-cancel10.
8675         * tst-cancel10.c: New file.
8677         * Makefile (tests): Add tst-signal4.
8678         * tst-signal4.c: New file.
8680         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8681         __sigismember instead of sigismember.  Add __builtin_expect.
8683 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8685         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8686         pthread_setcancelstate, and pthread_rwlock_setpshared.
8688         * tst-cancel7.c (do_test): Make sure the pid file exists before
8689         canceling the thread.
8691         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8692         pthread_rwlock_timedrdlock tests.
8693         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8694         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8695         Check for invalid tv_nsec field.
8696         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8697         Likewise.
8699         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8700         recursive mutex of overflow.
8702         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8704         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8705         going into an endless loop.
8706         * Makefile (tests): Add tst-cancel9.
8707         * tst-cancel9.c: New file.
8709         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8711 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8713         * tst-mutex5.c (do_test): Add more timedlock tests.
8715         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8716         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8718         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8719         use INLINE_SYSCALL.  Error number is returned, not -1.
8721         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8722         and __deallocate_stack with internal_function.
8723         * pthread_create.c: Adjust definitions appropriately.
8724         * allocatestack.c: Likewise.
8726         * pthread_join.c: Add one more __builtin_expect.
8727         * pthread_timedjoin.c: Likewise.
8729         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8730         not data of sequence number does not match.
8731         Add one __builtin_expect.
8733         * Makefile (tests): Add tst-clock1.
8734         * tst-clock1.c: New file.
8736         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8737         negative arguments.
8738         * Makefile (tests): Add tst-basic5.
8739         * tst-basic5.c: New file.
8741 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8743         * Makefile (tests): Add tst-basic4.
8744         * tst-basic4.c: New file.
8746         * pthreadP.h: Add declaraction for __nptl_nthreads.
8747         * pthread_create.c: Define __nptl_nthreads
8748         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8749         after thread is done.  If then zero, call exit(0).
8750         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8751         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8752         * init.c (pthread_functions): Initialize ptr_nthreads.
8753         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8754         (__reclaim_stacks): Decrement __nptl_nthreads.
8755         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8756         Define.
8757         * Makefile (tests): Add tst-basic3.
8758         * tst-basic3.c: New file.
8760         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8761         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8762         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8763         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8764         if asynchronous canceling is enabled.
8765         * pthread_join.c (pthread_join): When recognizing circular joins,
8766         take into account the other thread might be already canceled.
8767         * Makefile (tests): Add tst-join5.
8768         * tst-join5.c: New file.
8770         * Makefile (tests): Add tst-join4.
8771         * tst-join4.c: New file.
8773 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8775         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8777 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8779         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8780         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8781         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8782         warning.
8783         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8784         to avoid warning.
8785         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8786         error if lll_futex_wake failed.
8788 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8790         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8791         handling of cancellation and failung pthread_mutex_unlock call.
8792         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8793         * Makefile (tests): Add tst-cond8 and tst-cond9.
8794         * tst-cond8.c: New file.
8795         * tst-cond9.c: New file.
8797         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8799         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8800         non-standard initializers with __USE_GNU.
8802         * Makefile (tests): Add tst-cleanup3.
8803         * tst-cleanup3.c: New file.
8805 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8807         * Makefile (tests): Add tst-attr1 and tst-attr2.
8808         * tst-attr1.c: New file.
8809         * tst-attr2.c: New file.
8811         * Makefile: Add rules to build and run tst-atfork2 test.
8812         * tst-atfork2.c: New file.
8813         * tst-atfork2mod.c: New file.
8815         * sysdeps/unix/sysv/linux/unregister-atfork.c
8816         (__unregister_atfork): Free the memory allocated for the handlers
8817         after removing them from the lists.
8819         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8820         cleanup function.
8822         * tst-atfork1.c (do_test): Wait for the child we forked.
8823         Report error in child.
8825         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8827         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8829 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8831         * Makefile (tests): Add tst-cancel8.
8832         * tst-cancel8.c: New file.
8834         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8835         clearing of control variable.
8836         * Makefile (tests): Add tst-once3 and tst-once4.
8837         * tst-once3.c: New file.
8838         * tst-once4.c: New file.
8840 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8842         * sysdeps/sh/Makefile: New file.
8843         * sysdeps/sh/bits/atomic.h: New file.
8844         * sysdeps/sh/pthread_spin_init.c: New file.
8845         * sysdeps/sh/pthread_spin_lock.c: New file.
8846         * sysdeps/sh/pthread_spin_trylock.S: New file.
8847         * sysdeps/sh/pthread_spin_unlock.S: New file.
8848         * sysdeps/sh/pthreaddef.h: New file.
8849         * sysdeps/sh/tcb-offsets.sym: New file.
8850         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8851         * sysdeps/sh/tls.h: New file.
8852         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8853         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8854         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8855         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8856         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8857         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8858         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8859         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8860         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8861         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8862         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8863         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8864         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8865         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8866         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8867         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8868         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8869         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8870         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8871         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8872         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8873         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8874         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8875         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8876         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8877         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8878         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8879         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8880         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8881         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8883 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8885         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8886         according to POSIX.
8888         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8890 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8892         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8893         (TLS_GET_FS): New #define.
8894         (TLS_SET_FS): New #define.
8895         Correct value of __NR_set_thread_area.
8897         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8899 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8901         * Makefile (tests): Add tst-popen1.
8902         * tst-popen1.c: New file.
8904         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8905         but inactive generalization.
8906         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8907         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8908         Minor optimization, remove one instruction.
8909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8911 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8913         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8915 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8917         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8918         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8919         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8920         * sysdeps/pthread/pthread_cond_signal.c: New file.
8921         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8922         * sysdeps/pthread/pthread_cond_wait.c: New file.
8923         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8924         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8925         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8926         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8927         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8928         * sysdeps/s390/Makefile: New file.
8929         * sysdeps/s390/bits/atomic.h: New file.
8930         * sysdeps/s390/pthread_spin_init.c: New file.
8931         * sysdeps/s390/pthread_spin_lock.c: New file.
8932         * sysdeps/s390/pthread_spin_trylock.c: New file.
8933         * sysdeps/s390/pthread_spin_unlock.c: New file.
8934         * sysdeps/s390/pthreaddef.h: New file.
8935         * sysdeps/s390/tcb-offsets.sym: New file.
8936         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8937         * sysdeps/s390/tls.h: New file.
8938         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8939         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8940         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8941         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8942         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8943         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8944         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8945         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8946         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8947         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8948         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8949         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8950         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8951         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8952         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8953         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8954         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8955         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8956         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8957         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8958         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8959         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8960         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8962 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8964         * atomic.h: Add a couple more default implementations.
8965         (atomic_compare_and_exchange_acq): Use
8966         __arch_compare_and_exchange_32_acq in return value definition.  It
8967         always exists.
8968         (atomic_bit_set): Renamed from atomic_set_bit.
8969         Add missing atomic_ prefixes.
8971         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8972         thread library is available, use correct value to mark initialized
8973         once variable.
8975 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8977         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8978         __sysconf to determine pagesize.
8980         * pthread_create.c: Include <atomic.h>.
8981         * allocatestack.c (allocate_stack): Implement coloring of the
8982         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8983         size minus one.  Adjust users.
8984         * sysdeps/i386/i686/Makefile: New file.
8986 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8988         * allocatestack.c: Improve comment throughout the file.
8990         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8991         (__lll_lock_wait): Add branch prediction.
8992         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8993         (__lll_lock_wait): Likewise.
8994         (lll_unlock_wake_cb): Removed.
8996 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8998         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8999         _POSIX_THREAD_PRIORITY_SCHEDULING.
9001 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
9003         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
9004         Fix return type of ptr___pthread_getspecific.
9006 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
9008         * Makefile (tests): Add tst-umask1.
9009         (tst-umask1-ARGS): Define.
9010         * tst-umask1.c: New file.
9012 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
9014         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
9015         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
9016         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9017         pthread_rwlock_unlock.
9018         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9019         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9020         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9021         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9022         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9023         New file.
9024         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9025         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9026         New file.
9027         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9028         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9029         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9030         New file.
9031         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9032         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9033         New file.
9034         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9035         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9036         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9037         New file.
9038         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9039         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9040         New file.
9041         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9043         * Makefile (libpthread-routines): Remove lowlevelcond and
9044         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9045         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9046         and pthread_cond_broadcast.
9047         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9048         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9049         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9050         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9051         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9052         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9053         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9054         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9055         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9056         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9057         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9058         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9060         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9061         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9062         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9063         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9064         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9065         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9066         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9067         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9068         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9069         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9070         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9071         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9072         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9073         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9074         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9075         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9076         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9077         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9079         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9080         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9081         of the code is moved to ...
9082         * sysdeps/pthread/createthread.c: ...here.  New file.
9084 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9086         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9087         (__new_sem_post): Clear %eax before returning.
9088         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9090         * Makefile (tests): Add tst-cleanup2.
9091         * tst-cleanup2.c: New file.
9093         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9094         Interpret first parameter correctly.
9096 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9098         * Makefile (headers): Add bits/semaphore.h.
9100 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9102         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9103         if not SHARED.
9105 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9107         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9108         must be used and mapping failed.
9109         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9111         * Makefile (CFLAGS-pthread_self.os): Define this, not
9112         CFLAGS-pthread_self.c.
9114 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9116         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9117         lll_unlock_wake_cb.
9119         * Makefile (libpthread-routines): Add version.  Add rules to build
9120         version.os and banner.h.
9121         * version.c: New file.
9123 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9125         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9126         the alias unconditional.
9127         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9129 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9131         * Makefile (CFLAGS-pthread_self.c): New definition.
9133 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9135         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9136         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9137         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9138         * init.c (__pthread_initialize_minimal_internal): Likewise.
9140 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9142         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9144         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9145         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9146         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9147         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9148         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9149         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9151 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9153         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9154         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9155         * tst-cancel-wrappers.sh: Remove all exceptions.
9157 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9159         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9160         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9162         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9163         Use __libc_pthread_functions array if SHARED.
9165         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9166         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9168         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9169         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9170         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9171         __libc_ptf_call instead of __libc_maybe_call.
9172         (PTF): New #define.
9173         (__libc_cleanup_region_start): Wrap function name with PTF call.
9174         (__libc_cleanup_region_end): Likewise.
9175         (__libc_cleanup_end): Likewise.
9177         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9178         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9179         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9180         * pthreadP.h: Add prototypes.
9182         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9183         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9184         __pthread_rwlock_unlock aliases.
9185         * pthreadP.h: Add prototypes for new aliases.
9187         * pthreadP.h (struct pthead_functions): Moved to...
9188         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9189         * init.c (pthread_functions): Add initializers for new elements.
9191         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9192         __pthread_cleanup_pop_restore aliases.
9193         * pthreadP.h: Add prototypes.
9195         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9196         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9197         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9198         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9199         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9200         * pthreadP.h: Adjust prototypes and callers.
9202 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9204         * Makefile (tests): Add tst-cancel7.
9205         (tst-cancel7-ARGS): New variable.
9206         * tst-cancel7.c: New file.
9208         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9209         around gcc defficiencies.
9210         * old_pthread_cond_signal.c: Likewise.
9211         * old_pthread_cond_timedwait.c: Likewise.
9212         * old_pthread_cond_wait.c: Likewise.
9214         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9216 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9218         * Makefile (tests): Add tst-cond7.
9219         * tst-cond7.c: New file.
9221         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9222         (condvar_cleanup): Get condvar address from the right place.
9224         * atomic.h: Correct definitions of atomic_full_barrier,
9225         atomic_read_barrier, atomic_write_barrier.
9227         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9228         race-free.
9229         * old_pthread_cond_signal.c: Likewise.
9230         * old_pthread_cond_timedwait.c: Likewise.
9231         * old_pthread_cond_wait.c: Likewise.
9233 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9235         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9237 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9239         * pthreadP.h (pthread_cond_2_0_t): New type.
9240         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9241         Use new type for the 2.0 condvar function prototypes.
9242         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9243         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9244         parameter.
9245         * old_pthread_cond_destroy.c: Likewise.
9246         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9247         * old_pthread_cond_signal.c: Likewise.
9248         * old_pthread_cond_timedwait.c: Likewise.
9249         * old_pthread_cond_wait.c: Likewise.
9251         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9252         (__pthread_cond_wait): Don't save cancellation mode and seq value
9253         in same location.
9255         * herrno.c (__h_errno_location): Don't define as weak.
9257 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9259         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9260         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9261         and pthread_cond_wait.
9262         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9263         Renamed to...
9264         (__pthread_cond_broadcast_2_0): ... this.
9265         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9266         Renamed to...
9267         (__pthread_cond_destroy_2_0): ... this.
9268         * old_pthread_cond_init.c (__old_pthread_cond_init):
9269         Renamed to...
9270         (__pthread_cond_init_2_0): ... this.
9271         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9272         Renamed to...
9273         (__pthread_cond_signal_2_0): ... this.
9274         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9275         Renamed to...
9276         (__pthread_cond_wait_2_0): ... this.
9277         * pthread_cond_destroy.c: Include shlib-compat.h.
9278         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9279         * pthread_cond_init.c: Include shlib-compat.h.
9280         (pthread_cond_init): Change strong_alias into versioned_symbol.
9281         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9282         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9283         fields.
9284         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9285         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9286         __pthread_cond_wait_2_0): New prototypes.
9287         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9288         __old_pthread_cond_init, __old_pthread_cond_signal,
9289         __old_pthread_cond_wait): Removed.
9290         * init.c: Include shlib-compat.h.
9291         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9292         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9293         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9294         ptr___pthread_cond_*_2_0 fields.
9295         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9296         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9298         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9299         LIBC_SIGACTION was not yet defined.
9300         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9301         [!defined LIBC_SIGACTION] (__sigaction): New function and
9302         libc_hidden_weak.
9303         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9304         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9306 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9308         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9310 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9312         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9313         New, larger type definition.
9314         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9315         implementation.
9316         * Versions [libpthread]: Add definitions for new pthread_cond_*
9317         interfaces for version GLIBC_2.3.2.
9318         * pthread_cond_init.c: Update initialization for new type definition.
9319         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9320         pthread_cond_timedwait, pthread_cond_signal, and
9321         pthread_cond_broadcast.  Add old_pthread_cond_init,
9322         old_pthread_cond_destroy, old_pthread_cond_wait,
9323         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9324         old_pthread_cond_broadcast.
9325         * old_pthread_cond_broadcast.c: New file.
9326         * old_pthread_cond_destroy.c: New file.
9327         * old_pthread_cond_init.c: New file.
9328         * old_pthread_cond_signal.c: New file.
9329         * old_pthread_cond_timedwait.c: New file.
9330         * old_pthread_cond_wait.c: New file.
9331         * pthreadP.h: Add prototypes for the compatibility interfaces.
9333         * pthread_cond_destroy.c: Don't include <errno.h>.
9335 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9337         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9338         unnecessary zero offset when addressing MUTEX.
9340 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9342         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9343         __register_atfork.
9344         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9345         for __register_atfork.
9347 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9349         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9350         instead of ASSEMBLER test macro.
9352         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9353         __libc_current_sigrtmax): Add libc_hidden_def.
9355         * sysdeps/pthread/list.h: Remove assert.h include.
9357 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9359         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9360         __pthread_initialize_minimal_internal not
9361         __pthread_initialize_minimal.
9363 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9365         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9366         __pthread_initialize_minimal as hidden.
9368         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9369         constructor.
9371 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9373         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9374         $(common-objpfx)format.lds, include that into the output script.
9375         Fix comment.
9376         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9378 2002-12-28  Andreas Jaeger  <aj@suse.de>
9380         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9381         nsec resolution changes.
9382         (xstat64_conv): Likewise.
9383         (xstat32_conv): Likewise.
9384         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9385         struct kernel_stat.
9386         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9387         structs stat and stat64.
9388         * time/time.h (__timespec_defined): Define for __USE_MISC.
9389         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9391 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9393         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9394         argument.
9395         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9396         (pthread_exit): Use strong_alias to avoid warnings.
9397         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9398         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9399         ptr___pthread_attr_init_2_*.
9400         * init.c (pthread_functions): Adjust.
9402 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9404         * forward.c: Make all functions available by default again.  It
9405         caused too much trouble.
9407         * pt-siglongjmp.c: Removed.
9409 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9411         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9412         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9413         * sysdeps/i386/Makefile: New file.
9414         * sysdeps/i386/tcb-offsets.sym: New file.
9415         * sysdeps/pthread/tcb-offsets.h: New file.
9416         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9417         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9419         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9420         __register_atfork...
9421         (GLIBC_2.3.2): ...here.
9423 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9425         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9426         pthread_attr_setstackaddr with __attribute_deprecated__.
9428 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9430         * pt-system.c (system): Remove cancellation handling.
9431         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9432         cancellation routines.
9434 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9436         * descr.h: Include <dl-sysdep.h>.
9437         (struct pthread): Move header.data.list to the back of the struct.
9438         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9439         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9440         (SYSINFO_OFFSEET): Likewise.
9442 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9444         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9445         Define.
9446         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9447         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9448         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9449         (USE_DL_SYSINFO): Undef.
9451 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9453         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9454         $(common-objpfx)libc.so.
9455         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9456         it is bigger than pipe buffer size even on arches with bigger
9457         page size.
9458         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9460 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9462         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9463         correct errno access for case that USE___THREAD is not defined.
9465 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9467         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9468         Patch by Marijn Ros <marijn@mad.scientist.com>.
9470 2002-12-22  Roland McGrath  <roland@redhat.com>
9472         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9474 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9476         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9478 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9480         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9481         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9482         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9484         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9485         of int $0x80.
9486         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9487         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9488         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9489         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9490         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9491         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9492         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9493         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9495         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9496         sysenter.
9497         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9499         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9501         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9502         in new TCB.
9503         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9504         that sysinfo is properly initialized.
9505         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9506         to 1 only for ld.so.
9508         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9509         RTLD_CORRECT_DYNAMIC_WEAK.
9511 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9513         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9514         Use return 0 as 6th argument to FORWARD4.
9515         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9517 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9519         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9520         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9521         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9522         (INIT_SYSINFO): New #define.
9523         (TLS_TP_INIT): Use INIT_SYSINFO.
9524         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9525         At test to make sure SYSINFO_OFFSET value is correct.
9526         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9528 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9530         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9531         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9532         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9533         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9534         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9535         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9536         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9538 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9540         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9541         macro instead of using int $0x80 directly.
9543         * sysdeps/pthread/bits/stdio-lock.h: New file.
9544         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9545         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9546         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9547         * Makefile (routines): Add libc-lowlevelmutex.
9549         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9550         __i686.get_pc_thunk.dx.
9552 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9554         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9555         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9556         ($(objpfx)tst-cancel-wrappers.out): New rule.
9557         * tst-cancel-wrappers.sh: New test.
9558         * tst-locale1.c: Include signal.h.
9559         (uselocale): Test static linking of __libc_current_sigrt*.
9561 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9563         * Makefile (tests): Add tst-cancel6.
9564         * tst-cancel6.c: New file
9566 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9568         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9569         Define meaningfully for assembler as well.
9570         * pthreadP.h (struct pthread_functions): Remove
9571         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9572         and ptr_pthread_attr_init_2_1 fields.
9573         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9574         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9575         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9576         (FORWARD3): Define using FORWARD4.
9577         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9578         versions.
9579         * pt-system.c: Remove duplicate stdlib.h include.
9581 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9583         * sem_init.c: Define sem_init@GLIBC_2.0.
9584         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9585         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9587         * flockfile.c: Moved to...
9588         * sysdeps/pthread/flockfile.c: ...here.  New file.
9589         * funlockfile.c: Moved to...
9590         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9591         * ftrylockfile.c: Moved to...
9592         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9594 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9596         * libc-cancellation.c: Guard both function with
9597         #if !defined NOT_IN_libc.
9598         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9599         automatically provided pthread wrappers.
9600         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9601         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9602         nor in libpthread.
9603         * pt-open.c: Removed.
9604         * pt-fcntl.c: Removed.
9605         * pt-fsync.c: Removed.
9606         * pt-lseek.c: Removed.
9607         * pt-msgrcv.c: Removed.
9608         * pt-msgsnd.c: Removed.
9609         * pt-msync.c: Removed.
9610         * pt-nanosleep.c: Removed.
9611         * pt-open64.c: Removed.
9612         * pt-pause.c: Removed.
9613         * pt-pread.c: Removed.
9614         * pt-pread64.c: Removed.
9615         * pt-pwrite.c: Removed.
9616         * pt-pwrite64.c: Removed.
9617         * pt-read.c: Removed.
9618         * pt-recv.c: Removed.
9619         * pt-recvfrom.c: Removed.
9620         * pt-recvmsg.c: Removed.
9621         * pt-send.c: Removed.
9622         * pt-sendto.c: Removed.
9623         * pt-sigtimedwait.c: Removed.
9624         * pt-sigwait.c: Removed.
9625         * pt-wait.c: Removed.
9626         * pt-waitpid.c: Removed.
9627         * pt-write.c: Removed.
9628         * pt-accept.c: Removed.
9629         * pt-close.c: Removed.
9630         * pt-connect.c: Removed.
9631         * pt-lseek64.c: Removed.
9632         * pt-sendmsg.c: Removed.
9633         * pt-tcdrain.c: Removed.
9635 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9637         * init.c (__pthread_initialize_minimal_internal): Renamed from
9638         __pthread_initialize_minimal.  Make old name an alias.  This
9639         converts a normal relocation into a relative relocation.
9641         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9643         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9644         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9645         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9646         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9647         pt-sigwaitinfo, pt-waitid, and pt-writev.
9648         * pt-creat.c: Removed.
9649         * pt-poll.c: Removed.
9650         * pt-pselect.c: Removed.
9651         * pt-readv.c: Removed.
9652         * pt-select.c: Removed.
9653         * pt-sigpause.c: Removed.
9654         * pt-sigsuspend.c: Removed.
9655         * pt-sigwaitinfo.c: Removed.
9656         * pt-waitid.c: Removed.
9657         * pt-writev.c: Removed.
9659         * init.c (pthread_functions): New variable.
9660         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9661         (or NULL) to __libc_pthread_init.
9662         * forward.c: Rewrite to use __libc:pthread_functions array to get
9663         function addresses.
9664         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9665         prototype.
9666         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9667         Take new parameter.  Copy content of variable pointed to by it
9668         to __libc_pthread_init.
9670         * pthreadP.h (struct pthread_functions): New type.
9671         (__libc_pthread_init): Declare.
9673         * pthread_attr_destroy.c: Add namespace protected alias.
9674         * pthread_attr_getdetachstate.c: Likewise.
9675         * pthread_attr_getinheritsched.c: Likewise.
9676         * pthread_attr_getschedparam.c: Likewise.
9677         * pthread_attr_getschedpolicy.c: Likewise.
9678         * pthread_attr_getscope.c: Likewise.
9679         * pthread_attr_setdetachstate.c: Likewise.
9680         * pthread_attr_setinheritsched.c: Likewise.
9681         * pthread_attr_setschedparam.c: Likewise.
9682         * pthread_attr_setschedpolicy.c: Likewise.
9683         * pthread_attr_setscope.c: Likewise.
9684         * pthread_cond_broadcast.c: Likewise.
9685         * pthread_cond_destroy.c: Likewise.
9686         * pthread_cond_init.c: Likewise.
9687         * pthread_cond_signal.c: Likewise.
9688         * pthread_cond_wait.c: Likewise.
9689         * pthread_condattr_destroy.c: Likewise.
9690         * pthread_condattr_init.c: Likewise.
9691         * pthread_equal.c: Likewise.
9692         * pthread_exit.c: Likewise.
9693         * pthread_getschedparam.c: Likewise.
9694         * pthread_self.c: Likewise.
9695         * pthread_setcancelstate.c: Likewise.
9696         * pthread_setschedparam.c: Likewise.
9697         * pthread_mutex_destroy.c: Likewise.
9698         * pthread_mutex_init.c: Likewise.
9699         * pthreadP.h: Add prototypes for the aliases.
9701         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9702         multiple_threads member in correct TCB to 1.
9704         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9705         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9706         member of thread decriptor, otherwise return unconditionally 1.
9708 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9710         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9711         regular Linux version.  Remove file.
9712         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9713         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9714         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9715         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9716         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9717         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9718         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9719         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9720         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9721         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9722         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9723         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9724         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9725         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9726         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9727         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9728         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9729         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9730         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9731         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9732         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9733         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9734         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9735         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9736         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9737         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9738         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9739         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9740         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9741         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9743 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9745         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9746         * sysdeps/unix/sysv/linux/open.c: Removed.
9747         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9748         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9749         * sysdeps/unix/sysv/linux/msync.c: Removed.
9750         * sysdeps/unix/sysv/linux/read.c: Removed.
9751         * sysdeps/unix/sysv/linux/close.c: Removed.
9752         * sysdeps/unix/sysv/linux/creat.c: Removed.
9753         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9754         * sysdeps/unix/sysv/linux/pause.c: Removed.
9755         * sysdeps/unix/sysv/linux/select.c: Removed.
9756         * sysdeps/unix/sysv/linux/write.c: Removed.
9758 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9760         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9761         element in TCB to see whether locking is needed.
9763         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9764         MULTIPLE_THREADS_OFFSET value is correct.
9766         * sysdeps/unix/sysv/linux/close.c: New file.
9767         * sysdeps/unix/sysv/linux/connect.S: New file.
9768         * sysdeps/unix/sysv/linux/creat.c: New file.
9769         * sysdeps/unix/sysv/linux/fsync.c: New file.
9770         * sysdeps/unix/sysv/linux/llseek.c: New file.
9771         * sysdeps/unix/sysv/linux/lseek.c: New file.
9772         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9773         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9774         * sysdeps/unix/sysv/linux/msync.c: New file.
9775         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9776         * sysdeps/unix/sysv/linux/open.c: New file.
9777         * sysdeps/unix/sysv/linux/open64.c: New file.
9778         * sysdeps/unix/sysv/linux/pause.c: New file.
9779         * sysdeps/unix/sysv/linux/poll.c: New file.
9780         * sysdeps/unix/sysv/linux/pread.c: New file.
9781         * sysdeps/unix/sysv/linux/pread64.c: New file.
9782         * sysdeps/unix/sysv/linux/pselect.c: New file.
9783         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9784         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9785         * sysdeps/unix/sysv/linux/readv.c: New file.
9786         * sysdeps/unix/sysv/linux/recv.S: New file.
9787         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9788         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9789         * sysdeps/unix/sysv/linux/select.c: New file.
9790         * sysdeps/unix/sysv/linux/send.S: New file.
9791         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9792         * sysdeps/unix/sysv/linux/sendto.S: New file.
9793         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9794         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9795         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9796         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9797         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9798         * sysdeps/unix/sysv/linux/system.c: New file.
9799         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9800         * sysdeps/unix/sysv/linux/wait.c: New file.
9801         * sysdeps/unix/sysv/linux/waitid.c: New file.
9802         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9803         * sysdeps/unix/sysv/linux/writev.c: New file.
9804         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9806         * pt-readv.c: Fix comment.
9808 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9810         * tst-cleanup1.c: Include stdlib.h.
9812         * tst-cancel5.c: New test.
9813         * Makefile (tests): Add tst-cancel5.
9814         (tst-cancel5): Link against libc.so libpthread.so in that order.
9816 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9818         * forward.c (test_loaded): Prevent recursive calls.
9820         * Makefile (routines): Add libc-cancellation.
9821         * libc-cancellation.c: New file.
9822         * descr.h (struct pthread): Add multiple_threads field.
9823         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9824         new thread descriptor to 1.
9825         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9826         Initialize multiple_thread field after successful thread creation.
9827         * cancellation.c (__do_cancel): Move to pthreadP.h.
9828         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9829         (__pthread_disable_asynccancel): Add internal_function attribute.
9830         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9831         * pthread_setcancelstate.c: Likewise.
9832         * pthread_setcanceltype.c: Likewise.
9833         * pthread_exit.c: Likewise.
9834         * pthreadP.h (CANCELLATION_P): Likewise.
9835         (__do_cancel): Define as static inline.
9836         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9837         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9838         declarations.
9839         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9840         fields.  Define MULTIPLE_THREADS_OFFSET.
9841         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9842         declaration.
9843         * sysdeps/unix/sysv/linux/accept.S: New file.
9844         * sysdeps/unix/sysv/linux/read.c: New file.
9845         * sysdeps/unix/sysv/linux/write.c: New file.
9846         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9847         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9848         initialization of __libc_locking_needed.
9849         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9850         __libc_locking_needed, use multiple_threads field in TCB.
9851         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9853 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9855         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9856         version.
9857         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9859         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9860         access to __libc_locking_needed for PIC.
9862 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9864         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9865         declare for libc.so.
9866         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9867         expression.
9868         (__libc_lock_lock): Put into statement expression.
9869         (__libc_lock_unlock): Remove trailing semicolon.
9870         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9872 2002-12-12  Roland McGrath  <roland@redhat.com>
9874         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9875         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9877 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9879         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9880         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9881         Initialize __libc_locking_needed.
9882         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9883         instead of __register_pthread_fork_handler.
9884         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9885         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9886         fork-gen with libc_pthread_init.
9887         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9888         of __register_pthread_fork_handler.
9889         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9890         of __register_pthread_fork_handler.
9891         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9892         __libc_locking_needed to determine whether lock prefix can be avoided.
9893         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9895 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9897         * Makefile (tests): Add tst-cleanup1.
9898         * tst-cleanup1.c: New file.
9899         * cancellation.c (__cleanup_thread): Removed.
9900         (__do_cancel): Remove call to __cleanup_thread.
9901         * pthreadP.h: Remove __cleanup_thread prorotype.
9903         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9904         Remember function and argument even if cancellation handler
9905         function is not available.
9906         (__libc_cleanup_region_end): Execute registered function directly if
9907         pthread functions are not available.
9908         (__libc_cleanup_end): Likewise.
9910         * init.c (__pthread_initialize_minimal): Fix initialization in
9911         static lib by preventing gcc from being too clever.
9913 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9915         * init.c (__pthread_initialize_minimal): Remove unneccesary
9916         sigaddset call.
9918         * Makefile (tests): We can run tst-locale2 now.
9920 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9922         * Versions: Remove duplicated sigwait entry.
9924 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9926         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9927         inside libpthread.
9929         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9931         * pthreadP.h: Declare __pthread_enable_asynccancel and
9932         __pthread_disable_asynccancel.
9933         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9934         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9935         * cancellation.c (__pthread_enable_asynccancel): New function.
9936         (__pthread_disable_asynccancel): New function.
9937         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9938         * pt-close.c: Likewise.
9939         * pt-connect.c: Likewise.
9940         * pt-creat.c: Likewise.
9941         * pt-fcntl.c: Likewise.
9942         * pt-fsync.c: Likewise.
9943         * pt-lseek.c: Likewise.
9944         * pt-lseek64.c: Likewise.
9945         * pt-msgrcv.c: Likewise.
9946         * pt-msgsnd.c: Likewise.
9947         * pt-msync.c: Likewise.
9948         * pt-nanosleep.c: Likewise.
9949         * pt-open.c: Likewise.
9950         * pt-open64.c: Likewise.
9951         * pt-pause.c: Likewise.
9952         * pt-poll.c: Likewise.
9953         * pt-pread.c: Likewise.
9954         * pt-pread64.c: Likewise.
9955         * pt-pselect.c: Likewise.
9956         * pt-pwrite.c: Likewise.
9957         * pt-pwrite64.c: Likewise.
9958         * pt-read.c: Likewise.
9959         * pt-readv.c: Likewise.
9960         * pt-recv.c: Likewise.
9961         * pt-recvfrom.c: Likewise.
9962         * pt-recvmsg.c: Likewise.
9963         * pt-select.c: Likewise.
9964         * pt-send.c: Likewise.
9965         * pt-sendmsg.c: Likewise.
9966         * pt-sendto.c: Likewise.
9967         * pt-sigpause.c: Likewise.
9968         * pt-sigsuspend.c: Likewise.
9969         * pt-sigtimedwait.c: Likewise.
9970         * pt-sigwait.c: Likewise.
9971         * pt-sigwaitinfo.c: Likewise.
9972         * pt-system.c: Likewise.
9973         * pt-tcdrain.c: Likewise.
9974         * pt-wait.c: Likewise.
9975         * pt-waitid.c: Likewise.
9976         * pt-waitpid.c: Likewise.
9977         * pt-write.c: Likewise.
9978         * pt-writev.c: Likewise.
9979         * pthread_join.c: Likewise.
9980         * pthread_timedjoin.c: Likewise.
9982         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9983         (__xpg_sigpause): New function.
9984         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9986 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9988         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9990         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9991         _GI_pthread_cleanup_pop to pthreadP.h.
9993         * ftrylockfile.c: Use _IO_lock_trylock instead of
9994         pthread_mutex_trylock.
9996         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9997         (CANCEL_RESET): Likewise.
9998         (__pthread_setcanceltype_): Declare.
9999         (__pthread_mutex_lock_internal): Declare.
10000         (__pthread_mutex_unlock_internal): Declare.
10001         (__pthread_once_internal): Declare.
10002         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
10003         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
10005         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
10006         and pthread_mutex_unlock.
10007         * pthread_cond_wait.c: Likewise.
10008         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
10009         * pthread_mutex_unlock.c: Likewise.
10011         * pthread_setcanceltype.c: Add additional alias
10012         __pthread_setcanceltype.
10014         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
10015         * sem_open.c (sem_open): Likewise.
10016         Use __libc_open, __libc_write, and __libc_close instead of
10017         open, write, and close respectively.
10019         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10020         Rewrite as statement expression since it must return a value.
10022         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10023         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10024         __pthread_kill.
10026         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10027         alias __pthread_once_internal.
10029         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10031 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10033         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10034         * tst-stdio1.c: New file.
10035         * tst-stdio2.c: New file.
10037         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10039         * Makefile (tests): Comment out tst-locale2 for now.
10040         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10042         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10043         -D_IO_MTSAFE_IO.
10044         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10045         Use _IO_lock_init instead of explicit assignment.
10047         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10048         Define __libc_lock_* and __libc_lock_recursive macros with
10049         lowlevellock macros, not pthread mutexes.
10051         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10052         of pthread_mutex_lock.
10053         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10054         instead of pthread_mutex_unlock.
10056 2002-12-06  Roland McGrath  <roland@redhat.com>
10058         * allocatestack.c (__stack_user): Use uninitialized defn.
10059         * init.c (__pthread_initialize_minimal): Initialize it here.
10061 2002-12-05  Roland McGrath  <roland@redhat.com>
10063         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10064         string.
10065         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10067         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10068         missing & here too.
10070 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10072         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10073         lowlevellock.
10074         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10075         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10076         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10077         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10078         for __libc_lock_* macros.
10079         * Makefile (routines): Add libc-lowlevellock.
10081 2002-10-09  Roland McGrath  <roland@redhat.com>
10083         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10084         Under [__PIC__], call the function via the pointer fetched for
10085         comparison rather than a call by name that uses the PLT.
10086         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10087         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10088         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10089         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10090         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10092 2002-12-04  Roland McGrath  <roland@redhat.com>
10094         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10096         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10097         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10099         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10101 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10103         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10104         a completely opaque, non-integer type.
10105         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10107 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10109         * sysdeps/i386/tls.h: Include stdlib.h.
10110         * sysdeps/x86_64/tls.h: Likewise.
10112 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10114         * Makefile (tests): Add tst-locale2.
10115         (tests-static): Likewise.
10116         * tst-locale2.c: New file.
10118         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10119         volatile and add memory clobbers to lock operations.
10121 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10123         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10124         * sysdeps/i386/i486/bits/atomic.h: New file.
10125         * sysdeps/i386/i586/bits/atomic.h: New file.
10126         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10127         include i486 version.
10128         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10129         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10130         Patch by Marijn Ros <marijn@mad.scientist.com>.
10132         * allocatestack.c (get_cached_stack): Don't crash if we first
10133         found a stack with a larger size then needed.
10134         Reported by Hui Huang <hui.huang@sun.com>.
10136         * Makefile (tests): Add tst-sysconf.
10137         * tst-sysconf.c: New file.
10139         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10140         PTHREAD_THREADS_MAX.
10142 2002-12-02  Roland McGrath  <roland@redhat.com>
10144         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10145         Declare using hidden_proto instead of attribute_hidden, so there are
10146         non-.hidden static symbols for gdb to find.
10147         (__pthread_keys): Likewise.
10148         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10149         * allocatestack.c (__stack_user): Likewise.
10150         * pthread_create.c (__pthread_keys): Likewise.
10151         (__nptl_threads_events, __nptl_last_event): Make these static instead
10152         of hidden.
10153         * pthread_key_create.c (__pthread_pthread_keys_max,
10154         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10156 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10158         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10159         statically.
10160         * tst-locale1.c: New file.
10162         * pthread_cond_timedwait.c: Include <stdlib.h>.
10164         * Makefile (tests): Add tst-fork2 and tst-fork3.
10165         * tst-fork2.c: New file.
10166         * tst-fork3.c: New file.
10168 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10170         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10172         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10173         require it to 200112L.
10175         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10176         instruction only if HAVE_CMOV is defined.
10177         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10179         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10181         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10183         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10185         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10187 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10189         * sysdeps/x86_64/bits/atomic.h: New file.
10191         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10192         16-bit operations.
10194         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10195         possible since gettid cannot fail.
10197         * sysdeps/x86_64/pthreaddef.h: New file.
10199         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10201         * sysdeps/x86_64/pthread_spin_init.c: New file.
10202         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10203         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10204         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10206         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10207         Add missing lock prefix.  Minute optimization.
10209         * tst-spin2.c (main): Also check successful trylock call.
10211         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10212         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10214         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10215         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10217         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10218         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10219         value in case of an error.  Add support for INTERNAL_SYSCALL.
10221         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10222         value in case of an error.
10224         * sysdeps/x86_64/tls.h: New file.
10226 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10228         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10229         takes the array member name and the index as parameters.
10230         (THREAD_SETMEM_NC): Likewise.
10231         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10232         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10233         interfaces.
10235         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10236         to decide which code to use.
10237         (THREAD_SETMEM_NC): Likewise.
10239         * allocatestack.c (queue_stack): Don't remove stack from list here.
10240         Do it in the caller.  Correct condition to prematurely terminate
10241         loop to free stacks.
10242         (__deallocate_stack): Remove stack from list here.
10244 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10246         * Makefile (tests): Add tst-stack1.
10247         * tst-stack1.c: New file.
10249         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10250         provided stack.
10252         * pthread_attr_getstack.c: Return bottom of the thread area.
10254 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10256         * Makefile (libpthread-routines): Add pt-allocrtsig and
10257         pthread_kill_other_threads.
10258         * pt-allocrtsig.c: New file.
10259         * pthread_kill_other_threads.c: New file.
10260         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10261         all three functions.
10262         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10263         allocrtsig.
10264         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10265         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10266         and __libc_allocate_rtsig_private.
10267         * Versions (libpthread): Export pthread_kill_other_threads_np,
10268         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10270 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10272         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10273         the end of the stack.  Adjust computations.
10274         When mprotect call fails dequeue stack and free it.
10275         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10276         attribute.
10277         * pthread_getattr_np.c: Likewise.
10279         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10280         surprises.
10282 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10284         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10285         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10287 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10289         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10290         * pthread_setspecific.c: Likewise.
10292 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10294         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10295         definitions.  Get them from the official place.
10296         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10298         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10299         Use new CLONE_ flags in clone() calls.
10301         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10302         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10304         * Versions: Add pthread_* functions for libc.
10305         * forward.c: New file.
10307         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10308         errno-loc.
10309         * herrno.c: New file.
10310         * res.c: New file.
10312         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10313         sem_trywait, and sem_timedwait.  Add herrno and res.
10314         * sem_init.c: Don't initialize lock and waiters members.
10315         * sem_open.c: Likewise.
10316         * sem_post.c: Removed.
10317         * sem_wait.c: Removed.
10318         * sem_trywait.c: Removed.
10319         * sem_timedwait.c: Removed.
10320         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10321         Includes full implementations of sem_post, sem_wait, sem_trywait,
10322         and sem_timedwait.
10323         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10324         for new implementation.
10325         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10326         and waiters fields.
10328         * tst-sem3.c: Improve error message.
10329         * tst-signal3.c: Likewise.
10331         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10332         to tell the kernel about the termination futex and to initialize tid
10333         member.  Don't initialize main_thread.
10334         * descr.h (struct pthread): Remove main_thread member.
10335         * cancelllation.c (__do_cancel): Remove code handling main thread.
10336         The main thread is not special anymore.
10338         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10339         size of the stacks to stack_cache_actsize.
10341         * pt-readv.c: Add missing "defined".
10342         * pt-sigwait.c: Likewise.
10343         * pt-writev.c: Likewise.
10345 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10347         * Versions: Export __connect from libpthread.
10348         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10350         * Makefile (libpthread-routines): Add pt-raise.
10351         * sysdeps/unix/sysv/linux/raise.c: New file.
10352         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10353         * sysdeps/generic/pt-raise.c: New file.
10355         * pthread_cond_init.c: Initialize all data elements of the condvar
10356         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10358         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10359         * pthread_create.c: Likewise.
10361         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10362         * tst-key1.c: New file.
10363         * tst-key2.c: New file.
10364         * tst-key3.c: New file.
10366         * Versions: Export pthread_detach for version GLIBC_2.0.
10367         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10369 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10371         * pthread_key_create.c: Terminate search after an unused key was found.
10372         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10374         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10375         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10377 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10379         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10380         dynamic lookup for errno in PIC.
10382         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10383         release the stack lock as soon as possible.
10384         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10385         the static TLS block.
10386         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10388         * cancellation.c: Renamed from cancelation.c.
10389         * Makefile: Adjust accordingly.
10390         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10391         * cleanup_defer.c: Use CANCELLATION_P.
10392         * pthread_testcancel.c: Likewise.
10393         * descr.h: Fix spelling in comments.
10394         * init.c: Likewise.
10395         * pthread_getattr_np.c: Likewise.
10396         * pthread_getschedparam.c: Likewise.
10397         * pthread_setschedparam.c: Likewise.
10398         * Versions: Likewise.
10400         * pt-pselect.c: New file.
10401         * Makefile (libpthread-routines): Add pt-pselect.
10402         * Versions: Add pselect.
10404         * tst-cancel4.c: New file.
10405         * Makefile (tests): Add tst-cancel4.
10407 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10409         * pthread_mutex_lock.c: Always record lock ownership.
10410         * pthread_mutex_timedlock.c: Likewise.
10411         * pthread_mutex_trylock.c: Likewise.
10413         * pt-readv.c: New file.
10414         * pt-writev.c: New file.
10415         * pt-creat.c: New file.
10416         * pt-msgrcv.c: New file.
10417         * pt-msgsnd.c: New file.
10418         * pt-poll.c: New file.
10419         * pt-select.c: New file.
10420         * pt-sigpause.c: New file.
10421         * pt-sigsuspend.c: New file.
10422         * pt-sigwait.c: New file.
10423         * pt-sigwaitinfo.c: New file.
10424         * pt-waitid.c: New file.
10425         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10426         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10427         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10428         * Versions: Add all the new functions.
10430         * tst-exit1.c: New file.
10431         * Makefile (tests): Add tst-exit1.
10433         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10435 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10437         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10439         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10440         call.  pthread_join is an official cancellation point.
10441         * pthread_timedjoin.c: Likewise.
10443         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10444         and the condvar's mutex are retrieved.
10445         * pthread_cond_timedwait.c: Likewise.
10446         Reported by dice@saros.East.Sun.COM.
10448 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10450         * pthreadP.h: Cut out all type definitions and move them...
10451         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10452         * pthreadP.h: Include <internaltypes.h>.
10454         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10455         performance tweaks.
10457         * sem_trywait.c: Shuffle #includes around to get right order.
10458         * sem_timedwait.c: Likewise.
10459         * sem_post.c: Likewise.
10460         * sem_wait.c: Likewise.
10462         * nptl 0.3 released.
10464         * Makefile (tests): Add tst-signal3.
10465         * tst-signal3.c: New file.
10467 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10469         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10470         the asms modify the sem object.
10471         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10473         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10474         the actual members.
10475         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10476         * semaphoreP.h: Include pthreadP.h.
10477         * sem_getvalue.c: Adjust to sem_t change.
10478         * sem_init.c: Likewise.
10479         * sem_open.c: Likewise.
10480         * sem_post.c: Likewise.
10481         * sem_timedwait.c: Likewise.
10482         * sem_trywait.c: Likewise.
10483         * sem_wait.c: Likewise.
10485 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10487         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10488         * tst-basic2.c: New file.
10489         * tst-exec1.c: New file.
10490         * tst-exec2.c: New file.
10491         * tst-exec3.c: New file.
10493         * tst-fork1.c: Remove extra */.
10495         * nptl 0.2 released.  The API for IA-32 is complete.