* nscd/grpcache.c (cache_addgr): Correctly compute size of
[glibc.git] / nptl / ChangeLog
blob744f90d78631798fb8b615c221a49deb9977a5d5
1 2008-06-12  Ulrich Drepper  <drepper@redhat.com>
3         * sysdeps/pthread/pthread.h: Remove inadvertant checkin.
5 2008-05-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>
7         * sysdeps/pthread/pthread.h: Fix typo in comment.
9 2008-05-28  Ulrich Drepper  <drepper@redhat.com>
11         * sysdeps/pthread/createthread.c (do_clone): Pass accurate length
12         of CPU set to the kernel.
14 2008-05-23  Paul Pluzhnikov  <ppluzhnikov@google.com>
16         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Add
17         cfi directives.
18         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
19         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
20         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
21         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
22         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
23         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
25 2008-05-22  Paul Pluzhnikov  <ppluzhnikov@google.com>
27         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S: Add
28         cfi directives.
29         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
30         Likewise.
31         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
32         Likewise.
33         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
34         Likewise.
36 2008-05-26  Ulrich Drepper  <drepper@redhat.com>
38         * tst-typesizes.c: Explicitly check __SIZEOF_PTHREAD_* constants.
40 2008-05-20  Jakub Jelinek  <jakub@redhat.com>
42         David S. Miller  <davem@davemloft.net>
44         * sysdeps/unix/sysv/linux/sparc/sparc64/Makefile: New file.
46 2008-05-10  Ulrich Drepper  <drepper@redhat.com>
48         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
49         __pshared correctly.
50         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
51         Likewise.
52         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
53         Likewise.
54         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
55         Likewise.
56         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
57         Likewise.
58         Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
60 2008-04-14  David S. Miller  <davem@davemloft.net>
62         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
63         (__old_sem_wait): Fix argument to lll_futex_wait().
65 2007-11-26  Daniel Jacobowitz  <dan@codesourcery.com>
67         * pthread_create.c: Require pthread_mutex_trylock and
68         pthread_key_delete for libgcc.
70 2008-04-08  Jakub Jelinek  <jakub@redhat.com>
72         [BZ #6020]
73         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h
74         (lll_futex_wake_unlock): Add private argument to the pre-v9 macro.
75         Patch by Sunil Amitkumar Janki <devel.sjanki@gmail.com>.
77 2008-03-27  Ulrich Drepper  <drepper@redhat.com>
79         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefined ARG_MAX if
80         <linux/limits.h> has defined it.
81         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
82         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
83         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
84         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
86 2008-03-18  Jakub Jelinek  <jakub@redhat.com>
88         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Use __ASSEMBLER__ instead
89         of ASSEMBLER.
90         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
91         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Likewise.
93 2008-03-14  Ulrich Drepper  <drepper@redhat.com>
95         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
96         HAVE_DL_DISCOVER_OSVERSION.
97         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: Likewise.
98         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: Likewise.
100 2008-03-07  Ulrich Drepper  <drepper@redhat.com>
102         [BZ #5778]
103         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Change
104         _POSIX_CHOWN_RESTRICTED value to zero.
106 2008-01-31  Roland McGrath  <roland@redhat.com>
108         * Makefile (omit-deps): Variable removed.
110 2008-01-30  Ulrich Drepper  <drepper@redhat.com>
112         * sysdeps/unix/sysv/linux/x86_64/sem_post.S (sem_post): Avoid
113         unnecessary addr32 prefix.
115 2008-01-29  Roland McGrath  <roland@redhat.com>
117         * Makeconfig (ptw-CPPFLAGS, sysd-rules-patterns): New variables.
119 2008-01-22  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
121         * sysdeps/unix/sysv/linux/sh/sem_post.S: Don't overflow value field.
123 2008-01-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
125         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XADD): Use
126         a scratch register.
127         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
128         (__lll_lock_wait_private): Fix typo.
129         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
130         (pthread_barrier_wait): Likewise.  Adjust XADD use.
131         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
132         Adjust XADD use.
133         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S
134         (pthread_rwlock_timedrdlock): Return correct return value.
135         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S
136         (pthread_rwlock_timedwrlock): Likewise.
138 2008-01-15  Ulrich Drepper  <drepper@redhat.com>
140         * tst-eintr2.c (do_test): make sure that if mutex_lock in main
141         thread returns the program exits with an error code.
143 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
145         * pthread-errnos.sym: Add EOVERFLOW.
146         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
147         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
148         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
149         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
151 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
153         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
154         parameter.  Passed it as permission to mmap.
155         * allocatestack.c (allocate_stack): Pass prot as second parameter
156         to ARCH_RETRY_MMAP.
158 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
160         * tst-basic7.c: Allocate memory for the stack.
162         [BZ #5465]
163         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
164         (__pthread_cond_timedwait): Don't use VDSO.
165         Patch by Michal Januszewski.
167 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
169         [BZ #5455]
170         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
171         Allow label before pthread_cleanup_pop.
172         (pthread_cleanup_pop_restore_np): Likewise.
174 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
176         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
177         Store 2 before returning ETIMEDOUT.
179 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
181         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
182         Store 2 before returning ETIMEDOUT.
183         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
184         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
185         (__lll_lock_wait_private): Optimize.
186         (__lll_lock_wait): Likewise.
188 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
190         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
191         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
192         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
194 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
196         [BZ #5240]
197         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
198         If we time out, try one last time to lock the futex to avoid
199         losing a wakeup signal.
200         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
201         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
203         [BZ #5245]
204         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
205         if necessary.
207 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
209         [BZ #5245]
210         * allocatestack.c (allocate_stack): Change ENOMEM error in case
211         mmap failed to EAGAIN.
212         * Makefile (tests): Add tst-basic7.
213         * tst-basic7.c: New file.
215 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
217         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
218         Use __linkin_atfork.
220 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
222         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
223         missing line continuations.
224         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
225         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
227 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
229         [BZ #5220]
230         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
231         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
232         (struct timer): Add next element.
233         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
234         enqueue timer structure into __active_timer_sigev_thread list.
235         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
236         remove timer struct from __active_timer_sigev_thread.
237         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
238         Before using timer structure make sure it is still on the
239         __active_timer_sigev_thread list.  Keep lock until done.
240         Define __active_timer_sigev_thread and
241         __active_timer_sigev_thread_lock.
243 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
245         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
246         Redefine thread_atfork for use of ATFORK_MEM.
247         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
248         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
249         function.
250         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
251         Use atomic operation when removing first element of list.
253 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
255         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
256         routine instead of an alias to __new_sem_post.
258 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
260         * init.c (__pthread_initialize_minimal): Initialize word to appease
261         valgrind.
263 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
265         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
266         libc.so just clear NAME.
267         (__libc_rwlock_fini): Nop inside of libc.so.
268         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
269         all zeros.
271 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
273         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
274         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
275         unlocking failed.
276         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
278 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
280         [BZ #4938]
281         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
282         reclaimed stack if necessary.
283         * Makefile (tests): Add tst-tsd6.
284         * tst-tsd6.c: New file.
286 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
288         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
289         Add private argument.
291 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
293         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
294         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
296 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
298         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
299         (__lll_robust_timedlock): Pass private as last argument to
300         __lll_robust_timedlock_wait.
301         (__lll_unlock): Fix a pasto.
303 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
305         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
306         sparc_old_sem): New structs.
307         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
308         (__sem_wait_cleanup): New function.
309         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
310         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
311         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
312         lll_futex_wait.
313         (__old_sem_wait): New function.
314         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
315         nptl/sysdeps/unix/sysv/linux/sparc version.
316         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
317         Likewise.
318         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
319         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
320         (__new_sem_trywait): Use sparc_old_sem structure.
321         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
322         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
323         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
324         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
325         lll_futex_timed_wait.
326         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
327         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
328         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
329         lll_futex_wake.
330         (__old_sem_post): New function.
331         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
332         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
333         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
334         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
335         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
336         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
338 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
340         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
341         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
342         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
343         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
344         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
345         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
346         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
347         Use FUTEX_WAKE_OP.
348         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
349         kernel-features.h and tcb-offsets.h.
350         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
351         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
352         process private.
353         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
354         tcb-offsets.h.
355         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
356         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
357         process private.
358         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
359         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
361         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
362         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
363         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
364         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
366 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
368         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
369         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
370         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
371         lll_futex_timed_wait.
373         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
374         __lll_robust_unlock): Rewrite as macros instead of inline functions.
375         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
376         __lll_robust_unlock, __lll_wait_tid): Likewise.
378 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
380         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
381         Fix a pasto.
382         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
383         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
384         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
385         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
387         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
388         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
389         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
390         kernel-features.h.
391         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
392         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
393         process private.  Switch DW_CFA_advance_loc1 and some
394         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
395         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
396         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
397         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
398         process private.  Switch DW_CFA_advance_loc{1,2} and some
399         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
400         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
401         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
402         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
403         Likewise.
404         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
406         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
407         Likewise.
408         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
409         (__pthread_cond_broadcast): Compare %r8 instead of
410         dep_mutex-cond_*(%rdi) with $-1.
411         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
412         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
413         of oring.
415 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
417         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
419 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
421         * allocatestack.c: Include kernel-features.h.
422         * pthread_create.c: Likewise.
423         * pthread_mutex_init.c: Likewise.
424         * init.c: Likewise.
425         * pthread_cond_timedwait.c: Likewise.
426         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
427         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
429         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
430         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
431         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
432         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
433         Likewise.
434         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
435         Likewise.
436         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
437         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
438         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
439         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
441 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
443         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
444         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
445         byte elements.  One of them is the new __shared element.
446         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
447         adjust names of other padding elements.
448         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
449         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
450         byte elements.  One of them is the new __shared element.
451         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
452         adjust names of other padding elements.
453         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
454         Renamed __pad1 element to __shared, adjust names of other padding
455         elements.
456         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
457         (pthread_rwlock_t): Likewise.
458         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
459         typo.
461 2007-08-09  Anton Blanchard  <anton@samba.org>
463         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
465 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
467         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
468         <kernel-features.h>.
469         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
471 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
473         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
474         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
475         dealing with robust mutexes.
476         * pthread_mutex_timedlock.c: Likewise.
477         * pthread_mutex_trylock.c: Likewise.
478         * pthread_mutex_unlock.c: Likewise.
479         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
481 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
483         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
484         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
485         (PTHREAD_MUTEX_PSHARED): Define.
486         * pthread_mutex_init.c (__pthread_mutex_init): Set
487         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
488         mutexes.
489         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
490         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
491         as second argument to lll_lock.
492         (LLL_MUTEX_TRYLOCK): Take mutex as argument
493         instead of its __data.__lock field.
494         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
495         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
496         to lll_robust_lock.
497         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
498         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
499         instead of mutex->__data.__kind directly, pass
500         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
501         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
502         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
503         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
504         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
505         to lll_timedlock, lll_robust_timedlock, lll_unlock and
506         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
507         of mutex->__data.__kind directly.
508         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
509         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
510         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
511         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
512         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
513         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
514         and lll_futex_wake.
515         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
516         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
517         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
518         directly.
519         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
520         Take mutex as argument instead of its __data.__lock field, pass
521         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
522         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
523         __data.__lock field.
524         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
525         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
526         to lll_robust_cond_lock.
527         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
528         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
529         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
530         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
531         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
532         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
533         lll_futex_wait.
534         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
535         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
536         lll_futex_wake.
537         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
538         pshared variable, pass it to lll_lock, lll_unlock,
539         lll_futex_timedwait and lll_futex_wake.
540         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
541         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
542         and lll_futex_wake.
543         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
544         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
545         macro.
546         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
547         lll_futex_wake_unlock): Likewise.
548         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
549         Likewise.
550         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
551         lll_futex_wake_unlock): Likewise.
552         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
553         Likewise.
554         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
555         lll_futex_wake_unlock): Likewise.
556         (lll_futex_wake): Fix a typo.
557         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
558         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
559         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
560         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
561         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
562         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
563         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
564         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
565         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
566         (__pthread_cond_timedwait): Likewise.
567         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
568         (__condvar_cleanup, __pthread_cond_wait): Likewise.
570 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
572         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
573         Don't use CGOTSETUP and CGOTRESTORE macros.
574         (CGOTSETUP, CGOTRESTORE): Remove.
575         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
576         @local symbol.
578 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
580         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
581         definitions for private futexes.
582         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
583         kernel-features.h and lowlevellock.h.  Use private futexes if
584         they are available.
585         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
586         (__lll_mutex_lock_wait): Rename to
587         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
588         (__lll_mutex_timedlock_wait): Rename to ...
589         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
590         Don't compile in for libc.so.
591         (__lll_mutex_unlock_wake): Rename to ...
592         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
593         (__lll_timedwait_tid): Use __NR_gettimeofday.
594         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
595         the header from assembler.  Renamed all lll_mutex_* resp.
596         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
597         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
598         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
599         Define.
600         (__lll_lock_wait_private): Add prototype.
601         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
602         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
603         __lll_unlock_wake): Likewise.
604         (lll_lock): Add private argument.  Call __lll_lock_wait_private
605         if private is constant LLL_PRIVATE.
606         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
607         lll_timedlock, lll_robust_timedlock): Add private argument.
608         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
609         if private is constant LLL_PRIVATE.
610         (lll_robust_unlock, lll_robust_dead): Add private argument.
611         (lll_lock_t): Remove.
612         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
613         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
614         lll_cond_wake, lll_cond_broadcast): Remove.
615         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
616         kernel-features.h and lowlevellock.h.
617         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
618         (LOAD_FUTEX_WAIT): Define.
619         (__lll_robust_mutex_lock_wait): Rename to ...
620         (__lll_robust_lock_wait): ... this.  Add private argument.
621         Use LOAD_FUTEX_WAIT macro.
622         (__lll_robust_mutex_timedlock_wait): Rename to ...
623         (__lll_robust_timedlock_wait): ... this.    Add private argument.
624         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
625         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
626         lowlevellock.h.
627         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
628         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
629         __lll_mutex_{lock,unlock}_*.
630         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
631         lowlevellock.h and pthread-errnos.h.
632         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
633         FUTEX_CMP_REQUEUE, EINVAL): Remove.
634         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
635         __lll_mutex_{lock,unlock}_*.
636         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
637         lowlevellock.h and pthread-errnos.h.
638         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
639         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
640         __lll_mutex_{lock,unlock}_*.
641         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
642         lowlevellock.h.
643         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
644         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
645         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
646         (__condvar_tw_cleanup): Likewise.
647         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
648         lowlevellock.h.
649         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
650         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
651         __lll_mutex_{lock,unlock}_*.
652         ( __condvar_w_cleanup): Likewise.
653         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
654         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
655         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
656         lowlevellock.h.
657         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
658         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
659         __lll_mutex_{lock,unlock}_*.
660         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
661         lowlevellock.h.
662         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
663         FUTEX_PRIVATE_FLAG): Remove.
664         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
665         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
666         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
667         lowlevellock.h.
668         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
669         FUTEX_PRIVATE_FLAG): Remove.
670         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
671         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
672         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
673         lowlevellock.h.
674         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
675         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
676         __lll_mutex_{lock,unlock}_*.
677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
678         lowlevellock.h.
679         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
680         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
681         __lll_mutex_{lock,unlock}_*.
682         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
683         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
684         (__new_sem_post): Use standard initial exec code sequences.
685         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
686         lowlevellock.h.
687         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
688         FUTEX_PRIVATE_FLAG): Remove.
689         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
690         exec code sequences.
691         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
692         (__new_sem_trywait): Use standard initial exec code sequences.
693         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
694         (__new_sem_wait): Use standard initial exec code sequences.
696 2007-07-31  Anton Blanchard  <anton@samba.org>
698         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
699         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
700         atomic_full_barrier.
702 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
704         * allocatestack.c (stack_cache_lock): Change type to int.
705         (get_cached_stack, allocate_stack, __deallocate_stack,
706         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
707         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
708         as second argument to lll_lock and lll_unlock macros on
709         stack_cache_lock.
710         * pthread_create.c (__find_in_stack_list): Likewise.
711         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
712         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
713         as second argument.
714         * descr.h (struct pthread): Change lock and setxid_futex field
715         type to int.
716         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
717         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
718         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
719         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
720         Likewise.
721         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
722         * pthread_cond_init.c (__pthread_cond_init): Likewise.
723         * pthreadP.h (__attr_list_lock): Change type to int.
724         * pthread_attr_init.c (__attr_list_lock): Likewise.
725         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
726         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
727         lll_{,un}lock.
728         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
729         also for lll_futex_{wake,wait}.
730         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
731         a pointer to const.
732         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
733         LLL_SHARED as second argument to lll_{,un}lock.
734         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
735         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
736         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
737         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
738         Likewise.
739         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
740         as second argument to lll_{,un}lock macros on pd->lock.
741         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
742         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
743         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
744         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
745         Likewise.
746         * sysdeps/pthread/createthread.c (do_clone, create_thread):
747         Likewise.
748         * pthread_once.c (once_lock): Change type to int.
749         (__pthread_once): Pass LLL_PRIVATE as second argument to
750         lll_{,un}lock macros on once_lock.
751         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
752         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
753         rwlock->__data.__shared as second argument to them and similarly
754         for lll_futex_w*.
755         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
756         Likewise.
757         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
758         Likewise.
759         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
760         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
761         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
762         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
763         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
764         to lll_{,un}lock macros on __sem_mappings_lock.
765         * sem_open.c (check_add_mapping): Likewise.
766         (__sem_mappings_lock): Change type to int.
767         * semaphoreP.h (__sem_mappings_lock): Likewise.
768         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
769         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
770         instead of lll_*mutex_*, pass LLL_SHARED as last
771         argument.
772         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
773         pass LLL_SHARED as last argument.
774         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
775         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
776         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
777         pass LLL_SHARED as last argument.
778         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
779         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
780         LLL_SHARED as last argument.
781         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
782         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
783         Similarly.
784         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
785         __libc_lock_lock_recursive, __libc_lock_unlock,
786         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
787         argument to lll_{,un}lock.
788         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
789         _IO_lock_unlock): Likewise.
790         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
791         compound literal.
792         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
793         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
794         __fork_lock.
795         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
796         free_mem): Likewise.
797         (__fork_lock): Change type to int.
798         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
799         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
800         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
801         lll_futex_wake.
802         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
803         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
804         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
805         New function.
806         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
807         pass it through to lll_futex_*wait, only compile in when
808         IS_IN_libpthread.
809         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
810         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
811         argument and pass it through to lll_futex_*wait.
812         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
813         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
814         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
815         inline functions to __lll_* resp. __lll_robust_*.
816         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
817         (lll_mutex_dead): Add private argument.
818         (__lll_lock_wait_private): New prototype.
819         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
820         __lll_robust_lock_timedwait): Add private argument to prototypes.
821         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
822         call __lll_lock_wait_private, otherwise pass private to
823         __lll_lock_wait.
824         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
825         __lll_robust_timedlock): Add private argument, pass it to
826         __lll_*wait functions.
827         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
828         call __lll_unlock_wake_private, otherwise pass private to
829         __lll_unlock_wake.
830         (__lll_robust_unlock): Add private argument, pass it to
831         __lll_robust_unlock_wake.
832         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
833         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
834         argument, pass it through to __lll_* inline function.
835         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
836         (lll_lock_t): Remove.
837         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
838         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
839         lll_cond_wake, lll_cond_broadcast): Remove.
840         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
841         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
842         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
843         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
844         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
845         the header from assembler.  Renamed all lll_mutex_* resp.
846         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
847         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
848         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
849         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
850         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
851         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
852         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
853         Remove prototype.
854         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
855         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
856         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
857         (lll_trylock): Likewise, use __lll_trylock_asm, pass
858         MULTIPLE_THREADS_OFFSET as another asm operand.
859         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
860         MULTIPLE_THREADS_OFFSET as last asm operand, call
861         __lll_lock_wait_private if private is constant LLL_PRIVATE,
862         otherwise pass private as another argument to __lll_lock_wait.
863         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
864         lll_timedlock, lll_robust_timedlock): Add private argument, pass
865         private as another argument to __lll_*lock_wait call.
866         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
867         MULTIPLE_THREADS_OFFSET as another asm operand, call
868         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
869         otherwise pass private as another argument to __lll_unlock_wake.
870         (lll_robust_unlock): Add private argument, pass private as another
871         argument to __lll_unlock_wake.
872         (lll_robust_dead): Add private argument, use __lll_private_flag
873         macro.
874         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
875         LLL_MUTEX_LOCK_INITIALIZER.
876         (lll_lock_t): Remove.
877         (LLL_LOCK_INITIALIZER_WAITERS): Define.
878         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
879         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
880         lll_cond_wake, lll_cond_broadcast): Remove.
881         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
882         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
883         2007-05-2{3,9} changes.
884         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
885         kernel-features.h and lowlevellock.h.
886         (LOAD_PRIVATE_FUTEX_WAIT): Define.
887         (LOAD_FUTEX_WAIT): Rewritten.
888         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
889         define.
890         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
891         (__lll_mutex_lock_wait): Rename to ...
892         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
893         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
894         (__lll_mutex_timedlock_wait): Rename to ...
895         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
896         contains private argument.  Don't compile in for libc.so.
897         (__lll_mutex_unlock_wake): Rename to ...
898         (__lll_unlock_wake): ... this.  %ecx contains private argument.
899         Don't compile in for libc.so.
900         (__lll_timedwait_tid): Use __NR_gettimeofday.
901         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
902         kernel-features.h and lowlevellock.h.
903         (LOAD_FUTEX_WAIT): Define.
904         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
905         define.
906         (__lll_robust_mutex_lock_wait): Rename to ...
907         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
908         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
909         macro.
910         (__lll_robust_mutex_timedlock_wait): Rename to ...
911         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
912         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
913         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
914         lowlevellock.h.
915         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
916         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
917         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
918         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
919         to __lll_lock_wait in %edx.
920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
921         Include lowlevellock.h and pthread-errnos.h.
922         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
923         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
924         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
925         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
926         pass LLL_SHARED in %ecx to both __lll_lock_wait and
927         __lll_unlock_wake.
928         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
929         Include lowlevellock.h and pthread-errnos.h.
930         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
931         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
932         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
933         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
934         pass LLL_SHARED in %ecx to both __lll_lock_wait and
935         __lll_unlock_wake.
936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
937         Include lowlevellock.h.
938         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
939         Don't define.
940         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
941         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
942         pass LLL_SHARED in %ecx to both __lll_lock_wait and
943         __lll_unlock_wake.  Use __NR_gettimeofday.
944         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
945         Include lowlevellock.h.
946         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
947         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
948         to __lll_*, pass cond_lock address in %edx rather than %ecx to
949         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
950         and __lll_unlock_wake.
951         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
952         Include lowlevellock.h.
953         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
954         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
955         MUTEX(%ebx) address in %edx rather than %ecx to
956         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
957         and __lll_unlock_wake.  Move return value from %ecx to %edx
958         register.
959         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
960         Include lowlevellock.h.
961         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
962         Don't define.
963         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
964         MUTEX(%ebp) address in %edx rather than %ecx to
965         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
966         and __lll_unlock_wake.  Move return value from %ecx to %edx
967         register.  Use __NR_gettimeofday.
968         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
969         Include lowlevellock.h.
970         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
971         Don't define.
972         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
973         MUTEX(%ebp) address in %edx rather than %ecx to
974         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
975         and __lll_unlock_wake.  Move return value from %ecx to %edx
976         register.  Use __NR_gettimeofday.
977         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
978         Include lowlevellock.h.
979         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
980         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
981         MUTEX(%edi) address in %edx rather than %ecx to
982         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
983         and __lll_unlock_wake.
984         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
985         Include lowlevellock.h.
986         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
987         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
988         MUTEX(%ebx) address in %edx rather than %ecx to
989         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
990         and __lll_unlock_wake.  Move return value from %ecx to %edx
991         register.
992         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
993         lowlevellock.h.
994         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
995         define.
996         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
997         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
998         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
999         lowlevellock.h.
1000         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
1001         (sem_timedwait): Use __NR_gettimeofday.
1002         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
1003         lowlevellock.h.
1004         (LOCK): Don't define.
1005         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
1006         lowlevellock.h.
1007         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1008         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
1009         are waiters.
1010         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
1011         2007-05-2{3,9} changes.
1012         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
1013         kernel-features.h and lowlevellock.h.
1014         (LOAD_PRIVATE_FUTEX_WAIT): Define.
1015         (LOAD_FUTEX_WAIT): Rewritten.
1016         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1017         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
1018         (__lll_mutex_lock_wait): Rename to ...
1019         (__lll_lock_wait): ... this.  %esi is now private argument.
1020         Don't compile in for libc.so.
1021         (__lll_mutex_timedlock_wait): Rename to ...
1022         (__lll_timedlock_wait): ... this.  %esi contains private argument.
1023         Don't compile in for libc.so.
1024         (__lll_mutex_unlock_wake): Rename to ...
1025         (__lll_unlock_wake): ... this.  %esi contains private argument.
1026         Don't compile in for libc.so.
1027         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
1028         kernel-features.h and lowlevellock.h.
1029         (LOAD_FUTEX_WAIT): Define.
1030         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
1031         (__lll_robust_mutex_lock_wait): Rename to ...
1032         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
1033         Use LOAD_FUTEX_WAIT macro.
1034         (__lll_robust_mutex_timedlock_wait): Rename to ...
1035         (__lll_robust_timedlock_wait): ... this. %esi argument contains
1036         private, use LOAD_FUTEX_WAIT macro.
1037         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
1038         lowlevellock.h.
1039         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1040         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
1041         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
1042         __lll_lock_wait and __lll_unlock_wake.
1043         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
1044         Include lowlevellock.h and pthread-errnos.h.
1045         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
1046         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
1047         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
1048         pass LLL_SHARED in %esi to both __lll_lock_wait and
1049         __lll_unlock_wake.
1050         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
1051         Include lowlevellock.h and pthread-errnos.h.
1052         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
1053         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
1054         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
1055         pass LLL_SHARED in %esi to both __lll_lock_wait and
1056         __lll_unlock_wake.
1057         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
1058         Include lowlevellock.h.
1059         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1060         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
1061         pass LLL_SHARED in %esi to both __lll_lock_wait and
1062         __lll_unlock_wake.
1063         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
1064         Include lowlevellock.h.
1065         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
1066         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
1067         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
1068         and __lll_unlock_wake.
1069         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
1070         Include lowlevellock.h.
1071         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1072         Don't define.
1073         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
1074         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1075         and __lll_unlock_wake.
1076         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1077         Include lowlevellock.h.
1078         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1079         Don't define.
1080         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1081         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1082         and __lll_unlock_wake.
1083         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1084         Include lowlevellock.h.
1085         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1086         Don't define.
1087         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1088         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1089         and __lll_unlock_wake.
1090         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
1091         Include lowlevellock.h.
1092         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1093         Don't define.
1094         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
1095         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
1096         and __lll_unlock_wake.
1097         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
1098         Include lowlevellock.h.
1099         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
1100         Don't define.
1101         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
1102         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
1103         and __lll_unlock_wake.
1104         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
1105         lowlevellock.h.
1106         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
1107         define.
1108         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
1109         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
1110         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
1111         lowlevellock.h.
1112         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1113         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
1114         lowlevellock.h.
1115         (LOCK): Don't define.
1116         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
1117         lowlevellock.h.
1118         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
1119         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
1120         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
1121         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
1122         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
1123         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
1124         (__lll_lock_wait_private): New function.
1125         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
1126         it to lll_futex_*wait.  Don't compile in for libc.so.
1127         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
1128         Remove.
1129         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
1130         (struct sparc_pthread_barrier): Remove.
1131         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
1132         struct sparc_pthread_barrier.  Pass
1133         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
1134         and lll_futex_wait macros.
1135         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
1136         Remove.
1137         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1138         Include sparc pthread_barrier_wait.c instead of generic one.
1140 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1142         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1144         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1145         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1146         %ecx.
1147         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1148         (pthread_rwlock_timedwrlock): Likewise.
1149         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1150         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1152 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1154         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1156 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1158         * tst-locale2.c (useless): Add return statement.
1160 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1162         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1163         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1164         * pthread_create.c (start_thread): Likewise.
1165         * init.c (sighandler_setxid): Likewise.
1166         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1167         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1168         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1169         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1170         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1171         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1172         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1173         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1174         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1175         Likewise.
1176         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1177         Likewise.
1178         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1179         Likewise.
1180         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1181         __rtld_notify): Likewise.
1182         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1183         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1184         __pthread_once): Likewise.
1185         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1186         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1187         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1188         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1189         (lll_futex_wait): Add private argument, define as wrapper around
1190         lll_futex_timed_wait.
1191         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1192         use __lll_private_flag macro.
1193         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1194         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1195         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1196         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1197         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1198         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1199         (lll_futex_wait): Add private argument, define as wrapper around
1200         lll_futex_timed_wait.
1201         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1202         use __lll_private_flag macro.
1203         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1204         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1205         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1206         Define.
1207         (lll_futex_timed_wait, lll_futex_wake): Use it.
1208         (lll_private_futex_wait, lll_private_futex_timed_wait,
1209         lll_private_futex_wake): Removed.
1210         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1211         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1212         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1213         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1214         (lll_futex_wait): Add private argument, define as wrapper around
1215         lll_futex_timed_wait.
1216         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1217         use __lll_private_flag macro.
1218         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1219         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1220         to lll_futex_*.
1221         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1222         (lll_private_futex_wait, lll_private_futex_timed_wait,
1223         lll_private_futex_wake): Removed.
1224         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1225         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1226         (lll_private_futex_wait, lll_private_futex_timed_wait,
1227         lll_private_futex_wake): Removed.
1228         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1229         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1230         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1231         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1232         (lll_futex_wait): Add private argument, define as wrapper around
1233         lll_futex_timed_wait.
1234         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1235         use __lll_private_flag macro.
1236         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1237         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1238         to lll_futex_*.
1239         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1240         Define.
1241         (lll_futex_timed_wait, lll_futex_wake): Use it.
1242         (lll_private_futex_wait, lll_private_futex_timed_wait,
1243         lll_private_futex_wake): Removed.
1245 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1247         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1248         of the structure for sparc32.
1250 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1252         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1254 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1256         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1257         code used when private futexes are assumed.
1258         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1259         Likewise.
1261 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1263         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1264         (__lll_private_flag): Define.
1265         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1266         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1267         __lll_private_flag.
1268         (lll_private_futex_wait, lll_private_futex_timedwait,
1269         lll_private_futex_wake): Define as wrapper around non-_private
1270         macros.
1271         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1272         (__lll_private_flag): Define.
1273         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1274         (lll_private_futex_wait, lll_private_futex_timedwait,
1275         lll_private_futex_wake): Define as wrapper around non-_private
1276         macros.
1278 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1280         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1281         parameter to lll_futex_wait call.
1282         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1284         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1285         Replace lll_futex_wait with lll_private_futex_wait.
1286         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1287         Add LLL_SHARED parameter to lll_futex_wake().
1289         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1290         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1291         lll_private_futex_wake.
1292         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1293         bit from private parm before syscall.
1294         (lll_futex_timed_wait): Likewise.
1295         (lll_futex_wake): Likewise.
1296         (lll_futex_wake_unlock): Likewise.
1297         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1298         (lll_robust_mutex_unlock): Likewise.
1299         (lll_mutex_unlock_force): Likewise.
1300         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1302 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1304         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1305         compilation when unconditionally using private futexes.
1306         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1307         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1308         Likewise.
1309         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1310         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1312 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1314         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1315         Define.
1317 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1319         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1320         kernel-features.h.
1322 2007-05-16  Roland McGrath  <roland@redhat.com>
1324         * init.c (__nptl_initial_report_events): New variable.
1325         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1326         to that.
1328 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1330         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1331         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1333 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1335         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1336         implementation.
1338 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1340         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1341         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1342         * pthread_mutex_timedlock.c: Likewise.
1343         * pthread_mutex_trylock.c: Likewise.
1344         * pthread_mutex_unlock.c: Likewise.
1346 2007-06-17  Andreas Schwab  <schwab@suse.de>
1348         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1349         sections.
1351 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1353         * allocatestack.c (allocate_stack): Make code compile if
1354         __ASSUME_PRIVATE_FUTEX is set.
1356 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1358         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1359         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1361         (__pthread_rwlock_wrlock): Likewise.
1362         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1363         (pthread_rwlock_timedrdlock): Likewise.
1364         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1365         (pthread_rwlock_timedwrlock): Likewise.
1366         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1367         (__pthread_rwlock_unlock): Likewise.
1369 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1371         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1372         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1373         Split __flags into __flags, __shared, __pad1 and __pad2.
1374         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1375         futexes if they are available.
1376         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1377         in libc-lowlevellock.S allow using private futexes.
1378         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1379         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1380         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1381         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1382         lll_private_futex_timed_wait and lll_private_futex_wake.
1383         (lll_robust_mutex_unlock): Fix typo.
1384         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1385         field in futex command setup.
1386         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1387         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1388         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1389         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1390         if they are available.  Remove clear_once_control.
1391         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1392         futexes if they are available.
1393         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1394         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1395         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1396         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1397         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1398         Wake only when there are waiters.
1399         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1400         support.  Indicate that there are waiters.  Remove unnecessary
1401         extra cancellation test.
1402         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1403         left-over duplication of __sem_wait_cleanup.
1405 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1407         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1408         parameter to lll_futex_wait, lll_futex_timed_wait, and
1409         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1410         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1411         lll_private_futex_wake.
1412         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1413         * allocatestack.c: Adjust use of lll_futex_* macros.
1414         * init.c: Likewise.
1415         * lowlevellock.h: Likewise.
1416         * pthread_barrier_wait.c: Likewise.
1417         * pthread_cond_broadcast.c: Likewise.
1418         * pthread_cond_destroy.c: Likewise.
1419         * pthread_cond_signal.c: Likewise.
1420         * pthread_cond_timedwait.c: Likewise.
1421         * pthread_cond_wait.c: Likewise.
1422         * pthread_create.c: Likewise.
1423         * pthread_mutex_lock.c: Likewise.
1424         * pthread_mutex_setprioceiling.c: Likewise.
1425         * pthread_mutex_timedlock.c: Likewise.
1426         * pthread_mutex_unlock.c: Likewise.
1427         * pthread_rwlock_timedrdlock.c: Likewise.
1428         * pthread_rwlock_timedwrlock.c: Likewise.
1429         * pthread_rwlock_unlock.c: Likewise.
1430         * sysdeps/alpha/tls.h: Likewise.
1431         * sysdeps/i386/tls.h: Likewise.
1432         * sysdeps/ia64/tls.h: Likewise.
1433         * sysdeps/powerpc/tls.h: Likewise.
1434         * sysdeps/pthread/aio_misc.h: Likewise.
1435         * sysdeps/pthread/gai_misc.h: Likewise.
1436         * sysdeps/s390/tls.h: Likewise.
1437         * sysdeps/sh/tls.h: Likewise.
1438         * sysdeps/sparc/tls.h: Likewise.
1439         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1440         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1441         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1442         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1443         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1444         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1445         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1446         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1447         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1448         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1449         Likewise.
1450         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1451         * sysdeps/x86_64/tls.h: Likewise.
1453 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1455         * pthread_getattr_np.c: No need to install a cancellation handler,
1456         this is no cancellation point.
1457         * pthread_getschedparam.c: Likewise.
1458         * pthread_setschedparam.c: Likewise.
1459         * pthread_setschedprio.c: Likewise.
1460         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1461         lll_unlock_wake_cb.
1462         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1463         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1464         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1465         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1466         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1467         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1468         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1469         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1470         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1471         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1472         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1473         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1475         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1476         whether there are more than one thread makes no sense here since
1477         we only call the slow path if the locks are taken.
1478         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1480         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1481         COND_NWAITERS_SHIFT.
1482         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1483         COND_CLOCK_BITS.
1484         * pthread_cond_init.c: Likewise.
1485         * pthread_cond_timedwait.c: Likewise.
1486         * pthread_cond_wait.c: Likewise.
1487         * pthread_condattr_getclock.c: Likewise.
1488         * pthread_condattr_setclock.c: Likewise.
1489         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1490         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1491         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1492         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1493         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1495 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1497         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1498         unistd.h.
1500         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1501         insn suffix.
1502         (THREAD_GSCOPE_GET_FLAG): Remove.
1503         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1504         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1505         changes.
1506         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1507         (THREAD_GSCOPE_GET_FLAG): Remove.
1508         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1509         instead of THREAD_GSCOPE_GET_FLAG.
1510         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1511         it.
1512         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1513         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1514         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1515         THREAD_GSCOPE_WAIT): Define.
1516         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1517         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1518         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1519         THREAD_GSCOPE_WAIT): Define.
1520         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1521         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1522         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1523         THREAD_GSCOPE_WAIT): Define.
1524         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1525         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1526         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1527         THREAD_GSCOPE_WAIT): Define.
1529 2007-05-24  Richard Henderson  <rth@redhat.com>
1531         * descr.h (struct pthread): Add header.gscope_flag.
1532         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1533         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1534         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1535         THREAD_GSCOPE_WAIT): Define.
1537 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1539         * init.c: Make it compile with older kernel headers.
1541         * tst-initializers1.c: Show through exit code which test failed.
1543         * pthread_rwlock_init.c: Also initialize __shared field.
1544         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1545         element in rwlock structure into four byte elements.  One of them is
1546         the new __shared element.
1547         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1548         Likewise.
1549         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1550         __shared, adjust names of other padding elements.
1551         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1552         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1553         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1554         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1555         FUTEX_PRIVATE_FLAG.
1556         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1557         futex to use private operations if possible.
1558         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1559         Likewise.
1560         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1561         Likewise.
1562         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1563         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1564         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1565         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1566         Likewise.
1567         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1568         Likewise.
1569         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1570         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1572 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1574         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1575         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1576         * pthread_rwlock_timedrdlock.c: Likewise.
1577         * pthread_rwlock_tryrdlock.c: Likewise.
1579         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1580         optimization.
1582         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1583         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1584         duplication of __sem_wait_cleanup.
1586         * allocatestack.c: Revert last change.
1587         * init.c: Likewise.
1588         * sysdeps/i386/tls.h: Likewise.
1589         * sysdeps/x86_64/tls.h: Likewise.
1590         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1591         header structure.
1592         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1594         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1595         Add private field.
1596         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1597         * pthread_barrier_init.c: Set private flag if pshared and private
1598         futexes are supported.
1599         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1600         private field in futex command setup.
1601         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1603 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1605         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1606         support.
1607         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1608         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1609         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1610         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1611         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1613         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1614         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1615         fields in the structure.
1616         (__old_sem_init): New function.
1617         * sem_open.c: Initialize all fields of the structure.
1618         * sem_getvalue.c: Adjust for renamed element.
1619         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1620         (gen-as-const-headers): Add structsem.sym.
1621         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1622         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1623         struct new_sem.  Add struct old_sem.
1624         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1625         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1626         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1627         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1628         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1629         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1630         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1631         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1632         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1633         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1634         * tst-sem10.c: New file.
1635         * tst-sem11.c: New file.
1636         * tst-sem12.c: New file.
1637         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1638         of struct sem.
1640 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1641             Jakub Jelinek  <jakub@redhat.com>
1643         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1644         Move __pthread_enable_asynccancel right before futex syscall.
1645         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1646         Likewise.
1648 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1650         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1651         THREAD_COPY_PRIVATE_FUTEX): Define.
1652         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1653         THREAD_COPY_PRIVATE_FUTEX): Define.
1654         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1655         * init.c (__pthread_initialize_minimal_internal): Use
1656         THREAD_SET_PRIVATE_FUTEX.
1658         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1659         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1660         THREAD_GSCOPE_FLAG_WAIT): Define.
1661         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1662         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1663         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1664         PTR_DEMANGLE.
1665         (THREAD_GSCOPE_GET_FLAG): Define.
1666         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1667         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1668         instead of ->header.gscope_flag directly.
1670 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1672         * init.c (__pthread_initialize_minimal_internal): Check whether
1673         private futexes are available.
1674         * allocatestack.c (allocate_stack): Copy private_futex field from
1675         current thread into the new stack.
1676         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1677         futexes if they are available.
1678         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1679         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1680         in libc-lowlevellock.S allow using private futexes.
1681         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1682         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1683         FUTEX_PRIVATE_FLAG.
1684         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1685         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1686         if they are available.
1687         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1688         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1689         * sysdeps/i386/tcb-offsets.sym: Likewise.
1690         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1691         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1693 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1695         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1696         Remove ptr_wait_lookup_done again.
1697         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1698         (__pthread_initialize_minimal_internal): Initialize
1699         _dl_wait_lookup_done pointer in _rtld_global directly.
1700         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1701         Remove code to code _dl_wait_lookup_done.
1702         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1703         encrypted for now.
1705 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1707         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1708         pthread_mutex_init failed with ENOTSUP.
1710 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1712         * allocatestack.c (__wait_lookup_done): New function.
1713         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1714         Add ptr_wait_lookup_done.
1715         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1716         * pthreadP.h: Declare __wait_lookup_done.
1717         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1718         Define macros to implement reference handling of global scope.
1719         * sysdeps/x86_64/tls.h: Likewise.
1720         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1721         Initialize GL(dl_wait_lookup_done).
1723 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1725         [BZ #4512]
1726         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1727         is detected.
1728         * pthread_mutex_timedlock.c: Likewise.
1729         * pthread_mutex_trylock.c: Likewise.
1730         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1732         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1733         * tst-robust9.c: New file.
1734         * tst-robustpi9.c: New file.
1736         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1737         unnecessary extra cancellation test.
1739 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1741         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1742         extra cancellation test.
1743         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1745 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1747         * descr.h (struct pthread): Rearrange members to fill hole in
1748         64-bit layout.
1750         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1751         (__pthread_setaffinity_new): If syscall was successful and
1752         RESET_VGETCPU_CACHE is defined, use it before returning.
1753         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1755 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1757         [BZ #4455]
1758         * tst-align2.c: Include stackinfo.h.
1759         * tst-getpid1.c: Likewise.
1761 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1763         [BZ #4455]
1764         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1765         * tst-getpid1.c (do_test): Likewise.
1767         [BZ #4456]
1768         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1769         (allocate_stack): Likewise.
1771 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1773         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1774         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1775         (__lll_robust_timedlock_wait): Likewise.
1776         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1778 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1780         [BZ #4465]
1781         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1782         * tst-cancel4.c (tf_fdatasync): New test.
1784 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1786         [BZ #4392]
1787         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1788         check mutexes like normal mutexes.
1790         [BZ #4306]
1791         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1792         Initialize the whole sigevent structure to appease valgrind.
1794 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1796         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1797         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1799 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1801         * tst-locale1.c: Avoid warnings.
1802         * tst-locale2.c: Likewise.
1804 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1806         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1807         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1809 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1811         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1812         __extern_always_inline where appropriate.
1813         * sysdeps/pthread/pthread.h: Likewise.
1815 2007-03-13  Richard Henderson  <rth@redhat.com>
1817         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1818         separate cfi regions for the two subsections.
1820 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1822         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1823         new thread, don't just decrement it.
1824         Patch by Suzuki K P <suzuki@in.ibm.com>.
1826 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1828         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1829         PTHFCT_CALL definition.
1831 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1833         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1834         available, don't use it.
1836 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1838         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1839         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1840         call into the kernel to delay.
1842 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1844         * tst-initializers1.c: We want to test the initializers as seen
1845         outside of libc, so undefined _LIBC.
1847         * pthread_join.c (cleanup): Avoid warning.
1849 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1851         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1852         (__lll_timedwait_tid): Add unwind info.
1854         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1855         function table, mangle the pointers.
1856         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1857         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1858         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1859         demangle pointers before use.
1860         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1861         demangle pointer.
1862         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1863         * sysdeps/pthread/setxid.h: Likewise.
1865 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1867         * tst-rwlock7.c: Show some more information in case of correct
1868         behavior.
1870 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1872         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1873         (lll_futex_timed_wait): Undo part of last change, don't negate
1874         return value.
1876 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1878         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1879         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1881 2006-12-28  David S. Miller  <davem@davemloft.net>
1883         * shlib-versions: Fix sparc64 linux target specification.
1885 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1887         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1888         Adjust include path for pthread_barrier_wait.c move.
1890 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1892         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1893         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1895 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1897         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1898         6 argument cancellable syscalls.
1899         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1900         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1901         6 argument cancellable syscalls.
1902         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1904 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1906         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1907         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1909 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1911         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1912         __sync_lock_release instead of __sync_lock_release_si.
1914 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1916         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1917         Define.
1918         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1919         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1920         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1921         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1922         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1923         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1924         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1925         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1926         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1927         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1928         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1930 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1932         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1933         * pthread_barrier_wait.c: ...here.
1934         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1935         * pthread_cond_broadcast.c: ...here.
1936         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1937         * pthread_cond_signal.c: ...here.
1938         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1939         * pthread_cond_timedwait.c: ...here.
1940         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1941         * pthread_cond_wait.c: ...here.
1942         * sysdeps/pthread/pthread_once.c: Move to...
1943         * pthread_once.c: ...here.
1944         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1945         * pthread_rwlock_rdlock.c: ...here.
1946         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1947         * pthread_rwlock_timedrdlock.c: ...here.
1948         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1949         * pthread_rwlock_timedwrlock.c: ...here.
1950         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1951         * pthread_rwlock_unlock.c: ...here.
1952         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1953         * pthread_rwlock_wrlock.c: ...here.
1954         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1955         * pthread_spin_destroy.c: ...here.
1956         * sysdeps/pthread/pthread_spin_init.c: Move to...
1957         * pthread_spin_init.c: ...here.
1958         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1959         * pthread_spin_unlock.c: ...here.
1960         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1961         * pthread_getcpuclockid.c: ...here.
1963         * init.c: USE_TLS support is now always enabled.
1964         * tst-tls5.h: Likewise.
1965         * sysdeps/alpha/tls.h: Likewise.
1966         * sysdeps/i386/tls.h: Likewise.
1967         * sysdeps/ia64/tls.h: Likewise.
1968         * sysdeps/powerpc/tls.h: Likewise.
1969         * sysdeps/s390/tls.h: Likewise.
1970         * sysdeps/sh/tls.h: Likewise.
1971         * sysdeps/sparc/tls.h: Likewise.
1972         * sysdeps/x86_64/tls.h: Likewise.
1974 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1976         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1977         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1978         failed.
1980         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1981         Define to THREAD_SELF->header.multiple_threads.
1982         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1983         Likewise.
1984         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1985         Likewise.
1986         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1987         (SINGLE_THREAD_P): Likewise.
1988         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1989         (SINGLE_THREAD_P): Likewise.
1990         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1991         (SINGLE_THREAD_P): Likewise.
1992         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1993         (SINGLE_THREAD_P): Likewise.
1994         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1995         Likewise.
1996         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1997         (SINGLE_THREAD_P): Likewise.
1998         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1999         (SINGLE_THREAD_P): Likewise.
2000         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
2001         Likewise.
2003 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
2005         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
2006         by default rather than 2_3_3.
2008 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
2010         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
2011         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
2012         atomic_* instead of catomic_* macros.
2014 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
2016         [BZ #3285]
2017         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
2018         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
2019         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
2020         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
2021         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
2022         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
2023         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
2024         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
2025         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
2026         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
2027         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
2028         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
2029         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
2031 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
2033         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
2034         cancelable syscalls with six parameters.
2036         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
2037         operations instead of atomic_*.
2039 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
2041         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
2043 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
2045         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
2046         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
2047         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
2048         New file.
2049         * pthread_attr_setstack.c: Allow overwriting the version number of the
2050         new symbol.
2051         * pthread_attr_setstacksize.c: Likewise.
2052         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
2053         it.
2054         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
2055         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
2057 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
2059         [BZ #3251]
2060         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
2061         Patch by Petr Baudis.
2063 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
2065         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
2067         * tst-cancel2.c (tf): Loop as long as something was written.
2069 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2071         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
2072         mutexes wake all mutexes.
2073         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
2074         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2075         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
2077 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
2079         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
2080         to guarantee the thread is always canceled.
2082 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
2084         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
2085         Include stdlib.h.
2086         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
2087         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
2088         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2089         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2090         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2092 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
2094         [BZ #3123]
2095         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
2096         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
2097         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
2098         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
2099         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
2100         * Makefile (tests): Add tst-cond22.
2101         * tst-cond22.c: New file.
2103 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
2105         [BZ #3124]
2106         * descr.h (struct pthread): Add parent_cancelhandling.
2107         * sysdeps/pthread/createthread.c (create_thread): Pass parent
2108         cancelhandling value to child.
2109         * pthread_create.c (start_thread): If parent thread was canceled
2110         reset the SIGCANCEL mask.
2111         * Makefile (tests): Add tst-cancel25.
2112         * tst-cancel25.c: New file.
2114 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
2115             Ulrich Drepper  <drepper@redhat.com>
2117         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
2118         counterp if it is already zero.
2119         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
2121 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
2122             Roland McGrath  <roland@redhat.com>
2124         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2125         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2126         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
2127         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2128         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2129         lll_robust_mutex_timedlock, lll_mutex_unlock,
2130         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2131         Add _L_*_ symbols around the subsection.
2132         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
2133         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
2135 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
2136             Roland McGrath  <roland@redhat.com>
2138         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2139         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
2140         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
2141         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2142         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2143         lll_robust_mutex_timedlock, lll_mutex_unlock,
2144         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2145         Add _L_*_ symbols around the subsection.
2146         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2147         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2149 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2151         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2152         change because it can disturb too much existing code.  If real hard
2153         reader preference is needed we'll introduce another type.
2154         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2155         (pthread_rwlock_timedwrlock): Likewise.
2156         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2157         Likewise.
2159 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2161         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2162         reader preference.
2163         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2164         (pthread_rwlock_timedwrlock): Likewise.
2165         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2166         Likewise.
2168 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2170         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2171         Only define ifdef SHARED.
2173 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2175         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2176         (free_stacks): ...here.
2177         (__free_stack_cache): New function.
2178         * pthreadP.h: Declare __free_stack_cache.
2179         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2180         ptr_freeres.
2181         * init.c (pthread_functions): Initialize ptr_freeres.
2182         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2183         New freeres function.
2185 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2187         [BZ #3018]
2188         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2190 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2192         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2193         _XOPEN_REALTIME_THREADS.
2195 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2197         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2198         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2199         HAVE_CLOCK_GETTIME_VSYSCALL.
2200         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2202 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2204         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2205         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2206         * descr.h (struct priority_protection_data): New type.
2207         (struct pthread): Add tpp field.
2208         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2209         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2210         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2211         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2212         TPP mutexes.
2213         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2214         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2215         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2216         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2217         * tpp.c: New file.
2218         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2219         boosted by TPP.
2220         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2221         * pthread_mutexattr_getprioceiling.c
2222         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2223         in the SCHED_FIFO priority range.
2224         * pthread_mutexattr_setprioceiling.c
2225         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2226         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2227         if mutex is not TPP.  Ceiling is now in __data.__lock.
2228         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2229         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2230         is now in __data.__lock.  Add locking.
2231         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2232         * Makefile (libpthread-routines): Add tpp.
2233         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2234         * tst-tpp.h: New file.
2235         * tst-mutexpp1.c: New file.
2236         * tst-mutexpp6.c: New file.
2237         * tst-mutexpp10.c: New file.
2238         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2239         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2241 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2243         [BZ #2843]
2244         * pthread_join.c (pthread_join): Account for self being canceled
2245         when checking for deadlocks.
2246         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2247         (tf1): Don't print anything after pthread_join returns, this would be
2248         another cancellation point.
2249         (tf2): Likewise.
2250         * tst-join6.c: New file.
2251         * Makefile (tests): Add tst-join6.
2253 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2255         [BZ #2892]
2256         * pthread_setspecific.c (__pthread_setspecific): Check
2257         out-of-range index before checking for unused key.
2259         * sysdeps/pthread/gai_misc.h: New file.
2261 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2263         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2264         file.  Don't use sysctl.
2265         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2266         overwrite the file if this is likely not true.
2268 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2270         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2271         * Makefile (tests): Add tst-getpid3.
2272         * tst-getpid3.c: New file.
2274 2006-07-30  Roland McGrath  <roland@redhat.com>
2276         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2278         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2279         (pause_not_cancel): New macro.
2280         (nanosleep_not_cancel): New macro.
2281         (sigsuspend_not_cancel): New macro.
2282         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2283         nanosleep_not_cancel macro from <not-cancel.h>.
2284         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2285         macro from <not-cancel.h>.
2287 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2288             Jakub Jelinek  <jakub@redhat.com>
2290         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2291         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2292         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2293         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2294         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2295         * pthread_mutex_lock.c: Likewise.
2296         * pthread_mutex_timedlock.c: Likewise.
2297         * pthread_mutex_trylock.c: Likewise.
2298         * pthread_mutex_unlock.c: Likewise.
2299         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2300         all mutexes.
2301         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2302         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2303         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2304         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2305         pthread-pi-defines.sym.
2306         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2307         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2308         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2309         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2310         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2311         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2312         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2313         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2314         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2315         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2316         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2317         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2318         * tst-mutex2.c: Likewise.
2319         * tst-mutex3.c: Likewise.
2320         * tst-mutex4.c: Likewise.
2321         * tst-mutex5.c: Likewise.
2322         * tst-mutex6.c: Likewise.
2323         * tst-mutex7.c: Likewise.
2324         * tst-mutex7a.c: Likewise.
2325         * tst-mutex8.c: Likewise.
2326         * tst-mutex9.c: Likewise.
2327         * tst-robust1.c: Likewise.
2328         * tst-robust7.c: Likewise.
2329         * tst-robust8.c: Likewise.
2330         * tst-mutexpi1.c: New file.
2331         * tst-mutexpi2.c: New file.
2332         * tst-mutexpi3.c: New file.
2333         * tst-mutexpi4.c: New file.
2334         * tst-mutexpi5.c: New file.
2335         * tst-mutexpi6.c: New file.
2336         * tst-mutexpi7.c: New file.
2337         * tst-mutexpi7a.c: New file.
2338         * tst-mutexpi8.c: New file.
2339         * tst-mutexpi9.c: New file.
2340         * tst-robust1.c: New file.
2341         * tst-robust2.c: New file.
2342         * tst-robust3.c: New file.
2343         * tst-robust4.c: New file.
2344         * tst-robust5.c: New file.
2345         * tst-robust6.c: New file.
2346         * tst-robust7.c: New file.
2347         * tst-robust8.c: New file.
2348         * Makefile (tests): Add the new tests.
2350         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2351         * pthread_mutex_destroy.c: Remove unneeded label.
2353 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2355         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2356         computations to compile time.
2358 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2360         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2362 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2364         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2366 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2368         * pthread_key_create.c (__pthread_key_create): Do away with
2369         __pthread_keys_lock.
2371         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2372         (__kernel_cpumask_size): Mark as hidden.
2373         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2375         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2376         * semaphoreP.h (__sem_mappings_lock): Likewise.
2378 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2380         * pthread_atfork.c: Mark __dso_handle as hidden.
2382 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2384         [BZ #2644]
2385         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2386         the reload problem.  Change the one path in pthread_cancel_init
2387         which causes the problem.  Force gcc to reload.  Simplify callers.
2388         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2389         (_Unwind_GetBSP): Undo last patch.
2391 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2393         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2394         function pointer is reloaded after pthread_cancel_init calls.
2396         [BZ #2644]
2397         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2398         pointers are reloaded after pthread_cancel_init calls.
2400 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2402         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2403         __always_inline.
2405 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2407         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2408         Allocate new object which is passed to timer_sigev_thread so that
2409         the timer can be deleted before the new thread is scheduled.
2411 2006-04-26  Roland McGrath  <roland@redhat.com>
2413         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2415 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2417         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2418         suffix for conditional jumps.
2419         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2420         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2421         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2422         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2423         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2424         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2426         * init.c (sigcancel_handler): Compare with correct PID even if the
2427         thread is in the middle of a fork call.
2428         (sighandler_setxid): Likewise.
2429         Reported by Suzuki K P <suzuki@in.ibm.com> .
2431 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2433         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2435 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2437         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2438         fails [Coverity CID 105].
2440 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2442         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2444 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2446         [BZ #2505]
2447         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2448         Define __lll_rel_instr using lwsync.
2450 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2452         * allocatestack.c (allocate_stack): Always initialize robust_head.
2453         * descr.h: Define struct robust_list_head.
2454         (struct pthread): Use robust_list_head in robust mutex list definition.
2455         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2456         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2457         (__pthread_initialize_minimal_internal): Register robust_list with
2458         the kernel.
2459         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2460         Declare __set_robust_list_avail.
2461         * pthread_create.c (start_thread): Register robust_list of new thread.
2462         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2463         waiters.
2464         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2465         number of users, it's unreliable.
2466         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2467         set_robust_list syscall is available.
2468         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2469         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2470         Set robust_head.list_op_pending before trying to lock a robust mutex.
2471         * pthread_mutex_timedlock.c: Likewise.
2472         * pthread_mutex_trylock.c: Likewise.
2473         * pthread_mutex_unlock.c: Likewise for unlocking.
2474         * Makefile (tests): Add tst-robust8.
2475         * tst-robust8.c: New file.
2477 2006-03-08  Andreas Schwab  <schwab@suse.de>
2479         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2480         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2482 2006-03-05  Roland McGrath  <roland@redhat.com>
2484         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2485         and $config_os doesn't match *linux*.
2487 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2489         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2490         Use __syscall_error.
2491         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2492         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2493         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2494         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2495         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2496         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2498 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2500         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2502 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2504         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2505         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2506         mutex.
2507         (__lll_robust_timedlock_wait): Likewise.
2508         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2509         (__lll_robust_lock_wait): Likewise.
2510         (__lll_robust_timedlock_wait): Likewise.
2511         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2512         (__lll_robust_lock_wait): Likewise.
2513         (__lll_robust_timedlock_wait): Likewise.
2515 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2517         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2518         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2519         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2520         lll_robust_mutex_unlock): Define.
2521         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2523 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2525         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2526         instead of <clone.S>.
2528 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2530         * Makefile (libpthread-routines): Add
2531         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2532         and pthread_mutex_[sg]etprioceiling.
2533         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2534         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2535         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2536         pthread_mutex_setprioceiling.
2537         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2538         PTHREAD_PRIO_PROTECT): New enum values.
2539         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2540         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2541         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2542         prototypes.
2543         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2544         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2545         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2546         Define.
2547         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2548         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2549         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2550         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2551         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2552         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2553         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2554         protocol mutexes.
2555         * pthread_mutex_getprioceiling.c: New file.
2556         * pthread_mutex_setprioceiling.c: New file.
2557         * pthread_mutexattr_getprioceiling.c: New file.
2558         * pthread_mutexattr_setprioceiling.c: New file.
2559         * pthread_mutexattr_getprotocol.c: New file.
2560         * pthread_mutexattr_setprotocol.c: New file.
2562 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2564         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2566 2006-02-27  Roland McGrath  <roland@redhat.com>
2568         * sysdeps/pthread/Subdirs: List nptl here too.
2569         * configure (libc_add_on_canonical): New variable.
2571         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2573         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2574         self to get main source tree's file.
2575         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2576         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2577         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2578         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2579         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2580         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2581         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2582         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2583         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2584         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2585         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2586         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2587         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2589         * Makefile: Use $(sysdirs) in vpath directive.
2591         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2592         (CPPFLAGS-timer_routines.c): Likewise.
2594         * Makeconfig (includes): Variable removed.
2596 2006-02-26  Roland McGrath  <roland@redhat.com>
2598         * sysdeps/generic/pt-raise.c: Moved to ...
2599         * pt-raise.c: ... here.
2600         * sysdeps/generic/lowlevellock.h: Moved to ...
2601         * lowlevellock.h: ... here.
2603 2006-02-23  Roland McGrath  <roland@redhat.com>
2605         * descr.h (struct pthread): Add final member `end_padding'.
2606         (PTHREAD_STRUCT_END_PADDING): Use it.
2608 2006-02-20  Roland McGrath  <roland@redhat.com>
2610         * sysdeps/mips: Directory removed, saved in ports repository.
2611         * sysdeps/unix/sysv/linux/mips: Likewise.
2613 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2615         * tst-robust1.c: Add second mutex to check that the mutex list is
2616         handled correctly.
2618 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2620         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2621         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2622         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2623         lll_robust_mutex_unlock): New macros.
2624         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2625         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2626         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2627         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2628         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2630 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2632         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2633         definitions.
2634         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2636 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2638         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2639         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2640         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2641         (lll_robust_mutex_unlock): Likewise.
2643 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2645         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2646         Set robust_list.__next rather than robust_list.
2647         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2648         (__pthread_list_t): New typedef.
2649         (pthread_mutex_t): Replace __next and __prev fields with __list.
2650         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2651         (__pthread_list_t): New typedef.
2652         (pthread_mutex_t): Replace __next and __prev fields with __list.
2653         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2654         (__pthread_list_t, __pthread_slist_t): New typedefs.
2655         (pthread_mutex_t): Replace __next and __prev fields with __list.
2656         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2657         (__pthread_list_t, __pthread_slist_t): New typedefs.
2658         (pthread_mutex_t): Replace __next and __prev fields with __list.
2659         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2660         (__pthread_list_t, __pthread_slist_t): New typedefs.
2661         (pthread_mutex_t): Replace __next and __prev fields with __list.
2662         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2663         (__pthread_slist_t): New typedef.
2664         (pthread_mutex_t): Replace __next field with __list.
2666 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2668         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2669         PTHREAD_MUTEX_OWNERDEAD.
2670         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2671         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2672         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2673         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2674         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2675         to PTHREAD_MUTEX_INCONSISTENT.
2676         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2677         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2678         * pthread_mutex_trylock.c: Likewise.
2679         * pthread_mutex_timedlock.c: Likewise.
2680         * pthread_mutex_unlock.c: Likewise.
2681         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2682         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2683         lowlevelrobustlock.sym.
2684         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2685         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2686         definitions.
2687         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2688         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2689         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2690         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2691         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2693 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2695         * allocatestack.c (allocate_stack): Initialize robust_list.
2696         * init.c (__pthread_initialize_minimal_internal): Likewise.
2697         * descr.h (struct xid_command): Pretty printing.
2698         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2699         robust_list.  Adjust macros.
2700         * pthread_create.c (start_thread): Adjust robust_list handling.
2701         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2702         but the owner for all robust mutex types.
2703         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2704         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2705         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2706         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2708         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2709         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2711 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2713         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2714         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2716 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2718         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2719         Return status.
2720         (lll_futex_timed_wait): Define.
2722 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2724         * tst-cancel4.c: Test ppoll.
2726 2006-01-18  Andreas Jaeger  <aj@suse.de>
2728         [BZ #2167]
2729         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2730         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2731         by Jim Gifford <patches@jg555.com>.
2733 2006-01-13  Richard Henderson  <rth@redhat.com>
2735         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2737 2006-01-10  Roland McGrath  <roland@redhat.com>
2739         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2740         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2741         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2742         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2743         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2744         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2745         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2746         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2747         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2748         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2750 2006-01-09  Roland McGrath  <roland@redhat.com>
2752         * tst-initializers1-c89.c: New file.
2753         * tst-initializers1-c99.c: New file.
2754         * tst-initializers1-gnu89.c: New file.
2755         * tst-initializers1-gnu99.c: New file.
2756         * Makefile (tests): Add them.
2757         (CFLAGS-tst-initializers1-c89.c): New variable.
2758         (CFLAGS-tst-initializers1-c99.c): New variable.
2759         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2760         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2762         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2763         Use __extension__ on anonymous union definition.
2764         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2765         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2766         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2767         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2768         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2770 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2772         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2773         Don't give the union a name because it changes the mangled name.
2774         Instead name the struct for __data.
2775         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2776         Likewise.
2777         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2778         Likewise.
2780 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2782         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2783         stack bias to mc_ftp field.
2785 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2787         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2788         being too clever and reloading the futex value where it shouldn't.
2790 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2792         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2793         correct type.
2795 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2797         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2798         Add cfi directives.
2800 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2802         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2803         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2804         rename in tcbhead_t.
2806         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2807         Don't give the union a name because it changes the mangled name.
2808         Instead name the struct for __data.
2809         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2810         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2811         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2812         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2813         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2814         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2816 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2818         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2819         Return status.
2820         (lll_futex_timed_wait): Define.
2821         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2822         * sysdeps/pthread/aio_misc.h: New file.
2824 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2826         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2828 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2830         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2831         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2832         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2834 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2836         * tst-cancel24.cc: Use C headers instead of C++ headers.
2838 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2840         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2841         sparc-linux configured glibc.
2842         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2843         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2844         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2845         atomic_compare_and_exchange_val_24_acq instead of
2846         atomic_compare_and_exchange_val_acq.
2847         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2848         instead of atomic_exchange_rel.
2849         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2850         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2851         file.
2852         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2853         file.
2854         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2855         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2856         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2857         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2858         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2859         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2860         New file.
2861         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2862         New file.
2863         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2864         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2865         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2866         file.
2867         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2868         file.
2869         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2871 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2873         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2874         mutex initializers.
2876 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2878         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2879         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2880         THREAD_COPY_POINTER_GUARD): Define.
2881         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2882         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2884 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2886         * version.c: Update copyright year.
2888 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2890         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2891         .eh_frame section, use cfi_* directives.
2892         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2894 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2896         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2897         now.
2899 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2901         * sysdeps/pthread/sigaction.c: Removed.
2902         * sigaction.c: New file.
2903         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2905 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2907         * Makefile (tests): Add tst-signal7.
2908         * tst-signal7.c: New file.
2910 2005-12-27  Roland McGrath  <roland@redhat.com>
2912         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2913         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2914         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2915         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2916         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2917         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2918         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2919         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2920         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2921         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2922         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2924 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2926         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2927         and __prev field to pthread_mutex_t.
2928         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2929         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2930         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2931         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2932         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2933         to pthread_mutex_t.
2935 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2937         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2938         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2939         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2940         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2941         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2942         and PTHREAD_MUTEXATTR_FLAG_BITS.
2943         * descr.h (struct pthread): Add robust_list field and define
2944         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2945         * pthread_mutexattr_getrobust.c: New file.
2946         * pthread_mutexattr_setrobust.c: New file.
2947         * pthread_mutex_consistent.c: New file.
2948         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2949         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2950         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2951         Adjust pthread_mutex_t initializers.
2952         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2953         field to pthread_mutex_t.
2954         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2955         and __prev field to pthread_mutex_t.
2956         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2957         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2958         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2959         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2960         * pthread_mutexattr_gettype.c: Likewise.
2961         * pthread_mutexattr_setpshared.c: Likewise.
2962         * pthread_mutexattr_settype.c: Likewise.
2963         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2964         Initialize mutex kind according to robust flag.
2965         * pthread_mutex_lock.c: Implement local robust mutex.
2966         * pthread_mutex_timedlock.c: Likewise.
2967         * pthread_mutex_trylock.c: Likewise.
2968         * pthread_mutex_unlock.c: Likewise.
2969         * pthread_create.c (start_thread): Mark robust mutexes which remained
2970         locked as dead.
2971         * tst-robust1.c: New file.
2972         * tst-robust2.c: New file.
2973         * tst-robust3.c: New file.
2974         * tst-robust4.c: New file.
2975         * tst-robust5.c: New file.
2976         * tst-robust6.c: New file.
2977         * tst-robust7.c: New file.
2978         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2979         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2980         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2981         tst-robust5, tst-robust6, and tst-robust7.
2983         * tst-typesizes.c: New file.
2984         * Makefile (tests): Add tst-typesizes.
2986         * tst-once3.c: More debug output.
2988 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2990         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2991         missing after last change.
2993         * version.c: Update copyright year.
2995 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2997         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2998         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2999         * pthread_mutex_trylock.c: Likewise.
3000         * pthread_mutex_timedlock.c: Likewise.
3001         * pthread_mutex_unlock.c: Likewise.
3003 2005-12-22  Roland McGrath  <roland@redhat.com>
3005         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
3006         so that #include_next's search location is not reset to the -I..
3007         directory where <nptl/...> can be found.
3009 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
3011         [BZ #1913]
3012         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3013         Fix unwind info.  Remove useless branch prediction prefix.
3014         * tst-cancel24.cc: New file.
3015         * Makefile: Add rules to build and run tst-cancel24.
3017 2005-12-21  Roland McGrath  <roland@redhat.com>
3019         * libc-cancellation.c: Use <> rather than "" #includes.
3020         * pt-cleanup.c: Likewise.
3021         * pthread_create.c: Likewise.
3022         * pthread_join.c: Likewise.
3023         * pthread_timedjoin.c: Likewise.
3024         * pthread_tryjoin.c: Likewise.
3025         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
3026         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
3027         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
3028         * unwind.c: Likewise.
3030 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3032         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
3033         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
3034         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3035         THREAD_COPY_POINTER_GUARD): Define.
3037 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
3039         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
3040         rather than one.
3041         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3042         THREAD_COPY_POINTER_GUARD): Define.
3043         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
3044         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
3045         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
3046         THREAD_COPY_POINTER_GUARD): Define.
3047         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
3048         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
3049         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
3050         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
3051         Use PTR_DEMANGLE for B0 if defined.
3053 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
3055         * pthread_create.c (__pthread_create_2_1): Use
3056         THREAD_COPY_POINTER_GUARD if available.
3057         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
3058         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
3059         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
3060         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
3061         * sysdeps/x86_64/tls.h: Likewise.
3063 2005-12-15  Roland McGrath  <roland@redhat.com>
3065         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
3067 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
3069         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
3070         sysdeps/generic.
3071         * errno-loc.c: New file.
3073 2005-12-12  Roland McGrath  <roland@redhat.com>
3075         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
3076         adjustments before choosing stack size.  Update minimum stack size
3077         calculation to match allocate_stack change.
3079 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
3081         * allocatestack.c (allocate_stack): Don't demand that there is an
3082         additional full page available on the stack beside guard, TLS, the
3083         minimum stack.
3085 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
3087         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3088         (__cleanup_fct_attribute): Use __regparm__ not regparm.
3090         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
3091         compiling 32-bit code we must define __cleanup_fct_attribute.
3093 005-11-24  Jakub Jelinek  <jakub@redhat.com>
3095         [BZ #1920]
3096         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
3097         __attribute__ instead of __attribute.
3098         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
3099         (__cleanup_fct_attribute): Likewise.
3101 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
3103         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
3104         a write barrier before writing libgcc_s_getcfa.
3106 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
3108         * sysdeps/unix/sysv/linux/configure: Removed.
3110 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
3112         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
3113         optional init_array/fini_array support.
3115 2005-10-24  Roland McGrath  <roland@redhat.com>
3117         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
3118         versioned_symbol use.
3120 2005-10-16  Roland McGrath  <roland@redhat.com>
3122         * init.c (__pthread_initialize_minimal_internal): Even when using a
3123         compile-time default stack size, apply the minimum that allocate_stack
3124         will require, and round up to page size.
3126 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
3128         * Makefile ($(test-modules)): Remove static pattern rule.
3130 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
3131             Ulrich Drepper  <drepper@redhat.com>
3133         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
3134         alignment in callback function.
3135         * Makefile: Add rules to build and run tst-align3.
3136         * tst-align3.c: New file.
3138 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
3140         * allocatestack.c (setxid_signal_thread): Add
3141         INTERNAL_SYSCALL_DECL (err).
3143 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3145         * allocatestack.c (setxid_signal_thread): Need to use
3146         atomic_compare_and_exchange_bool_acq.
3148 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3149             Jakub Jelinek  <jakub@redhat.com>
3151         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3152         CANCEL_RESTMASK.
3153         (struct pthread): Move specific_used field to avoid padding.
3154         Add setxid_futex field.
3155         * init.c (sighandler_setxid): Reset setxid flag and release the
3156         setxid futex.
3157         * allocatestack.c (setxid_signal_thread): New function.  Broken
3158         out of the bodies of the two loops in __nptl_setxid.  For undetached
3159         threads check whether they are exiting and if yes, don't send a signal.
3160         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3161         * pthread_create.c (start_thread): For undetached threads, check
3162         whether setxid bit is set.  If yes, wait until signal has been
3163         processed.
3165         * allocatestack.c (STACK_VARIABLES): Initialize them.
3166         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3168 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3170         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3171         waiters, awake all waiters on the associated mutex.
3173 2005-09-22  Roland McGrath  <roland@redhat.com>
3175         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3176         ../sysdeps/x86_64/hp-timing.h).
3178 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3180         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3181         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3182         (lll_futex_wake_unlock): Define.
3183         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3184         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3185         (lll_futex_wake_unlock): Define.
3186         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3187         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3188         (lll_futex_wake_unlock): Define.
3189         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3190         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3191         (lll_futex_wake_unlock): Define.
3192         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3193         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3194         (lll_futex_wake_unlock): Define.
3195         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3196         lll_futex_wake_unlock.
3197         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3198         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3199         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3200         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3201         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3202         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3204 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3206         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3207         Fix typo in register name.
3209 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3211         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3212         Use __sigfillset.  Document that sigfillset does the right thing wrt
3213         to SIGSETXID.
3215 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3217         [BZ #1102]
3218         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3219         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3220         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3221         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3222         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3223         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3224         in the structure.
3225         * Makefile (tests): Add tst-initializers1.
3226         (CFLAGS-tst-initializers1.c): Set.
3227         * tst-initializers1.c: New test.
3229 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3231         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3232         Make sure __flags are located at offset 48 from the start of the
3233         structure.
3235 2005-07-02  Roland McGrath  <roland@redhat.com>
3237         * Makeconfig: Comment fix.
3239 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3241         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3242         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3243         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3244         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3245         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3246         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3247         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3248         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3249         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3250         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3252 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3254         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3255         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3256         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3257         fields.
3258         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3259         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3260         field.  Put in sysinfo field unconditionally.
3261         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3262         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3263         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3264         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3265         fields.
3266         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3267         * pthread_create.c (__pthread_create_2_1): Use
3268         THREAD_COPY_STACK_GUARD macro.
3269         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3270         tests.
3271         * tst-stackguard1.c: New file.
3272         * tst-stackguard1-static.c: New file.
3274 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3276         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3277         Invoke CGOTSETUP and CGOTRESTORE.
3278         (CGOTSETUP, CGOTRESTORE): Define.
3280 2005-05-29  Richard Henderson  <rth@redhat.com>
3282         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3283         (tf_write, tf_writev): Use it.
3284         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3285         the system minimum.
3287 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3289         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3290         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3291         __librt_*_asynccancel@local.
3293 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3295         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3296         all occurrences of JUMPTARGET.  Instead append @local to labels.
3298 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3300         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3301         size/alignment of struct pthread rather than tcbhead_t.
3302         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3303         Likewise.
3304         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3305         Likewise.
3306         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3307         Likewise.
3309 2005-05-19  Richard Henderson  <rth@redhat.com>
3311         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3312         __sync_val_compare_and_swap, not explicit _si variant.
3313         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3315 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3317         [BZ #915]
3318         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3320 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3322         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3323         .eh_frame section, use cfi_* directives.
3325 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3327         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3328         of "" includes.
3330 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3332         [BZ #1075]
3333         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3334         aio_write blocks.
3336 2005-04-27  Roland McGrath  <roland@redhat.com>
3338         * Makefile (tests): Remove tst-clock2.
3340         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3341         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3342         translating to the kernel clockid_t for our own process/thread clock.
3344         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3346 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3348         * old_pthread_cond_init.c: Include <errno.h>.
3349         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3350         process shared or uses clock other than CLOCK_REALTIME.
3351         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3353 2005-04-13  David S. Miller  <davem@davemloft.net>
3355         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3356         * sysdeps/sparc/sparc64/clone.S: New file.
3358 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3360         [BZ #1102]
3361         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3362         __inline instead of inline.
3363         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3365 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3367         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3368         functionally equivalent, but shorter instructions.
3369         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3370         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3371         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3372         Likewise.
3373         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3374         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3375         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3376         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3378         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3379         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3380         Likewise.
3381         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3382         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3383         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3384         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3385         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3387 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3389         * sysdeps/mips/Makefile: New file.
3390         * sysdeps/mips/nptl-sysdep.S: New file.
3391         * sysdeps/mips/tcb-offsets.sym: New file.
3392         * sysdeps/mips/pthread_spin_lock.S: New file.
3393         * sysdeps/mips/pthread_spin_trylock.S: New file.
3394         * sysdeps/mips/pthreaddef.h: New file.
3395         * sysdeps/mips/tls.h: New file.
3396         * sysdeps/mips/jmpbuf-unwind.h: New file.
3397         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3398         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3399         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3400         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3401         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3402         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3403         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3404         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3405         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3406         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3408 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3410         [BZ #1112]
3411         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3412         variable to scerr.
3414 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3416         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3418 2005-02-25  Roland McGrath  <roland@redhat.com>
3420         * alloca_cutoff.c: Correct license text.
3421         * tst-unload.c: Likewise.
3422         * sysdeps/pthread/allocalim.h: Likewise.
3423         * sysdeps/pthread/pt-initfini.c: Likewise.
3424         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3425         * sysdeps/pthread/bits/sigthread.h: Likewise.
3426         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3427         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3429 2005-02-16  Roland McGrath  <roland@redhat.com>
3431         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3432         Use unsigned int * for ptr_nthreads.
3434 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3436         [BZ #721]
3437         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3438         gcc4.
3440 2005-02-07  Richard Henderson  <rth@redhat.com>
3442         [BZ #787]
3443         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3444         argument.
3446 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3448         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3449         order of arguments in invocation of atomic_add_zero.
3451 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3453         [BZ #737]
3454         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3455         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3456         at least gotntpoff relocation and addition.
3457         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3458         Likewise.
3459         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3460         Likewise.
3461         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3462         Likewise.
3464 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3466         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3467         entry for static tls deallocation fix.
3468         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3469         also contains information whether the memory pointed to is static
3470         TLS or not.
3471         * sysdeps/i386/tls.h: Likewise.
3472         * sysdeps/ia64/tls.h: Likewise.
3473         * sysdeps/powerpc/tls.h: Likewise.
3474         * sysdeps/s390/tls.h: Likewise.
3475         * sysdeps/sh/tls.h: Likewise.
3476         * sysdeps/sparc/tls.h: Likewise.
3477         * sysdeps/x86_64/tls.h: Likewise.
3479 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3481         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3483 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3485         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3486         %esp.
3487         * Makefile (tests): Add tst-align2.
3488         * tst-align2.c: New test.
3489         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3490         -mpreferred-stack-boundary=4.
3492 2004-12-18  Roland McGrath  <roland@redhat.com>
3494         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3495         New file removed withdrawn for the moment.
3497 2004-12-17  Richard Henderson  <rth@redhat.com>
3499         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3500         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3502 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3504         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3505         Increased PTHREAD_STACK_MIN.
3507         * tst-context1.c (stacks): Use bigger stack size.
3509 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3511         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3512         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3514 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3516         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3517         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3518         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3520 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3522         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3524 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3526         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3527         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3529         * tst-getpid1.c: If child crashes, report this first.  Print which
3530         signal.
3532 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3534         * init.c (__pthread_initialize_minimal_internal): Also unblock
3535         SIGSETXID.
3537 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3539         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3540         _POSIX_THREAD_CPUTIME): Define to 0.
3541         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3542         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3543         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3544         __timer_signal_thread_tclk): Remove.
3545         (init_module): Remove their initialization.
3546         (thread_cleanup): Remove their cleanup assertions.
3547         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3548         __timer_signal_thread_tclk): Remove.
3549         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3550         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3551         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3553 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3555         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3556         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3558         * Makefile (tests): Add tst-getpid2.
3559         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3560         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3561         * tst-getpid2.c: New test.
3563 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3565         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3567 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3569         * Makefile (tests): Add tst-getpid1.
3570         * tst-getpid1.c: New file.
3571         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3572         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3574 2004-12-02  Roland McGrath  <roland@redhat.com>
3576         * Makefile (libpthread-nonshared): Variable removed.
3577         ($(objpfx)libpthread_nonshared.a): Target removed.
3578         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3579         These are now handled by generic magic from
3580         libpthread-static-only-routines being set.
3582 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3584         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3585         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3586         _POSIX_THREAD_PRIO_PROTECT): Define.
3587         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3588         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3589         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3591 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3593         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3594         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3595         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3596         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3597         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3598         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3599         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3601 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3603         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3605         * Makefile (libpthread-routines): Add pthread_setschedprio.
3606         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3607         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3608         * pthread_setschedprio.c: New file.
3610 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3612         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3613         * pthread_cancel.c (pthread_create): Likewise.
3615         * Makefile (libpthread-routines): Add vars.
3616         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3617         * init.c (__default_stacksize, __is_smp): Remove.
3618         * vars.c: New file.
3619         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3620         and define a wrapper macro.
3621         (PTHREAD_STATIC_FN_REQUIRE): Define.
3622         * allocatestack.c (__find_thread_by_id): Undefine.
3623         * pthread_create (__pthread_keys): Remove.
3624         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3625         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3626         PTHREAD_STATIC_FN_REQUIRE.
3628 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3630         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3631         parameter to REGISTER macro.
3633 2004-11-17  Roland McGrath  <roland@redhat.com>
3635         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3636         Make sure SIGCANCEL is blocked as well.
3638 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3640         * sysdeps/pthread/setxid.h: New file.
3641         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3642         (struct xid_command): Add forward decl.
3643         (struct pthread_functions): Change return type of __nptl_setxid hook
3644         to int.
3645         * pthreadP.h (__nptl_setxid): Change return type to int.
3646         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3647         calling thread, return its return value and set errno on failure.
3648         * descr.h (struct xid_command): Change id type to long array.
3650         * Makefile: Add rules to build and test tst-setuid1 and
3651         tst-setuid1-static.
3652         * tst-setuid1.c: New test.
3653         * tst-setuid1-static.c: New test.
3655 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3657         * Makefile (tests): Add tst-exit3.
3658         * tst-exit3.c: New test.
3660 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3662         * Makefile (tests): Add tst-exit2.
3663         * tst-exit2.c: New file.
3665 2004-11-09  Roland McGrath  <roland@redhat.com>
3667         [BZ #530]
3668         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3669         here, before calling clone.
3670         * pthread_create.c (start_thread): Don't do it here.
3672 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3674         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3676 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3678         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3679         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3680         assembler warning.
3682 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3684         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3685         if sched_priority is not between minprio and maxprio.
3687 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3689         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3690         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3692         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3693         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3695 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3697         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3698         not-cancelable I/O functions.
3700 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3702         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3703         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3704         make sure 2 is stored in the futex and we looked at the old value.
3705         Fix a few other problems to return the correct value.
3707 2004-10-14  Richard Henderson  <rth@redhat.com>
3709         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3710         make gcc4 happy.
3712 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3714         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3715         of pthread-functions.h and pthreaddef.h.
3716         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3718         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3719         Change __data.__nwaiters from int to unsigned int.
3721         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3722         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3724         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3725         before return type.
3727         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3728         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3730 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3732         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3733         test fails, remove message queue.
3734         (tf_msgsnd): Likewise.
3736 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3738         * tst-clock1.c: Change #ifdef to #if defined.
3739         * tst-clock2.c: Likewise.
3740         * tst-cond11.c: Likewise.
3742         * sysdeps/pthread/timer_create.c (timer_create): Use
3743         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3744         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3745         THREAD_CPUTIME.
3747 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3749         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3750         _POSIX_THREAD_CPUTIME): Define to 0.
3752 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3754         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3755         and _POSIX_THREAD_CPUTIME to zero.
3756         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3757         * tst-barrier2.c: Fix testing for POSIX feature.
3758         * tst-clock1.c: Likewise.
3759         * tst-clock2.c: Likewise.
3760         * tst-cond11.c: Likewise.
3761         * tst-cond4.c: Likewise.
3762         * tst-cond6.c: Likewise.
3763         * tst-flock2.c: Likewise.
3764         * tst-mutex4.c: Likewise.
3765         * tst-mutex9.c: Likewise.
3766         * tst-rwlock12.c: Likewise.
3767         * tst-rwlock4.c: Likewise.
3768         * tst-signal1.c: Likewise.
3769         * tst-spin2.c: Likewise.
3770         * sysdeps/pthread/posix-timer.h: Likewise.
3771         * sysdeps/pthread/timer_create.c: Likewise.
3772         * sysdeps/pthread/timer_routines.c: Likewise.
3774 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3776         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3777         (__lll_mutex_timedlock_wait): Address futex correctly.
3779         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3780         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3781         make sure 2 is stored in the futex and we looked at the old value.
3782         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3783         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3784         which might very well made the code not working at all before.
3785         [BZ #417]
3787 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3789         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3790         allow SIGSETXID to be sent.
3791         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3792         for SIGSETXID to be defined.
3793         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3794         SIGSETXID cannot be blocked.
3796         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3797         Add __extension__ to long long types.
3798         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3799         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3800         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3801         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3802         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3803         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3804         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3806 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3808         * descr.h (struct pthread): Add stopped_start field.
3809         * sysdeps/pthread/createthread.c (create_thread): Set
3810         start_stopped flag in descriptor for new thread appropriately.
3811         * pthread_create.c (start_thread): Only take lock to be stopped on
3812         startup if stopped_start flag says so.
3814 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3816         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3817         is created detached and if yes, do not try to free the stack in case
3818         the thread creation failed.
3819         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3820         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3821         case there has been no error.  [BZ #405]
3823         * pthread_create.c (start_thread): Don't wait for scheduler data
3824         etc to be set at the beginning of the function.  The cancellation
3825         infrastructure must have been set up.  And enable async
3826         cancellation before potentially going to sleep.  [BZ #401]
3828 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3830         * Versions: Remove exports for pthread_set*id_np functions.
3831         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3832         for now.
3833         * Makefile: Don't build pthread_set*id code for now.
3835 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3837         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3838         internal use.
3839         * allocatestack.c (__nptl_setxid): New function.
3840         * descr.h (struct xid_command): Define type.
3841         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3842         (sighandler_setxid): New function.
3843         (__pthread_initialize_minimal): Register sighandler_setxid for
3844         SIGCANCEL.
3845         * pt-allocrtsig.c: Update comment.
3846         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3847         Declare __nptl_setxid.
3848         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3849         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3850         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3851         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3852         and pthread_setresuid_np.
3853         * pthread_setgid_np.c: New file.
3854         * pthread_setuid_np.c: New file.
3855         * pthread_setegid_np.c: New file.
3856         * pthread_seteuid_np.c: New file.
3857         * pthread_setregid_np.c: New file.
3858         * pthread_setreuid_np.c: New file.
3859         * pthread_setresgid_np.c: New file.
3860         * pthread_setresuid_np.c: New file.
3861         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3862         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3863         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3864         and pthread_setresuid_np.
3865         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3866         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3867         pthread_setregid, and pthread_setresgid.
3869 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3871         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3872         ENOMEM when out of memory.
3874 2004-09-10  Roland McGrath  <roland@redhat.com>
3876         [BZ #379]
3877         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3878         code, since we don't try to use the broken CLONE_STOPPED any more.
3879         * pthread_create.c (start_thread): Likewise.
3881 2004-09-15  Richard Henderson  <rth@redhat.com>
3883         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3885 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3887         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3888         (__libc_unwind_longjmp): Delete macro and declare as function.
3889         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3890         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3891         nptl directory.
3892         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3893         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3894         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3896 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3898         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3899         for __USE_XOPEN2K.
3900         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3901         types also for __USE_XOPEN2K.
3902         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3903         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3904         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3905         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3906         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3907         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3908         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3909         [BZ #320]
3911 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3913         * sysdeps/pthread/pthread.h
3914         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3915         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3916         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3917         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3918         [BZ #375]
3920 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3922         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3923         PSEUDO to be used with . prefix.
3925         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3926         Use atomic_increment instead of atomic_exchange_and_add.
3927         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3928         Likewise.
3929         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3930         Likewise.
3931         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3932         Likewise.
3934         * allocatestack.c (allocate_stack): Use atomic_increment_val
3935         instead of atomic_exchange_and_add.
3936         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3937         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3938         Likewise.
3939         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3940         Likewise.
3942         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3943         the initialization function might throw.
3945 2005-09-05  Richard Henderson  <rth@redhat.com>
3947         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3948         Move definition inside libpthread, libc, librt check.  Provide
3949         definition for rtld.
3951 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3953         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3954         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3955         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3956         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3957         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3958         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3959         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3960         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3961         * unwind.c: Use it.
3963         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3964         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3965         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3966         Likewise.
3967         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3968         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3969         this is the last waiter, signal pthread_cond_destroy caller and
3970         avoid using the pthread_cond_t structure after unlock.
3971         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3972         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3973         Read clock type from the least significant bits of __nwaiters instead
3974         of __clock.
3975         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3976         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3978 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3980         [BZ #342]
3981         * Makefile (tests): Add tst-cond20 and tst-cond21.
3982         * tst-cond20.c: New test.
3983         * tst-cond21.c: New test.
3984         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3985         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3986         it unsigned int.
3987         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3988         Likewise.
3989         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3990         (pthread_cond_t): Likewise.
3991         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3992         Likewise.
3993         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3994         Likewise.
3995         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3996         Likewise.
3997         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3998         (cond_nwaiters): New.
3999         (clock_bits): New.
4000         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
4001         if there are waiters not signalled yet.
4002         Wait until all already signalled waiters wake up.
4003         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
4004         __nwaiters.  If pthread_cond_destroy has been called and this is the
4005         last waiter, signal pthread_cond_destroy caller and avoid using
4006         the pthread_cond_t structure after unlock.
4007         (__pthread_cond_wait): Increment __nwaiters in the beginning,
4008         decrement it when leaving.  If pthread_cond_destroy has been called
4009         and this is the last waiter, signal pthread_cond_destroy caller.
4010         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4011         Likewise.  Read clock type from the least significant bits of
4012         __nwaiters instead of __clock.
4013         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
4014         whether clock ID can be encoded in COND_CLOCK_BITS bits.
4015         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
4016         clock type just from the last COND_CLOCK_BITS bits of value.
4017         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
4018         instead of __clock, just from second bit of condattr's value.
4020 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
4022         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
4023         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
4024         != 64.
4025         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4027 2004-08-15  Roland McGrath  <roland@frob.com>
4029         * pthread_atfork.c: Update copyright terms including special exception
4030         for these trivial files, which are statically linked into executables
4031         that use dynamic linking for the significant library code.
4033 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
4035         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
4036         pthread_rwlock_rdlock.
4037         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
4038         Decrease __nr_readers_queued after reacquiring lock.
4039         * sysdeps/pthread/pthread_rwlock_timedrdlock
4040         (pthread_rwlock_timedrdlock): Likewise.
4041         Reported by Bob Cook <bobcook47@hotmail.com>.
4043 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
4045         * tst-rwlock14.c (tf): Read main thread handle from *ARG
4046         before pthread_barrier_wait.
4048 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
4050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
4051         Remove unnecessary exception handling data.
4053 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
4055         [BZ #284]
4056         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
4057         instead of clockid_t.
4059 2004-07-21  Roland McGrath  <roland@redhat.com>
4061         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
4063 2004-07-19  Roland McGrath  <roland@redhat.com>
4065         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
4067 2004-07-02  Roland McGrath  <roland@redhat.com>
4069         * configure: Don't exit.
4071 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4073         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4074         (__pthread_cond_timedwait): Check for invalid nanosecond in
4075         timeout value.
4077 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
4079         * Makefile: Add rules to build and run tst-fini1.
4080         * tst-fini1.c: New file.
4081         * tst-fini1mod.c: New file.
4083 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
4085         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
4086         if no cancellation support is needed.
4087         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
4088         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
4089         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
4090         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
4091         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
4092         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
4093         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
4094         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
4095         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
4097         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
4098         only if not already defined.
4100 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
4102         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
4103         constraint "m" instead of "0" for futex.
4105         * shlib-versions: Add powerpc64-.*-linux.*.
4107 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
4109         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
4110         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
4111         for valid tv_nsec.
4112         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
4113         1 billion and 64-bit tv_nsec which is valid when truncated to 32
4114         bits.
4116 2004-06-29  Roland McGrath  <roland@redhat.com>
4118         * Banner: NPTL no longer has its own version number.
4119         * Makefile (nptl-version): Variable removed.
4120         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
4121         using $(version), the glibc version number.
4123 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4125         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4126         Fix branch offset for a PLT entry.
4127         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4128         Likewise.
4129         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4130         Likewise.
4131         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4132         Likewise.
4133         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4134         Likewise.
4136 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4138         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4139         unconditionally.
4141 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4143         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4144         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4145         instead of tv_sec.
4146         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4147         (pthread_rwlock_timedrdlock): Likewise.
4149 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4151         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4152         Set __r7 to val, not mutex.
4154 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4156         * Makefile: Add rules to build tst-rwlock14.
4157         * tst-rwlock14.c: New file.
4159 2004-06-24  Boris Hu  <boris.hu@intel.com>
4161         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4162         check.
4163         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4165 2004-06-19  Andreas Jaeger  <aj@suse.de>
4167         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4168         assembler in last patch.
4170 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4172         * sysdeps/pthread/pthread_cond_timedwait.c
4173         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4174         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4175         (__pthread_cond_timedwait): Check for invalid nanosecond in
4176         timeout value.
4177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4178         * tst-cond19.c: New file.
4179         * Makefile: Add rules to build and run tst-cond19.
4181 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4183         * tst-context1.c (GUARD_PATTERN): Defined.
4184         (tst_context_t): Define struct containing ucontext_t & guard words.
4185         (ctx): Declare as an array of tst_context_t.
4186         (fct): Verify uc_link & guard words are still valid.
4187         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4189 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4191         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4192         Add __data.__futex field, reshuffle __data.__clock.
4193         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4194         (__pthread_cond_signal): Increment __futex at the same time as
4195         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4196         address of low 32-bits of __wakeup_seq to futex syscall.
4197         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4198         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4199         releasing internal lock to FUTEX_WAIT.
4200         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4201         (__pthread_cond_timedwait): Likewise.
4202         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4203         (FUTEX_CMP_REQUEUE): Define.
4204         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4205         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4206         Pass __futex value from before the unlock and __futex address instead
4207         of address of low 32-bits of __wakeup_seq to futex syscall.
4208         Fallback to FUTEX_WAKE all on any errors.
4210 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4212         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4213         comment typo.
4214         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4215         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4216         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4217         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4218         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4220 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4222         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4223         Add memory clobber to inline assembly.
4224         (__lll_mutex_trylock): Likewise.
4225         (__lll_mutex_cond_trylock): Likewise.
4227 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4229         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4230         Pass val argument as 6th system call argument in %r7.
4232 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4234         * Makefile (tests): Add tst-cond16.
4235         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4236         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4237         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4238         Add __data.__futex field, reshuffle __data.__clock.
4239         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4240         (__pthread_cond_signal): Increment __futex at the same time as
4241         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4242         address of low 32-bits of __wakeup_seq to futex syscall.
4243         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4244         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4245         releasing internal lock to FUTEX_WAIT.
4246         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4247         (__pthread_cond_timedwait): Likewise.
4248         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4249         (FUTEX_CMP_REQUEUE): Define.
4250         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4251         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4252         Pass __futex value from before the unlock and __futex address instead
4253         of address of low 32-bits of __wakeup_seq to futex syscall.
4254         Fallback to FUTEX_WAKE all on any errors.
4255         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4256         Define.
4257         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4258         internally.  Return non-zero if error, zero if success.
4259         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4260         Add __data.__futex field, reshuffle __data.__clock.
4261         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4262         Define.
4263         (lll_futex_requeue): Add val argument, return 1 unconditionally
4264         for the time being.
4265         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4266         Add __data.__futex field, reshuffle __data.__clock.
4267         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4268         Define.
4269         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4270         internally.  Return non-zero if error, zero if success.
4271         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4272         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4273         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4274         Define.
4275         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4276         internally.  Return non-zero if error, zero if success.
4277         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4278         Add __data.__futex field, reshuffle __data.__clock.
4279         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4280         Define.
4281         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4282         internally.  Return non-zero if error, zero if success.
4283         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4284         Add __data.__futex field, reshuffle __data.__clock.
4285         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4286         Add __data.__futex field, reshuffle __data.__clock.
4287         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4288         Increment __futex at the same time as __wakeup_seq or __total_seq.
4289         Pass address of __futex instead of address of low 32-bits of
4290         __wakeup_seq to futex syscall.
4291         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4292         Pass __futex value from before releasing internal lock
4293         to FUTEX_WAIT.
4294         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4295         Likewise.  Avoid unnecessary shadowing of variables.
4296         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4297         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4298         unlock and __futex address instead of address of low 32-bits of
4299         __wakeup_seq to futex_requeue macro, adjust for new return value
4300         meaning.
4301         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4302         (__pthread_cond_signal): Increment __futex at the same time as
4303         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4304         address of low 32-bits of __wakeup_seq to futex syscall.
4305         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4306         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4307         releasing internal lock to FUTEX_WAIT.
4308         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4309         (__pthread_cond_timedwait): Likewise.
4310         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4311         (FUTEX_CMP_REQUEUE): Define.
4312         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4313         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4314         Pass __futex value from before the unlock and __futex address instead
4315         of address of low 32-bits of __wakeup_seq to futex syscall.
4316         Fallback to FUTEX_WAKE all on any errors.
4318 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4320         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4321         Add nop to align the end of critical section.
4322         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4324 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4326         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4327         Add __broadcast_seq field.
4328         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4329         all waiters as woken with woken_seq and bump broadcast counter.
4330         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4331         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4332         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4333         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4335 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4337         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4338         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4339         Reported by Kaz Kojima.
4341 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4343         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4345 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4347         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4348         __broadcast_seq with bc_seq after acquiring internal lock instead of
4349         before it.
4351 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4353         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4354         compilation.
4355         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4356         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4357         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4358         (pthread_cond_t): Add __data.__broadcast_seq field.
4359         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4360         (FRAME_SIZE): Define.
4361         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4362         Comment typo fixes.
4363         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4364         Define.
4365         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4366         typo fixes.
4367         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4368         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4369         fixes.
4371 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4373         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4374         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4375         Add __broadcast_seq field.
4376         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4377         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4378         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4379         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4380         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4381         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4382         all waiters as woken with woken_seq and bump broadcast counter.
4383         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4385         __broadcast_seq field.
4386         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4387         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4388         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4389         * pthread_cond_init.c: Initialize __broadcast_seq field.
4390         * Makefile (tests): Add tst-cond17 and tst-cond18.
4391         Add .NOTPARALLEL goal.
4392         * tst-cond16.c: New file.  From Jakub.
4393         * tst-cond17.c: New file.  From Jakub.
4394         * tst-cond18.c: New file.  From Jakub.
4396 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4398         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4399         unwind info.
4401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4402         Parametrize frame size.  Correct some unwind info.
4403         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4405 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4407         * tst-stack3.c: Note testing functionality beyond POSIX.
4409 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4411         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4412         Change conditional from ifdef to if.
4414 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4416         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4417         SYSDEP_CANCEL_ERROR): Define.
4418         (PSEUDO): Use it.
4420 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4422         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4424 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4426         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4428 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4430         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4431         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4432         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4433         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4435 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4437         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4438         thread has all signals blocked.
4440 2004-04-18  Andreas Jaeger  <aj@suse.de>
4442         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4443         (SEM_VALUE_MAX): Add missing brace.
4445 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4447         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4448         in rt subdir.
4449         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4450         * sysdeps/pthread/tst-mqueue8x.c: New test.
4451         * tst-cancel4.c: Update comment about message queues.
4453         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4454         return it_value { 0, 0 }.
4455         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4456         like SIGEV_SIGNAL.
4457         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4458         assertion for SIGEV_NONE.
4459         (thread_attr_compare): Compare all attributes, not just a partial
4460         subset.
4462 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4464         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4466 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4468         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4469         Just use a plain number.
4470         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4471         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4472         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4473         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4474         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4475         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4476         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4478 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4480         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4481         frame info.
4482         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4484 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4486         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4487         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4488         of calling sigwaitinfo.
4490 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4492         * allocatestack.c (allocate_stack): Set reported_guardsize
4493         unconditionally.
4494         * pthread_getattr_np.c (pthread_getattr_np): Use
4495         reported_guardsize instead of guardsize.
4496         * descr.h (struct pthread): Add reported_guardsize field.
4498 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4500         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4502 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4504         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4506 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4508         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4509         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4510         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4511         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4512         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4513         Define.
4514         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4515         (_POSIX_MESSAGE_PASSING): Define.
4516         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4517         (_POSIX_MESSAGE_PASSING): Define.
4518         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4519         (_POSIX_MESSAGE_PASSING): Define.
4521 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4523         * tst-context1.c (fct): Check whether correct stack is used.
4525 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4527         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4528         matching constraints for asm mem parameters.
4530         * tst-clock2.c (tf): Don't define unless needed.
4532 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4534         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4535         $(gnulib).
4537 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4539         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4540         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4541         * pthreadP.h: Declare __nptl_deallocate_tsd.
4542         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4543         Adjust caller.
4545         * Makefile (tests): Add tst-tsd5.
4546         * tst-tsd5.c: New file.
4548 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4550         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4551         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4552         is SHLIB_COMPAT check.
4553         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4554         (__pthread_attr_getaffinity_old): Likewise.
4555         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4556         (__pthread_getaffinity_old): Likewise.
4557         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4558         (__pthread_setaffinity_old): Likewise.
4560 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4562         * allocatestack.c (_make_stacks_executable): Call
4563         _dl_make_stack_executable first.
4565 2004-03-24  Roland McGrath  <roland@redhat.com>
4567         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4568         constraint instead of "0".
4570 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4572         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4573         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4575         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4576         code to avoid warning.
4578 2004-03-24  Andreas Jaeger  <aj@suse.de>
4580         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4581         (__pthread_attr_setaffinity_old): Remove const.
4583 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4585         * sysdeps/unix/sysv/linux/smp.h: New file.
4586         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4587         * init.c: Define __is_smp.
4588         (__pthread_initialize_minimal_internal): Call is_smp_system to
4589         initialize __is_smp.
4590         * pthreadP.h: Declare __is_smp.
4591         Define MAX_ADAPTIVE_COUNT is necessary.
4592         * pthread_mutex_init.c: Add comment regarding __spins field.
4593         * pthread_mutex_lock.c: Implement adaptive mutex type.
4594         * pthread_mutex_timedlock.c: Likewise.
4595         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4596         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4597         Add __spins field.
4598         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4599         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4600         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4601         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4602         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4603         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4604         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4605         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4606         lll_mutex_cond_trylock.
4607         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4608         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4609         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4610         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4611         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4612         Define BUSY_WAIT_NOP.
4613         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4614         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4616         * tst-mutex5.c: Add support for testing adaptive mutexes.
4617         * tst-mutex7.c: Likewise.
4618         * tst-mutex5a.c: New file.
4619         * tst-mutex7a.c: New file.
4620         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4622         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4623         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4624         vgettimeofday call might destroy the content.
4626         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4627         @pause in the loop.
4629         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4630         No need to restrict type of ret.  Make it int.  Add comment.
4632         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4633         Remove unnecessary setne instruction.
4635 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4637         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4638         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4639         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4640         If realloc fails, break out of the loop.
4642 2004-03-20  Andreas Jaeger  <aj@suse.de>
4644         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4645         (__pthread_setaffinity_old): Fix interface.
4646         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4647         (__pthread_getaffinity_old): Likewise.
4649         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4650         (__pthread_setaffinity_new): Remove duplicate declaration.
4652 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4654         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4655         the return value to a safe register.
4656         (CDISABLE): Set the function argument correctly.
4658 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4660         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4661         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4662         Rewrite so that only one locked memory operation per round is needed.
4663         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4664         (pthread_barrier_wait): After wakeup, release lock only when the
4665         last thread stopped using the barrier object.
4666         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4667         (__pthread_cond_wait): Don't store mutex address if the current
4668         value is ~0l.  Add correct cleanup support and unwind info.
4669         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4670         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4671         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4672         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4673         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4674         Add correct cleanup support and unwind info.
4675         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4676         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4677         information for syscall wrappers.
4679 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4681         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4682         cpusetsize field, remove next.
4683         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4684         parameter for size of the CPU set.
4685         (pthread_setaffinity_np): Likewise.
4686         (pthread_attr_getaffinity_np): Likewise.
4687         (pthread_attr_setaffinity_np): Likewise.
4688         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4689         interface change, keep compatibility code.
4690         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4691         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4692         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4693         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4694         __pthread_getaffinity_np.
4695         * Versions: Add version for changed interfaces.
4696         * tst-attr3.c: Adjust test for interface change.
4697         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4698         increasing buffer sizes.
4699         * pthread_attr_destroy.c: Remove unused list handling.
4700         * pthread_attr_init.c: Likewise.
4702 2004-03-17  Roland McGrath  <roland@redhat.com>
4704         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4705         first argument to clock_getres so we ever enable kernel timers.
4707 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4709         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4711 2004-03-12  Richard Henderson  <rth@redhat.com>
4713         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4714         oldvalue from CENABLE to CDISABLE.
4716 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4718         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4719         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4720         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4721         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4723 2004-03-11  Richard Henderson  <rth@redhat.com>
4725         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4726         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4727         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4729 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4731         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4732         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4733         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4735 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4737         * forward.c (__pthread_cond_broadcast_2_0,
4738         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4739         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4740         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4742 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4744         * sysdeps/sh/tcb-offsets.sym: Add PID.
4745         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4746         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4748 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4750         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4751         include <sysdep-cancel.h>, vfork is no cancellation point.
4752         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4753         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4754         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4756 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4758         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4759         libc_hidden_def.
4760         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4761         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4762         Likewise.
4763         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4764         Likewise.
4765         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4766         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4767         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4768         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4769         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4771         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4772         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4773         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4774         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4775         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4776         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4778         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4779         a local register for saving old PID.  Negate PID in parent upon exit.
4781         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4782         tcb-offsets.h.
4783         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4784         before syscall, set to the old value in the parent afterwards.
4785         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4786         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4787         tcb-offsets.h.
4788         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4789         before syscall, set to the old value in the parent afterwards.
4790         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4791         * sysdeps/s390/tcb-offsets.sym: Add PID.
4793         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4794         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4795         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4796         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4797         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4798         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4800 2004-03-10  Andreas Schwab  <schwab@suse.de>
4802         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4803         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4804         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4806 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4808         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4809         * tst-cancel21.c (do_one_test): Likewise.
4810         Reported by Gordon Jin <gordon.jin@intel.com>.
4812 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4814         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4815         if non-zero and set to INT_MIN if zero.
4816         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4817         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4818         (SAVE_PID, RESTORE_PID): Define.
4819         (__vfork): Use it.
4820         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4821         Use relative path to avoid including NPTL i386/vfork.S.
4822         (SAVE_PID, RESTORE_PID): Define.
4823         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4824         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4825         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4826         tst-vfork2x.
4827         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4828         * tst-vfork1.c: New test.
4829         * tst-vfork2.c: New test.
4830         * tst-vfork1x.c: New test.
4831         * tst-vfork2x.c: New test.
4833 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4835         * sysdeps/i386/tcb-offsets.sym: Add PID.
4836         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4837         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4838         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4840 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4842         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4844 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4846         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4847         _rtld_global_ro.
4849 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4851         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4852         _rtld_global_ro.
4854         * tst-once4.c: Remove unnecessary macro definition.
4856         * tst-mutex7.c (do_test): Limit thread stack size.
4857         * tst-once2.c (do_test): Likewise.
4858         * tst-tls3.c (do_test): Likewise.
4859         * tst-tls1.c (do_test): Likewise.
4860         * tst-signal3.c (do_test): Likewise.
4861         * tst-kill6.c (do_test): Likewise.
4862         * tst-key4.c (do_test): Likewise.
4863         * tst-join4.c (do_test): Likewise.
4864         * tst-fork1.c (do_test): Likewise.
4865         * tst-context1.c (do_test): Likewise.
4866         * tst-cond2.c (do_test): Likewise.
4867         * tst-cond10.c (do_test): Likewise.
4868         * tst-clock2.c (do_test): Likewise.
4869         * tst-cancel10.c (do_test): Likewise.
4870         * tst-basic2.c (do_test): Likewise.
4871         * tst-barrier4.c (do_test): Likewise.
4873 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4875         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4877 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4879         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4880         (__pthread_cond_timedwait): Optimize wakeup test.
4881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4882         (__pthread_cond_wait): Likewise.
4883         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4884         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4885         Likewise.
4887 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4889         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4890         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4891         the atomic instruction needed.
4892         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4893         (__lll_mutex_lock_wait): Likewise.
4895 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4897         * Makefile (tests): Add tst-cond14 and tst-cond15.
4898         * tst-cond14.c: New file.
4899         * tst-cond15.c: New file.
4901 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4903         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4904         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4905         needs to be implemented differently to be useful.
4907 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4909         * pthread_attr_setschedparam.c: Don't test priority against limits
4910         here.  Set ATTR_FLAG_SCHED_SET flag.
4911         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4912         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4913         from parent thread to child.  If attribute is used and scheduling
4914         parameters are not inherited, copy parameters from attribute or
4915         compute them.  Check priority value.
4916         * pthread_getschedparam.c: If the parameters aren't known yet get
4917         them from the kernel.
4918         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4919         ATTR_FLAG_POLICY_SET flag for thread.
4920         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4921         and ATTR_FLAG_POLICY_SET.
4923         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4925         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4926         fail if stack address hasn't been set.  Just return 0.
4928 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4930         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4931         libpthread for the files in this list.
4932         (CFLAGS-tst-unload): Removed.
4933         * tst-unload.c (do_test): Don't use complete path for
4934         LIBPHREAD_SO.
4936         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4937         tst-_res1mod2.
4939 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4941         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4942         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4943         operation per round is needed.
4944         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4945         (__lll_mutex_lock_wait): Likewise.
4947 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4949         * tst-cancel9.c (cleanup): Don't print to stderr.
4951 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4953         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4955 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4957         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4958         (__syscall_error_handler2): Call CDISABLE.
4959         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4960         (__syscall_error_handler2): Call CDISABLE.
4962         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4963         Release lock before the loop, don't reacquire it.
4965         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4967 2004-02-19  Andreas Schwab  <schwab@suse.de>
4969         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4970         Fix last change.
4972 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4974         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4975         (pthread_barrier_wait): After wakeup, release lock only when the
4976         last thread stopped using the barrier object.
4977         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4978         (pthread_barrier_wait): Likewise.
4979         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4980         Likewise.
4981         * Makefile (tests): Add tst-barrier4.
4982         * tst-barrier4.c: New file.
4984         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4985         (__pthread_cond_timedwait): Perform timeout test while holding
4986         internal lock to prevent wakeup race.
4987         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4988         * sysdeps/pthread/pthread_cond_timedwait.c
4989         (__pthread_cond_timedwait): Likewise.
4990         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4991         (__pthread_cond_timedwait): Likewise.
4993 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4995         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4996         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4997         * Makefile (tests): Add tst-rwlock13.
4998         * tst-rwlock13.c: New test.
5000 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
5002         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5003         (__condvar_tw_cleanup): Little optimization.
5004         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
5006 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
5008         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
5009         libpthread as "lib" parameter to SHLIB_COMPAT.
5010         (__novmx_siglongjmp): Fix typo in function name.
5011         (__novmx_longjmp): Fix typo in function name.
5013 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5015         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
5016         __builtin_expect.
5018         * sysdeps/generic/pt-longjmp.c: Moved to...
5019         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
5021 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
5023         * Makefile (libpthread-routines): Add pt-cleanup.
5024         * pt-longjmp.c: Removed.
5025         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
5026         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
5027         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
5028         Version longjmp, siglongjmp for GLIBC_2.3.4.
5029         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
5031 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
5033         * sysdeps/pthread/pthread_cond_timedwait.c
5034         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
5035         Reuse code.  Add __builtin_expects.
5037         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5038         (__pthread_cond_timedwait): Get internal lock in case timeout has
5039         passed before the futex syscall.
5040         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5042 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
5044         * allocatestack.c: Pretty printing.
5046         * sysdeps/pthread/createthread.c (create_thread): Don't add
5047         CLONE_DETACHED bit if it is not necessary.
5049 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
5051         * pthread_getattr_np.c: Include ldsodefs.h.
5053 2004-01-16  Richard Henderson  <rth@redhat.com>
5055         * allocatestack.c: Don't declare __libc_stack_end.
5056         * init.c (__pthread_initialize_minimal_internal): Likewise.
5057         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
5059 2004-01-15  Richard Henderson  <rth@redhat.com>
5061         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
5062         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
5063         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
5064         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
5065         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
5066         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
5067         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
5068         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
5070 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
5072         * init.c (pthread_functions): Make array const.
5074 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
5076         * allocatestack.c (__make_stacks_executable): Change interface.
5077         Check parameters.  Pass parameter on to libc counterpart.
5078         * pthreadP.h: Change declaration.
5080 2004-01-13  Richard Henderson  <rth@redhat.com>
5082         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
5083         prototype form.
5084         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
5085         Likewise.
5087         * sysdeps/alpha/Makefile: New file.
5088         * sysdeps/alpha/tcb-offsets.sym: New file.
5089         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
5090         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
5092         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
5093         on powerpc version.
5095 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
5097         * Makefile (tests): Add tst-backtrace1.
5098         * tst-backtrace1.c: New test.
5100 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
5102         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
5103         register as second parameter to the REGISTER macro.
5104         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
5105         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
5106         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
5107         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
5108         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
5109         of thread register as second parameter to REGISTER macro in 64 case.
5111 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
5113         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
5114         (CFLAGS-getpid.o): Defined.
5115         (CFLAGS-getpid.os): Defined.
5117 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
5119         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
5120         returned for main thread does not overlap with any other VMA.
5121         Patch by Jakub Jelinek.
5123 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
5125         * tst-raise1.c: Include stdio.h.
5127 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5129         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5130         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5131         If pid is 0, set it to selftid.
5132         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5133         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5134         != 0, return self->tid without doing a syscall.
5135         * descr.h (struct pthread): Move pid field after tid.
5137         * Makefile (tests): Add tst-raise1.
5138         * tst-raise1.c: New file.
5140 2003-12-23  Roland McGrath  <roland@redhat.com>
5142         * tst-oddstacklimit.c: New file.
5143         * Makefile (tests): Add it.
5144         (tst-oddstacklimit-ENV): New variable.
5146         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5147         value up to page size for __default_stacksize.
5149 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5151         * Makefile (tests): Add tst-eintr5.
5152         * tst-eintr5.c: New file.
5154         * eintr.c (eintr_source): Prevent sending signal to self.
5156         * tst-eintr2.c (tf1): Improve error message.
5158 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5160         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5161         * sysdeps/unix/sysv/linux/getpid.c: New file.
5162         * pthread_cancel.c: Add comment explaining use of PID field.
5163         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5164         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5165         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5166         temporarily to signal the field must not be relied on and updated
5167         by getpid().
5168         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5169         temporarily negative.
5170         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5172 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5174         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5175         (eintr_source): If ARG != NULL, use pthread_kill.
5176         * tst-eintr1.c: Adjust for this change.
5177         * tst-eintr2.c: Likewise.
5178         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5179         * tst-eintr3.c: New file.
5180         * tst-eintr4.c: New file.
5182 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5184         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5185         if CANCELSTATE_BITMASK is set.
5186         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5187         Likewise.
5189         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5190         (tests-reverse): Add tst-cancel23.
5191         * tst-cancel22.c: New test.
5192         * tst-cancel23.c: New test.
5194 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5196         * tst-eintr1.c: Better error messages.
5198         * Makefile (tests): Add tst-eintr2.
5199         * tst-eintr2.c: New file.
5201 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5203         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5204         (CFLAGS-tst-cancelx21.c): Set.
5205         * tst-cancel21.c: New test.
5206         * tst-cancelx21.c: New test.
5208         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5209         comparison operand.
5210         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5211         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5212         * pt-longjmp.c: Include jmpbuf-unwind.h.
5213         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5214         _JMPBUF_UNWINDS.  Adjust compared pointers.
5215         * init.c (__pthread_initialize_minimal_internal): Initialize
5216         pd->stackblock_size.
5217         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5218         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5219         * sysdeps/i386/jmpbuf-unwind.h: New file.
5220         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5221         * sysdeps/s390/jmpbuf-unwind.h: New file.
5222         * sysdeps/sh/jmpbuf-unwind.h: New file.
5223         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5224         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5225         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5226         (_JMPBUF_CFA_UNWINDS): Remove.
5227         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5229 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5231         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5232         (CFLAGS-tst-cancelx20.c): Set.
5233         * tst-cancel20.c: New test.
5234         * tst-cancelx20.c: New test.
5236 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5238         * init.c (__pthread_initialize_minimal_internal): Don't treat
5239         architectures with separate register stack special here when
5240         computing default stack size.
5242 2003-12-17  Roland McGrath  <roland@redhat.com>
5244         * Makefile (tst-cancelx7-ARGS): New variable.
5245         Reportd by Greg Schafer <gschafer@zip.com.au>.
5247 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5249         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5250         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5251         (tst-stack3-ENV): Set.
5252         ($(objpfx)tst-stack3-mem): New.
5253         * tst-stack3.c: New test.
5255 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5257         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5258         Add unwind directives.  Drop unused .regstk directive.
5259         (_fini_EPILOG_BEGINS): Add unwind directives.
5261 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5263         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5264         Assume parameter is a pointer.
5265         (lll_futex_wake): Likewise.
5266         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5267         Likewise.
5268         (lll_futex_wake): Likewise.
5269         Reported by Boris Hu.
5270         * sysdeps/unix/sysv/linux/unregister-atfork.c
5271         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5273         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5275 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5277         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5278         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5279         __rtld_lock_initialize for ld.so lock.
5280         Patch in part by Adam Li <adam.li@intel.com>.
5282 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5284         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5285         in $(gnulib).  Also, remove stale comment.
5287 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5289         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5290         advantage of new syscall stub and optimize accordingly.
5292         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5293         from SYS_futex, to match expectations of
5294         sysdep.h:DO_INLINE_SYSCALL.
5295         (lll_futex_clobbers): Remove.
5296         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5297         (lll_futex_wake): Likewise.
5298         (lll_futex_requeue): Likewise.
5299         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5300         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5301         Jelinek).
5302         (__lll_mutex_lock): Likewise.
5303         (__lll_mutex_cond_lock): Likewise.
5304         (__lll_mutex_timed_lock): Likewise.
5305         (__lll_mutex_unlock): Likewise.
5306         (__lll_mutex_unlock_force): Likewise.
5308         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5309         comes before the include of <sysdep.h>.
5310         (THREAD_SELF_SYSINFO): New macro.
5311         (THREAD_SYSINFO): Likewise.
5312         (INIT_SYSINFO): New macro.
5313         (TLS_INIT_TP): Call INIT_SYSINFO.
5315         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5317         * sysdeps/pthread/createthread.c (create_thread): Use
5318         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5319         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5320         THREAD_SELF_SYSINFO instead of open code.
5321         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5322         (THREAD_SYSINFO): Likewise.
5324         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5326         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5328 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5330         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5331         instead of .init.  Patch by David Mosberger.
5333 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5335         * sysdeps/pthread/configure.in: Remove broken declaration in C
5336         cleanup handling check.
5338 2003-11-30  Andreas Jaeger  <aj@suse.de>
5340         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5341         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5342         Likewise.
5344 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5346         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5347         * pthread_attr_destroy.c: Include shlib-compat.h.
5348         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5349         is set in iattr->flags.
5350         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5352 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5354         * Makefile (distribute): Add tst-cleanup4aux.c.
5356         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5357         include.
5359 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5361         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5362         pthread_cond_signal.
5364         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5365         store mutex address if the current value is ~0l.
5366         * sysdeps/pthread/pthread_cond_timedwait.c
5367         (__pthread_cond_timedwait): Likewise.
5368         * sysdeps/pthread/pthread_cond_broadcast.c
5369         (__pthread_cond_broadcast): Don't use requeue for pshared
5370         condvars.
5372         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5373         (__pthread_cond_wait): Don't store mutex address if the current
5374         value is ~0l.
5375         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5376         (__pthread_cond_timedwait): Likewise.
5377         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5378         (__pthread_cond_broadcast): Don't use requeue for pshared
5379         condvars.
5381         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5382         element with ~0l for pshared condvars, with NULL otherwise.
5384         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5385         (__pthread_cond_wait): Don't store mutex address if the current
5386         value is ~0l.
5387         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5388         (__pthread_cond_timedwait): Likewise.
5389         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5390         (__pthread_cond_broadcast): Don't use requeue for pshared
5391         condvars.
5393         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5394         * tst-cond12.c: New file.
5395         * tst-cond13.c: New file.
5397 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5399         * sysdeps/pthread/configure.in: Make missing forced unwind support
5400         fatal.
5402 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5404         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5406 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5408         * Makefile: Add magic to clean up correctly.
5410 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5412         * unwind.c (FRAME_LEFT): Define.
5413         (unwind_stop): Handle old style cleanups here.
5414         (__pthread_unwind): Handle old style cleanups only if
5415         !HAVE_FORCED_UNWIND.
5416         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5417         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5418         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5419         ($(objpfx)tst-cleanupx4): Likewise.
5420         * tst-cleanup4.c: New test.
5421         * tst-cleanup4aux.c: New.
5422         * tst-cleanupx4.c: New test.
5424 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5426         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5427         lll_mutex_*lock macros to skip atomic operations on some archs.
5429 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5431         * sysdeps/pthread/tst-timer.c (main): Initialize
5432         sigev2.sigev_value as well.
5434 2003-10-15  Roland McGrath  <roland@redhat.com>
5436         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5437         is missing.
5438         * sysdeps/pthread/configure: Regenerated.
5440 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5442         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5443         locking macros.  No distinction between normal and mutex locking
5444         anymore.
5445         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5446         Merge bits from lowlevelmutex.S we still need.
5447         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5448         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5449         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5450         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5451         new mutex implementation.
5452         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5453         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5454         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5455         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5456         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5457         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5458         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5459         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5460         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5461         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5462         symbol for entry point to avoid cancellation.
5464 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5466         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5467         changes.
5468         (SAVE_OLDTYPE_0): Fix a typo.
5470 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5472         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5473         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5475 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5477         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5478         correct offset.
5480 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5482         * Makefile (tests): Add tst-cancel19.
5483         * tst-cancel19.c: New test.
5485 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5487         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5488         restoring of the old cancellation type.
5490 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5492         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5494 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5496         * sysdeps/pthread/malloc-machine.h: New file
5498 2003-09-24  Roland McGrath  <roland@redhat.com>
5500         * allocatestack.c (__make_stacks_executable): Don't ignore return
5501         value from _dl_make_stack_executable.
5503 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5505         * allocatestack.c (__make_stacks_executable): Also change
5506         permission of the currently unused stacks.
5508         * allocatestack.c (change_stack_perm): Split out from
5509         __make_stacks_executable.
5510         (allocate_stack): If the required permission changed between the time
5511         we started preparing the stack and queueing it, change the permission.
5512         (__make_stacks_executable): Call change_stack_perm.
5514         * Makefile: Build tst-execstack-mod locally.
5515         * tst-execstack-mod.c: New file.
5517 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5519         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5521 2003-09-23  Roland McGrath  <roland@redhat.com>
5523         * tst-execstack.c: New file.
5524         * Makefile (tests): Add it.
5525         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5526         (LDFLAGS-tst-execstack): New variable.
5528         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5529         whether to use PROT_EXEC for stack mmap.
5530         (__make_stacks_executable): New function.
5531         * pthreadP.h: Declare it.
5532         * init.c (__pthread_initialize_minimal_internal): Set
5533         GL(dl_make_stack_executable_hook) to that.
5535 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5537         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5538         recommendation from AMD re avoidance of lock prefix.
5540 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5542         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5543         lll_futex_timed_wait instead of lll_futex_wait.
5544         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5545         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5546         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5547         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5548         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5549         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5550         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5551         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5552         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5553         Completely revamp the locking macros.  No distinction between
5554         normal and mutex locking anymore.
5555         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5556         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5557         __lll_lock_timedwait): Fix prototypes.
5558         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5559         __lll_lock_timedwait): Likewise.
5560         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5561         macros, add __builtin_expect.
5562         (lll_mutex_timedlock): Likewise.  Fix return value.
5563         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5564         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5565         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5566         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5567         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5568         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5569         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5570         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5572 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5574         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5575         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5576         operation if possible.
5578         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5579         like jumping over the lock prefix.
5581 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5583         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5584         locking macros.  No distinction between normal and mutex locking
5585         anymore.
5586         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5587         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5588         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5589         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5590         locking.  Merge bits from lowlevelmutex.S we still need.
5591         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5592         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5593         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5594         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5595         * Makefile (routines): Remove libc-lowlevelmutex.
5596         (libpthread-rountines): Remove lowlevelmutex.
5597         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5598         for new mutex implementation.
5599         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5600         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5601         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5602         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5603         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5604         Likewise.
5605         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5606         Likewise.
5607         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5608         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5609         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5610         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5611         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5612         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5613         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5614         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5615         Likewise.
5616         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5617         Likewise.
5618         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5619         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5620         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5621         Don't use requeue.
5622         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5623         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5625 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5627         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5628         in parameters of asm with output parameters.
5630         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5631         type of DECR parameter to int.
5632         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5634 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5636         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5637         guardsize for each thread.
5639 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5641         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5642         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5643         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5645         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5646         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5647         NULL.
5648         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5649         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5650         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5651         (pthread_getaffinity_np): Add hidden_def.
5653         * Makefile (tests): Add tst-attr3.
5654         * tst-attr3.c: New test.
5656         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5658 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5660         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5661         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5663 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5665         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5666         * tst-align.c: Include tst-stack-align.h.
5667         (tf, do_test): Use TEST_STACK_ALIGN macro.
5669 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5671         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5672         variable.
5674 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5676         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5677         stack-related values for the initial thread.
5679 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5681         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5683 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5685         * pthread_mutex_lock.c: Minor code rearrangements.
5687 2003-09-05  Roland McGrath  <roland@redhat.com>
5689         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5690         Instead, include ../nptl_db/db_info.c to do its magic.
5691         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5692         (__pthread_pthread_key_2ndlevel_size): Likewise.
5693         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5694         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5695         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5696         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5697         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5698         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5699         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5700         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5701         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5702         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5703         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5704         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5705         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5706         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5707         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5708         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5709         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5711 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5713         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5714         of pthread_t to be compatible with LT.
5715         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5716         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5717         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5718         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5719         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5720         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5721         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5723 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5725         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5727 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5729         * unwind-forcedunwind.c: Move to...
5730         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5731         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5732         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5733         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5734         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5735         * unwind.c: Include jmpbuf-unwind.h.
5736         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5738 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5740         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5741         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5742         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5743         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5744         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5745         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5746         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5747         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5748         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5749         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5750         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5751         function.
5752         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5753         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5754         * Makefile (tests): Add tst-stack2.
5755         * tst-stack2.c: New test.
5756         * tst-stack1.c: Include limits.h and sys/param.h.
5757         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5759         * pthread_condattr_setpshared.c: Include errno.h.
5760         (pthread_condattr_setpshared): Return EINVAL if pshared
5761         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5763         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5764         defined symbol for entry point to avoid cancellation.
5765         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5766         Likewise.
5767         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5768         Likewise.
5769         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5770         Likewise.
5771         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5772         Likewise.
5773         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5774         Likewise.
5775         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5776         __close_nocancel, __read_nocancel, __write_nocancel,
5777         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5778         libpthread.so or librt.so, define to corresponding function
5779         without _nocancel suffix.
5780         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5781         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5782         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5784         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5786 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5788         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5789         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5791         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5792         in subsections has a symbol associated with it.
5794         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5795         defined symbol for entry point to avoid cancellation.
5796         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5798 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5800         * Makefile (tests): Add tst-tls5.
5801         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5802         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5803         ($(objpfx)tst-tls5): New.
5804         ($(objpfx)tst-tls6.out): Likewise.
5805         (tests): Depend on $(objpfx)tst-tls6.out.
5806         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5807         (do_test): Check pthread_self () return value alignment.
5808         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5809         (tf): Check pthread_self () return value alignment.
5810         * tst-tls5.c: New test.
5811         * tst-tls5.h: New.
5812         * tst-tls5mod.c: New.
5813         * tst-tls5moda.c: New.
5814         * tst-tls5modb.c: New.
5815         * tst-tls5modc.c: New.
5816         * tst-tls5modd.c: New.
5817         * tst-tls5mode.c: New.
5818         * tst-tls5modf.c: New.
5819         * tst-tls6.sh: New test.
5821         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5822         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5823         * init.c (pthread_functions): Initialize them.
5824         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5825         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5826         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5827         pthread_cond_timedwait@@GLIBC_2.3.2.
5829 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5831         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5832         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5833         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5834         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5835         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5836         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5838         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5840         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5841         _POSIX_THREAD_PRIORITY_SCHEDULING.
5842         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5844 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5846         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5847         nested function, use static inline function from libio.h.
5848         Code by Richard Henderson.
5850         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5851         weak.
5853 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5855         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5856         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5857         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5858         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5859         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5860         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5861         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5862         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5863         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5864         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5865         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5866         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5867         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5868         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5869         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5870         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5871         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5872         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5873         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5874         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5875         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5876         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5877         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5878         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5879         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5880         * sysdeps/sparc/tls.h: New file.
5881         * sysdeps/sparc/tcb-offsets.sym: New file.
5882         * sysdeps/sparc/Makefile: New file.
5883         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5884         * init.c [__sparc__] (__NR_set_tid_address): Define.
5886 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5888         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5889         _IO_release_lock): Define.
5891 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5893         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5894         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5896 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5898         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5899         (__pthread_cleanup_class): Add missing return types of member
5900         functions.
5902 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5904         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5905         (lll_mutex_unlock_force): Add memory barrier between store and futex
5906         syscall.
5908 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5910         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5911         tempmsg in first loop.
5913 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5915         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5916         _POSIX_THREAD_PRIORITY_SCHEDULING.
5917         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5919 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5921         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5922         (__rtld_lock_default_lock_recursive,
5923         __rtld_lock_default_unlock_recursive): Define.
5924         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5925         __rtld_lock_unlock_recursive): Define using
5926         GL(_dl_rtld_*lock_recursive).
5927         * init.c (__pthread_initialize_minimal_internal): Initialize
5928         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5929         Lock GL(_dl_load_lock) the same number of times as
5930         GL(_dl_load_lock) using non-mt implementation was nested.
5932         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5933         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5935 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5937         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5938         PIPE_BUF.
5940 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5942         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5944 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5946         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5947         to first syscall error check.  Move syscall error check for tkill
5948         into __ASSUME_CLONE_STOPPED #ifdef.
5950 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5952         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5953         is not defined, do explicit synchronization.
5954         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5955         is not defined also unlock pd->lock for non-debugging case in case
5956         it is necessary.
5957         * pthread_create.c (start_thread): Always get and release pd->lock
5958         if __ASSUME_CLONE_STOPPED is not defined.
5959         (start_thread_debug): Removed.  Adjust users.
5960         * allocatestack.c (allocate_stack): Always initialize lock if
5961         __ASSUME_CLONE_STOPPED is not defined.
5962         * Makefile (tests): Add tst-sched1.
5963         * tst-sched1.c: New file.
5965         * sysdeps/pthread/createthread.c (do_clone): Only use
5966         sched_setschduler and pass correct parameters.
5968 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5970         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5971         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5972         PTHREAD_STACK_MIN in comments.
5974 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5976         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5977         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5978         argument.
5979         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5980         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5981         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5982         (__pthread_cleanup_upto): Fix prototype.
5983         (_longjmp_unwind): Adjust caller.
5984         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5985         Change second argument to const struct pointer.
5986         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5987         * tst-sem9.c (main): Likewise.
5988         * unwind.c: Include string.h for strlen prototype.
5990 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5992         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5993         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5994         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5995         Define HAVE_CMOV.
5996         Patch by Nicholas Miell <nmiell@attbi.com>.
5998 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
6000         * init.c (__pthread_initialize_minimal_internal): Initialize
6001         GL(dl_init_static_tls).
6002         * pthreadP.h (__pthread_init_static_tls): New prototype.
6003         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
6004         New functions.
6005         * Makefile (tests): Add tst-tls4.
6006         (modules-names): Add tst-tls4moda and tst-tls4modb.
6007         ($(objpfx)tst-tls4): Link against libdl and libpthread.
6008         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
6009         tst-tls4modb.so.
6010         * tst-tls4.c: New file.
6011         * tst-tls4moda.c: New file.
6012         * tst-tls4modb.c: New file.
6014 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
6016         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
6017         before __timer_dealloc.
6018         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
6019         Don't call list_unlink.
6021 2003-07-29  Roland McGrath  <roland@redhat.com>
6023         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
6025 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
6027         * tst-cancel17.c (do_test): Check if aio_cancel failed.
6028         Don't reuse struct aiocb A if it failed.
6029         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
6030         not just one byte, as that does not block.
6032 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
6034         * sysdeps/pthread/unwind-resume.c: New file.
6035         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
6036         unwind-resume in csu subdir.
6037         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
6038         exceptions.
6039         (librt-sysdep_routines, librt-shared-only-routines): Add
6040         rt-unwind-resume.
6041         * sysdeps/pthread/rt-unwind-resume.c: New file.
6042         * unwind-forcedunwind.c: New file.
6043         * Makefile (libpthread-routines): Add unwind-forcedunwind.
6044         (libpthread-shared-only-routines): Likewise.
6045         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
6046         * pthreadP.h (pthread_cancel_init): New prototype.
6047         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
6049         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
6050         attr argument const struct pthread_attr *.
6052         * res.c (__res_state): Return __resp.
6053         * descr.h: Include resolv.h.
6054         (struct pthread): Add res field.
6055         * pthread_create.c: Include resolv.h.
6056         (start_thread): Initialize __resp.
6057         * Makefile (tests): Add tst-_res1.
6058         (module-names): Add tst-_res1mod1, tst-_res1mod2.
6059         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
6060         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
6061         libpthread.
6062         * tst-_res1.c: New file.
6063         * tst-_res1mod1.c: New file.
6064         * tst-_res1mod2.c: New file.
6066 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
6068         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
6070         * Makefile: Define various *-no-z-defs variables for test DSOs
6071         which has undefined symbols.
6073 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
6075         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
6076         Retry if the stwcx fails to store once_control.
6078 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
6080         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
6081         pthread_attr_setaffinity.
6082         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
6083         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
6084         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
6085         * pthread_attr_destroy.c: Free cpuset element if allocated.
6086         * pthread_create.c: Pass iattr as additional parameter to
6087         create_thread.
6088         * sysdeps/pthread/createthread.c: If attribute is provided and
6089         a new thread is created with affinity set or scheduling parameters,
6090         start thread with CLONE_STOPPED.
6091         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
6092         pthread_attr_setaffinity.
6093         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
6094         cpuset element.
6096 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
6098         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
6100 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
6102         * sysdeps/pthread/configure.in: Require CFI directives also for
6103         ppc and s390.
6105 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
6107         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
6108         Add cfi directives.
6110 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6112         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
6113         CLEANUP_JMP_BUF.
6114         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
6115         registers as variables.  Call __pthread_mutex_unlock_usercnt.
6116         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
6117         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
6118         not self pointer in __writer.  Compare with TID to determine
6119         deadlocks.
6120         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6121         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
6122         Likewise.
6123         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6124         Likewise.
6125         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6126         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6127         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6128         macros also when compiling librt.
6130 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6132         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6133         -fasynchronous-unwind-tables.
6134         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6135         (PSEUDO): Add cfi directives.
6136         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6137         Likewise.
6138         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6139         Likewise.
6141 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6143         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6144         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6145         * unwind.c (__pthread_unwind_next): Add hidden_def.
6146         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6147         Likewise.
6148         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6149         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6150         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6151         Likewise.
6152         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6153         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6154         Likewise.
6155         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6156         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6157         __pthread_unregister_cancel and __pthread_unwind_next.
6159 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6161         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6162         different symbol for the cancellation syscall wrapper and
6163         non-cancellation syscall wrapper.
6164         (PSEUDO_END): Define.
6166 2003-07-05  Richard Henderson  <rth@redhat.com>
6168         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6169         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6170         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6171         return actual return value from the syscall, not 0.
6173 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6175         * descr.h (struct pthread): Add pid field.
6176         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6177         (__reclaim_stacks): Likewise.
6178         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6179         also check for PID of the signal source.
6180         (__pthread_initialize_minimal_internal): Also initialize pid field
6181         of initial thread's descriptor.
6182         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6183         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6184         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6185         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6186         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6188 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6190         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6191         Fix use of parameter.
6192         (__libc_cleanup_pop): Likewise.
6194 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6196         * init.c (sigcancel_handler): Change parameters to match handler
6197         for SA_SIGACTION.  Check signal number and code to recognize
6198         invalid invocations.
6200 2003-07-03  Roland McGrath  <roland@redhat.com>
6202         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6203         Apply sizeof (struct pthread) bias to r13 value.
6205 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6207         * sysdeps/pthread/configure.in: Require CFI directives.
6209         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6210         definition.
6211         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6212         libpthread compilation.
6213         * unwind.c (__pthread_unwind): Add hidden_def.
6214         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6216 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6218         * libc-cancellation.c (__libc_cleanup_routine): Define.
6219         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6220         (__pthread_cleanup_pop): Define.
6222 2003-07-01  Richard Henderson  <rth@redhat.com>
6224         * sysdeps/alpha/elf/pt-initfini.c: New file.
6225         * sysdeps/alpha/pthread_spin_lock.S: New file.
6226         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6227         * sysdeps/alpha/pthreaddef.h: New file.
6228         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6229         * sysdeps/alpha/tls.h: New file.
6230         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6231         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6232         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6233         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6234         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6235         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6236         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6237         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6238         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6239         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6241 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6243         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6244         cleanup support and unwind info.
6246 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6248         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6249         Use correct cleanup handler registration.  Add unwind info.
6250         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6251         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6252         * tst-once3.c: Add cleanup handler and check it is called.
6253         * tst-once4.c: Likewise.
6254         * tst-oncex3.c: New file.
6255         * tst-oncex4.c: New file.
6256         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6258 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6260         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6262 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6264         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6265         (tf_msgsnd): Likewise.
6267         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6268         premature returns a bit more.
6270 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6272         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6273         definition to the front.
6275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6276         the cleanup functions to make the names unique.  Fix dwarf opcode
6277         un unwind table.
6278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6279         functions to make the names unique.  Fix CFA offset for two blocks.
6281 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6283         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6284         missing closing braces.
6285         Patch by Christophe Saout <christophe@saout.de>.
6287 2003-06-24  Roland McGrath  <roland@redhat.com>
6289         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6291 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6293         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6294         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6296         * pthreadP.h: Declare __find_thread_by_id.
6297         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6298         * pthread_clock_gettime.c: Allow using other thread's clock.
6299         * pthread_clock_settime.c: Likewise.
6300         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6301         * Makefile: Add rules to build and run tst-clock2.
6302         * tst-clock2.c: New file.
6304 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6306         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6307         to use exception-based cleanup handler.
6308         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6310         * tst-cond8.c (ch): Announce that we are done.
6312         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6314         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6315         Also test aio_suspend with timeout value.
6317 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6319         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6320         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6321         attribute_hidden.
6323         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6324         (__pthread_mutex_lock_internal): Likewise.
6325         (__pthread_mutex_unlock_internal): Likewise.
6326         (__pthread_mutex_unlock_usercnt): Declare.
6327         * pthread_mutex_destroy.c: Always fail if used in any way.
6328         * pthread_mutex_init.c: Update comment.
6329         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6330         * pthread_mutex_timedlock.c: Adjust __nusers.
6331         * pthread_mutex_trylock.c: Adjust __nusers.
6332         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6333         and public interfaces are wrapper with pass additional parameter.
6334         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6335         parameter zero.
6336         * tst-mutex8.c: New file.
6337         * Makefile (tests): Add tst-mutex8.
6338         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6339         __pthread_mutex_unlock_usercnt.
6340         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6341         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6342         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6343         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6344         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6345         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6346         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6347         Add __nusers.
6348         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6349         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6350         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6351         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6352         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6354         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6355         * pthread_mutex_timedlock.c: Likewise.
6356         * pthread_mutex_trylock.c: Adjust __nusers.
6357         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6358         * tst-mutex9.c: New file.
6359         * Makefile (tests): Add tst-mutex9.
6360         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6361         * sysdeps/ia64/tls.h: Likewise.
6362         * sysdeps/powerpc/tls.h: Likewise.
6363         * sysdeps/s390/tls.h: Likewise.
6364         * sysdeps/sh/tls.h: Likewise.
6365         * sysdeps/x86_64/tls.h: Likewise.
6366         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6367         Change type of __owner.
6368         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6369         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6370         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6371         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6372         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6374 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6376         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6377         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6379         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6380         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6381         instead of nr to lll_futex_wake.  Only set errno and return -1
6382         if err < 0.
6384         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6385         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6386         return actual return value from the syscall, not 0.
6388 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6390         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6391         find a random value.
6392         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6393         errno==EIDRM.
6395         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6396         compat_timer_settime.
6397         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6398         compat_timer_gettime.
6399         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6400         compat_timer_getoverrun.
6401         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6402         compat_timer_delete.
6404         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6405         error-checking mutex detect busy mutexes.
6407 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6410         Add ax to clobber list.
6411         (lll_mutex_cond_lock): Likewise.
6412         (lll_mutex_unlock): Likewise.
6413         (lll_lock): Likewise.
6414         (lll_unlock): Likewise.
6416         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6417         * tst-cancel18.c: New file.
6418         * tst-cancelx18.c: New file.
6420         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6421         and tcdrain.
6423         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6424         * tst-cancel17.c: New file.
6425         * tst-cancelx17.c: New file.
6427         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6428         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6429         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6431         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6433 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6435         * sysdeps/pthread/createthread.c (create_thread): Set
6436         header.multiple_threads unconditionally.
6437         * allocatestack.c (allocate_stack): Likewise.
6438         * descr.h (struct pthread): Add header.multiple_threads
6439         unconditionally.
6440         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6441         Define for librt.  #error if neither libpthread, libc nor librt.
6442         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6443         Likewise.
6444         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6445         CDISABLE): Likewise.
6446         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6447         CDISABLE): Likewise.
6448         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6449         CDISABLE): Likewise.
6450         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6451         CDISABLE): Likewise.  Access header.multiple_threads outside of
6452         libc and libpthread.
6453         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6454         Likewise.
6455         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6456         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6458 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6460         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6461         Also test early cancellation before the thread reaches the cancellation
6462         point.
6464         * Makefile: Compile forward.c with exceptions.
6466         * sysdeps/unix/sysv/linux/sleep.c: New file.
6468 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6470         * Makefile: Add CFLAGS definition to compile function wrappers
6471         duplicated from libc with exceptions.
6472         * tst-cancel4.c: Also check cancellation handlers.
6474         * Makefile: Add rules to build and run tst-cancel16 and
6475         tst-cancelx16.  Add missing CFLAGS definitions.
6476         * tst-cancel16.c: New file.
6477         * tst-cancelx16.c: New file.
6479 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6481         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6482         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6483         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6484         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6486         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6487         (LIBC_CANCEL_RESET): Likewise.
6488         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6489         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6490         librt-cancellation.
6491         (CFLAGS-libcrt-cancellation.c): Define.
6492         * sysdeps/pthread/librt-cancellation.c: New file.
6493         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6494         macros also when compiling librt.
6495         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6496         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6497         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6498         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6499         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6500         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6501         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6503         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6504         compat_timer_create.
6506 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6508         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6510         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6511         __register_atfork.
6512         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6513         Add libc_hidden_def.
6515 2003-06-13  Roland McGrath  <roland@redhat.com>
6517         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6518         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6520 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6522         * allocatestack.c (queue_stack): Always inline.
6523         * ptreadhP.h (__do_cancel): Likewise.
6525 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6527         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6528         a typo.
6530 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6532         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6533         (__pthread_cond_signal): Remove incorrect second addition for
6534         cond_lock!=0.
6536 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6538         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6539         (__pthread_cond_signal): Use correct futex pointer in
6540         __lll_mutex_lock_wait call.
6542         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6543         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6545 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6547         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6548         cancelable.
6549         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6550         Likewise.
6552         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6553         hand-written CFI generation code.  Since ENTRY/END also initiated
6554         CFI frames this caused two CFI sets to be generated.
6556 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6558         * cleanup_routine.c: New file.
6559         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6560         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6561         cleanup handling.
6562         * Makefile (libpthread-routines): Add cleanup_routine.
6563         Add more CFLAGS variables to compile with exceptions.  Add comments
6564         why which file needs unwind tables.
6565         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6566         tests.
6567         * tst-cancelx1.c: New file.
6568         * tst-cancelx2.c: New file.
6569         * tst-cancelx3.c: New file.
6570         * tst-cancelx4.c: New file.
6571         * tst-cancelx5.c: New file.
6572         * tst-cancelx6.c: New file.
6573         * tst-cancelx7.c: New file.
6574         * tst-cancelx8.c: New file.
6575         * tst-cancelx9.c: New file.
6576         * tst-cancelx10.c: New file.
6577         * tst-cancelx11.c: New file.
6578         * tst-cancelx12.c: New file.
6579         * tst-cancelx13.c: New file.
6580         * tst-cancelx14.c: New file.
6581         * tst-cancelx15.c: New file.
6582         * tst-cleanupx0.c: New file.
6583         * tst-cleanupx0.expect: New file.
6584         * tst-cleanupx1.c: New file.
6585         * tst-cleanupx2.c: New file.
6586         * tst-cleanupx3.c: New file.
6588         * tst-cleanup0.c: Make standard compliant.
6589         * tst-cleanup1.c: Likewise.
6591         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6592         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6593         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6594         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6595         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6596         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6597         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6598         CLEANUP_JMP_BUF.
6599         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6600         * tst-cancel12.c: New file.
6601         * tst-cancel13.c: New file.
6602         * tst-cancel14.c: New file.
6603         * tst-cancel15.c: New file.
6604         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6605         and tst-cancel15.
6607         * tst-cancel1.c: Add some comments.
6609         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6610         timeout correctly.
6612 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6614         * Makefile (CFLAGS-pthread_cancel.c): Define.
6616 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6618         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6619         Change type of __writer element to int.
6620         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6621         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6622         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6623         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6624         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6625         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6626         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6627         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6628         Compare with TID to determine deadlocks.
6629         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6630         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6631         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6632         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6633         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6634         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6635         Likewise.
6636         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6637         Likewise.
6638         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6639         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6640         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6641         Likewise.
6642         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6643         Likewise.
6644         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6645         * Makefile (tests): Add tst-rwlock12.
6646         * tst-rwlock12.c: New file.
6648 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6650         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6651         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6652         Remove bogus hidden_proto.
6653         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6654         Likewise.
6655         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6656         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6657         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6658         ___lll_mutex_timedlock): Likewise.
6660 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6663         (__pthread_cond_signal): Add some code to eventually handle
6664         cond_lock!=0.
6666 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6668         * Makefile (tests): Add tst-exec4.
6669         (tst-exec4-ARGS): Define.
6670         * tst-exec4.c: New file.
6672 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6674         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6675         Also fail if tv_nsec < 0.
6676         (__lll_timedwait_tid): Likewise.
6677         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6678         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6679         Likewise.
6680         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6681         Likewise.
6682         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6683         Likewise.
6684         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6685         Likewise.
6686         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6687         Likewise.
6688         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6689         Likewise.
6691         * Makefile (tests): Add tst-sem8 and tst-sem9.
6692         * tst-sem8.c: New file.
6693         * tst-sem9.c: New file.
6694         * sem_open.c: Fix creation of in_use record if the file exists but
6695         no internal record.
6697         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6698         definitions.
6700         * sysdeps/pthread/timer_create.c (timer_create): In case
6701         evp==NULL, assign timer ID to sival_ptr.
6703         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6704         struct pthread_unwind_buf *.
6705         (struct pthread): Likewise for cleanup_jmp_buf element.
6707         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6708         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6709         * unwind.c (__pthread_unwind_next): Likewise.
6711 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6713         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6714         (lll_futex_timed_wait): Use int for futex value parameter.
6715         (lll_futex_wake): Likewise.
6716         (lll_futex_requeue): Likewise.
6718         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6719         Replace one memory operation with one register operation.
6721         * tst-join4.c (do_test): Fix error message.
6723         * tst-rwlock6.c (do_test): Use correct format specifier.
6725         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6726         (__lll_mutex_lock_wait): Replace one memory operation with one
6727         register operation.
6728         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6729         (__lll_mutex_lock_wait): Likewise.
6731         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6732         (__lll_mutex_cond_lock): Add one to value parameter of
6733         __lll_lock_wait to reflect reality in the futex syscall.
6734         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6735         (lll_mutex_cond_lock): Likewise.
6737 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6739         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6740         New function.
6741         (lll_mutex_cond_lock): Define.
6743 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6745         * Makefile (tests): Add tst-signal6.
6746         * tst-signal6.c: New file.
6748         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6749         (__lll_mutex_unlock_force): New function
6750         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6752         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6753         (__lll_mutex_unlock_force): New function.
6754         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6756         * tst-rwlock7.c (do_test): Use correct format specifier.
6758         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6759         Find break parameter in correct asm argument.
6761 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6763         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6764         Remove out4.
6765         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6766         error occured.
6767         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6768         Add __mutex.
6769         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6770         lll_futex_requeue, lll_mutex_unlock_force): Define.
6772 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6774         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6775         (pthread_cond_t): Add __mutex.
6776         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6777         lll_futex_requeue, lll_mutex_unlock_force): Define.
6779 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6781         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6782         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6783         Add __mutex field.
6784         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6785         Define.
6786         (lll_futex_wait, lll_futex_wake): Define.
6787         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6788         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6789         FUTEX_REQUEUE instead of FUTEX_WAIT.
6790         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6791         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6792         mutex which was used in condvar structure.  Call
6793         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6794         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6796         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6797         include tcb-offsets.h.  Read wakeup value in locked region.
6798         Use the value of gbr register as THREAD_ID.
6799         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6800         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6801         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6803         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6804         macros.
6806 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6808         * sysdeps/pthread/pthread_cond_broadcast.c
6809         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6811 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6813         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6814         typo in register name.
6815         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6816         correctly.  Actually use requeue.  Little optimization.
6817         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6818         mutex address early.  Handle cancellation state as 32-bit value.
6819         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6820         Remove unnecessary label.
6822 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6824         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6825         instead of FUTEX_WAIT.
6826         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6827         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6828         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6829         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6830         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6831         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6832         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6833         of __pthread_mutex_lock_internal.
6834         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6835         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6836         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6837         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6838         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6839         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6840         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6841         Add pthread_mutex_cond_lock.
6842         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6843         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6844         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6845         lll_mutex_cond_lock.
6846         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6847         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6848         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6849         Add __mutex field.
6850         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6851         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6853         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6854         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6856         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6857         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6858         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6859         macro don't define aliases.
6861         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6862         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6863         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6864         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6865         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6866         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6867         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6868         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6869         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6871 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6873         * sem_open.c: Fix one endless loop.  Implement correct semantics
6874         wrt opening the same semaphore more then once.
6875         * sem_close.c: Adjust for sem_open change.
6876         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6877         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6878         * Makefile (tests): Add tst-sem7.
6879         * tst-sem7.c: New file.
6881 2003-05-16  Roland McGrath  <roland@redhat.com>
6883         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6884         uninitialized variable braino.
6886 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6888         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6889         test for syscall availability.
6891         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6892         __no_posix_timers to -1 if the syscalls don't exist.
6894         * pthread_join.c (pthread_join): Set tid field of the joined
6895         thread to -1.  This isn't necessary but helps to recognize some
6896         error conditions with almost no cost.
6898         * allocatestack.c (FREE_P): Also negative values indicate an
6899         unused stack.
6901         * unwind.c: Include <unistd.h>.
6903 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6905         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6907 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6909         * Makefile (crti-objs, crtn-objs): New variables.
6910         (omit-deps, extra-objs): Add crtn.
6911         ($(objpfx)libpthread.so): Depend on both crti and crtn
6912         and links to them in multidir.
6913         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6915 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6917         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6918         (lll_mutex_unlock): Use atomic_exchange_rel.
6920 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6922         * cond-perf.c (cons): Add missing locking around setting of alldone.
6924 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6926         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6927         related macros.
6928         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6930 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6932         * tst-sem6.c: New file.
6933         * Makefile (tests): Add tst-sem6.
6935         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6936         Use atomic_exchange_rel instead of atomic_exchange.
6937         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6938         Likewise.
6940         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6941         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6942         vsyscall is possible.
6944         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6945         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6946         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6947         pthread_setaffinity_np.
6948         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6949         and pthread_setaffinity_np.
6950         * Makefile (libpthread-routines): Add pthread_getaffinity and
6951         pthread_setaffinity.
6953         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6954         use it in case mmap to allocate the stack fails.
6955         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6956         ARCH_MAP_FLAGS here.
6957         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6958         ARCH_RETRY_MMAP.
6960 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6962         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6963         handler implementation.  It is now lockless in fork().
6964         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6965         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6966         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6967         declare the __fork_*_lists.
6968         (struct fork_handler): Include pointers to all three functions.
6969         Add next, refcntr and need_signal elements.
6970         (__fork_handlers): New declaration.
6971         (__register_atfork_malloc): Remove declaration.
6972         (HAVE_register_atfork_malloc): Remove definition.
6973         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6974         __pthread_child_handler variable.
6975         (__libc_pthread_init): Use __register_atfork instead of explicitly
6976         adding to the list.
6977         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6978         and lll_futex_wake.
6979         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6981         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6982         function must never be reached.
6984         * cond-perf.c: New file.
6986 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6988         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6990 2003-05-04  Roland McGrath  <roland@redhat.com>
6992         * Makefile ($(objpfx)../libc.so): New target.
6994 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6996         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6997         (pthread_condattr_t): Size is only an int, don't use long for
6998         alignment.
6999         (pthread_mutexattr_t): Likewise.
7000         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7001         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
7002         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7004 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
7006         * sysdeps/i386/tls.h: Define THREAD_ID.
7007         * sysdeps/ia64/tls.h: Likewise.
7008         * sysdeps/powerpc/tls.h: Likewise.
7009         * sysdeps/s390/tls.h: Likewise.
7010         * sysdeps/sh/tls.h: Likewise.
7011         * sysdeps/x86_64/tls.h: Likewise.
7012         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
7013         record ownership.
7014         * pthread_mutex_timedlock.c: Likewise.
7015         * pthread_mutex_trylock.c: Likewise.
7016         * pthread_mutex_unlock.c: Likewise.
7017         * pthread_rwlock_trywrlock.c: Likewise.
7018         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
7019         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
7020         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
7021         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
7023         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
7024         flag.
7026 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
7028         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7029         (__SIZEOF_PTHREAD_COND_T): Define to 48.
7030         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
7031         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
7032         Make __align long long instead of long.
7033         (pthread_rwlock_t): Formatting.
7034         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
7035         (pthread_rwlock_t): Formatting.
7036         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
7037         (pthread_cond_t): Make __align long long instead of long.
7038         (pthread_rwlock_t): Move __flags field to the same position as in
7039         linuxthreads.
7041 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
7043         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
7044         * tst-rwlock7.c (do_test): Likewise.
7046 2003-04-26  Roland McGrath  <roland@redhat.com>
7048         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
7050 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
7052         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
7053         sizeof (struct pthread).
7054         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
7055         1 struct pthread.
7056         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
7057         to 0.
7058         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
7059         struct pthread.
7060         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
7061         to 32-bit bytes.
7062         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
7063         tcbp.
7064         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
7065         unneccessarily.
7066         (NO_TLS_OFFSET): Define.
7067         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
7068         add TLS_TCB_SIZE unnecessarily.
7070 2003-04-22  Roland McGrath  <roland@redhat.com>
7072         * Makeconfig (shared-thread-library): Reverse link order to work
7073         around linker bug.
7075 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
7077         * semaphore.h: Fix typo in comment.
7079 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
7081         * sysdeps/pthread/sigfillset.c: New file.
7083         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
7084         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
7085         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
7086         * sysdeps/pthread/sigaction.c: Likewise.
7087         * sysdeps/pthread/sigprocmask.c: New file.
7088         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
7089         __SIGRTMIN+1.
7090         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7091         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
7092         in this case.
7094 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
7096         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
7097         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
7099         * sysdeps/unix/sysv/linux/unregister-atfork.c
7100         (__unregister_atfork): Don't free memory not allocated dynamically.
7102         * semaphore.h: Remove __THROW marker from cancellation points.
7103         * nptl/sysdeps/pthread/pthread.h: Likewise.
7105 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
7107         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
7108         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
7109         __THROW.
7111 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
7113         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
7115 2003-04-15  Roland McGrath  <roland@redhat.com>
7117         * forward.c (__pthread_unwind): Tweak to avoid warning.
7119 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
7121         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7123 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7125         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7126         overflow CFA advance instructions.
7127         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7129 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7131         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7132         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7133         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7134         defined.
7136         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7137         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7138         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7139         DW_CFA_advance_loc for .Laddl-.Lsubl.
7141 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7143         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7144         position-independent unwind data for static libraries.
7145         Add missing unwind info.  Add comments.
7147         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7148         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7149         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7150         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7152 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7154         * Makefile: Make sure all cancellation points are compiled with
7155         exception and asynchronous unwind tables.
7157         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7158         which mishandles loading of global object addresses in PIC.
7159         (THREAD_SETMEM_NC): Likewise.
7161 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7163         * pthread.h: Define new data structure for cleanup buffer.  Declare
7164         new cleanup handler interfaces.
7165         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7166         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7167         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7168         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7169         it.  Declare old cleanup handler installation functions.
7170         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7171         handling.
7172         * cleanup_defer.c: Likewise.
7173         * cleanup_compat.c: New file.  Old cleanup code.
7174         * cleanup_def_compat.c: New file.  Old cleanup code.
7175         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7176         if own thread descriptor.
7177         * unwind.c: New file.
7178         * forward.c: Add __pthread_unwind.
7179         * init.c (pthread_functions): Add __pthread_unwind.
7180         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7181         Add ptr___pthread_unwind.
7182         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7183         and unwind function.
7184         * Makefile (libpthread-routines): Add cleanup_compat,
7185         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7186         table generation if necessary.
7187         * version.c: Record whether unwind support is compiled in.
7188         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7189         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7190         handler interfaces.
7191         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7192         complication to generate unwind information for syscall wrappers.
7193         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7194         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7195         __cleanup_fct_attribute.
7197         * Makefile: Add rules to build and run tst-cleanup0.
7198         * tst-cleanup0.c: New file.
7199         * tst-cleanup0.expect: New file.
7201         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7202         caller.  Optimize to avoid often unecessary local variable.
7204 2003-04-11  Roland McGrath  <roland@redhat.com>
7206         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7207         sets variable `multidir'; include that.
7208         (generated): Add it.
7209         ($(objpfx)$(multidir)/crti.o): New target.
7210         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7212 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7214         * tst-attr2.c (do_test): Add cast to avoid warning.
7215         * tst-mutex4.c (do_test): Likewise.
7217 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7219         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7220         in child.
7222 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7224         * Makefile (tests): Add tst-detach1.
7225         * tst-detach1.c: New file.
7227 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7229         * sysdeps/pthread/pthread.h: Remove duplicate
7230         pthread_cleanup_{push,pop} definitions.
7232         * tst-barrier2.c: Eliminate warnings.
7233         * tst-cancel4.c: Likewise.
7234         * tst-cond4.c: Likewise.
7235         * tst-cond6.c: Likewise.
7236         * tst-detach1.c: Likewise.
7237         * tst-rwlock4.c: Likewise.
7238         * tst-rwlock6.c: Likewise.
7239         * tst-rwlock7.c: Likewise.
7240         * tst-sem3.c: Likewise.
7241         * tst-spin2.c: Likewise.
7242         * tst-umask1.c: Likewise.
7244 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7246         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7248 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7250         * descr.h (struct pthread): Move cancelhandling member to the front.
7252 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7254         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7255         malloc_parent, and malloc_child statically.
7256         (__register_atfork_malloc): New function.
7257         (free_mem): Don't free any of the malloc_* variables on the list.
7258         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7259         Define HAVE_register_atfork_malloc.
7261 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7263         * sysdeps/pthread/createthread.c (create_thread): Add some more
7264         comments explaining when to set multiple_threads and when not.
7266         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7267         THREAD_ATOMIC_BIT_SET if not already defined.
7268         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7269         THREAD_ATOMIC_BIT_SET:
7270         * sysdeps/x86_64/tls.h: Likewise.
7271         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7272         THREAD_ATOMIC_CMPXCHG_VAL.
7273         (_pthread_cleanup_pop_restore): Likewise.
7274         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7275         (__pthread_enable_asynccancel_2): Likewise.
7276         (__pthread_disable_asynccancel): Likewise.
7277         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7278         (__libc_disable_asynccancel): Likewise.
7279         * init.c (sigcancel_handler): Likewise.
7280         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7281         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7283 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7285         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7286         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7287         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7288         * Makefile (tests): Add tst-cancel11.
7289         * tst-cancel11.c: New file.
7291 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7293         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7294         round, not the first.  Use specific_used flag instead of local
7295         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7296         (__free_tcb): Don't call deallocate_tsd here.
7297         (start_thread): Call deallocate_tsd here.
7298         * pthread_setspecific.c: Set specific_used flag really only when
7299         needed.
7300         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7301         * tst-tsd3.c: New file.
7302         * tst-tsd4.c: New file.
7304 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7306         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7307         Use atomic_exchange_and_add instead of __lll_add.
7308         (__lll_mutex_timedlock): Likewise.
7309         Patch by Ian Wienand.
7311 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7313         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7314         (SINGLE_THREAD_P): Fix typo.
7315         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7317 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7319         * Makefile (tests): Add tst-align.
7320         * tst-align.c: New file.
7321         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7323         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7324         function correctly.
7326         * tst-tsd2.c: Add casts to avoid warnings.
7328 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7330         * descr.h (struct pthread): Move most often used elements to the front.
7332 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7334         * Makefile (libpthread-routines): Add pthread_atfork.
7335         (libpthread-static-only-routines): Add pthread_atfork.
7337 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7339         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7340         of TLS_DTV_AT_TP.
7341         (INSTALL_DTV): Add parens.
7342         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7343         Use passed descr instead of THREAD_SELF.
7344         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7345         (__lll_mutex_timedlock_wait): Correct expected value after
7346         spurious wakeup.
7347         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7348         Release lock before waking up the waiters.
7349         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7350         criteria.  Reorderstruct passed to cleanup handler.  Fix
7351         handling of cancellation and failung pthread_mutex_unlock call.
7352         Use __pthread_enable_asynccancel_2 instead of
7353         __pthread_enable_asynccancel.
7354         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7355         Return result of lock re-get if it fails.
7356         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7357         for __pthread_cleanup_push.
7358         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7359         completely broken rwlock implementation.
7360         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7361         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7362         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7363         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7364         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7365         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7366         versioned_symbol macro.
7367         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7368         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7370 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7372         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7373         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7374         and __helper_tid.
7375         (struct timer): Remove th and bar field.
7376         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7377         debugging code.  Create only one helper thread.
7378         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7379         helper thread.
7380         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7381         Renamed.  Define statically.  Use thread info from siginfo.
7382         (__helper_once): New variable.
7383         (__helper_tid): New variable.
7384         (__reset_helper_control): New function.
7385         (__start_helper_thread): New function.
7387         * pthread_create.c (start_thread): Don't use setjmp inside
7388         __builtin_expect to work around gcc bug.
7390         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7391         timer_delete syscall fails, but not with ENOSYS, set
7392         __no_posix_timers.
7394         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7395         (timer_settime): Fix typo.
7396         * sysdeps/unix/sysv/linux/timer_getoverr.c
7397         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7399 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7401         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7402         offset of cleanupbuf.__prev.
7404 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7406         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7407         of included file.
7409 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7411         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7412         NULL provide default definition to syscall.
7414 2003-03-25  Roland McGrath  <roland@redhat.com>
7416         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7417         (timer_id2ptr): Fix typo.
7419 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7421         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7422         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7423         * sysdeps/ia64/pthreaddef.h: Likewise.
7424         * sysdeps/powerpc/pthreaddef.h: Likewise.
7425         * sysdeps/s390/pthreaddef.h: Likewise.
7426         * sysdeps/sh/pthreaddef.h: Likewise.
7427         * sysdeps/x86_64/pthreaddef.h: Likewise.
7428         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7429         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7430         being changed.
7431         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7432         SIGTIMER is not unblocked.
7433         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7434         RT signal taken.
7435         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7436         be send.
7437         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7438         pass pointer through as ID.
7439         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7440         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7441         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7442         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7443         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7444         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7445         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7446         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7447         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7448         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7449         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7450         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7451         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7452         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7453         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7454         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7455         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7456         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7457         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7458         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7459         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7460         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7461         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7462         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7463         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7464         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7465         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7466         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7467         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7468         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7469         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7470         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7471         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7473         * pthreadP.h: Remove FRAME_LEFT definition.
7474         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7475         already left frame.  Programs which have this problem are not POSIX
7476         compliant.
7477         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7479 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7481         * sysdeps/pthread/tst-timer.c: Check return values of the
7482         functions we test.
7484 2003-03-23  Roland McGrath  <roland@redhat.com>
7486         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7487         * tst-tls3mod.c: Likewise.
7488         * tst-tls1.c: Likewise.
7489         * tst-tls2.c: Likewise.
7491         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7492         undefined behavior.
7494         * tst-join5.c (tf1, tf2): Add a cast.
7496         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7498         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7499         Don't test anything.
7500         * tst-cond4.c: Likewise.
7501         * tst-cond6.c: Likewise.
7502         * tst-flock2.c: Likewise.
7503         * tst-mutex4.c: Likewise.
7504         * tst-rwlock4.c: Likewise.
7505         * tst-signal1.c: Likewise.
7506         * tst-spin2.c: Likewise.
7507         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7509         * tst-mutex4.c: Use test-skeleton.c.
7510         * tst-spin2.c: Likewise.
7511         * tst-sysconf.c: Likewise.
7512         * tst-barrier2.c: Likewise.
7513         * tst-cond4.c: Likewise.
7514         * tst-cond6.c: Likewise.
7515         * tst-rwlock4.c: Likewise.
7516         * tst-unload.c: Likewise.
7517         * tst-flock2.c (do_test): Use return instead of exit.
7519 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7521         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7523 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7525         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7526         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7527         instead of __lll_compare_and_swap.
7528         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7529         Likewise.
7530         Removed definition if __lll_compare_and_swap.
7532         * cancellation.c: Adjust for new form of compare&exchange macros.
7533         * cleanup_defer.c: Likewise.
7534         * init.c: Likewise.
7535         * libc-cancellation.c: Likewise.
7536         * old_pthread_cond_broadcast.c: Likewise.
7537         * old_pthread_cond_signal.c: Likewise.
7538         * old_pthread_cond_timedwait.c: Likewise.
7539         * old_pthread_cond_wait.c: Likewise.
7540         * pthread_cancel.c: Likewise.
7541         * pthread_create.c: Likewise.
7542         * pthread_detach.c: Likewise.
7543         * pthread_join.c: Likewise.
7544         * pthread_key_delete.c: Likewise.
7545         * pthread_setcancelstate.c: Likewise.
7546         * pthread_setcanceltype.c: Likewise.
7547         * pthread_timedjoin.c: Likewise.
7548         * pthread_tryjoin.c: Likewise.
7549         * sysdeps/pthread/createthread.c: Likewise.
7551 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7553         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7554         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7555         definitions.  Replace uses with calls to atomic_* functions.
7556         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7557         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7558         __lll_test_and_set calls with atomic_exchange_and_add and
7559         atomic_exchange calls respectively.
7560         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7561         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7562         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7563         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7564         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7565         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7566         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7568         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7569         returns the old value.
7571 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7573         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7574         int for variable OLDVAL and correct inline assembler contraint.
7575         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7576         type int for variable OLD.
7578         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7579         only for s390-32.
7580         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7581         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7582         instead of multiple_threads field in the TCB.
7584 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7586         * sysdeps/i386/i686/bits/atomic.h: Removed.
7587         * sysdeps/i386/i586/bits/atomic.h: Removed.
7588         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7589         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7590         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7591         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7592         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7593         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7594         * atomic.h: Removed.  Moved to glibc.
7596         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7597         support for clock selection.
7599         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7600         signalling waiters.
7602 2003-03-18  Roland McGrath  <roland@redhat.com>
7604         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7605         Add __lll_rel_instr first.  Add memory clobber.
7606         (lll_mutex_unlock): Use __lll_test_and_set.
7607         From Paul Mackerras <paulus@samba.org>.
7609         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7610         unconditionally.
7611         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7612         (SINGLE_THREAD_P):  Add `header.' prefix.
7613         From Paul Mackerras <paulus@samba.org>.
7615         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7616         pthread_timedjoin_np to ...
7617         (libpthread: GLIBC_2.3.3): ... here.
7618         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7620         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7621         Avoid shadowing VAL variable.
7623         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7624         New macro.
7626 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7628         * Makefile (tests): Add tst-cond11.
7629         * tst-cond11.c: New file.
7631         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7632         struct passed to cleanup handler to eliminate one more
7633         instruction.
7634         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7636         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7637         (pthrad_cond_t): Replace __unused field with __clock.
7639         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7640         waken all waiters in cleanup handler.
7641         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7642         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7644         * pthread_condattr_getclock.c: New file.
7645         * pthread_condattr_setclock.c: New file.
7646         * sysdeps/pthread/pthread.h: Declare these new functions.
7647         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7648         * Makefile (libpthread-routines): Add the new functions.
7649         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7650         Renamed field to value.  Document use of the bits.
7651         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7652         change.
7653         * pthread_condattr_setpshared.c: Likewise.
7654         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7655         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7656         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7657         Add __clock field.
7658         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7659         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7660         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7661         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7662         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7663         Implement clock selection.
7664         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7665         * pthread-errnos.sym: Add ENOSYS.
7666         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7667         _POSIX_CLOCK_SELECTION.
7668         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7670         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7671         invalid .size directive.
7673 2003-03-17  Roland McGrath  <roland@redhat.com>
7675         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7676         Formatting tweaks.
7678 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7680         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7681         Use __lll_add instead of spelling it out.  Use protected symbol names.
7682         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7683         Use __lll_add.
7684         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7685         Renamed from lll_compare_and_swap.  Use new name where necessary.
7686         (__lll_add): Defined.
7687         (__lll_dec_if_positive): Defined.
7688         (__lll_test_and_set): Defined.
7689         * sysdeps/ia64/pthread_spin_init.c: Removed.
7690         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7691         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7692         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7693         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7694         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7695         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7696         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7697         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7698         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7699         __sync_lock_release_si.
7700         Patch by Jakub Jelinek.
7702         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7703         Fix timeout handling.
7704         (__lll_timedwait_tid): Likewise.
7705         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7706         Patch by Jakub Jelinek.
7708         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7710 2003-03-17  Roland McGrath  <roland@redhat.com>
7712         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7713         * sysdeps/pthread/pthread_spin_init.c: New file.
7714         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7715         * sysdeps/powerpc/Makefile: New file.
7716         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7717         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7718         * sysdeps/powerpc/pthreaddef.h: New file.
7719         * sysdeps/powerpc/tcb-offsets.sym: New file.
7720         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7721         * sysdeps/powerpc/tls.h: New file.
7722         * sysdeps/powerpc/bits/atomic.h: New file.
7723         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7724         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7725         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7727         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7728         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7729         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7730         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7731         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7732         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7733         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7734         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7735         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7736         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7737         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7738         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7739         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7740         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7741         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7743         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7744         not gettimeofday.
7745         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7746         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7747         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7748         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7749         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7751 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7753         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7754         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7755         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7756         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7757         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7759 2003-03-16  Roland McGrath  <roland@redhat.com>
7761         * tst-fork4.c: Include <string.h>.
7762         * tst-signal2.c: Likewise.
7763         * tst-mutex5.c (do_test): exit -> return.
7764         * tst-mutex2.c: Include <stdlib.h>.
7766 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7768         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7769         (__lll_mutex_timedlock_wait): Correct expected value after
7770         spurious wakeup.  Otherwise we would never wait again.
7772         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7773         zone versus inline asm stupidity.  Use correct instructions.
7775         * tst-rwlock6.c: Add some more status output.
7777 2003-03-15  Roland McGrath  <roland@redhat.com>
7779         * sysdeps/pthread/configure.in: New file.
7780         * sysdeps/pthread/configure: New file (generated).
7782 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7784         * allocatestack.c (allocate_stack): Store the exact stack size of
7785         user allocated stacks.
7787 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7789         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7790         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7791         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7792         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7793         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7794         Use `header.' prefix.
7795         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7797 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7799         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7800         __builtin_frame_address, use stack pointer.
7802         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7803         instead of __builtin_frame_pointer.
7805 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7807         * tst-basic1.c (do_test): Add cast to avoid warning.
7808         * tst-basic2.c (do_test): Likewise.
7810         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7811         amount of stack correction.
7813         * tst-fork4.c: Use test-skeleton.c.
7815 2003-03-14  Roland McGrath  <roland@redhat.com>
7817         * init.c: Fix typo "#eli" for "#else".
7819 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7821         * allocatestack.c (__stack_user): Use hidden_data_def.
7822         * pthread_create.c (__pthread_keys): Likewise.
7824         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7826 2003-03-14  Roland McGrath  <roland@redhat.com>
7828         * tst-fork4.c: New file.
7829         * Makefile (tests): Add it.
7831         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7832         we always define the padding space.
7833         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7834         stopped supporting its own extensions fully.
7835         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7836         struct also called `header', so `header.multiple_threads' is the field
7837         name to use on all machines.
7838         * allocatestack.c (allocate_stack): Use `header.' prefix.
7839         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7840         * pthread_create.c (__pthread_create_2_1): Likewise.
7841         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7842         (THREAD_SELF): Likewise.
7843         * sysdeps/x86_64/tls.h: Likewise.
7844         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7845         (SINGLE_THREAD_P): Likewise.
7846         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7847         (SINGLE_THREAD_P): Likewise.
7848         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7849         (SINGLE_THREAD_P): Likewise.
7851         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7852         value directly.
7854 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7856         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7857         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7859         * pthread_create.c (start_thread): setjmp is expected to return 0.
7861         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7862         (THREAD_GETMEM_NC): Likewise.
7864 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7866         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7867         and the size of the stack which must be allocated is a multiple,
7868         allocate one more page.
7869         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7870         MULTI_PAGE_ALIASING.
7872 2003-03-13  Roland McGrath  <roland@redhat.com>
7874         * pthread_create.c (start_thread): Set EXITING_BIT after the
7875         event-reporting (and destructors), not before.
7877 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7879         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7880         lll_futex_wake): Declare register variables as long int instead of
7881         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7882         Make syscall arguments clobbered by the syscall.
7883         (lll_futex_wait): Define using lll_futex_timed_wait.
7885         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7886         to void *.
7888         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7889         PPID if [! NDEBUG].
7891         * allocatestack.c (nptl_ncreated): Only declare if
7892         COLORING_INCREMENT != 0.
7894         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7895         (__libc_enable_asynccancel_2): Remove prototype.
7897         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7898         ctid to match kernel.
7900 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7902         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7903         libc_multiple_threads.
7904         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7905         __libc_multiple_threads to...
7906         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7908         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7909         versioning.
7910         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7911         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7913         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7914         (__pthread_once_internal): Define.
7916         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7917         macros instead of .symver directly.
7918         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7919         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7921         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7922         * sysdeps/x86_64/tcb-offsets.sym: New file.
7923         * sysdeps/x86_64/Makefile: New file.
7925         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7926         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7927         to access own pthread_t in TCB.
7928         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7929         Likewise.
7930         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7931         Likewise.
7932         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7934 2003-03-12  Roland McGrath  <roland@redhat.com>
7936         * pthread-errnos.sym: New file.
7937         * Makefile (gen-as-const-headers): New variable, list that file.
7938         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7939         header <pthread-errnos.h> instead of defining errno values here.
7940         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7941         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7942         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7943         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7944         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7945         Likewise.
7946         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7947         Likewise.
7948         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7949         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7950         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7951         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7952         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7953         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7954         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7955         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7956         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7957         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7958         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7959         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7960         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7961         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7962         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7963         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7964         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7965         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7966         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7967         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7968         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7969         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7970         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7971         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7972         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7973         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7974         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7976         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7977         CLONE_CHILD_SETTID worked.
7979 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7981         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7982         file.
7983         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7984         file.
7986         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7987         (pthread_cond_t): Add padding.
7989         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7990         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7991         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7993         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7994         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7995         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7996         (__pthread_rwlock_timedrdlock): Likewise.
7997         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7998         (__pthread_rwlock_wrlock): Likewise.
7999         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
8000         (__pthread_rwlock_rdlock): Likewise.
8002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
8004         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
8005         result of lock re-get if it fails.
8007 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8009         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
8010         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
8011         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
8012         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
8013         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
8014         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
8015         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
8016         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
8017         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
8018         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
8020         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
8021         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
8023         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
8024         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
8025         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
8026         (create_thread): Likewise.
8027         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
8028         * init.c (__pthread_initialize_minimal_internal): Initialize
8029         __libc_multiple_threads_ptr if necessary.
8030         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
8031         __pthread_multiple_threads and __libc_multiple_threads_ptr.
8032         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
8033         __libc_multiple_threads.
8034         (__libc_pthread_init): Return pointer to __libc_pthread_init if
8035         necessary.
8037         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
8038         (THREAD_SETMEM_NC): Likewise.
8040         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
8041         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
8042         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
8043         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
8045         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
8046         Eliminate one entire instruction.
8048         * cancellation.c (__pthread_enable_asynccancel_2): New function.
8049         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
8050         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
8051         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
8052         instead of __pthread_enable_asynccancel.
8053         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8054         (__pthread_cond_wait): Likewise.
8055         * sysdeps/pthread/pthread_cond_timedwait.c
8056         (__pthread_cond_timedwait): Likewise.
8057         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
8059         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
8060         (__condvar_cleanup): Wake up all waiters in case we got signaled
8061         after being woken up but before disabling asynchronous
8062         cancellation.
8063         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8064         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
8065         (__condvar_cleanup): Likewise.
8067         * init.c (__NR_set_tid_address): If already defined, don't redefine.
8068         Make it an error if architecture has no #if case.  Add x86-64.
8070         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
8071         pt-initfini.s generation.
8073         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
8074         (TLS_INIT_TP): Fix typo.
8076 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8078         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
8079         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
8081         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
8082         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
8083         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
8084         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
8085         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
8086         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8087         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8088         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8090 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
8092         * sysdeps/pthread/pthread_cond_timedwait.c
8093         (__pthread_cond_timedwait): Return the result of the final
8094         locking.  If it succeeds, the regular function return value.
8096         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
8097         Return result of the final locking.
8098         * version.c (__nptl_main): Work around problems with the strange
8099         INTERNAL_SYSCALL macro on ppc32.
8100         * init.c (__pthread_initialize_minimal_internal): Unblock
8101         SIGCANCEL in case the parent blocked it.
8102         Reported by Paul Mackerras <paulus@samba.org>.
8104         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
8105         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
8106         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
8108 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
8110         * sysdeps/pthread/pthread_cond_timedwait.c
8111         (__pthread_cond_timedwait): Unlock and fail if
8112         __pthread_mutex_unlock_internal failed.
8114         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
8115         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
8116         Use ARCH_CLONE.
8117         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
8118         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
8119         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
8120         ALLOCATE_STACK): New macros.
8121         (TLS_TPADJ): New macro.
8122         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8123         (allocate_stack): Handle TLS_DTV_AT_TP and
8124         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8125         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8126         Don't set PD->self.
8127         * init.c [__ia64__] (__NR_set_tid_address): Define.
8129         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8130         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8131         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8132         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8133         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8134         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8135         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8136         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8137         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8138         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8139         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8140         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8141         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8142         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8143         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8144         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8145         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8146         * sysdeps/ia64/bits/atomic.h: New file.
8147         * sysdeps/ia64/Makefile: New file.
8148         * sysdeps/ia64/pthread_spin_init.c: New file.
8149         * sysdeps/ia64/pthread_spin_lock.c: New file.
8150         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8151         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8152         * sysdeps/ia64/pthreaddef.h: New file.
8153         * sysdeps/ia64/tcb-offsets.sym: New file.
8154         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8155         * sysdeps/ia64/tls.h: New file.
8157         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8158         to syscall instead of no arguments.
8160 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8162         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8163         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8164         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8165         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8167         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8168         unused code.
8170         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8172         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8173         lowlevelbarrier.sym.
8174         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8175         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8176         Include lowlevelbarrier.h and don't define offsets locally.
8177         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8179         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8180         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8181         (__lll_mutex_timedlock_wait): Likewise.
8182         (lll_mutex_lock): Adjust asm for that.
8183         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8184         (lll_lock): Adjust asm for operand order change.
8185         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8186         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8188         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8189         Reverse order of parameters.
8190         (__lll_timedwait_tid): Remove regparms attribute.
8191         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8192         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8194         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8195         (__lll_timedwait_tid): Remove one unnecessary instruction.
8197         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8198         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8199         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8200         lowlevelmutex.S.
8202         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8203         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8204         for NOT_IN_libc.
8205         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8206         lowlevellock.S.
8208         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8209         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8210         for libc.so.
8211         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8212         define LOCK here (if UP is not defined).  The actual code is in
8213         lowlevelmutex.S.
8215         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8216         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8217         __lll_timedwait_tid for libc.so.
8218         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8219         define LOCK here (if UP is not defined).  The actual code is in
8220         lowlevellock.S.
8222         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8223         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8224         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8225         instead of lowlevelsem.h.
8226         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8227         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8228         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8230         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8231         lowlevelrwlock.sym.
8232         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8233         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8234         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8236         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8237         register loading.
8238         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8239         last changed.  D'oh.
8241         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8243         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8244         of __libc_locking_needed.
8245         (lll_trylock): Initialize %eax to zero.
8247         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8248         pthread_cond_t definition.
8250 2003-03-10  Roland McGrath  <roland@redhat.com>
8252         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8253         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8254         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8255         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8256         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8258         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8259         Instead of setting PD->multiple_threads, set globals
8260         __pthread_multiple_threads and __libc_multiple_threads.
8261         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8262         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8263         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8265         * descr.h (struct pthread): Conditionalize first member on
8266         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8267         containing an anonymous tcbhead_t.  Move `list' member out.
8268         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8269         * allocatestack.c: Remove use of `header.data.' prefix.
8270         * pthread_create.c: Likewise.
8271         * init.c (__pthread_initialize_minimal_internal): Likewise.
8272         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8273         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8274         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8275         * sysdeps/x86_64/tls.h: Likewise.
8276         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8277         (SINGLE_THREAD_P): Likewise.
8278         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8279         (SINGLE_THREAD_P): Likewise.
8280         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8281         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8283 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8285         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8287         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8288         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8290         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8291         leftovers from the ia32 code.
8293         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8294         memory load.
8295         (clear_once_control): Don't load %esi.
8297         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8298         handling.
8300         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8302         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8303         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8305         * Makefile (tests): Add tst-cond10.
8306         * tst-cond10.c: New file.
8308 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8310         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8311         * tst-signal3.c (do_test): Likewise.
8312         * tst-sem5.c (do_test): Likewise.
8313         * tst-kill6.c (do_test): Likewise.
8314         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8316         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8317         of inc/dec.
8318         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8319         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8320         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8321         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8322         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8323         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8324         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8325         Likewise.
8326         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8327         Likewise.
8328         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8329         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8330         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8331         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8332         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8333         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8334         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8335         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8337         * allocatestack.c (allocate_stack): If mprotect() fails free the
8338         TLS memory.
8340 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8342         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8344         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8345         lll_wake_tid.  This was used only to work around kernel limits in
8346         the early days.
8347         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8348         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8349         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8350         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8352         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8353         (__pthread_initialize_minimal_internal): Change initialization of
8354         __static_tls_align_m1 appropriately.
8355         * pthreadP.h (__static_tls_align_m1): Renamed from
8356         __static_tls_align.
8357         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8358         instead of __static_tls_align-1.
8360 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8362         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8364         * pthread_create.c: Define __pthread_keys using nocommon
8365         attribute, not by placing it explicitly in bss.
8366         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8368         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8369         Use it in mmap call to allocate stacks.
8371         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8373         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8374         result of the thread function.
8376 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8378         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8379         version is just fine.
8381         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8382         (__pthread_child_handler): Renamed from pthread_child_handler,
8383         exported, and marked hidden.  Change all users.
8384         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8385         free __pthread_child_handler from child list.
8387 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8389         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8391         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8392         Fix handling of cancellation and failing pthread_mutex_unlock call.
8393         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8394         (__pthread_cond_wait): Likewise.
8396         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8397         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8398         lll_futex_timed_wait call.
8399         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8400         (pthread_rwlock_timedwrlock): Likewise.
8402         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8403         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8404         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8406         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8407         check of lll_futex_wake return value.
8409 2003-03-03  Roland McGrath  <roland@redhat.com>
8411         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8413         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8414         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8415         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8417 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8419         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8420         error for CPU clocks.
8422         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8423         _POSIX_MONOTONIC_CLOCK.
8424         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8426         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8427         recent kernels.
8429 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8431         * descr.h (struct pthread): Move cleanup field to the front.
8433 2003-03-01  Roland McGrath  <roland@redhat.com>
8435         * sem_open.c (sem_open): Braino fix.
8437 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8439         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8440         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8441         __pthread_cleanup_pop functionality.
8442         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8444         * descr.h (struct pthread): Move tid field to the front now that
8445         it is often used.
8447         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8448         (__lll_mutex_timedlock_wait): Remove.
8449         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8450         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8451         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8452         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8453         (lll_unlock_wake_cb): Don't save and restore %esi.
8454         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8455         %esi.
8456         (__lll_timedwait_tid): Add alignment.
8457         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8458         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8459         %esi.
8460         (__lll_timedwait_tid): Removed.
8461         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8462         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8463         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8464         (pthread_barrier_wait): Don't save, load, and restore %esi for
8465         last thread.
8466         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8467         (__pthread_cond_signal): Don't save, load, and restore %esi.
8468         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8469         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8470         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8471         Don't save, load, and restore %esi.
8473 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8475         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8476         Release lock before waking up the waiters.
8478         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8480         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8481         (reader_thread): Likewise.
8483         * sysdeps/pthread/pthread_rwlock_unlock.c
8484         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8485         to wake up readers if there are none.
8487         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8488         Release internal lock before wake threads.
8490 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8492         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8493         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8494         predefined.
8495         * tst-rwlock9.c: Likewise.
8496         * tst-rwlock10.c: New file.
8497         * tst-rwlock11.c: New file.
8499         * Makefile (tests): Add tst-dlsym1.
8500         * tst-dlsym1.c: New file.
8502         * init.c (__pthread_initialize_minimal_internal): Set
8503         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8504         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8506 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8508         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8510         * tst-cond2.c: Fix sychronization with child.
8512         * tst-rwlock8.c (reader_thread): Remove unused variable.
8514         * Makefile: Add rules to build and run tst-tls3.
8515         * tst-tls3.c: New file.
8516         * tst-tls3mod.c: New file.
8518         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8519         * tst-rwlock8.c: New file.
8520         * tst-rwlock9.c: New file.
8521         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8522         complete broken rwlock implementation.
8523         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8524         Likewise.
8525         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8526         Likewise.
8527         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8528         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8529         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8530         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8531         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8532         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8533         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8535 2003-02-23  Roland McGrath  <roland@redhat.com>
8537         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8539 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8541         * Makefile (tests): Add tst-context1.
8542         * tst-context1.c: New file.
8544         * Makefile (tests): Add tst-tls1 and tst-tls2.
8545         * tst-tls1.c: New file.
8546         * tst-tls2.c: New file.
8548         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8549         for failed cmpxchg.
8551         * pthread_create.c (start_thread): Set EXITING_BIT early.
8553         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8554         (THREAD_GETMEM_NC): Likewise.
8556 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8558         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8559         off 3 more bytes by using offset-less instructions when possible.
8561         * Makefile: Add dependency for $(objpfx)version.d.
8563         * eintr.c (eintr_source): Add unnecessary return but the compiler
8564         insists.
8566         * tst-kill3.c: Include <unistd.h>.
8568 2003-02-21  Roland McGrath  <roland@redhat.com>
8570         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8572 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8574         * Makefile (tests): Add tst-eintr1.
8575         (distribute): Add eintr.c.
8576         * tst-eintr1.c: New file.
8577         * eintr.c: New file.
8579         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8581         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8582         Disallow sending SIGCANCEL.
8584         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8585         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8586         * tst-kill1.c: New file.
8587         * tst-kill2.c: New file.
8588         * tst-kill3.c: New file.
8589         * tst-kill5.c: New file.
8590         * tst-kill6.c: New file.
8591         * tst-basic7.c: Renamed to...
8592         * tst-kill4.c: ...this.
8594 2003-02-21  Roland McGrath  <roland@redhat.com>
8596         * Makefile (install-lib-ldscripts): New variable.
8598 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8600         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8601         * pthread_cancel.c: Use INVALID_TD_P.
8602         * pthread_detach.c: Likewise.
8603         * pthread_getschedparam.c: Likewise.
8604         * pthread_setschedparam.c: Likewise.
8605         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8606         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8607         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8608         * pthread_timedjoin.c: Likewise.
8610         * tst-basic7.c: Include <signal.h>.
8612         * pthread_join.c (pthread_join): Limited checking for invalid
8613         descriptors.
8614         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8616 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8618         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8619         beginning of the loop.  Clear the entire first block of TSD.
8620         * Makefile (tests): Add tst-key4.
8621         * tst-key4.c: New file.
8623 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8625         * Makefile (tests): Add tst-basic7.
8626         * tst-basic7.c: New file.
8628         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8629         Add some more __builtin_expect.
8631         * pthreadP.h: Define dummy version of DEBUGGING_P.
8633 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8635         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8636         _POSIX_THREAD_PRIORITY_SCHEDULING.
8637         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8638         _XOPEN_REALTIME_THREADS.
8639         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8641         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8642         kernel returns EINVAL for PID <= 0, work around it.
8644         * Makefile (tests): Add tst-signal5.
8645         * tst-signal5.c: New file.
8647         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8648         and LOGIN_NAME_MAX.
8650         * tst-cancel1.c (tf): Block all signals.
8652         * Makefile (tests): Add tst-basic6.
8653         * tst-basic6.c: New file.
8655         * tst-basic1.c: Add test for process ID.
8657         * Makefile (tests): Add tst-cancel10.
8658         * tst-cancel10.c: New file.
8660         * Makefile (tests): Add tst-signal4.
8661         * tst-signal4.c: New file.
8663         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8664         __sigismember instead of sigismember.  Add __builtin_expect.
8666 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8668         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8669         pthread_setcancelstate, and pthread_rwlock_setpshared.
8671         * tst-cancel7.c (do_test): Make sure the pid file exists before
8672         canceling the thread.
8674         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8675         pthread_rwlock_timedrdlock tests.
8676         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8677         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8678         Check for invalid tv_nsec field.
8679         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8680         Likewise.
8682         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8683         recursive mutex of overflow.
8685         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8687         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8688         going into an endless loop.
8689         * Makefile (tests): Add tst-cancel9.
8690         * tst-cancel9.c: New file.
8692         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8694 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8696         * tst-mutex5.c (do_test): Add more timedlock tests.
8698         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8699         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8701         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8702         use INLINE_SYSCALL.  Error number is returned, not -1.
8704         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8705         and __deallocate_stack with internal_function.
8706         * pthread_create.c: Adjust definitions appropriately.
8707         * allocatestack.c: Likewise.
8709         * pthread_join.c: Add one more __builtin_expect.
8710         * pthread_timedjoin.c: Likewise.
8712         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8713         not data of sequence number does not match.
8714         Add one __builtin_expect.
8716         * Makefile (tests): Add tst-clock1.
8717         * tst-clock1.c: New file.
8719         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8720         negative arguments.
8721         * Makefile (tests): Add tst-basic5.
8722         * tst-basic5.c: New file.
8724 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8726         * Makefile (tests): Add tst-basic4.
8727         * tst-basic4.c: New file.
8729         * pthreadP.h: Add declaraction for __nptl_nthreads.
8730         * pthread_create.c: Define __nptl_nthreads
8731         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8732         after thread is done.  If then zero, call exit(0).
8733         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8734         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8735         * init.c (pthread_functions): Initialize ptr_nthreads.
8736         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8737         (__reclaim_stacks): Decrement __nptl_nthreads.
8738         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8739         Define.
8740         * Makefile (tests): Add tst-basic3.
8741         * tst-basic3.c: New file.
8743         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8744         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8745         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8746         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8747         if asynchronous canceling is enabled.
8748         * pthread_join.c (pthread_join): When recognizing circular joins,
8749         take into account the other thread might be already canceled.
8750         * Makefile (tests): Add tst-join5.
8751         * tst-join5.c: New file.
8753         * Makefile (tests): Add tst-join4.
8754         * tst-join4.c: New file.
8756 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8758         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8760 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8762         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8763         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8764         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8765         warning.
8766         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8767         to avoid warning.
8768         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8769         error if lll_futex_wake failed.
8771 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8773         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8774         handling of cancellation and failung pthread_mutex_unlock call.
8775         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8776         * Makefile (tests): Add tst-cond8 and tst-cond9.
8777         * tst-cond8.c: New file.
8778         * tst-cond9.c: New file.
8780         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8782         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8783         non-standard initializers with __USE_GNU.
8785         * Makefile (tests): Add tst-cleanup3.
8786         * tst-cleanup3.c: New file.
8788 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8790         * Makefile (tests): Add tst-attr1 and tst-attr2.
8791         * tst-attr1.c: New file.
8792         * tst-attr2.c: New file.
8794         * Makefile: Add rules to build and run tst-atfork2 test.
8795         * tst-atfork2.c: New file.
8796         * tst-atfork2mod.c: New file.
8798         * sysdeps/unix/sysv/linux/unregister-atfork.c
8799         (__unregister_atfork): Free the memory allocated for the handlers
8800         after removing them from the lists.
8802         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8803         cleanup function.
8805         * tst-atfork1.c (do_test): Wait for the child we forked.
8806         Report error in child.
8808         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8810         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8812 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8814         * Makefile (tests): Add tst-cancel8.
8815         * tst-cancel8.c: New file.
8817         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8818         clearing of control variable.
8819         * Makefile (tests): Add tst-once3 and tst-once4.
8820         * tst-once3.c: New file.
8821         * tst-once4.c: New file.
8823 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8825         * sysdeps/sh/Makefile: New file.
8826         * sysdeps/sh/bits/atomic.h: New file.
8827         * sysdeps/sh/pthread_spin_init.c: New file.
8828         * sysdeps/sh/pthread_spin_lock.c: New file.
8829         * sysdeps/sh/pthread_spin_trylock.S: New file.
8830         * sysdeps/sh/pthread_spin_unlock.S: New file.
8831         * sysdeps/sh/pthreaddef.h: New file.
8832         * sysdeps/sh/tcb-offsets.sym: New file.
8833         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8834         * sysdeps/sh/tls.h: New file.
8835         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8836         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8837         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8838         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8839         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8840         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8841         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8842         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8843         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8844         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8845         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8846         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8847         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8848         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8849         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8850         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8851         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8852         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8853         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8854         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8855         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8856         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8857         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8858         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8859         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8860         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8861         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8862         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8863         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8864         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8866 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8868         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8869         according to POSIX.
8871         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8873 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8875         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8876         (TLS_GET_FS): New #define.
8877         (TLS_SET_FS): New #define.
8878         Correct value of __NR_set_thread_area.
8880         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8882 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8884         * Makefile (tests): Add tst-popen1.
8885         * tst-popen1.c: New file.
8887         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8888         but inactive generalization.
8889         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8890         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8891         Minor optimization, remove one instruction.
8892         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8894 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8896         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8898 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8900         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8901         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8902         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8903         * sysdeps/pthread/pthread_cond_signal.c: New file.
8904         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8905         * sysdeps/pthread/pthread_cond_wait.c: New file.
8906         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8907         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8908         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8909         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8910         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8911         * sysdeps/s390/Makefile: New file.
8912         * sysdeps/s390/bits/atomic.h: New file.
8913         * sysdeps/s390/pthread_spin_init.c: New file.
8914         * sysdeps/s390/pthread_spin_lock.c: New file.
8915         * sysdeps/s390/pthread_spin_trylock.c: New file.
8916         * sysdeps/s390/pthread_spin_unlock.c: New file.
8917         * sysdeps/s390/pthreaddef.h: New file.
8918         * sysdeps/s390/tcb-offsets.sym: New file.
8919         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8920         * sysdeps/s390/tls.h: New file.
8921         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8922         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8923         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8924         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8925         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8926         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8927         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8928         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8929         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8930         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8931         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8932         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8933         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8934         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8935         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8936         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8937         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8938         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8939         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8940         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8941         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8942         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8943         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8945 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8947         * atomic.h: Add a couple more default implementations.
8948         (atomic_compare_and_exchange_acq): Use
8949         __arch_compare_and_exchange_32_acq in return value definition.  It
8950         always exists.
8951         (atomic_bit_set): Renamed from atomic_set_bit.
8952         Add missing atomic_ prefixes.
8954         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8955         thread library is available, use correct value to mark initialized
8956         once variable.
8958 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8960         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8961         __sysconf to determine pagesize.
8963         * pthread_create.c: Include <atomic.h>.
8964         * allocatestack.c (allocate_stack): Implement coloring of the
8965         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8966         size minus one.  Adjust users.
8967         * sysdeps/i386/i686/Makefile: New file.
8969 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8971         * allocatestack.c: Improve comment throughout the file.
8973         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8974         (__lll_lock_wait): Add branch prediction.
8975         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8976         (__lll_lock_wait): Likewise.
8977         (lll_unlock_wake_cb): Removed.
8979 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8981         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8982         _POSIX_THREAD_PRIORITY_SCHEDULING.
8984 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8986         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8987         Fix return type of ptr___pthread_getspecific.
8989 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8991         * Makefile (tests): Add tst-umask1.
8992         (tst-umask1-ARGS): Define.
8993         * tst-umask1.c: New file.
8995 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8997         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8998         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8999         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
9000         pthread_rwlock_unlock.
9001         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
9002         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
9003         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
9004         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
9005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
9006         New file.
9007         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
9008         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
9009         New file.
9010         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
9011         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
9012         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
9013         New file.
9014         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
9015         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
9016         New file.
9017         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
9018         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
9019         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
9020         New file.
9021         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
9022         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
9023         New file.
9024         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
9026         * Makefile (libpthread-routines): Remove lowlevelcond and
9027         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
9028         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
9029         and pthread_cond_broadcast.
9030         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
9031         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
9032         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
9033         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
9034         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
9035         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
9036         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
9037         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
9038         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
9039         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
9040         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
9041         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
9042         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
9043         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
9044         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
9045         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
9046         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
9047         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
9048         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
9049         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
9050         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
9051         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
9052         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
9053         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
9054         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
9055         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
9056         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
9057         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
9058         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
9059         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
9060         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
9062         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
9063         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
9064         of the code is moved to ...
9065         * sysdeps/pthread/createthread.c: ...here.  New file.
9067 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
9069         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
9070         (__new_sem_post): Clear %eax before returning.
9071         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
9073         * Makefile (tests): Add tst-cleanup2.
9074         * tst-cleanup2.c: New file.
9076         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9077         Interpret first parameter correctly.
9079 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
9081         * Makefile (headers): Add bits/semaphore.h.
9083 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
9085         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
9086         if not SHARED.
9088 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
9090         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
9091         must be used and mapping failed.
9092         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
9094         * Makefile (CFLAGS-pthread_self.os): Define this, not
9095         CFLAGS-pthread_self.c.
9097 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9099         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
9100         lll_unlock_wake_cb.
9102         * Makefile (libpthread-routines): Add version.  Add rules to build
9103         version.os and banner.h.
9104         * version.c: New file.
9106 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
9108         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
9109         the alias unconditional.
9110         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
9112 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
9114         * Makefile (CFLAGS-pthread_self.c): New definition.
9116 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9118         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
9119         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
9120         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
9121         * init.c (__pthread_initialize_minimal_internal): Likewise.
9123 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9125         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9127         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9128         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9129         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9130         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9131         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9132         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9134 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9136         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9137         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9138         * tst-cancel-wrappers.sh: Remove all exceptions.
9140 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9142         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9143         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9145         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9146         Use __libc_pthread_functions array if SHARED.
9148         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9149         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9151         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9152         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9153         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9154         __libc_ptf_call instead of __libc_maybe_call.
9155         (PTF): New #define.
9156         (__libc_cleanup_region_start): Wrap function name with PTF call.
9157         (__libc_cleanup_region_end): Likewise.
9158         (__libc_cleanup_end): Likewise.
9160         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9161         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9162         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9163         * pthreadP.h: Add prototypes.
9165         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9166         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9167         __pthread_rwlock_unlock aliases.
9168         * pthreadP.h: Add prototypes for new aliases.
9170         * pthreadP.h (struct pthead_functions): Moved to...
9171         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9172         * init.c (pthread_functions): Add initializers for new elements.
9174         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9175         __pthread_cleanup_pop_restore aliases.
9176         * pthreadP.h: Add prototypes.
9178         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9179         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9180         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9181         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9182         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9183         * pthreadP.h: Adjust prototypes and callers.
9185 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9187         * Makefile (tests): Add tst-cancel7.
9188         (tst-cancel7-ARGS): New variable.
9189         * tst-cancel7.c: New file.
9191         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9192         around gcc defficiencies.
9193         * old_pthread_cond_signal.c: Likewise.
9194         * old_pthread_cond_timedwait.c: Likewise.
9195         * old_pthread_cond_wait.c: Likewise.
9197         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9199 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9201         * Makefile (tests): Add tst-cond7.
9202         * tst-cond7.c: New file.
9204         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9205         (condvar_cleanup): Get condvar address from the right place.
9207         * atomic.h: Correct definitions of atomic_full_barrier,
9208         atomic_read_barrier, atomic_write_barrier.
9210         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9211         race-free.
9212         * old_pthread_cond_signal.c: Likewise.
9213         * old_pthread_cond_timedwait.c: Likewise.
9214         * old_pthread_cond_wait.c: Likewise.
9216 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9218         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9220 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9222         * pthreadP.h (pthread_cond_2_0_t): New type.
9223         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9224         Use new type for the 2.0 condvar function prototypes.
9225         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9226         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9227         parameter.
9228         * old_pthread_cond_destroy.c: Likewise.
9229         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9230         * old_pthread_cond_signal.c: Likewise.
9231         * old_pthread_cond_timedwait.c: Likewise.
9232         * old_pthread_cond_wait.c: Likewise.
9234         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9235         (__pthread_cond_wait): Don't save cancellation mode and seq value
9236         in same location.
9238         * herrno.c (__h_errno_location): Don't define as weak.
9240 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9242         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9243         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9244         and pthread_cond_wait.
9245         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9246         Renamed to...
9247         (__pthread_cond_broadcast_2_0): ... this.
9248         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9249         Renamed to...
9250         (__pthread_cond_destroy_2_0): ... this.
9251         * old_pthread_cond_init.c (__old_pthread_cond_init):
9252         Renamed to...
9253         (__pthread_cond_init_2_0): ... this.
9254         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9255         Renamed to...
9256         (__pthread_cond_signal_2_0): ... this.
9257         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9258         Renamed to...
9259         (__pthread_cond_wait_2_0): ... this.
9260         * pthread_cond_destroy.c: Include shlib-compat.h.
9261         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9262         * pthread_cond_init.c: Include shlib-compat.h.
9263         (pthread_cond_init): Change strong_alias into versioned_symbol.
9264         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9265         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9266         fields.
9267         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9268         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9269         __pthread_cond_wait_2_0): New prototypes.
9270         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9271         __old_pthread_cond_init, __old_pthread_cond_signal,
9272         __old_pthread_cond_wait): Removed.
9273         * init.c: Include shlib-compat.h.
9274         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9275         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9276         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9277         ptr___pthread_cond_*_2_0 fields.
9278         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9279         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9281         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9282         LIBC_SIGACTION was not yet defined.
9283         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9284         [!defined LIBC_SIGACTION] (__sigaction): New function and
9285         libc_hidden_weak.
9286         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9287         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9289 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9291         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9293 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9295         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9296         New, larger type definition.
9297         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9298         implementation.
9299         * Versions [libpthread]: Add definitions for new pthread_cond_*
9300         interfaces for version GLIBC_2.3.2.
9301         * pthread_cond_init.c: Update initialization for new type definition.
9302         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9303         pthread_cond_timedwait, pthread_cond_signal, and
9304         pthread_cond_broadcast.  Add old_pthread_cond_init,
9305         old_pthread_cond_destroy, old_pthread_cond_wait,
9306         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9307         old_pthread_cond_broadcast.
9308         * old_pthread_cond_broadcast.c: New file.
9309         * old_pthread_cond_destroy.c: New file.
9310         * old_pthread_cond_init.c: New file.
9311         * old_pthread_cond_signal.c: New file.
9312         * old_pthread_cond_timedwait.c: New file.
9313         * old_pthread_cond_wait.c: New file.
9314         * pthreadP.h: Add prototypes for the compatibility interfaces.
9316         * pthread_cond_destroy.c: Don't include <errno.h>.
9318 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9320         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9321         unnecessary zero offset when addressing MUTEX.
9323 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9325         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9326         __register_atfork.
9327         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9328         for __register_atfork.
9330 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9332         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9333         instead of ASSEMBLER test macro.
9335         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9336         __libc_current_sigrtmax): Add libc_hidden_def.
9338         * sysdeps/pthread/list.h: Remove assert.h include.
9340 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9342         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9343         __pthread_initialize_minimal_internal not
9344         __pthread_initialize_minimal.
9346 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9348         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9349         __pthread_initialize_minimal as hidden.
9351         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9352         constructor.
9354 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9356         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9357         $(common-objpfx)format.lds, include that into the output script.
9358         Fix comment.
9359         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9361 2002-12-28  Andreas Jaeger  <aj@suse.de>
9363         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9364         nsec resolution changes.
9365         (xstat64_conv): Likewise.
9366         (xstat32_conv): Likewise.
9367         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9368         struct kernel_stat.
9369         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9370         structs stat and stat64.
9371         * time/time.h (__timespec_defined): Define for __USE_MISC.
9372         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9374 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9376         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9377         argument.
9378         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9379         (pthread_exit): Use strong_alias to avoid warnings.
9380         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9381         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9382         ptr___pthread_attr_init_2_*.
9383         * init.c (pthread_functions): Adjust.
9385 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9387         * forward.c: Make all functions available by default again.  It
9388         caused too much trouble.
9390         * pt-siglongjmp.c: Removed.
9392 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9394         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9395         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9396         * sysdeps/i386/Makefile: New file.
9397         * sysdeps/i386/tcb-offsets.sym: New file.
9398         * sysdeps/pthread/tcb-offsets.h: New file.
9399         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9400         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9402         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9403         __register_atfork...
9404         (GLIBC_2.3.2): ...here.
9406 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9408         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9409         pthread_attr_setstackaddr with __attribute_deprecated__.
9411 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9413         * pt-system.c (system): Remove cancellation handling.
9414         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9415         cancellation routines.
9417 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9419         * descr.h: Include <dl-sysdep.h>.
9420         (struct pthread): Move header.data.list to the back of the struct.
9421         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9422         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9423         (SYSINFO_OFFSEET): Likewise.
9425 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9427         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9428         Define.
9429         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9430         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9431         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9432         (USE_DL_SYSINFO): Undef.
9434 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9436         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9437         $(common-objpfx)libc.so.
9438         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9439         it is bigger than pipe buffer size even on arches with bigger
9440         page size.
9441         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9443 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9445         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9446         correct errno access for case that USE___THREAD is not defined.
9448 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9450         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9451         Patch by Marijn Ros <marijn@mad.scientist.com>.
9453 2002-12-22  Roland McGrath  <roland@redhat.com>
9455         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9457 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9459         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9461 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9463         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9464         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9465         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9467         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9468         of int $0x80.
9469         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9470         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9471         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9472         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9473         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9474         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9475         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9476         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9478         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9479         sysenter.
9480         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9482         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9484         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9485         in new TCB.
9486         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9487         that sysinfo is properly initialized.
9488         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9489         to 1 only for ld.so.
9491         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9492         RTLD_CORRECT_DYNAMIC_WEAK.
9494 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9496         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9497         Use return 0 as 6th argument to FORWARD4.
9498         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9500 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9502         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9503         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9504         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9505         (INIT_SYSINFO): New #define.
9506         (TLS_TP_INIT): Use INIT_SYSINFO.
9507         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9508         At test to make sure SYSINFO_OFFSET value is correct.
9509         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9511 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9513         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9514         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9515         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9516         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9517         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9518         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9519         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9521 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9523         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9524         macro instead of using int $0x80 directly.
9526         * sysdeps/pthread/bits/stdio-lock.h: New file.
9527         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9528         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9529         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9530         * Makefile (routines): Add libc-lowlevelmutex.
9532         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9533         __i686.get_pc_thunk.dx.
9535 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9537         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9538         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9539         ($(objpfx)tst-cancel-wrappers.out): New rule.
9540         * tst-cancel-wrappers.sh: New test.
9541         * tst-locale1.c: Include signal.h.
9542         (uselocale): Test static linking of __libc_current_sigrt*.
9544 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9546         * Makefile (tests): Add tst-cancel6.
9547         * tst-cancel6.c: New file
9549 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9551         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9552         Define meaningfully for assembler as well.
9553         * pthreadP.h (struct pthread_functions): Remove
9554         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9555         and ptr_pthread_attr_init_2_1 fields.
9556         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9557         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9558         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9559         (FORWARD3): Define using FORWARD4.
9560         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9561         versions.
9562         * pt-system.c: Remove duplicate stdlib.h include.
9564 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9566         * sem_init.c: Define sem_init@GLIBC_2.0.
9567         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9568         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9570         * flockfile.c: Moved to...
9571         * sysdeps/pthread/flockfile.c: ...here.  New file.
9572         * funlockfile.c: Moved to...
9573         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9574         * ftrylockfile.c: Moved to...
9575         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9577 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9579         * libc-cancellation.c: Guard both function with
9580         #if !defined NOT_IN_libc.
9581         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9582         automatically provided pthread wrappers.
9583         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9584         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9585         nor in libpthread.
9586         * pt-open.c: Removed.
9587         * pt-fcntl.c: Removed.
9588         * pt-fsync.c: Removed.
9589         * pt-lseek.c: Removed.
9590         * pt-msgrcv.c: Removed.
9591         * pt-msgsnd.c: Removed.
9592         * pt-msync.c: Removed.
9593         * pt-nanosleep.c: Removed.
9594         * pt-open64.c: Removed.
9595         * pt-pause.c: Removed.
9596         * pt-pread.c: Removed.
9597         * pt-pread64.c: Removed.
9598         * pt-pwrite.c: Removed.
9599         * pt-pwrite64.c: Removed.
9600         * pt-read.c: Removed.
9601         * pt-recv.c: Removed.
9602         * pt-recvfrom.c: Removed.
9603         * pt-recvmsg.c: Removed.
9604         * pt-send.c: Removed.
9605         * pt-sendto.c: Removed.
9606         * pt-sigtimedwait.c: Removed.
9607         * pt-sigwait.c: Removed.
9608         * pt-wait.c: Removed.
9609         * pt-waitpid.c: Removed.
9610         * pt-write.c: Removed.
9611         * pt-accept.c: Removed.
9612         * pt-close.c: Removed.
9613         * pt-connect.c: Removed.
9614         * pt-lseek64.c: Removed.
9615         * pt-sendmsg.c: Removed.
9616         * pt-tcdrain.c: Removed.
9618 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9620         * init.c (__pthread_initialize_minimal_internal): Renamed from
9621         __pthread_initialize_minimal.  Make old name an alias.  This
9622         converts a normal relocation into a relative relocation.
9624         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9626         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9627         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9628         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9629         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9630         pt-sigwaitinfo, pt-waitid, and pt-writev.
9631         * pt-creat.c: Removed.
9632         * pt-poll.c: Removed.
9633         * pt-pselect.c: Removed.
9634         * pt-readv.c: Removed.
9635         * pt-select.c: Removed.
9636         * pt-sigpause.c: Removed.
9637         * pt-sigsuspend.c: Removed.
9638         * pt-sigwaitinfo.c: Removed.
9639         * pt-waitid.c: Removed.
9640         * pt-writev.c: Removed.
9642         * init.c (pthread_functions): New variable.
9643         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9644         (or NULL) to __libc_pthread_init.
9645         * forward.c: Rewrite to use __libc:pthread_functions array to get
9646         function addresses.
9647         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9648         prototype.
9649         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9650         Take new parameter.  Copy content of variable pointed to by it
9651         to __libc_pthread_init.
9653         * pthreadP.h (struct pthread_functions): New type.
9654         (__libc_pthread_init): Declare.
9656         * pthread_attr_destroy.c: Add namespace protected alias.
9657         * pthread_attr_getdetachstate.c: Likewise.
9658         * pthread_attr_getinheritsched.c: Likewise.
9659         * pthread_attr_getschedparam.c: Likewise.
9660         * pthread_attr_getschedpolicy.c: Likewise.
9661         * pthread_attr_getscope.c: Likewise.
9662         * pthread_attr_setdetachstate.c: Likewise.
9663         * pthread_attr_setinheritsched.c: Likewise.
9664         * pthread_attr_setschedparam.c: Likewise.
9665         * pthread_attr_setschedpolicy.c: Likewise.
9666         * pthread_attr_setscope.c: Likewise.
9667         * pthread_cond_broadcast.c: Likewise.
9668         * pthread_cond_destroy.c: Likewise.
9669         * pthread_cond_init.c: Likewise.
9670         * pthread_cond_signal.c: Likewise.
9671         * pthread_cond_wait.c: Likewise.
9672         * pthread_condattr_destroy.c: Likewise.
9673         * pthread_condattr_init.c: Likewise.
9674         * pthread_equal.c: Likewise.
9675         * pthread_exit.c: Likewise.
9676         * pthread_getschedparam.c: Likewise.
9677         * pthread_self.c: Likewise.
9678         * pthread_setcancelstate.c: Likewise.
9679         * pthread_setschedparam.c: Likewise.
9680         * pthread_mutex_destroy.c: Likewise.
9681         * pthread_mutex_init.c: Likewise.
9682         * pthreadP.h: Add prototypes for the aliases.
9684         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9685         multiple_threads member in correct TCB to 1.
9687         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9688         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9689         member of thread decriptor, otherwise return unconditionally 1.
9691 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9693         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9694         regular Linux version.  Remove file.
9695         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9696         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9697         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9698         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9699         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9700         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9701         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9702         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9703         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9704         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9705         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9706         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9707         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9708         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9709         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9710         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9711         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9712         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9713         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9714         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9715         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9716         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9717         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9718         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9719         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9720         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9721         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9722         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9723         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9724         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9726 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9728         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9729         * sysdeps/unix/sysv/linux/open.c: Removed.
9730         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9731         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9732         * sysdeps/unix/sysv/linux/msync.c: Removed.
9733         * sysdeps/unix/sysv/linux/read.c: Removed.
9734         * sysdeps/unix/sysv/linux/close.c: Removed.
9735         * sysdeps/unix/sysv/linux/creat.c: Removed.
9736         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9737         * sysdeps/unix/sysv/linux/pause.c: Removed.
9738         * sysdeps/unix/sysv/linux/select.c: Removed.
9739         * sysdeps/unix/sysv/linux/write.c: Removed.
9741 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9743         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9744         element in TCB to see whether locking is needed.
9746         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9747         MULTIPLE_THREADS_OFFSET value is correct.
9749         * sysdeps/unix/sysv/linux/close.c: New file.
9750         * sysdeps/unix/sysv/linux/connect.S: New file.
9751         * sysdeps/unix/sysv/linux/creat.c: New file.
9752         * sysdeps/unix/sysv/linux/fsync.c: New file.
9753         * sysdeps/unix/sysv/linux/llseek.c: New file.
9754         * sysdeps/unix/sysv/linux/lseek.c: New file.
9755         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9756         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9757         * sysdeps/unix/sysv/linux/msync.c: New file.
9758         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9759         * sysdeps/unix/sysv/linux/open.c: New file.
9760         * sysdeps/unix/sysv/linux/open64.c: New file.
9761         * sysdeps/unix/sysv/linux/pause.c: New file.
9762         * sysdeps/unix/sysv/linux/poll.c: New file.
9763         * sysdeps/unix/sysv/linux/pread.c: New file.
9764         * sysdeps/unix/sysv/linux/pread64.c: New file.
9765         * sysdeps/unix/sysv/linux/pselect.c: New file.
9766         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9767         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9768         * sysdeps/unix/sysv/linux/readv.c: New file.
9769         * sysdeps/unix/sysv/linux/recv.S: New file.
9770         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9771         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9772         * sysdeps/unix/sysv/linux/select.c: New file.
9773         * sysdeps/unix/sysv/linux/send.S: New file.
9774         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9775         * sysdeps/unix/sysv/linux/sendto.S: New file.
9776         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9777         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9778         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9779         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9780         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9781         * sysdeps/unix/sysv/linux/system.c: New file.
9782         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9783         * sysdeps/unix/sysv/linux/wait.c: New file.
9784         * sysdeps/unix/sysv/linux/waitid.c: New file.
9785         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9786         * sysdeps/unix/sysv/linux/writev.c: New file.
9787         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9789         * pt-readv.c: Fix comment.
9791 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9793         * tst-cleanup1.c: Include stdlib.h.
9795         * tst-cancel5.c: New test.
9796         * Makefile (tests): Add tst-cancel5.
9797         (tst-cancel5): Link against libc.so libpthread.so in that order.
9799 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9801         * forward.c (test_loaded): Prevent recursive calls.
9803         * Makefile (routines): Add libc-cancellation.
9804         * libc-cancellation.c: New file.
9805         * descr.h (struct pthread): Add multiple_threads field.
9806         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9807         new thread descriptor to 1.
9808         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9809         Initialize multiple_thread field after successful thread creation.
9810         * cancellation.c (__do_cancel): Move to pthreadP.h.
9811         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9812         (__pthread_disable_asynccancel): Add internal_function attribute.
9813         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9814         * pthread_setcancelstate.c: Likewise.
9815         * pthread_setcanceltype.c: Likewise.
9816         * pthread_exit.c: Likewise.
9817         * pthreadP.h (CANCELLATION_P): Likewise.
9818         (__do_cancel): Define as static inline.
9819         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9820         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9821         declarations.
9822         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9823         fields.  Define MULTIPLE_THREADS_OFFSET.
9824         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9825         declaration.
9826         * sysdeps/unix/sysv/linux/accept.S: New file.
9827         * sysdeps/unix/sysv/linux/read.c: New file.
9828         * sysdeps/unix/sysv/linux/write.c: New file.
9829         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9830         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9831         initialization of __libc_locking_needed.
9832         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9833         __libc_locking_needed, use multiple_threads field in TCB.
9834         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9836 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9838         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9839         version.
9840         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9842         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9843         access to __libc_locking_needed for PIC.
9845 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9847         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9848         declare for libc.so.
9849         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9850         expression.
9851         (__libc_lock_lock): Put into statement expression.
9852         (__libc_lock_unlock): Remove trailing semicolon.
9853         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9855 2002-12-12  Roland McGrath  <roland@redhat.com>
9857         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9858         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9860 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9862         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9863         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9864         Initialize __libc_locking_needed.
9865         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9866         instead of __register_pthread_fork_handler.
9867         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9868         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9869         fork-gen with libc_pthread_init.
9870         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9871         of __register_pthread_fork_handler.
9872         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9873         of __register_pthread_fork_handler.
9874         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9875         __libc_locking_needed to determine whether lock prefix can be avoided.
9876         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9878 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9880         * Makefile (tests): Add tst-cleanup1.
9881         * tst-cleanup1.c: New file.
9882         * cancellation.c (__cleanup_thread): Removed.
9883         (__do_cancel): Remove call to __cleanup_thread.
9884         * pthreadP.h: Remove __cleanup_thread prorotype.
9886         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9887         Remember function and argument even if cancellation handler
9888         function is not available.
9889         (__libc_cleanup_region_end): Execute registered function directly if
9890         pthread functions are not available.
9891         (__libc_cleanup_end): Likewise.
9893         * init.c (__pthread_initialize_minimal): Fix initialization in
9894         static lib by preventing gcc from being too clever.
9896 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9898         * init.c (__pthread_initialize_minimal): Remove unneccesary
9899         sigaddset call.
9901         * Makefile (tests): We can run tst-locale2 now.
9903 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9905         * Versions: Remove duplicated sigwait entry.
9907 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9909         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9910         inside libpthread.
9912         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9914         * pthreadP.h: Declare __pthread_enable_asynccancel and
9915         __pthread_disable_asynccancel.
9916         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9917         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9918         * cancellation.c (__pthread_enable_asynccancel): New function.
9919         (__pthread_disable_asynccancel): New function.
9920         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9921         * pt-close.c: Likewise.
9922         * pt-connect.c: Likewise.
9923         * pt-creat.c: Likewise.
9924         * pt-fcntl.c: Likewise.
9925         * pt-fsync.c: Likewise.
9926         * pt-lseek.c: Likewise.
9927         * pt-lseek64.c: Likewise.
9928         * pt-msgrcv.c: Likewise.
9929         * pt-msgsnd.c: Likewise.
9930         * pt-msync.c: Likewise.
9931         * pt-nanosleep.c: Likewise.
9932         * pt-open.c: Likewise.
9933         * pt-open64.c: Likewise.
9934         * pt-pause.c: Likewise.
9935         * pt-poll.c: Likewise.
9936         * pt-pread.c: Likewise.
9937         * pt-pread64.c: Likewise.
9938         * pt-pselect.c: Likewise.
9939         * pt-pwrite.c: Likewise.
9940         * pt-pwrite64.c: Likewise.
9941         * pt-read.c: Likewise.
9942         * pt-readv.c: Likewise.
9943         * pt-recv.c: Likewise.
9944         * pt-recvfrom.c: Likewise.
9945         * pt-recvmsg.c: Likewise.
9946         * pt-select.c: Likewise.
9947         * pt-send.c: Likewise.
9948         * pt-sendmsg.c: Likewise.
9949         * pt-sendto.c: Likewise.
9950         * pt-sigpause.c: Likewise.
9951         * pt-sigsuspend.c: Likewise.
9952         * pt-sigtimedwait.c: Likewise.
9953         * pt-sigwait.c: Likewise.
9954         * pt-sigwaitinfo.c: Likewise.
9955         * pt-system.c: Likewise.
9956         * pt-tcdrain.c: Likewise.
9957         * pt-wait.c: Likewise.
9958         * pt-waitid.c: Likewise.
9959         * pt-waitpid.c: Likewise.
9960         * pt-write.c: Likewise.
9961         * pt-writev.c: Likewise.
9962         * pthread_join.c: Likewise.
9963         * pthread_timedjoin.c: Likewise.
9965         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9966         (__xpg_sigpause): New function.
9967         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9969 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9971         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9973         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9974         _GI_pthread_cleanup_pop to pthreadP.h.
9976         * ftrylockfile.c: Use _IO_lock_trylock instead of
9977         pthread_mutex_trylock.
9979         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9980         (CANCEL_RESET): Likewise.
9981         (__pthread_setcanceltype_): Declare.
9982         (__pthread_mutex_lock_internal): Declare.
9983         (__pthread_mutex_unlock_internal): Declare.
9984         (__pthread_once_internal): Declare.
9985         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9986         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9988         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9989         and pthread_mutex_unlock.
9990         * pthread_cond_wait.c: Likewise.
9991         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9992         * pthread_mutex_unlock.c: Likewise.
9994         * pthread_setcanceltype.c: Add additional alias
9995         __pthread_setcanceltype.
9997         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9998         * sem_open.c (sem_open): Likewise.
9999         Use __libc_open, __libc_write, and __libc_close instead of
10000         open, write, and close respectively.
10002         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
10003         Rewrite as statement expression since it must return a value.
10005         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
10006         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
10007         __pthread_kill.
10009         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
10010         alias __pthread_once_internal.
10012         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
10014 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
10016         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
10017         * tst-stdio1.c: New file.
10018         * tst-stdio2.c: New file.
10020         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
10022         * Makefile (tests): Comment out tst-locale2 for now.
10023         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
10025         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
10026         -D_IO_MTSAFE_IO.
10027         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
10028         Use _IO_lock_init instead of explicit assignment.
10030         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
10031         Define __libc_lock_* and __libc_lock_recursive macros with
10032         lowlevellock macros, not pthread mutexes.
10034         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
10035         of pthread_mutex_lock.
10036         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
10037         instead of pthread_mutex_unlock.
10039 2002-12-06  Roland McGrath  <roland@redhat.com>
10041         * allocatestack.c (__stack_user): Use uninitialized defn.
10042         * init.c (__pthread_initialize_minimal): Initialize it here.
10044 2002-12-05  Roland McGrath  <roland@redhat.com>
10046         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
10047         string.
10048         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
10050         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
10051         missing & here too.
10053 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
10055         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10056         lowlevellock.
10057         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
10058         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
10059         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
10060         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
10061         for __libc_lock_* macros.
10062         * Makefile (routines): Add libc-lowlevellock.
10064 2002-10-09  Roland McGrath  <roland@redhat.com>
10066         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
10067         Under [__PIC__], call the function via the pointer fetched for
10068         comparison rather than a call by name that uses the PLT.
10069         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
10070         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
10071         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
10072         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
10073         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
10075 2002-12-04  Roland McGrath  <roland@redhat.com>
10077         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
10079         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
10080         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
10082         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
10084 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10086         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
10087         a completely opaque, non-integer type.
10088         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
10090 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
10092         * sysdeps/i386/tls.h: Include stdlib.h.
10093         * sysdeps/x86_64/tls.h: Likewise.
10095 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
10097         * Makefile (tests): Add tst-locale2.
10098         (tests-static): Likewise.
10099         * tst-locale2.c: New file.
10101         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
10102         volatile and add memory clobbers to lock operations.
10104 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
10106         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
10107         * sysdeps/i386/i486/bits/atomic.h: New file.
10108         * sysdeps/i386/i586/bits/atomic.h: New file.
10109         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
10110         include i486 version.
10111         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
10112         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
10113         Patch by Marijn Ros <marijn@mad.scientist.com>.
10115         * allocatestack.c (get_cached_stack): Don't crash if we first
10116         found a stack with a larger size then needed.
10117         Reported by Hui Huang <hui.huang@sun.com>.
10119         * Makefile (tests): Add tst-sysconf.
10120         * tst-sysconf.c: New file.
10122         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10123         PTHREAD_THREADS_MAX.
10125 2002-12-02  Roland McGrath  <roland@redhat.com>
10127         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10128         Declare using hidden_proto instead of attribute_hidden, so there are
10129         non-.hidden static symbols for gdb to find.
10130         (__pthread_keys): Likewise.
10131         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10132         * allocatestack.c (__stack_user): Likewise.
10133         * pthread_create.c (__pthread_keys): Likewise.
10134         (__nptl_threads_events, __nptl_last_event): Make these static instead
10135         of hidden.
10136         * pthread_key_create.c (__pthread_pthread_keys_max,
10137         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10139 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10141         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10142         statically.
10143         * tst-locale1.c: New file.
10145         * pthread_cond_timedwait.c: Include <stdlib.h>.
10147         * Makefile (tests): Add tst-fork2 and tst-fork3.
10148         * tst-fork2.c: New file.
10149         * tst-fork3.c: New file.
10151 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10153         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10155         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10156         require it to 200112L.
10158         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10159         instruction only if HAVE_CMOV is defined.
10160         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10162         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10164         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10166         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10168         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10170 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10172         * sysdeps/x86_64/bits/atomic.h: New file.
10174         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10175         16-bit operations.
10177         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10178         possible since gettid cannot fail.
10180         * sysdeps/x86_64/pthreaddef.h: New file.
10182         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10184         * sysdeps/x86_64/pthread_spin_init.c: New file.
10185         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10186         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10187         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10189         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10190         Add missing lock prefix.  Minute optimization.
10192         * tst-spin2.c (main): Also check successful trylock call.
10194         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10195         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10197         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10198         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10200         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10201         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10202         value in case of an error.  Add support for INTERNAL_SYSCALL.
10204         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10205         value in case of an error.
10207         * sysdeps/x86_64/tls.h: New file.
10209 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10211         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10212         takes the array member name and the index as parameters.
10213         (THREAD_SETMEM_NC): Likewise.
10214         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10215         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10216         interfaces.
10218         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10219         to decide which code to use.
10220         (THREAD_SETMEM_NC): Likewise.
10222         * allocatestack.c (queue_stack): Don't remove stack from list here.
10223         Do it in the caller.  Correct condition to prematurely terminate
10224         loop to free stacks.
10225         (__deallocate_stack): Remove stack from list here.
10227 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10229         * Makefile (tests): Add tst-stack1.
10230         * tst-stack1.c: New file.
10232         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10233         provided stack.
10235         * pthread_attr_getstack.c: Return bottom of the thread area.
10237 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10239         * Makefile (libpthread-routines): Add pt-allocrtsig and
10240         pthread_kill_other_threads.
10241         * pt-allocrtsig.c: New file.
10242         * pthread_kill_other_threads.c: New file.
10243         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10244         all three functions.
10245         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10246         allocrtsig.
10247         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10248         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10249         and __libc_allocate_rtsig_private.
10250         * Versions (libpthread): Export pthread_kill_other_threads_np,
10251         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10253 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10255         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10256         the end of the stack.  Adjust computations.
10257         When mprotect call fails dequeue stack and free it.
10258         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10259         attribute.
10260         * pthread_getattr_np.c: Likewise.
10262         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10263         surprises.
10265 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10267         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10268         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10270 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10272         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10273         * pthread_setspecific.c: Likewise.
10275 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10277         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10278         definitions.  Get them from the official place.
10279         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10281         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10282         Use new CLONE_ flags in clone() calls.
10284         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10285         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10287         * Versions: Add pthread_* functions for libc.
10288         * forward.c: New file.
10290         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10291         errno-loc.
10292         * herrno.c: New file.
10293         * res.c: New file.
10295         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10296         sem_trywait, and sem_timedwait.  Add herrno and res.
10297         * sem_init.c: Don't initialize lock and waiters members.
10298         * sem_open.c: Likewise.
10299         * sem_post.c: Removed.
10300         * sem_wait.c: Removed.
10301         * sem_trywait.c: Removed.
10302         * sem_timedwait.c: Removed.
10303         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10304         Includes full implementations of sem_post, sem_wait, sem_trywait,
10305         and sem_timedwait.
10306         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10307         for new implementation.
10308         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10309         and waiters fields.
10311         * tst-sem3.c: Improve error message.
10312         * tst-signal3.c: Likewise.
10314         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10315         to tell the kernel about the termination futex and to initialize tid
10316         member.  Don't initialize main_thread.
10317         * descr.h (struct pthread): Remove main_thread member.
10318         * cancelllation.c (__do_cancel): Remove code handling main thread.
10319         The main thread is not special anymore.
10321         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10322         size of the stacks to stack_cache_actsize.
10324         * pt-readv.c: Add missing "defined".
10325         * pt-sigwait.c: Likewise.
10326         * pt-writev.c: Likewise.
10328 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10330         * Versions: Export __connect from libpthread.
10331         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10333         * Makefile (libpthread-routines): Add pt-raise.
10334         * sysdeps/unix/sysv/linux/raise.c: New file.
10335         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10336         * sysdeps/generic/pt-raise.c: New file.
10338         * pthread_cond_init.c: Initialize all data elements of the condvar
10339         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10341         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10342         * pthread_create.c: Likewise.
10344         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10345         * tst-key1.c: New file.
10346         * tst-key2.c: New file.
10347         * tst-key3.c: New file.
10349         * Versions: Export pthread_detach for version GLIBC_2.0.
10350         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10352 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10354         * pthread_key_create.c: Terminate search after an unused key was found.
10355         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10357         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10358         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10360 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10362         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10363         dynamic lookup for errno in PIC.
10365         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10366         release the stack lock as soon as possible.
10367         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10368         the static TLS block.
10369         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10371         * cancellation.c: Renamed from cancelation.c.
10372         * Makefile: Adjust accordingly.
10373         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10374         * cleanup_defer.c: Use CANCELLATION_P.
10375         * pthread_testcancel.c: Likewise.
10376         * descr.h: Fix spelling in comments.
10377         * init.c: Likewise.
10378         * pthread_getattr_np.c: Likewise.
10379         * pthread_getschedparam.c: Likewise.
10380         * pthread_setschedparam.c: Likewise.
10381         * Versions: Likewise.
10383         * pt-pselect.c: New file.
10384         * Makefile (libpthread-routines): Add pt-pselect.
10385         * Versions: Add pselect.
10387         * tst-cancel4.c: New file.
10388         * Makefile (tests): Add tst-cancel4.
10390 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10392         * pthread_mutex_lock.c: Always record lock ownership.
10393         * pthread_mutex_timedlock.c: Likewise.
10394         * pthread_mutex_trylock.c: Likewise.
10396         * pt-readv.c: New file.
10397         * pt-writev.c: New file.
10398         * pt-creat.c: New file.
10399         * pt-msgrcv.c: New file.
10400         * pt-msgsnd.c: New file.
10401         * pt-poll.c: New file.
10402         * pt-select.c: New file.
10403         * pt-sigpause.c: New file.
10404         * pt-sigsuspend.c: New file.
10405         * pt-sigwait.c: New file.
10406         * pt-sigwaitinfo.c: New file.
10407         * pt-waitid.c: New file.
10408         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10409         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10410         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10411         * Versions: Add all the new functions.
10413         * tst-exit1.c: New file.
10414         * Makefile (tests): Add tst-exit1.
10416         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10418 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10420         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10422         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10423         call.  pthread_join is an official cancellation point.
10424         * pthread_timedjoin.c: Likewise.
10426         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10427         and the condvar's mutex are retrieved.
10428         * pthread_cond_timedwait.c: Likewise.
10429         Reported by dice@saros.East.Sun.COM.
10431 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10433         * pthreadP.h: Cut out all type definitions and move them...
10434         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10435         * pthreadP.h: Include <internaltypes.h>.
10437         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10438         performance tweaks.
10440         * sem_trywait.c: Shuffle #includes around to get right order.
10441         * sem_timedwait.c: Likewise.
10442         * sem_post.c: Likewise.
10443         * sem_wait.c: Likewise.
10445         * nptl 0.3 released.
10447         * Makefile (tests): Add tst-signal3.
10448         * tst-signal3.c: New file.
10450 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10452         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10453         the asms modify the sem object.
10454         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10456         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10457         the actual members.
10458         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10459         * semaphoreP.h: Include pthreadP.h.
10460         * sem_getvalue.c: Adjust to sem_t change.
10461         * sem_init.c: Likewise.
10462         * sem_open.c: Likewise.
10463         * sem_post.c: Likewise.
10464         * sem_timedwait.c: Likewise.
10465         * sem_trywait.c: Likewise.
10466         * sem_wait.c: Likewise.
10468 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10470         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10471         * tst-basic2.c: New file.
10472         * tst-exec1.c: New file.
10473         * tst-exec2.c: New file.
10474         * tst-exec3.c: New file.
10476         * tst-fork1.c: Remove extra */.
10478         * nptl 0.2 released.  The API for IA-32 is complete.