Updated to fedora-glibc-20080111T0737
[glibc.git] / nptl / ChangeLog
blobddb451f9ed7a4bb4ecd279e13629bded28ec5767
1 2008-01-10  Ulrich Drepper  <drepper@redhat.com>
3         * pthread-errnos.sym: Add EOVERFLOW.
4         * sysdeps/unix/sysv/linux/structsem.sym: Add SEM_VALUE_MAX.
5         * sysdeps/unix/sysv/linux/sem_post.c: Don't overflow value field.
6         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
9 2007-12-14  Ulrich Drepper  <drepper@redhat.com>
11         * sysdeps/x86_64/pthreaddef.h (ARCH_RETRY_MMAP): Take additional
12         parameter.  Passed it as permission to mmap.
13         * allocatestack.c (allocate_stack): Pass prot as second parameter
14         to ARCH_RETRY_MMAP.
16 2007-12-12  Ulrich Drepper  <drepper@redhat.com>
18         * tst-basic7.c: Allocate memory for the stack.
20         [BZ #5465]
21         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S [!SHARED]
22         (__pthread_cond_timedwait): Don't use VDSO.
23         Patch by Michal Januszewski.
25 2007-12-07  Ulrich Drepper  <drepper@redhat.com>
27         [BZ #5455]
28         * sysdeps/pthread/pthread.h [!__EXCEPTIONS] (pthread_cleanup_pop):
29         Allow label before pthread_cleanup_pop.
30         (pthread_cleanup_pop_restore_np): Likewise.
32 2007-12-04  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
34         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait):
35         Store 2 before returning ETIMEDOUT.
37 2007-11-23  Ulrich Drepper  <drepper@redhat.com>
39         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedlock_wait):
40         Store 2 before returning ETIMEDOUT.
41         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise
42         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
43         (__lll_lock_wait_private): Optimize.
44         (__lll_lock_wait): Likewise.
46 2007-11-20  Jakub Jelinek  <jakub@redhat.com>
48         * sysdeps/pthread/pthread.h (pthread_cleanup_push,
49         pthread_cleanup_push_defer_np): Add extra (void *) cast to shut up
50         g++ 4.1 and 4.2 -Wstrict-aliasing warnings.
52 2007-11-08  Ulrich Drepper  <drepper@redhat.com>
54         [BZ #5240]
55         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
56         If we time out, try one last time to lock the futex to avoid
57         losing a wakeup signal.
58         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
59         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
61         [BZ #5245]
62         * sysdeps/pthread/createthread.c (do_clone): Translate clone error
63         if necessary.
65 2007-11-07  Ulrich Drepper  <drepper@redhat.com>
67         [BZ #5245]
68         * allocatestack.c (allocate_stack): Change ENOMEM error in case
69         mmap failed to EAGAIN.
70         * Makefile (tests): Add tst-basic7.
71         * tst-basic7.c: New file.
73 2007-11-05  Ulrich Drepper  <drepper@redhat.com>
75         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
76         Use __linkin_atfork.
78 2007-11-03  Mike Frysinger  <vapier@gentoo.org>
80         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (LOAD_FUTEX_WAIT): Add
81         missing line continuations.
82         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S (LOAD_FUTEX_WAIT,
83         LOAD_FUTEX_WAKE): Likewise.  Also add missing 3rd parameter.
85 2007-10-28  Ulrich Drepper  <drepper@redhat.com>
87         [BZ #5220]
88         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Declare
89         __active_timer_sigev_thread and __active_timer_sigev_thread_lock.
90         (struct timer): Add next element.
91         * sysdeps/unix/sysv/linux/timer_create.c: For SIGEV_THREAD timers,
92         enqueue timer structure into __active_timer_sigev_thread list.
93         * sysdeps/unix/sysv/linux/timer_delete.c: For SIGEV_THREAD timers,
94         remove timer struct from __active_timer_sigev_thread.
95         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
96         Before using timer structure make sure it is still on the
97         __active_timer_sigev_thread list.  Keep lock until done.
98         Define __active_timer_sigev_thread and
99         __active_timer_sigev_thread_lock.
101 2007-10-27  Ulrich Drepper  <drepper@redhat.com>
103         * sysdeps/pthread/malloc-machine.h: Define ATFORK_MEM.
104         Redefine thread_atfork for use of ATFORK_MEM.
105         * sysdeps/unix/sysv/linux/fork.h: Define __linkin_atfork.
106         * sysdeps/unix/sysv/linux/register-atfork.c (__linkin_atfork): New
107         function.
108         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
109         Use atomic operation when removing first element of list.
111 2007-10-17  Jakub Jelinek  <jakub@redhat.com>
113         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__old_sem_post): New
114         routine instead of an alias to __new_sem_post.
116 2007-10-15  Jakub Jelinek  <jakub@redhat.com>
118         * init.c (__pthread_initialize_minimal): Initialize word to appease
119         valgrind.
121 2007-10-10  Jakub Jelinek  <jakub@redhat.com>
123         * sysdeps/pthread/bits/libc-lock.h (__libc_rwlock_init): Inside of
124         libc.so just clear NAME.
125         (__libc_rwlock_fini): Nop inside of libc.so.
126         * tst-initializers1.c (main): Test if PTHREAD_RWLOCK_INITIALIZER is
127         all zeros.
129 2007-09-02  Ulrich Drepper  <drepper@redhat.com>
131         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
132         (__pthread_cond_wait): Fix unlocking of internal lock after mutex
133         unlocking failed.
134         Patch by Luca Barbieri <luca.barbieri@gmail.com>.
136 2007-08-21  Ulrich Drepper  <drepper@redhat.com>
138         [BZ #4938]
139         * allocatestack.c (__reclaim_stacks): Clear the TSD in the
140         reclaimed stack if necessary.
141         * Makefile (tests): Add tst-tsd6.
142         * tst-tsd6.c: New file.
144 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
146         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_dead):
147         Add private argument.
149 2007-08-20  Ulrich Drepper  <drepper@redhat.com>
151         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
152         (__pthread_cond_timedwait): Use clock_gettime from VDSO if possible.
154 2007-08-16  Jakub Jelinek  <jakub@redhat.com>
156         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h
157         (__lll_robust_timedlock): Pass private as last argument to
158         __lll_robust_timedlock_wait.
159         (__lll_unlock): Fix a pasto.
161 2007-08-15  Jakub Jelinek  <jakub@redhat.com>
163         * sysdeps/unix/sysv/linux/sparc/internaltypes.h (sparc_new_sem,
164         sparc_old_sem): New structs.
165         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c
166         (__sem_wait_cleanup): New function.
167         (__new_sem_wait): Use sparc_new_sem structure.  Bump and afterwards
168         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
169         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
170         lll_futex_wait.
171         (__old_sem_wait): New function.
172         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: Include
173         nptl/sysdeps/unix/sysv/linux/sparc version.
174         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c:
175         Likewise.
176         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: Likewise.
177         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c
178         (__new_sem_trywait): Use sparc_old_sem structure.
179         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c
180         (sem_timedwait): Use sparc_new_sem structure.  Bump and afterwards
181         decrease nwaiters.  Register __sem_wait_cleanup as cleanup handler.
182         Pass isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
183         lll_futex_timed_wait.
184         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c (__new_sem_post):
185         Use sparc_new_sem structure.  Only wake if nwaiters > 0.  Pass
186         isem->private ^ FUTEX_PRIVATE_FLAG as last argument to
187         lll_futex_wake.
188         (__old_sem_post): New function.
189         * sysdeps/unix/sysv/linux/sparc/sem_wait.c: New file.
190         * sysdeps/unix/sysv/linux/sparc/sem_init.c: New file.
191         * sysdeps/unix/sysv/linux/sparc/sem_timedwait.c: New file.
192         * sysdeps/unix/sysv/linux/sparc/sem_post.c: New file.
193         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: Remove.
194         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: Remove.
196 2007-08-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
198         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
199         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
200         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
201         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
202         * sysdeps/unix/sysv/linux/shpthread_cond_signal.S
203         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
204         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
205         Use FUTEX_WAKE_OP.
206         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
207         kernel-features.h and tcb-offsets.h.
208         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
209         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
210         process private.
211         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
212         tcb-offsets.h.
213         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE
214         to lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
215         process private.
216         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use #ifdef
217         __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
219         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
221         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
224 2007-08-14  Jakub Jelinek  <jakub@redhat.com>
226         * sysdeps/unix/sysv/linux/lowlevellock.c: Comment fix.
227         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
228         (__lll_timedwait_tid): Pass LLL_SHARED as 4th argument to
229         lll_futex_timed_wait.
231         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (__lll_unlock,
232         __lll_robust_unlock): Rewrite as macros instead of inline functions.
233         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_unlock,
234         __lll_robust_unlock, __lll_wait_tid): Likewise.
236 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
238         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
239         Fix a pasto.
240         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
241         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
242         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
243         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
244         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
245         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
246         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
247         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Include
248         kernel-features.h.
249         (__pthread_cond_wait, __condvar_w_cleanup): Pass LLL_PRIVATE to
250         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
251         process private.  Switch DW_CFA_advance_loc1 and some
252         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
254         (__pthread_cond_timedwait, __condvar_tw_cleanup): Pass LLL_PRIVATE to
255         lll_* and or FUTEX_PRIVATE_FLAG into SYS_futex op if cv is
256         process private.  Switch DW_CFA_advance_loc{1,2} and some
257         DW_CFA_advance_loc .eh_frame opcodes to DW_CFA_advance_loc4.
258         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use
259         #ifdef __ASSUME_PRIVATE_FUTEX instead of #if __ASSUME_PRIVATE_FUTEX.
260         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
261         Likewise.
262         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
263         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
264         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
265         Likewise.
266         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
267         (__pthread_cond_broadcast): Compare %r8 instead of
268         dep_mutex-cond_*(%rdi) with $-1.
269         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
270         (__pthread_cond_signal): Xor FUTEX_WAKE_OP with FUTEX_WAKE instead
271         of oring.
273 2007-08-13  Ulrich Drepper  <drepper@redhat.com>
275         * sysdeps/unix/sysv/linux/i386/i786/Implies: New file.
277 2007-08-13  Jakub Jelinek  <jakub@redhat.com>
279         * allocatestack.c: Include kernel-features.h.
280         * pthread_create.c: Likewise.
281         * pthread_mutex_init.c: Likewise.
282         * init.c: Likewise.
283         * pthread_cond_timedwait.c: Likewise.
284         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
285         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
286         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
287         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
288         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
289         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
290         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
291         Likewise.
292         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
293         Likewise.
294         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
295         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
296         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
297         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
299 2007-08-12  Jakub Jelinek  <jakub@redhat.com>
301         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
302         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
303         byte elements.  One of them is the new __shared element.
304         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
305         adjust names of other padding elements.
306         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
307         [__WORDSIZE=32] (pthread_rwlock_t): Split __flags element into four
308         byte elements.  One of them is the new __shared element.
309         [__WORDSIZE=64] (pthread_rwlock_t): Renamed __pad1 element to __shared,
310         adjust names of other padding elements.
311         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_rwlock_t):
312         Renamed __pad1 element to __shared, adjust names of other padding
313         elements.
314         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
315         (pthread_rwlock_t): Likewise.
316         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock): Fix a
317         typo.
319 2007-08-09  Anton Blanchard  <anton@samba.org>
321         * sysdeps/unix/sysv/linux/powerpc/pthread_spin_unlock.c: New file.
323 2007-08-12  Ulrich Drepper  <drepper@redhat.com>
325         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Include
326         <kernel-features.h>.
327         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
329 2007-08-11  Ulrich Drepper  <drepper@redhat.com>
331         * pthreadP.h (PTHREAD_ROBUST_MUTEX_PSHARED): Define.
332         * pthread_mutex_lock.c: Use it instead of PTHREAD_MUTEX_PSHARED when
333         dealing with robust mutexes.
334         * pthread_mutex_timedlock.c: Likewise.
335         * pthread_mutex_trylock.c: Likewise.
336         * pthread_mutex_unlock.c: Likewise.
337         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
339 2007-08-06  Jakub Jelinek  <jakub@redhat.com>
341         * pthreadP.h (PTHREAD_MUTEX_PSHARED_BIT): Define.
342         (PTHREAD_MUTEX_TYPE): Mask __kind with 127.
343         (PTHREAD_MUTEX_PSHARED): Define.
344         * pthread_mutex_init.c (__pthread_mutex_init): Set
345         PTHREAD_MUTEX_PSHARED_BIT for pshared or robust
346         mutexes.
347         * pthread_mutex_lock.c (LLL_MUTEX_LOCK): Take mutex as argument
348         instead of its __data.__lock field, pass PTHREAD_MUTEX_PSHARED
349         as second argument to lll_lock.
350         (LLL_MUTEX_TRYLOCK): Take mutex as argument
351         instead of its __data.__lock field.
352         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
353         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
354         to lll_robust_lock.
355         (__pthread_mutex_lock): Update LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
356         LLL_ROBUST_MUTEX_LOCK users, use PTHREAD_MUTEX_TYPE (mutex)
357         instead of mutex->__data.__kind directly, pass
358         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock and lll_futex_wait.
359         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Use
360         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
361         directly, pass PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock.
362         (pthread_mutex_timedlock): Pass PTHREAD_MUTEX_PSHARED (mutex)
363         to lll_timedlock, lll_robust_timedlock, lll_unlock and
364         lll_futex_timed_wait.  Use PTHREAD_MUTEX_TYPE (mutex) instead
365         of mutex->__data.__kind directly.
366         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Pass
367         PTHREAD_MUTEX_PSHARED (mutex) to lll_timedlock,
368         lll_robust_timedlock, lll_unlock and lll_futex_timed_wait.  Use
369         PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind directly.
370         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Pass
371         PTHREAD_MUTEX_PSHARED (mutex) to lll_unlock, lll_robust_unlock
372         and lll_futex_wake.
373         * pthread_mutex_setprioceiling.c (pthread_mutex_setprioceiling): Pass
374         PTHREAD_MUTEX_PSHARED (mutex) to lll_futex_wait and lll_futex_wake.
375         Use PTHREAD_MUTEX_TYPE (mutex) instead of mutex->__data.__kind
376         directly.
377         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK):
378         Take mutex as argument instead of its __data.__lock field, pass
379         PTHREAD_MUTEX_PSHARED as second argument to lll_cond_lock.
380         (LLL_MUTEX_TRYLOCK): Take mutex as argument instead of its
381         __data.__lock field.
382         (LLL_ROBUST_MUTEX_LOCK): Take mutex as argument instead of its
383         __data.__lock field, pass PTHREAD_MUTEX_PSHARED as second argument
384         to lll_robust_cond_lock.
385         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Add pshared
386         variable, pass it to lll_lock, lll_unlock, lll_futex_requeue and
387         lll_futex_wake.  Don't use lll_futex_requeue if dependent mutex
388         has PTHREAD_MUTEX_PSHARED_BIT bit set in its __data.__kind.
389         * pthread_cond_destroy.c (__pthread_cond_destroy): Add pshared
390         variable, pass it to lll_lock, lll_unlock, lll_futex_wake and
391         lll_futex_wait.
392         * pthread_cond_signal.c (__pthread_cond_signal): Add pshared
393         variable, pass it to lll_lock, lll_unlock, lll_futex_wake_unlock and
394         lll_futex_wake.
395         * pthread_cond_timedwait.c (__pthread_cond_wait): Add
396         pshared variable, pass it to lll_lock, lll_unlock,
397         lll_futex_timedwait and lll_futex_wake.
398         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait): Add
399         pshared variable, pass it to lll_lock, lll_unlock, lll_futex_wait
400         and lll_futex_wake.
401         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_requeue,
402         lll_futex_wake_unlock): Add private argument, use __lll_private_flag
403         macro.
404         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue,
405         lll_futex_wake_unlock): Likewise.
406         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_requeue):
407         Likewise.
408         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_futex_requeue,
409         lll_futex_wake_unlock): Likewise.
410         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_requeue):
411         Likewise.
412         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue,
413         lll_futex_wake_unlock): Likewise.
414         (lll_futex_wake): Fix a typo.
415         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym (PS_BIT): Add.
416         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
417         (__pthread_cond_broadcast): Pass LLL_PRIVATE to lll_* and or
418         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
419         Don't use FUTEX_CMP_REQUEUE if dep_mutex is not process private.
420         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
421         (__pthread_cond_signal): Pass LLL_PRIVATE to lll_* and or
422         FUTEX_PRIVATE_FLAG into SYS_futex op if cv is process private.
423         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
424         (__pthread_cond_timedwait): Likewise.
425         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
426         (__condvar_cleanup, __pthread_cond_wait): Likewise.
428 2007-08-05  Jakub Jelinek  <jakub@redhat.com>
430         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
431         Don't use CGOTSETUP and CGOTRESTORE macros.
432         (CGOTSETUP, CGOTRESTORE): Remove.
433         <IS_IN_rtld> (CENABLE, CDISABLE): Don't use JUMPTARGET, branch to
434         @local symbol.
436 2007-08-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
438         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Remove
439         definitions for private futexes.
440         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Include
441         kernel-features.h and lowlevellock.h.  Use private futexes if
442         they are available.
443         (__lll_lock_wait_private, __lll_unlock_wake_private): New.
444         (__lll_mutex_lock_wait): Rename to
445         (__lll_lock_wait): ... this.  Don't compile in for libc.so.
446         (__lll_mutex_timedlock_wait): Rename to ...
447         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.
448         Don't compile in for libc.so.
449         (__lll_mutex_unlock_wake): Rename to ...
450         (__lll_unlock_wake): ... this.  Don't compile in for libc.so.
451         (__lll_timedwait_tid): Use __NR_gettimeofday.
452         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Allow including
453         the header from assembler.  Renamed all lll_mutex_* resp.
454         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
455         Renamed all LLL_MUTEX_LOCK_* macros to LLL_LOCK_*.
456         (FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE):
457         Define.
458         (__lll_lock_wait_private): Add prototype.
459         (__lll_lock_wait, __lll_timedlock_wait, __lll_robust_lock_wait,
460         __lll_robust_timedlock_wait, __lll_unlock_wake_private,
461         __lll_unlock_wake): Likewise.
462         (lll_lock): Add private argument.  Call __lll_lock_wait_private
463         if private is constant LLL_PRIVATE.
464         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
465         lll_timedlock, lll_robust_timedlock): Add private argument.
466         (lll_unlock): Add private argument.  Call __lll_unlock_wake_private
467         if private is constant LLL_PRIVATE.
468         (lll_robust_unlock, lll_robust_dead): Add private argument.
469         (lll_lock_t): Remove.
470         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
471         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
472         lll_cond_wake, lll_cond_broadcast): Remove.
473         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: Include
474         kernel-features.h and lowlevellock.h.
475         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
476         (LOAD_FUTEX_WAIT): Define.
477         (__lll_robust_mutex_lock_wait): Rename to ...
478         (__lll_robust_lock_wait): ... this.  Add private argument.
479         Use LOAD_FUTEX_WAIT macro.
480         (__lll_robust_mutex_timedlock_wait): Rename to ...
481         (__lll_robust_timedlock_wait): ... this.    Add private argument.
482         Use __NR_gettimeofday.  Use LOAD_FUTEX_WAIT macro.
483         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Include
484         lowlevellock.h.
485         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
486         (pthread_barrier_wait): Use __lll_{lock,unlock}_* instead of
487         __lll_mutex_{lock,unlock}_*.
488         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Include
489         lowlevellock.h and pthread-errnos.h.
490         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
491         FUTEX_CMP_REQUEUE, EINVAL): Remove.
492         (__pthread_cond_broadcast): Use __lll_{lock,unlock}_* instead of
493         __lll_mutex_{lock,unlock}_*.
494         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Include
495         lowlevellock.h and pthread-errnos.h.
496         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE, EINVAL): Remove.
497         (__pthread_cond_signal): Use __lll_{lock,unlock}_* instead of
498         __lll_mutex_{lock,unlock}_*.
499         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Include
500         lowlevellock.h.
501         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE): Remove.
502         (__pthread_cond_timedwait): Use __lll_{lock,unlock}_* instead of
503         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
504         (__condvar_tw_cleanup): Likewise.
505         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Include
506         lowlevellock.h.
507         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Remove.
508         (__pthread_cond_wait): Use __lll_{lock,unlock}_* instead of
509         __lll_mutex_{lock,unlock}_*.
510         ( __condvar_w_cleanup): Likewise.
511         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Include lowlevellock.h.
512         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
513         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Include
514         lowlevellock.h.
515         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
516         (__pthread_rwlock_rdlock): Use __lll_{lock,unlock}_* instead of
517         __lll_mutex_{lock,unlock}_*.
518         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Include
519         lowlevellock.h.
520         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
521         FUTEX_PRIVATE_FLAG): Remove.
522         (pthread_rwlock_timedrdlock): Use __lll_{lock,unlock}_* instead of
523         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
524         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Include
525         lowlevellock.h.
526         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
527         FUTEX_PRIVATE_FLAG): Remove.
528         (pthread_rwlock_timedwrlock): Use __lll_{lock,unlock}_* instead of
529         __lll_mutex_{lock,unlock}_*.  Use __NR_gettimeofday.
530         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Include
531         lowlevellock.h.
532         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
533         (__pthread_rwlock_unlock): Use __lll_{lock,unlock}_* instead of
534         __lll_mutex_{lock,unlock}_*.
535         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Include
536         lowlevellock.h.
537         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
538         (__pthread_rwlock_wrlock): Use __lll_{lock,unlock}_* instead of
539         __lll_mutex_{lock,unlock}_*.
540         * sysdeps/unix/sysv/linux/sh/sem_post.S: Include lowlevellock.h.
541         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Remove.
542         (__new_sem_post): Use standard initial exec code sequences.
543         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Include
544         lowlevellock.h.
545         (SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE,
546         FUTEX_PRIVATE_FLAG): Remove.
547         (sem_timedwait): Use __NR_gettimeofday.  Use standard initial
548         exec code sequences.
549         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Include lowlevellock.h.
550         (__new_sem_trywait): Use standard initial exec code sequences.
551         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Include lowlevellock.h.
552         (__new_sem_wait): Use standard initial exec code sequences.
554 2007-07-31  Anton Blanchard  <anton@samba.org>
556         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
557         Use __asm __volatile (__lll_acq_instr ::: "memory") instead of
558         atomic_full_barrier.
560 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
562         * allocatestack.c (stack_cache_lock): Change type to int.
563         (get_cached_stack, allocate_stack, __deallocate_stack,
564         __make_stacks_executable, __find_thread_by_id, __nptl_setxid,
565         __pthread_init_static_tls, __wait_lookup_done): Add LLL_PRIVATE
566         as second argument to lll_lock and lll_unlock macros on
567         stack_cache_lock.
568         * pthread_create.c (__find_in_stack_list): Likewise.
569         (start_thread): Similarly with pd->lock.  Use lll_robust_dead
570         macro instead of lll_robust_mutex_dead, pass LLL_SHARED to it
571         as second argument.
572         * descr.h (struct pthread): Change lock and setxid_futex field
573         type to int.
574         * old_pthread_cond_broadcast.c (__pthread_cond_broadcast_2_0): Use
575         LLL_LOCK_INITIALIZER instead of LLL_MUTEX_LOCK_INITIALIZER.
576         * old_pthread_cond_signal.c (__pthread_cond_signal_2_0): Likewise.
577         * old_pthread_cond_timedwait.c (__pthread_cond_timedwait_2_0):
578         Likewise.
579         * old_pthread_cond_wait.c (__pthread_cond_wait_2_0): Likewise.
580         * pthread_cond_init.c (__pthread_cond_init): Likewise.
581         * pthreadP.h (__attr_list_lock): Change type to int.
582         * pthread_attr_init.c (__attr_list_lock): Likewise.
583         * pthread_barrier_destroy.c (pthread_barrier_destroy): Pass
584         ibarrier->private ^ FUTEX_PRIVATE_FLAG as second argument to
585         lll_{,un}lock.
586         * pthread_barrier_wait.c (pthread_barrier_wait): Likewise and
587         also for lll_futex_{wake,wait}.
588         * pthread_barrier_init.c (pthread_barrier_init): Make iattr
589         a pointer to const.
590         * pthread_cond_broadcast.c (__pthread_cond_broadcast): Pass
591         LLL_SHARED as second argument to lll_{,un}lock.
592         * pthread_cond_destroy.c (__pthread_cond_destroy): Likewise.
593         * pthread_cond_signal.c (__pthread_cond_singal): Likewise.
594         * pthread_cond_timedwait.c (__pthread_cond_timedwait): Likewise.
595         * pthread_cond_wait.c (__condvar_cleanup, __pthread_cond_wait):
596         Likewise.
597         * pthread_getattr_np.c (pthread_getattr_np): Add LLL_PRIVATE
598         as second argument to lll_{,un}lock macros on pd->lock.
599         * pthread_getschedparam.c (__pthread_getschedparam): Likewise.
600         * pthread_setschedparam.c (__pthread_setschedparam): Likewise.
601         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
602         * tpp.c (__pthread_tpp_change_priority, __pthread_current_priority):
603         Likewise.
604         * sysdeps/pthread/createthread.c (do_clone, create_thread):
605         Likewise.
606         * pthread_once.c (once_lock): Change type to int.
607         (__pthread_once): Pass LLL_PRIVATE as second argument to
608         lll_{,un}lock macros on once_lock.
609         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Use
610         lll_{,un}lock macros instead of lll_mutex_{,un}lock, pass
611         rwlock->__data.__shared as second argument to them and similarly
612         for lll_futex_w*.
613         * pthread_rwlock_timedrdlock.c (pthread_rwlock_timedrdlock):
614         Likewise.
615         * pthread_rwlock_timedwrlock.c (pthread_rwlock_timedwrlock):
616         Likewise.
617         * pthread_rwlock_tryrdlock.c (__pthread_rwlock_tryrdlock): Likewise.
618         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Likewise.
619         * pthread_rwlock_unlock.c (__pthread_rwlock_unlock): Likewise.
620         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
621         * sem_close.c (sem_close): Pass LLL_PRIVATE as second argument
622         to lll_{,un}lock macros on __sem_mappings_lock.
623         * sem_open.c (check_add_mapping): Likewise.
624         (__sem_mappings_lock): Change type to int.
625         * semaphoreP.h (__sem_mappings_lock): Likewise.
626         * pthread_mutex_lock.c (LLL_MUTEX_LOCK, LLL_MUTEX_TRYLOCK,
627         LLL_ROBUST_MUTEX_LOCK): Use lll_{,try,robust_}lock macros
628         instead of lll_*mutex_*, pass LLL_SHARED as last
629         argument.
630         (__pthread_mutex_lock): Use lll_unlock instead of lll_mutex_unlock,
631         pass LLL_SHARED as last argument.
632         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c (LLL_MUTEX_LOCK,
633         LLL_MUTEX_TRYLOCK, LLL_ROBUST_MUTEX_LOCK): Use
634         lll_{cond_,cond_try,robust_cond}lock macros instead of lll_*mutex_*,
635         pass LLL_SHARED as last argument.
636         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
637         lll_{timed,try,robust_timed,un}lock instead of lll_*mutex*, pass
638         LLL_SHARED as last argument.
639         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Similarly.
640         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
641         Similarly.
642         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_lock,
643         __libc_lock_lock_recursive, __libc_lock_unlock,
644         __libc_lock_unlock_recursive): Pass LLL_PRIVATE as second
645         argument to lll_{,un}lock.
646         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_lock,
647         _IO_lock_unlock): Likewise.
648         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Don't use
649         compound literal.
650         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
651         Pass LLL_PRIVATE as second argument to lll_{,un}lock macros on
652         __fork_lock.
653         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork,
654         free_mem): Likewise.
655         (__fork_lock): Change type to int.
656         * sysdeps/unix/sysv/linux/fork.h (__fork_lock): Likewise.
657         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Pass
658         isem->private ^ FUTEX_PRIVATE_FLAG as second argument to
659         lll_futex_wake.
660         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
661         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Likewise.
662         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait_private):
663         New function.
664         (__lll_lock_wait, __lll_timedlock_wait): Add private argument and
665         pass it through to lll_futex_*wait, only compile in when
666         IS_IN_libpthread.
667         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
668         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): Add private
669         argument and pass it through to lll_futex_*wait.
670         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Renamed all
671         lll_mutex_* resp. lll_robust_mutex_* macros to lll_* resp.
672         lll_robust_*.  Renamed all __lll_mutex_* resp. __lll_robust_mutex_*
673         inline functions to __lll_* resp. __lll_robust_*.
674         (LLL_MUTEX_LOCK_INITIALIZER): Remove.
675         (lll_mutex_dead): Add private argument.
676         (__lll_lock_wait_private): New prototype.
677         (__lll_lock_wait, __lll_robust_lock_wait, __lll_lock_timedwait,
678         __lll_robust_lock_timedwait): Add private argument to prototypes.
679         (__lll_lock): Add private argument, if it is constant LLL_PRIVATE,
680         call __lll_lock_wait_private, otherwise pass private to
681         __lll_lock_wait.
682         (__lll_robust_lock, __lll_cond_lock, __lll_timedlock,
683         __lll_robust_timedlock): Add private argument, pass it to
684         __lll_*wait functions.
685         (__lll_unlock): Add private argument, if it is constant LLL_PRIVATE,
686         call __lll_unlock_wake_private, otherwise pass private to
687         __lll_unlock_wake.
688         (__lll_robust_unlock): Add private argument, pass it to
689         __lll_robust_unlock_wake.
690         (lll_lock, lll_robust_lock, lll_cond_lock, lll_timedlock,
691         lll_robust_timedlock, lll_unlock, lll_robust_unlock): Add private
692         argument, pass it through to __lll_* inline function.
693         (__lll_mutex_unlock_force, lll_mutex_unlock_force): Remove.
694         (lll_lock_t): Remove.
695         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
696         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
697         lll_cond_wake, lll_cond_broadcast): Remove.
698         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
699         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
700         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
701         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
702         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Allow including
703         the header from assembler.  Renamed all lll_mutex_* resp.
704         lll_robust_mutex_* macros to lll_* resp. lll_robust_*.
705         (LOCK, FUTEX_CMP_REQUEUE, FUTEX_WAKE_OP,
706         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
707         (LLL_MUTEX_LOCK_INITIALIZER, LLL_MUTEX_LOCK_INITIALIZER_LOCKED,
708         LLL_MUTEX_LOCK_INITIALIZER_WAITERS): Remove.
709         (__lll_mutex_lock_wait, __lll_mutex_timedlock_wait,
710         __lll_mutex_unlock_wake, __lll_lock_wait, __lll_unlock_wake):
711         Remove prototype.
712         (__lll_trylock_asm, __lll_lock_asm_start, __lll_unlock_asm): Define.
713         (lll_robust_trylock, lll_cond_trylock): Use LLL_LOCK_INITIALIZER*
714         rather than LLL_MUTEX_LOCK_INITIALIZER* macros.
715         (lll_trylock): Likewise, use __lll_trylock_asm, pass
716         MULTIPLE_THREADS_OFFSET as another asm operand.
717         (lll_lock): Add private argument, use __lll_lock_asm_start, pass
718         MULTIPLE_THREADS_OFFSET as last asm operand, call
719         __lll_lock_wait_private if private is constant LLL_PRIVATE,
720         otherwise pass private as another argument to __lll_lock_wait.
721         (lll_robust_lock, lll_cond_lock, lll_robust_cond_lock,
722         lll_timedlock, lll_robust_timedlock): Add private argument, pass
723         private as another argument to __lll_*lock_wait call.
724         (lll_unlock): Add private argument, use __lll_unlock_asm, pass
725         MULTIPLE_THREADS_OFFSET as another asm operand, call
726         __lll_unlock_wake_private if private is constant LLL_PRIVATE,
727         otherwise pass private as another argument to __lll_unlock_wake.
728         (lll_robust_unlock): Add private argument, pass private as another
729         argument to __lll_unlock_wake.
730         (lll_robust_dead): Add private argument, use __lll_private_flag
731         macro.
732         (lll_islocked): Use LLL_LOCK_INITIALIZER instead of
733         LLL_MUTEX_LOCK_INITIALIZER.
734         (lll_lock_t): Remove.
735         (LLL_LOCK_INITIALIZER_WAITERS): Define.
736         (__lll_cond_wait, __lll_cond_timedwait, __lll_cond_wake,
737         __lll_cond_broadcast, lll_cond_wait, lll_cond_timedwait,
738         lll_cond_wake, lll_cond_broadcast): Remove.
739         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
740         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Revert
741         2007-05-2{3,9} changes.
742         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Include
743         kernel-features.h and lowlevellock.h.
744         (LOAD_PRIVATE_FUTEX_WAIT): Define.
745         (LOAD_FUTEX_WAIT): Rewritten.
746         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
747         define.
748         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
749         (__lll_mutex_lock_wait): Rename to ...
750         (__lll_lock_wait): ... this.  Take futex addr from %edx instead of
751         %ecx, %ecx is now private argument.  Don't compile in for libc.so.
752         (__lll_mutex_timedlock_wait): Rename to ...
753         (__lll_timedlock_wait): ... this.  Use __NR_gettimeofday.  %esi
754         contains private argument.  Don't compile in for libc.so.
755         (__lll_mutex_unlock_wake): Rename to ...
756         (__lll_unlock_wake): ... this.  %ecx contains private argument.
757         Don't compile in for libc.so.
758         (__lll_timedwait_tid): Use __NR_gettimeofday.
759         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Include
760         kernel-features.h and lowlevellock.h.
761         (LOAD_FUTEX_WAIT): Define.
762         (LOCK, SYS_gettimeofday, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't
763         define.
764         (__lll_robust_mutex_lock_wait): Rename to ...
765         (__lll_robust_lock_wait): ... this.  Futex addr is now in %edx
766         argument, %ecx argument contains private.  Use LOAD_FUTEX_WAIT
767         macro.
768         (__lll_robust_mutex_timedlock_wait): Rename to ...
769         (__lll_robust_timedlock_wait): ... this.  Use __NR_gettimeofday.
770         %esi argument contains private, use LOAD_FUTEX_WAIT macro.
771         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Include
772         lowlevellock.h.
773         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
774         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
775         PRIVATE(%ebx) ^ LLL_SHARED as private argument in %ecx to
776         __lll_lock_wait and __lll_unlock_wake, pass MUTEX(%ebx) address
777         to __lll_lock_wait in %edx.
778         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
779         Include lowlevellock.h and pthread-errnos.h.
780         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
781         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
782         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*, pass
783         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
784         pass LLL_SHARED in %ecx to both __lll_lock_wait and
785         __lll_unlock_wake.
786         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S:
787         Include lowlevellock.h and pthread-errnos.h.
788         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
789         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
790         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*, pass
791         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
792         pass LLL_SHARED in %ecx to both __lll_lock_wait and
793         __lll_unlock_wake.
794         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
795         Include lowlevellock.h.
796         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
797         Don't define.
798         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*, pass
799         cond_lock address in %edx rather than %ecx to __lll_lock_wait,
800         pass LLL_SHARED in %ecx to both __lll_lock_wait and
801         __lll_unlock_wake.  Use __NR_gettimeofday.
802         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
803         Include lowlevellock.h.
804         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
805         (__pthread_cond_wait, __condvar_w_cleanup): Rename __lll_mutex_*
806         to __lll_*, pass cond_lock address in %edx rather than %ecx to
807         __lll_lock_wait, pass LLL_SHARED in %ecx to both __lll_lock_wait
808         and __lll_unlock_wake.
809         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S:
810         Include lowlevellock.h.
811         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
812         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*, pass
813         MUTEX(%ebx) address in %edx rather than %ecx to
814         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
815         and __lll_unlock_wake.  Move return value from %ecx to %edx
816         register.
817         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
818         Include lowlevellock.h.
819         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
820         Don't define.
821         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
822         MUTEX(%ebp) address in %edx rather than %ecx to
823         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
824         and __lll_unlock_wake.  Move return value from %ecx to %edx
825         register.  Use __NR_gettimeofday.
826         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
827         Include lowlevellock.h.
828         (SYS_futex, SYS_gettimeofday, FUTEX_WAIT, FUTEX_WAKE, LOCK):
829         Don't define.
830         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
831         MUTEX(%ebp) address in %edx rather than %ecx to
832         __lll_lock_wait, pass PSHARED(%ebp) in %ecx to both __lll_lock_wait
833         and __lll_unlock_wake.  Move return value from %ecx to %edx
834         register.  Use __NR_gettimeofday.
835         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
836         Include lowlevellock.h.
837         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
838         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*, pass
839         MUTEX(%edi) address in %edx rather than %ecx to
840         __lll_lock_wait, pass PSHARED(%edi) in %ecx to both __lll_lock_wait
841         and __lll_unlock_wake.
842         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
843         Include lowlevellock.h.
844         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
845         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*, pass
846         MUTEX(%ebx) address in %edx rather than %ecx to
847         __lll_lock_wait, pass PSHARED(%ebx) in %ecx to both __lll_lock_wait
848         and __lll_unlock_wake.  Move return value from %ecx to %edx
849         register.
850         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Include
851         lowlevellock.h.
852         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
853         define.
854         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Include lowlevellock.h.
855         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
856         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Include
857         lowlevellock.h.
858         (LOCK, SYS_futex, SYS_gettimeofday, FUTEX_WAIT): Don't define.
859         (sem_timedwait): Use __NR_gettimeofday.
860         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Include
861         lowlevellock.h.
862         (LOCK): Don't define.
863         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include
864         lowlevellock.h.
865         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
866         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: Wake only when there
867         are waiters.
868         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Revert
869         2007-05-2{3,9} changes.
870         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Include
871         kernel-features.h and lowlevellock.h.
872         (LOAD_PRIVATE_FUTEX_WAIT): Define.
873         (LOAD_FUTEX_WAIT): Rewritten.
874         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
875         (__lll_lock_wait_private, __lll_unlock_wake_private): New functions.
876         (__lll_mutex_lock_wait): Rename to ...
877         (__lll_lock_wait): ... this.  %esi is now private argument.
878         Don't compile in for libc.so.
879         (__lll_mutex_timedlock_wait): Rename to ...
880         (__lll_timedlock_wait): ... this.  %esi contains private argument.
881         Don't compile in for libc.so.
882         (__lll_mutex_unlock_wake): Rename to ...
883         (__lll_unlock_wake): ... this.  %esi contains private argument.
884         Don't compile in for libc.so.
885         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Include
886         kernel-features.h and lowlevellock.h.
887         (LOAD_FUTEX_WAIT): Define.
888         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE): Don't define.
889         (__lll_robust_mutex_lock_wait): Rename to ...
890         (__lll_robust_lock_wait): ... this.  %esi argument contains private.
891         Use LOAD_FUTEX_WAIT macro.
892         (__lll_robust_mutex_timedlock_wait): Rename to ...
893         (__lll_robust_timedlock_wait): ... this. %esi argument contains
894         private, use LOAD_FUTEX_WAIT macro.
895         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Include
896         lowlevellock.h.
897         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
898         (pthread_barrier_wait): Rename __lll_mutex_* to __lll_*, pass
899         PRIVATE(%rdi) ^ LLL_SHARED as private argument in %esi to
900         __lll_lock_wait and __lll_unlock_wake.
901         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S:
902         Include lowlevellock.h and pthread-errnos.h.
903         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_REQUEUE,
904         FUTEX_CMP_REQUEUE, EINVAL, LOCK): Don't define.
905         (__pthread_cond_broadcast): Rename __lll_mutex_* to __lll_*,
906         pass LLL_SHARED in %esi to both __lll_lock_wait and
907         __lll_unlock_wake.
908         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S:
909         Include lowlevellock.h and pthread-errnos.h.
910         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_WAKE_OP,
911         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE, EINVAL, LOCK): Don't define.
912         (__pthread_cond_signal): Rename __lll_mutex_* to __lll_*,
913         pass LLL_SHARED in %esi to both __lll_lock_wait and
914         __lll_unlock_wake.
915         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S:
916         Include lowlevellock.h.
917         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
918         (__pthread_cond_timedwait): Rename __lll_mutex_* to __lll_*,
919         pass LLL_SHARED in %esi to both __lll_lock_wait and
920         __lll_unlock_wake.
921         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:
922         Include lowlevellock.h.
923         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, LOCK): Don't define.
924         (__pthread_cond_wait, __condvar_cleanup): Rename __lll_mutex_*
925         to __lll_*, pass LLL_SHARED in %esi to both __lll_lock_wait
926         and __lll_unlock_wake.
927         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S:
928         Include lowlevellock.h.
929         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
930         Don't define.
931         (__pthread_rwlock_rdlock): Rename __lll_mutex_* to __lll_*,
932         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
933         and __lll_unlock_wake.
934         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
935         Include lowlevellock.h.
936         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
937         Don't define.
938         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
939         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
940         and __lll_unlock_wake.
941         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
942         Include lowlevellock.h.
943         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
944         Don't define.
945         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
946         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
947         and __lll_unlock_wake.
948         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S:
949         Include lowlevellock.h.
950         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
951         Don't define.
952         (__pthread_rwlock_unlock): Rename __lll_mutex_* to __lll_*,
953         pass PSHARED(%rdi) in %esi to both __lll_lock_wait
954         and __lll_unlock_wake.
955         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S:
956         Include lowlevellock.h.
957         (SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG, LOCK):
958         Don't define.
959         (__pthread_rwlock_wrlock): Rename __lll_mutex_* to __lll_*,
960         pass PSHARED(%rdi) in %ecx to both __lll_lock_wait
961         and __lll_unlock_wake.
962         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Include
963         lowlevellock.h.
964         (LOCK, SYS_futex, FUTEX_WAIT, FUTEX_WAKE, FUTEX_PRIVATE_FLAG): Don't
965         define.
966         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Include lowlevellock.h.
967         (LOCK, SYS_futex, FUTEX_WAKE): Don't define.
968         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Include
969         lowlevellock.h.
970         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
971         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Include
972         lowlevellock.h.
973         (LOCK): Don't define.
974         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Include
975         lowlevellock.h.
976         (LOCK, SYS_futex, FUTEX_WAIT): Don't define.
977         * sysdeps/unix/sysv/linux/sparc/internaltypes.h: New file.
978         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_destroy.c: New file.
979         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_init.c: New file.
980         * sysdeps/unix/sysv/linux/sparc/pthread_barrier_wait.c: New file.
981         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c
982         (__lll_lock_wait_private): New function.
983         (__lll_lock_wait, __lll_timedlock_wait): Add private argument, pass
984         it to lll_futex_*wait.  Don't compile in for libc.so.
985         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c:
986         Remove.
987         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c
988         (struct sparc_pthread_barrier): Remove.
989         (pthread_barrier_wait): Use union sparc_pthread_barrier instead of
990         struct sparc_pthread_barrier.  Pass
991         ibarrier->s.pshared ? LLL_SHARED : LLL_PRIVATE to lll_{,un}lock
992         and lll_futex_wait macros.
993         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
994         Remove.
995         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
996         Include sparc pthread_barrier_wait.c instead of generic one.
998 2007-07-30  Jakub Jelinek  <jakub@redhat.com>
1000         * tst-rwlock14.c (do_test): Avoid warnings on 32-bit arches.
1002         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
1003         (pthread_rwlock_timedrdlock): Copy futex retval to %esi rather than
1004         %ecx.
1005         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
1006         (pthread_rwlock_timedwrlock): Likewise.
1007         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
1008         (__pthread_rwlock_unlock): Fix MUTEX != 0 args to __lll_*.
1010 2007-07-31  Jakub Jelinek  <jakub@redhat.com>
1012         * sysdeps/sparc/tls.h (tcbhead_t): Add private_futex field.
1014 2007-07-26  Jakub Jelinek  <jakub@redhat.com>
1016         * tst-locale2.c (useless): Add return statement.
1018 2007-07-24  Jakub Jelinek  <jakub@redhat.com>
1020         * allocatestack.c (__nptl_setxid, __wait_lookup_done): Replace
1021         lll_private_futex_* (*) with lll_futex_* (*, LLL_PRIVATE).
1022         * pthread_create.c (start_thread): Likewise.
1023         * init.c (sighandler_setxid): Likewise.
1024         * sysdeps/alpha/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1025         * sysdeps/ia64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1026         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1027         * sysdeps/s390/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1028         * sysdeps/powerpc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1029         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1030         * sysdeps/sparc/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1031         * sysdeps/sh/tls.h (THREAD_GSCOPE_RESET_FLAG): Likewise.
1032         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY, AIO_MISC_WAIT):
1033         Likewise.
1034         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY, GAI_MISC_WAIT):
1035         Likewise.
1036         * sysdeps/unix/sysv/linux/unregister-atfork.c (__unregister_atfork):
1037         Likewise.
1038         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_waitzero,
1039         __rtld_notify): Likewise.
1040         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Likewise.
1041         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (clear_once_control,
1042         __pthread_once): Likewise.
1043         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (clear_once_control,
1044         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1045         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1046         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1047         (lll_futex_wait): Add private argument, define as wrapper around
1048         lll_futex_timed_wait.
1049         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1050         use __lll_private_flag macro.
1051         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1052         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1053         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (clear_once_control,
1054         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1055         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1056         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1057         (lll_futex_wait): Add private argument, define as wrapper around
1058         lll_futex_timed_wait.
1059         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1060         use __lll_private_flag macro.
1061         (__lll_mutex_unlock, __lll_robust_mutex_unlock, lll_wait_tid,
1062         __lll_mutex_unlock_force): Pass LLL_SHARED as last arg to lll_futex_*.
1063         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (__lll_private_flag):
1064         Define.
1065         (lll_futex_timed_wait, lll_futex_wake): Use it.
1066         (lll_private_futex_wait, lll_private_futex_timed_wait,
1067         lll_private_futex_wake): Removed.
1068         * sysdeps/unix/sysv/linux/s390/pthread_once.c (clear_once_control,
1069         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1070         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1071         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1072         (lll_futex_wait): Add private argument, define as wrapper around
1073         lll_futex_timed_wait.
1074         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1075         use __lll_private_flag macro.
1076         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1077         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1078         to lll_futex_*.
1079         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1080         (lll_private_futex_wait, lll_private_futex_timed_wait,
1081         lll_private_futex_wake): Removed.
1082         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_private_flag):
1083         Fix !__ASSUME_PRIVATE_FUTEX non-constant private case.
1084         (lll_private_futex_wait, lll_private_futex_timed_wait,
1085         lll_private_futex_wake): Removed.
1086         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (clear_once_control,
1087         __pthread_once): Add LLL_PRIVATE as last argument to lll_futex_*.
1088         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_PRIVATE_FLAG,
1089         LLL_PRIVATE, LLL_SHARED, __lll_private_flag): Define.
1090         (lll_futex_wait): Add private argument, define as wrapper around
1091         lll_futex_timed_wait.
1092         (lll_futex_timed_wait, lll_futex_wake): Add private argument,
1093         use __lll_private_flag macro.
1094         (lll_robust_mutex_dead, __lll_mutex_unlock, __lll_robust_mutex_unlock,
1095         lll_wait_tid, __lll_mutex_unlock_force): Pass LLL_SHARED as last arg
1096         to lll_futex_*.
1097         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (__lll_private_flag):
1098         Define.
1099         (lll_futex_timed_wait, lll_futex_wake): Use it.
1100         (lll_private_futex_wait, lll_private_futex_timed_wait,
1101         lll_private_futex_wake): Removed.
1103 2007-07-27  Jakub Jelinek  <jakub@redhat.com>
1105         * sysdeps/sparc/tls.h (tcbhead_t): Move gscope_flag to the end
1106         of the structure for sparc32.
1108 2007-07-26  Aurelien Jarno  <aurelien@aurel32.net>
1110         * sysdeps/sparc/tls.h (tcbhead_t): Add gscope_flag.
1112 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1114         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1115         code used when private futexes are assumed.
1116         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1117         Likewise.
1119 2007-07-23  Jakub Jelinek  <jakub@redhat.com>
1121         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1122         (__lll_private_flag): Define.
1123         (lll_futex_wait): Define as a wrapper around lll_futex_timed_wait.
1124         (lll_futex_timed_wait, lll_futex_wake, lll_futex_wake_unlock): Use
1125         __lll_private_flag.
1126         (lll_private_futex_wait, lll_private_futex_timedwait,
1127         lll_private_futex_wake): Define as wrapper around non-_private
1128         macros.
1129         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1130         (__lll_private_flag): Define.
1131         (lll_futex_timed_wait, lll_futex_wake): Use __lll_private_flag.
1132         (lll_private_futex_wait, lll_private_futex_timedwait,
1133         lll_private_futex_wake): Define as wrapper around non-_private
1134         macros.
1136 2007-07-10  Steven Munroe  <sjmunroe@us.ibm.com>
1138         * pthread_rwlock_rdlock.c (__pthread_rwlock_rdlock): Add LLL_SHARED
1139         parameter to lll_futex_wait call.
1140         * pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock): Likewise.
1142         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
1143         Replace lll_futex_wait with lll_private_futex_wait.
1144         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
1145         Add LLL_SHARED parameter to lll_futex_wake().
1147         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define LLL_PRIVATE
1148         LLL_SHARED, lll_private_futex_wait, lll_private_futex_timed_wait and
1149         lll_private_futex_wake.
1150         (lll_futex_wait): Add private parameter. Adjust FUTEX_PRIVATE_FLAG
1151         bit from private parm before syscall.
1152         (lll_futex_timed_wait): Likewise.
1153         (lll_futex_wake): Likewise.
1154         (lll_futex_wake_unlock): Likewise.
1155         (lll_mutex_unlock): Add LLL_SHARED parm to lll_futex_wake call.
1156         (lll_robust_mutex_unlock): Likewise.
1157         (lll_mutex_unlock_force): Likewise.
1158         (lll_wait_tid): Add LLL_SHARED parm to lll_futex_wait call.
1160 2007-07-23  Ulrich Drepper  <drepper@redhat.com>
1162         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: Fix
1163         compilation when unconditionally using private futexes.
1164         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
1165         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1166         Likewise.
1167         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1168         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1170 2007-07-17  Jakub Jelinek  <jakub@redhat.com>
1172         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock_clear_flags2):
1173         Define.
1175 2007-07-06  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1177         * sysdeps/sh/tls.h: Include stdlib.h, list.h, sysdep.h and
1178         kernel-features.h.
1180 2007-05-16  Roland McGrath  <roland@redhat.com>
1182         * init.c (__nptl_initial_report_events): New variable.
1183         (__pthread_initialize_minimal_internal): Initialize pd->report_events
1184         to that.
1186 2007-06-22  Jakub Jelinek  <jakub@redhat.com>
1188         * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
1189         cpusetsize if pthread_getaffinity_np failed with ENOSYS.
1191 2007-06-19  Ulrich Drepper  <drepper@redhat.com>
1193         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Remove mrlock
1194         implementation.
1196 2007-06-18  Ulrich Drepper  <drepper@redhat.com>
1198         * pthreadP.h: Define PTHREAD_MUTEX_TYPE.
1199         * phtread_mutex_lock.c: Use PTHREAD_MUTEX_TYPE.
1200         * pthread_mutex_timedlock.c: Likewise.
1201         * pthread_mutex_trylock.c: Likewise.
1202         * pthread_mutex_unlock.c: Likewise.
1204 2007-06-17  Andreas Schwab  <schwab@suse.de>
1206         * sysdeps/pthread/pt-initfini.c: Tell gcc about the nonstandard
1207         sections.
1209 2007-06-17  Ulrich Drepper  <drepper@redhat.com>
1211         * allocatestack.c (allocate_stack): Make code compile if
1212         __ASSUME_PRIVATE_FUTEX is set.
1214 2007-06-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1216         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S:
1217         (__pthread_rwlock_rdlock): Don't use non SH-3/4 instruction.
1218         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S:
1219         (__pthread_rwlock_wrlock): Likewise.
1220         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
1221         (pthread_rwlock_timedrdlock): Likewise.
1222         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
1223         (pthread_rwlock_timedwrlock): Likewise.
1224         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S:
1225         (__pthread_rwlock_unlock): Likewise.
1227 2007-06-10  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1229         * sysdeps/sh/tcb-offsets.sym: Add PRIVATE_FUTEX.
1230         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Include endian.h.
1231         Split __flags into __flags, __shared, __pad1 and __pad2.
1232         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Use private
1233         futexes if they are available.
1234         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Adjust so that change
1235         in libc-lowlevellock.S allow using private futexes.
1236         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Define
1237         FUTEX_PRIVATE_FLAG.  Add additional parameter to lll_futex_wait,
1238         lll_futex_timed_wait and lll_futex_wake.  Change lll_futex_wait
1239         to call lll_futex_timed_wait.  Add lll_private_futex_wait,
1240         lll_private_futex_timed_wait and lll_private_futex_wake.
1241         (lll_robust_mutex_unlock): Fix typo.
1242         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Use private
1243         field in futex command setup.
1244         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Use
1245         COND_NWAITERS_SHIFT instead of COND_CLOCK_BITS.
1246         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
1247         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Use private futexes
1248         if they are available.  Remove clear_once_control.
1249         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Use private
1250         futexes if they are available.
1251         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
1252         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
1253         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
1254         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
1255         * sysdeps/unix/sysv/linux/sh/sem_post.S: Add private futex support.
1256         Wake only when there are waiters.
1257         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add private futex
1258         support.  Indicate that there are waiters.  Remove unnecessary
1259         extra cancellation test.
1260         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.  Removed
1261         left-over duplication of __sem_wait_cleanup.
1263 2007-06-07  Ulrich Drepper  <drepper@redhat.com>
1265         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Add additional
1266         parameter to lll_futex_wait, lll_futex_timed_wait, and
1267         lll_futex_wake.  Change lll_futex_wait to call lll_futex_timed_wait.
1268         Add lll_private_futex_wait, lll_private_futex_timed_wait, and
1269         lll_private_futex_wake.
1270         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1271         * allocatestack.c: Adjust use of lll_futex_* macros.
1272         * init.c: Likewise.
1273         * lowlevellock.h: Likewise.
1274         * pthread_barrier_wait.c: Likewise.
1275         * pthread_cond_broadcast.c: Likewise.
1276         * pthread_cond_destroy.c: Likewise.
1277         * pthread_cond_signal.c: Likewise.
1278         * pthread_cond_timedwait.c: Likewise.
1279         * pthread_cond_wait.c: Likewise.
1280         * pthread_create.c: Likewise.
1281         * pthread_mutex_lock.c: Likewise.
1282         * pthread_mutex_setprioceiling.c: Likewise.
1283         * pthread_mutex_timedlock.c: Likewise.
1284         * pthread_mutex_unlock.c: Likewise.
1285         * pthread_rwlock_timedrdlock.c: Likewise.
1286         * pthread_rwlock_timedwrlock.c: Likewise.
1287         * pthread_rwlock_unlock.c: Likewise.
1288         * sysdeps/alpha/tls.h: Likewise.
1289         * sysdeps/i386/tls.h: Likewise.
1290         * sysdeps/ia64/tls.h: Likewise.
1291         * sysdeps/powerpc/tls.h: Likewise.
1292         * sysdeps/pthread/aio_misc.h: Likewise.
1293         * sysdeps/pthread/gai_misc.h: Likewise.
1294         * sysdeps/s390/tls.h: Likewise.
1295         * sysdeps/sh/tls.h: Likewise.
1296         * sysdeps/sparc/tls.h: Likewise.
1297         * sysdeps/unix/sysv/linux/fork.c: Likewise.
1298         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
1299         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: Likewise.
1300         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Likewise.
1301         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
1302         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1303         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
1304         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
1305         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: Likewise.
1306         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c:
1307         Likewise.
1308         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: Likewise.
1309         * sysdeps/x86_64/tls.h: Likewise.
1311 2007-05-29  Ulrich Drepper  <drepper@redhat.com>
1313         * pthread_getattr_np.c: No need to install a cancellation handler,
1314         this is no cancellation point.
1315         * pthread_getschedparam.c: Likewise.
1316         * pthread_setschedparam.c: Likewise.
1317         * pthread_setschedprio.c: Likewise.
1318         * sysdeps/unix/sysv/linux/lowlevellock.c: Remove all traces of
1319         lll_unlock_wake_cb.
1320         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
1321         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1322         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1323         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
1324         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
1325         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
1326         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
1327         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
1328         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
1329         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: Likewise.
1330         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
1331         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
1333         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Checking
1334         whether there are more than one thread makes no sense here since
1335         we only call the slow path if the locks are taken.
1336         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Likewise.
1338         * sysdeps/unix/sysv/linux/internaltypes.h: Introduce
1339         COND_NWAITERS_SHIFT.
1340         * pthread_cond_destroy.c: Use COND_NWAITERS_SHIFT instead of
1341         COND_CLOCK_BITS.
1342         * pthread_cond_init.c: Likewise.
1343         * pthread_cond_timedwait.c: Likewise.
1344         * pthread_cond_wait.c: Likewise.
1345         * pthread_condattr_getclock.c: Likewise.
1346         * pthread_condattr_setclock.c: Likewise.
1347         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Likewise.
1348         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1349         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1350         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
1351         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1353 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
1355         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c: Include
1356         unistd.h.
1358         * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
1359         insn suffix.
1360         (THREAD_GSCOPE_GET_FLAG): Remove.
1361         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Remove.
1362         * allocatestack.c (__wait_lookup_done): Revert 2007-05-24
1363         changes.
1364         * sysdeps/powerpc/tls.h (tcbhead_t): Remove gscope_flag.
1365         (THREAD_GSCOPE_GET_FLAG): Remove.
1366         (THREAD_GSCOPE_RESET_FLAG): Use THREAD_SELF->header.gscope_flag
1367         instead of THREAD_GSCOPE_GET_FLAG.
1368         (THREAD_GSCOPE_SET_FLAG): Likewise.  Add atomic_write_barrier after
1369         it.
1370         * sysdeps/s390/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1371         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1372         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1373         THREAD_GSCOPE_WAIT): Define.
1374         * sysdeps/sparc/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1375         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1376         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1377         THREAD_GSCOPE_WAIT): Define.
1378         * sysdeps/sh/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1379         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1380         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1381         THREAD_GSCOPE_WAIT): Define.
1382         * sysdeps/ia64/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1383         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1384         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1385         THREAD_GSCOPE_WAIT): Define.
1387 2007-05-24  Richard Henderson  <rth@redhat.com>
1389         * descr.h (struct pthread): Add header.gscope_flag.
1390         * sysdeps/alpha/tls.h (THREAD_GSCOPE_FLAG_UNUSED,
1391         THREAD_GSCOPE_FLAG_USED, THREAD_GSCOPE_FLAG_WAIT,
1392         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_SET_FLAG,
1393         THREAD_GSCOPE_WAIT): Define.
1395 2007-05-27  Ulrich Drepper  <drepper@redhat.com>
1397         * init.c: Make it compile with older kernel headers.
1399         * tst-initializers1.c: Show through exit code which test failed.
1401         * pthread_rwlock_init.c: Also initialize __shared field.
1402         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Split __flags
1403         element in rwlock structure into four byte elements.  One of them is
1404         the new __shared element.
1405         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h [__WORDSIZE=32]:
1406         Likewise.
1407         [__WORDSIZE=64]: Renamed __pad1 element int rwlock structure to
1408         __shared, adjust names of other padding elements.
1409         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
1410         * sysdeps/pthread/pthread.h: Adjust rwlock initializers.
1411         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: Add PSHARED.
1412         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define
1413         FUTEX_PRIVATE_FLAG.
1414         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Change main
1415         futex to use private operations if possible.
1416         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
1417         Likewise.
1418         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
1419         Likewise.
1420         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
1421         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
1422         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
1423         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
1424         Likewise.
1425         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
1426         Likewise.
1427         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
1428         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
1430 2007-05-26  Ulrich Drepper  <drepper@redhat.com>
1432         * pthreadP.h (PTHREAD_RWLOCK_PREFER_READER_P): Define.
1433         * pthread_rwlock_rdlock.c: Use PTHREAD_RWLOCK_PREFER_READER_P.
1434         * pthread_rwlock_timedrdlock.c: Likewise.
1435         * pthread_rwlock_tryrdlock.c: Likewise.
1437         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S (sem_trywait): Tiny
1438         optimization.
1440         * sysdeps/unix/sysv/linux/sem_wait.c: Add missing break.
1441         * sysdeps/unix/sysv/linux/sem_timedwait.c: Removed left-over
1442         duplication of __sem_wait_cleanup.
1444         * allocatestack.c: Revert last change.
1445         * init.c: Likewise.
1446         * sysdeps/i386/tls.h: Likewise.
1447         * sysdeps/x86_64/tls.h: Likewise.
1448         * descr.h [TLS_DTV_AT_TP] (struct pthread): Add private_futex field to
1449         header structure.
1450         * sysdeps/powerpc/tcb-offsets.sym: Add PRIVATE_FUTEX_OFFSET.
1452         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_barrier):
1453         Add private field.
1454         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: Add PRIVATE definition.
1455         * pthread_barrier_init.c: Set private flag if pshared and private
1456         futexes are supported.
1457         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Use
1458         private field in futex command setup.
1459         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
1461 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1463         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Add private futex
1464         support.
1465         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1466         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1467         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1468         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1469         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1471         * semaphoreP.h: Declare __old_sem_init and __old_sem_wait.
1472         * sem_init.c (__new_sem_init): Rewrite to initialize all three
1473         fields in the structure.
1474         (__old_sem_init): New function.
1475         * sem_open.c: Initialize all fields of the structure.
1476         * sem_getvalue.c: Adjust for renamed element.
1477         * sysdeps/unix/sysv/linux/Makefile [subdir=nptl]
1478         (gen-as-const-headers): Add structsem.sym.
1479         * sysdeps/unix/sysv/linux/structsem.sym: New file.
1480         * sysdeps/unix/sysv/linux/internaltypes.h: Rename struct sem to
1481         struct new_sem.  Add struct old_sem.
1482         * sysdeps/unix/sysv/linux/sem_post.c: Wake only when there are waiters.
1483         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
1484         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
1485         * sysdeps/unix/sysv/linux/sem_wait.c: Indicate that there are waiters.
1486         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
1487         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
1488         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
1489         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
1490         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1491         * Makefile (tests): Add tst-sem10, tst-sem11, tst-sem12.
1492         * tst-sem10.c: New file.
1493         * tst-sem11.c: New file.
1494         * tst-sem12.c: New file.
1495         * tst-typesizes.c: Test struct new_sem and struct old_sem instead
1496         of struct sem.
1498 2007-05-25  Ulrich Drepper  <drepper@redhat.com>
1499             Jakub Jelinek  <jakub@redhat.com>
1501         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
1502         Move __pthread_enable_asynccancel right before futex syscall.
1503         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
1504         Likewise.
1506 2007-05-24  Jakub Jelinek  <jakub@redhat.com>
1508         * sysdeps/i386/tls.h (THREAD_SET_PRIVATE_FUTEX,
1509         THREAD_COPY_PRIVATE_FUTEX): Define.
1510         * sysdeps/x86_64/tls.h (THREAD_SET_PRIVATE_FUTEX,
1511         THREAD_COPY_PRIVATE_FUTEX): Define.
1512         * allocatestack.c (allocate_stack): Use THREAD_COPY_PRIVATE_FUTEX.
1513         * init.c (__pthread_initialize_minimal_internal): Use
1514         THREAD_SET_PRIVATE_FUTEX.
1516         * sysdeps/powerpc/tls.h (tcbhead_t): Add gscope_flag.
1517         (THREAD_GSCOPE_FLAG_UNUSED, THREAD_GSCOPE_FLAG_USED,
1518         THREAD_GSCOPE_FLAG_WAIT): Define.
1519         (THREAD_GSCOPE_GET_FLAG, THREAD_GSCOPE_SET_FLAG,
1520         THREAD_GSCOPE_RESET_FLAG, THREAD_GSCOPE_WAIT): Define.
1521         * sysdeps/i386/tls.h (THREAD_GSCOPE_WAIT): Don't use
1522         PTR_DEMANGLE.
1523         (THREAD_GSCOPE_GET_FLAG): Define.
1524         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_GET_FLAG): Define.
1525         * allocatestack.c (__wait_lookup_done): Use THREAD_GSCOPE_GET_FLAG
1526         instead of ->header.gscope_flag directly.
1528 2007-05-23  Ulrich Drepper  <drepper@redhat.com>
1530         * init.c (__pthread_initialize_minimal_internal): Check whether
1531         private futexes are available.
1532         * allocatestack.c (allocate_stack): Copy private_futex field from
1533         current thread into the new stack.
1534         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: Use private
1535         futexes if they are available.
1536         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise
1537         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Adjust so that change
1538         in libc-lowlevellock.S allow using private futexes.
1539         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
1540         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Define
1541         FUTEX_PRIVATE_FLAG.
1542         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Likewise.
1543         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use private futexes
1544         if they are available.
1545         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
1546         * sysdeps/x86_64/tcb-offsets.sym: Add PRIVATE_FUTEX.
1547         * sysdeps/i386/tcb-offsets.sym: Likewise.
1548         * sysdeps/x86_64/tls.h (tcbhead_t): Add private_futex field.
1549         * sysdeps/i386/tls.h (tcbhead_t): Likewise.
1551 2007-05-21  Ulrich Drepper  <drepper@redhat.com>
1553         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1554         Remove ptr_wait_lookup_done again.
1555         * init.c (pthread_functions): Don't add .ptr_wait_lookup_done here.
1556         (__pthread_initialize_minimal_internal): Initialize
1557         _dl_wait_lookup_done pointer in _rtld_global directly.
1558         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1559         Remove code to code _dl_wait_lookup_done.
1560         * sysdeps/x86_64/tls.h (THREAD_GSCOPE_WAIT): The pointer is not
1561         encrypted for now.
1563 2007-05-21  Jakub Jelinek  <jakub@redhat.com>
1565         * tst-robust9.c (do_test): Don't fail if ENABLE_PI and
1566         pthread_mutex_init failed with ENOTSUP.
1568 2007-05-19  Ulrich Drepper  <drepper@redhat.com>
1570         * allocatestack.c (__wait_lookup_done): New function.
1571         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
1572         Add ptr_wait_lookup_done.
1573         * init.c (pthread_functions): Initialize .ptr_wait_lookup_done.
1574         * pthreadP.h: Declare __wait_lookup_done.
1575         * sysdeps/i386/tls.h (tcbhead_t): Add gscope_flag.
1576         Define macros to implement reference handling of global scope.
1577         * sysdeps/x86_64/tls.h: Likewise.
1578         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
1579         Initialize GL(dl_wait_lookup_done).
1581 2007-05-17  Ulrich Drepper  <drepper@redhat.com>
1583         [BZ #4512]
1584         * pthread_mutex_lock.c: Preserve FUTEX_WAITERS bit when dead owner
1585         is detected.
1586         * pthread_mutex_timedlock.c: Likewise.
1587         * pthread_mutex_trylock.c: Likewise.
1588         Patch in part by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
1590         * Makefile (tests): Add tst-robust9 and tst-robustpi9.
1591         * tst-robust9.c: New file.
1592         * tst-robustpi9.c: New file.
1594         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Remove
1595         unnecessary extra cancellation test.
1597 2007-05-14  Ulrich Drepper  <drepper@redhat.com>
1599         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Remove unnecessary
1600         extra cancellation test.
1601         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
1603 2007-05-10  Ulrich Drepper  <drepper@redhat.com>
1605         * descr.h (struct pthread): Rearrange members to fill hole in
1606         64-bit layout.
1608         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
1609         (__pthread_setaffinity_new): If syscall was successful and
1610         RESET_VGETCPU_CACHE is defined, use it before returning.
1611         * sysdeps/unix/sysv/linux/x86_64/pthread_setaffinity.c: New file.
1613 2007-05-10  Jakub Jelinek  <jakub@redhat.com>
1615         [BZ #4455]
1616         * tst-align2.c: Include stackinfo.h.
1617         * tst-getpid1.c: Likewise.
1619 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
1621         [BZ #4455]
1622         * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
1623         * tst-getpid1.c (do_test): Likewise.
1625         [BZ #4456]
1626         * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
1627         (allocate_stack): Likewise.
1629 2007-05-07  Ulrich Drepper  <drepper@redhat.com>
1631         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
1632         (__lll_robust_lock_wait): Fix race caused by reloading of futex value.
1633         (__lll_robust_timedlock_wait): Likewise.
1634         Reported by Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>.
1636 2007-05-06  Mike Frysinger  <vapier@gentoo.org>
1638         [BZ #4465]
1639         * tst-cancel-wrappers.sh: Set C["fdatasync"] to 1.
1640         * tst-cancel4.c (tf_fdatasync): New test.
1642 2007-04-27  Ulrich Drepper  <drepper@redhat.com>
1644         [BZ #4392]
1645         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Treat error
1646         check mutexes like normal mutexes.
1648         [BZ #4306]
1649         * sysdeps/unix/sysv/linux/timer_create.c (timer_create):
1650         Initialize the whole sigevent structure to appease valgrind.
1652 2007-04-25  Ulrich Drepper  <drepper@redhat.com>
1654         * sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
1655         * sysdeps/x86_64/tcb-offsets.sym: Add VGETCPU_CACHE_OFFSET.
1657 2007-04-06  Ulrich Drepper  <drepper@redhat.com>
1659         * tst-locale1.c: Avoid warnings.
1660         * tst-locale2.c: Likewise.
1662 2007-03-19  Steven Munroe  <sjmunroe@us.ibm.com>
1664         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
1665         (__lll_robust_trylock): Add MUTEX_HINT_ACQ to lwarx instruction.
1667 2007-03-16  Jakub Jelinek  <jakub@redhat.com>
1669         * sysdeps/pthread/bits/libc-lock.h: Use __extern_inline and
1670         __extern_always_inline where appropriate.
1671         * sysdeps/pthread/pthread.h: Likewise.
1673 2007-03-13  Richard Henderson  <rth@redhat.com>
1675         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (PSEUDO): Use two
1676         separate cfi regions for the two subsections.
1678 2007-02-25  Ulrich Drepper  <drepper@redhat.com>
1680         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset refcntr in
1681         new thread, don't just decrement it.
1682         Patch by Suzuki K P <suzuki@in.ibm.com>.
1684 2007-02-21  Ulrich Drepper  <drepper@redhat.com>
1686         * sysdeps/pthread/pthread-functions.h: Correct last patch, correct
1687         PTHFCT_CALL definition.
1689 2007-02-18  Ulrich Drepper  <drepper@redhat.com>
1691         * sysdeps/pthread/pthread-functions.h: If PTR_DEMANGLE is not
1692         available, don't use it.
1694 2007-02-09  Jakub Jelinek  <jakub@redhat.com>
1696         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1697         (__lll_mutex_timedlock_wait): Use correct pointer when we don't
1698         call into the kernel to delay.
1700 2007-01-18  Ulrich Drepper  <drepper@redhat.com>
1702         * tst-initializers1.c: We want to test the initializers as seen
1703         outside of libc, so undefined _LIBC.
1705         * pthread_join.c (cleanup): Avoid warning.
1707 2007-01-17  Ulrich Drepper  <drepper@redhat.com>
1709         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
1710         (__lll_timedwait_tid): Add unwind info.
1712         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
1713         function table, mangle the pointers.
1714         * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL.
1715         * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init.
1716         * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions
1717         demangle pointers before use.
1718         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to
1719         demangle pointer.
1720         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
1721         * sysdeps/pthread/setxid.h: Likewise.
1723 2007-01-12  Ulrich Drepper  <drepper@redhat.com>
1725         * tst-rwlock7.c: Show some more information in case of correct
1726         behavior.
1728 2007-01-11  Ulrich Drepper  <drepper@redhat.com>
1730         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1731         (lll_futex_timed_wait): Undo part of last change, don't negate
1732         return value.
1734 2007-01-10  Ulrich Drepper  <drepper@redhat.com>
1736         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Cleanups.  Define
1737         FUTEX_CMP_REQUEUE and lll_futex_requeue.
1739 2006-12-28  David S. Miller  <davem@davemloft.net>
1741         * shlib-versions: Fix sparc64 linux target specification.
1743 2007-01-10  Jakub Jelinek  <jakub@redhat.com>
1745         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
1746         Adjust include path for pthread_barrier_wait.c move.
1748 2006-12-21  Jakub Jelinek  <jakub@redhat.com>
1750         * sysdeps/unix/sysv/linux/pthread_kill.c (pthread_kill): Make sure
1751         tid isn't reread from pd->tid in between ESRCH test and the syscall.
1753 2006-12-06  Jakub Jelinek  <jakub@redhat.com>
1755         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Handle
1756         6 argument cancellable syscalls.
1757         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1758         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO): Handle
1759         6 argument cancellable syscalls.
1760         (STM_6, LM_6, LR7_0, LR7_1, LR7_2, LR7_3, LR7_4, LR7_5, LR7_6): Define.
1762 2006-12-09  Ulrich Drepper  <drepper@redhat.com>
1764         * sysdeps/unix/sysv/linux/rtld-lowlevel.h
1765         (__rtld_mrlock_initialize): Add missing closing parenthesis.
1767 2006-10-30  Jakub Jelinek  <jakub@redhat.com>
1769         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
1770         __sync_lock_release instead of __sync_lock_release_si.
1772 2006-10-29  Jakub Jelinek  <jakub@redhat.com>
1774         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (RTLD_SINGLE_THREAD_P):
1775         Define.
1776         (SINGLE_THREAD_P): Define to 1 if IS_IN_rtld.
1777         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Likewise.
1778         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
1779         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
1780         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
1781         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
1782         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
1783         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
1784         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
1785         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
1786         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
1788 2006-10-27  Ulrich Drepper  <drepper@redhat.com>
1790         * sysdeps/pthread/pthread_barrier_wait.c: Move to...
1791         * pthread_barrier_wait.c: ...here.
1792         * sysdeps/pthread/pthread_cond_broadcast.c: Move to...
1793         * pthread_cond_broadcast.c: ...here.
1794         * sysdeps/pthread/pthread_cond_signal.c: Move to...
1795         * pthread_cond_signal.c: ...here.
1796         * sysdeps/pthread/pthread_cond_timedwait.c: Move to...
1797         * pthread_cond_timedwait.c: ...here.
1798         * sysdeps/pthread/pthread_cond_wait.c: Move to...
1799         * pthread_cond_wait.c: ...here.
1800         * sysdeps/pthread/pthread_once.c: Move to...
1801         * pthread_once.c: ...here.
1802         * sysdeps/pthread/pthread_rwlock_rdlock.c: Move to...
1803         * pthread_rwlock_rdlock.c: ...here.
1804         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Move to...
1805         * pthread_rwlock_timedrdlock.c: ...here.
1806         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Move to...
1807         * pthread_rwlock_timedwrlock.c: ...here.
1808         * sysdeps/pthread/pthread_rwlock_unlock.c: Move to...
1809         * pthread_rwlock_unlock.c: ...here.
1810         * sysdeps/pthread/pthread_rwlock_wrlock.c: Move to...
1811         * pthread_rwlock_wrlock.c: ...here.
1812         * sysdeps/pthread/pthread_spin_destroy.c: Move to...
1813         * pthread_spin_destroy.c: ...here.
1814         * sysdeps/pthread/pthread_spin_init.c: Move to...
1815         * pthread_spin_init.c: ...here.
1816         * sysdeps/pthread/pthread_spin_unlock.c: Move to...
1817         * pthread_spin_unlock.c: ...here.
1818         * sysdeps/pthread/pthread_getcpuclockid.c: Move to...
1819         * pthread_getcpuclockid.c: ...here.
1821         * init.c: USE_TLS support is now always enabled.
1822         * tst-tls5.h: Likewise.
1823         * sysdeps/alpha/tls.h: Likewise.
1824         * sysdeps/i386/tls.h: Likewise.
1825         * sysdeps/ia64/tls.h: Likewise.
1826         * sysdeps/powerpc/tls.h: Likewise.
1827         * sysdeps/s390/tls.h: Likewise.
1828         * sysdeps/sh/tls.h: Likewise.
1829         * sysdeps/sparc/tls.h: Likewise.
1830         * sysdeps/x86_64/tls.h: Likewise.
1832 2006-10-27  Jakub Jelinek  <jakub@redhat.com>
1834         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1835         __rtld_mrlock_change): Update oldval if atomic compare and exchange
1836         failed.
1838         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
1839         Define to THREAD_SELF->header.multiple_threads.
1840         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
1841         Likewise.
1842         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
1843         Likewise.
1844         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
1845         (SINGLE_THREAD_P): Likewise.
1846         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
1847         (SINGLE_THREAD_P): Likewise.
1848         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
1849         (SINGLE_THREAD_P): Likewise.
1850         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
1851         (SINGLE_THREAD_P): Likewise.
1852         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (SINGLE_THREAD_P):
1853         Likewise.
1854         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
1855         (SINGLE_THREAD_P): Likewise.
1856         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
1857         (SINGLE_THREAD_P): Likewise.
1858         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (SINGLE_THREAD_P):
1859         Likewise.
1861 2006-10-26  Jakub Jelinek  <jakub@redhat.com>
1863         * pthread_attr_setstacksize.c (NEW_VERNUM): Define to GLIBC_2_3_3
1864         by default rather than 2_3_3.
1866 2006-10-17  Jakub Jelinek  <jakub@redhat.com>
1868         * sysdeps/unix/sysv/linux/rtld-lowlevel.h (__rtld_mrlock_lock,
1869         __rtld_mrlock_unlock, __rtld_mrlock_change, __rtld_mrlock_done): Use
1870         atomic_* instead of catomic_* macros.
1872 2006-10-12  Ulrich Drepper  <drepper@redhat.com>
1874         [BZ #3285]
1875         * sysdeps/unix/sysv/linux/bits/local_lim.h: Add SEM_VALUE_MAX.
1876         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: Likewise.
1877         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
1878         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
1879         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
1880         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Remove SEM_VALUE_MAX.
1881         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
1882         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
1883         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
1884         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: Likewise.
1885         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
1886         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
1887         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
1889 2006-10-11  Ulrich Drepper  <drepper@redhat.com>
1891         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add support for
1892         cancelable syscalls with six parameters.
1894         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: Use catomic_*
1895         operations instead of atomic_*.
1897 2006-10-09  Ulrich Drepper  <drepper@redhat.com>
1899         * sysdeps/unix/sysv/linux/rtld-lowlevel.h: New file..
1901 2006-10-07  Ulrich Drepper  <drepper@redhat.com>
1903         * sysdeps/unix/sysv/linux/powerpc/bits/local_lim.h: New file.
1904         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstack.c: New file.
1905         * sysdeps/unix/sysv/linux/powerpc/pthread_attr_setstacksize.c:
1906         New file.
1907         * pthread_attr_setstack.c: Allow overwriting the version number of the
1908         new symbol.
1909         * pthread_attr_setstacksize.c: Likewise.
1910         (__old_pthread_attr_setstacksize): If STACKSIZE_ADJUST is defined use
1911         it.
1912         * sysdeps/unix/sysv/linux/powerpc/Versions (libpthread): Add
1913         pthread_attr_setstack and pthread_attr_setstacksize to GLIBC_2.6.
1915 2006-09-24  Ulrich Drepper  <drepper@redhat.com>
1917         [BZ #3251]
1918         * descr.h (ENQUEUE_MUTEX_BOTH): Add cast to avoid warning.
1919         Patch by Petr Baudis.
1921 2006-09-18  Jakub Jelinek  <jakub@redhat.com>
1923         * tst-kill4.c (do_test): Explicitly set tf thread's stack size.
1925         * tst-cancel2.c (tf): Loop as long as something was written.
1927 2006-09-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
1929         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: For PI
1930         mutexes wake all mutexes.
1931         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Don't increment
1932         WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1933         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
1935 2006-09-12  Ulrich Drepper  <drepper@redhat.com>
1937         * tst-cond22.c (tf): Slight changes to the pthread_cond_wait use
1938         to guarantee the thread is always canceled.
1940 2006-09-08  Jakub Jelinek  <jakub@redhat.com>
1942         * tst-cond22.c: Include pthread.h instead of pthreadP.h.
1943         Include stdlib.h.
1944         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Only
1945         increase FUTEX if increasing WAKEUP_SEQ.  Fix comment typo.
1946         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1947         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1948         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1950 2006-09-08  Ulrich Drepper  <drepper@redhat.com>
1952         [BZ #3123]
1953         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Don't
1954         increment WAKEUP_SEQ if this would increase the value beyond TOTAL_SEQ.
1955         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
1956         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
1957         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
1958         * Makefile (tests): Add tst-cond22.
1959         * tst-cond22.c: New file.
1961 2006-09-05  Ulrich Drepper  <drepper@redhat.com>
1963         [BZ #3124]
1964         * descr.h (struct pthread): Add parent_cancelhandling.
1965         * sysdeps/pthread/createthread.c (create_thread): Pass parent
1966         cancelhandling value to child.
1967         * pthread_create.c (start_thread): If parent thread was canceled
1968         reset the SIGCANCEL mask.
1969         * Makefile (tests): Add tst-cancel25.
1970         * tst-cancel25.c: New file.
1972 2006-09-05  Jakub Jelinek  <jakub@redhat.com>
1973             Ulrich Drepper  <drepper@redhat.com>
1975         * sysdeps/pthread/gai_misc.h (GAI_MISC_NOTIFY): Don't decrement
1976         counterp if it is already zero.
1977         * sysdeps/pthread/aio_misc.h (AIO_MISC_NOTIFY): Likewise..
1979 2006-03-04  Jakub Jelinek  <jakub@redhat.com>
1980             Roland McGrath  <roland@redhat.com>
1982         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
1983         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1984         LLL_STUB_UNWIND_INFO_3, LLL_STUB_UNWIND_INFO_4): Define.
1985         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
1986         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
1987         lll_robust_mutex_timedlock, lll_mutex_unlock,
1988         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
1989         Add _L_*_ symbols around the subsection.
1990         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Add unwind info.
1991         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: Likewise.
1993 2006-03-03  Jakub Jelinek  <jakub@redhat.com>
1994             Roland McGrath  <roland@redhat.com>
1996         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
1997         (LLL_STUB_UNWIND_INFO_START, LLL_STUB_UNWIND_INFO_END,
1998         LLL_STUB_UNWIND_INFO_5, LLL_STUB_UNWIND_INFO_6): Define.
1999         (lll_mutex_lock, lll_robust_mutex_lock, lll_mutex_cond_lock,
2000         lll_robust_mutex_cond_lock, lll_mutex_timedlock,
2001         lll_robust_mutex_timedlock, lll_mutex_unlock,
2002         lll_robust_mutex_unlock, lll_lock, lll_unlock): Use them.
2003         Add _L_*_ symbols around the subsection.
2004         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Add unwind info.
2005         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: Likewise.
2007 2006-08-31  Ulrich Drepper  <drepper@redhat.com>
2009         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Undo last
2010         change because it can disturb too much existing code.  If real hard
2011         reader preference is needed we'll introduce another type.
2012         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2013         (pthread_rwlock_timedwrlock): Likewise.
2014         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2015         Likewise.
2017 2006-08-30  Ulrich Drepper  <drepper@redhat.com>
2019         * pthread_rwlock_trywrlock.c (__pthread_rwlock_trywrlock): Respect
2020         reader preference.
2021         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
2022         (pthread_rwlock_timedwrlock): Likewise.
2023         * sysdeps/pthread/pthread_rwlock_wrlock.c (__pthread_rwlock_wrlock):
2024         Likewise.
2026 2006-08-25  Jakub Jelinek  <jakub@redhat.com>
2028         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libpthread):
2029         Only define ifdef SHARED.
2031 2006-08-23  Ulrich Drepper  <drepper@redhat.com>
2033         * allocatestack.c (queue_stack): Move freeing of surplus stacks to...
2034         (free_stacks): ...here.
2035         (__free_stack_cache): New function.
2036         * pthreadP.h: Declare __free_stack_cache.
2037         * sysdeps/pthread/pthread-functions.h (pthread_functions): Add
2038         ptr_freeres.
2039         * init.c (pthread_functions): Initialize ptr_freeres.
2040         * sysdeps/unix/sysv/linux/libc_pthread_init.c (freeres_libptread):
2041         New freeres function.
2043 2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
2045         [BZ #3018]
2046         * Makefile (extra-objs): Add modules to extra-test-objs instead.
2048 2006-08-20  Ulrich Drepper  <drepper@redhat.com>
2050         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2051         _XOPEN_REALTIME_THREADS.
2053 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
2055         * sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
2056         HAVE_CLOCK_GETRES_VSYSCALL as guard macro rather than
2057         HAVE_CLOCK_GETTIME_VSYSCALL.
2058         (maybe_syscall_settime_cpu): Use plain INTERNAL_VSYSCALL here.
2060 2006-08-14  Jakub Jelinek  <jakub@redhat.com>
2062         * sysdeps/unix/sysv/linux/bits/posix_opt.h
2063         (_POSIX_THREAD_PRIO_PROTECT): Define to 200112L.
2064         * descr.h (struct priority_protection_data): New type.
2065         (struct pthread): Add tpp field.
2066         * pthreadP.h (PTHREAD_MUTEX_PP_NORMAL_NP,
2067         PTHREAD_MUTEX_PP_RECURSIVE_NP, PTHREAD_MUTEX_PP_ERRORCHECK_NP,
2068         PTHREAD_MUTEX_PP_ADAPTIVE_NP): New enum values.
2069         * pthread_mutex_init.c (__pthread_mutex_init): Handle non-robust
2070         TPP mutexes.
2071         * pthread_mutex_lock.c (__pthread_mutex_lock): Handle TPP mutexes.
2072         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Likewise.
2073         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Likewise.
2074         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Likewise.
2075         * tpp.c: New file.
2076         * pthread_setschedparam.c (__pthread_setschedparam): Handle priority
2077         boosted by TPP.
2078         * pthread_setschedprio.c (pthread_setschedprio): Likewise.
2079         * pthread_mutexattr_getprioceiling.c
2080         (pthread_mutexattr_getprioceiling): If ceiling is 0, ensure it is
2081         in the SCHED_FIFO priority range.
2082         * pthread_mutexattr_setprioceiling.c
2083         (pthread_mutexattr_setprioceiling): Fix prioceiling validation.
2084         * pthread_mutex_getprioceiling.c (pthread_mutex_getprioceiling): Fail
2085         if mutex is not TPP.  Ceiling is now in __data.__lock.
2086         * pthread_mutex_setprioceiling.c: Include stdbool.h.
2087         (pthread_mutex_setprioceiling): Fix prioceiling validation.  Ceiling
2088         is now in __data.__lock.  Add locking.
2089         * pthread_create.c (__free_tcb): Free pd->tpp structure.
2090         * Makefile (libpthread-routines): Add tpp.
2091         (xtests): Add tst-mutexpp1, tst-mutexpp6 and tst-mutexpp10.
2092         * tst-tpp.h: New file.
2093         * tst-mutexpp1.c: New file.
2094         * tst-mutexpp6.c: New file.
2095         * tst-mutexpp10.c: New file.
2096         * tst-mutex1.c (TEST_FUNCTION): Don't redefine if already defined.
2097         * tst-mutex6.c (TEST_FUNCTION): Likewise.
2099 2006-08-12  Ulrich Drepper  <drepper@redhat.com>
2101         [BZ #2843]
2102         * pthread_join.c (pthread_join): Account for self being canceled
2103         when checking for deadlocks.
2104         * tst-join5.c: Cleanups.  Allow to be used in tst-join6.
2105         (tf1): Don't print anything after pthread_join returns, this would be
2106         another cancellation point.
2107         (tf2): Likewise.
2108         * tst-join6.c: New file.
2109         * Makefile (tests): Add tst-join6.
2111 2006-08-03  Ulrich Drepper  <drepper@redhat.com>
2113         [BZ #2892]
2114         * pthread_setspecific.c (__pthread_setspecific): Check
2115         out-of-range index before checking for unused key.
2117         * sysdeps/pthread/gai_misc.h: New file.
2119 2006-08-01  Ulrich Drepper  <drepper@redhat.com>
2121         * sysdeps/unix/sysv/linux/i386/smp.h: New file.  Old Linux-specific
2122         file.  Don't use sysctl.
2123         * sysdeps/unix/sysv/linux/smp.h: Always assume SMP.  Archs can
2124         overwrite the file if this is likely not true.
2126 2006-07-31  Daniel Jacobowitz  <dan@codesourcery.com>
2128         * allocatestack.c (__reclaim_stacks): Reset the PID on cached stacks.
2129         * Makefile (tests): Add tst-getpid3.
2130         * tst-getpid3.c: New file.
2132 2006-07-30  Roland McGrath  <roland@redhat.com>
2134         * Makefile (libpthread-routines): Add ptw-sigsuspend.
2136         * sysdeps/unix/sysv/linux/i386/not-cancel.h
2137         (pause_not_cancel): New macro.
2138         (nanosleep_not_cancel): New macro.
2139         (sigsuspend_not_cancel): New macro.
2140         * pthread_mutex_timedlock.c (pthread_mutex_timedlock): Use
2141         nanosleep_not_cancel macro from <not-cancel.h>.
2142         * pthread_mutex_lock.c (__pthread_mutex_lock): Use pause_not_cancel
2143         macro from <not-cancel.h>.
2145 2006-07-28  Ulrich Drepper  <drepper@redhat.com>
2146             Jakub Jelinek  <jakub@redhat.com>
2148         * descr.h: Change ENQUEUE_MUTEX and DEQUEUE_MUTEX for bit 0
2149         notification of PI mutex.  Add ENQUEUE_MUTEX_PI.
2150         * pthreadP.h: Define PTHREAD_MUTEX_PI_* macros for PI mutex types.
2151         * pthread_mutex_setprioceilining.c: Adjust for mutex type name change.
2152         * pthread_mutex_init.c: Add support for priority inheritance mutex.
2153         * pthread_mutex_lock.c: Likewise.
2154         * pthread_mutex_timedlock.c: Likewise.
2155         * pthread_mutex_trylock.c: Likewise.
2156         * pthread_mutex_unlock.c: Likewise.
2157         * sysdeps/pthread/pthread_cond_broadcast.c: For PI mutexes wake
2158         all mutexes.
2159         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.c: Likewise.
2160         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.c: Likewise.
2161         * sysdeps/unix/sysv/linux/pthread-pi-defines.sym: New file.
2162         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-header): Add
2163         pthread-pi-defines.sym.
2164         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define FUTEX_LOCK_PI,
2165         FUTEX_UNLOCK_PI, and FUTEX_TRYLOCK_PI.
2166         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2167         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Likewise.
2168         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2169         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2170         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2171         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
2172         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
2173         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
2174         _POSIX_THREAD_PRIO_INHERIT to 200112L.
2175         * tst-mutex1.c: Adjust to allow use in PI mutex test.
2176         * tst-mutex2.c: Likewise.
2177         * tst-mutex3.c: Likewise.
2178         * tst-mutex4.c: Likewise.
2179         * tst-mutex5.c: Likewise.
2180         * tst-mutex6.c: Likewise.
2181         * tst-mutex7.c: Likewise.
2182         * tst-mutex7a.c: Likewise.
2183         * tst-mutex8.c: Likewise.
2184         * tst-mutex9.c: Likewise.
2185         * tst-robust1.c: Likewise.
2186         * tst-robust7.c: Likewise.
2187         * tst-robust8.c: Likewise.
2188         * tst-mutexpi1.c: New file.
2189         * tst-mutexpi2.c: New file.
2190         * tst-mutexpi3.c: New file.
2191         * tst-mutexpi4.c: New file.
2192         * tst-mutexpi5.c: New file.
2193         * tst-mutexpi6.c: New file.
2194         * tst-mutexpi7.c: New file.
2195         * tst-mutexpi7a.c: New file.
2196         * tst-mutexpi8.c: New file.
2197         * tst-mutexpi9.c: New file.
2198         * tst-robust1.c: New file.
2199         * tst-robust2.c: New file.
2200         * tst-robust3.c: New file.
2201         * tst-robust4.c: New file.
2202         * tst-robust5.c: New file.
2203         * tst-robust6.c: New file.
2204         * tst-robust7.c: New file.
2205         * tst-robust8.c: New file.
2206         * Makefile (tests): Add the new tests.
2208         * pthread_create.c (start_thread): Add some casts to avoid warnings.
2209         * pthread_mutex_destroy.c: Remove unneeded label.
2211 2006-07-01  Ulrich Drepper  <drepper@redhat.com>
2213         * pthread_mutex_init.c (__pthread_mutex_init): Move some
2214         computations to compile time.
2216 2006-06-04  Ulrich Drepper  <drepper@redhat.com>
2218         * sysdeps/pthread/pthread.h: Add pthread_equal inline version.
2220 2006-05-15  Ulrich Drepper  <drepper@redhat.com>
2222         * sysdeps/unix/sysv/linux/fork.h: Mark __fork_handlers as hidden.
2224 2006-05-11  Ulrich Drepper  <drepper@redhat.com>
2226         * pthread_key_create.c (__pthread_key_create): Do away with
2227         __pthread_keys_lock.
2229         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
2230         (__kernel_cpumask_size): Mark as hidden.
2231         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
2233         * sem_open.c (__sem_mappings_lock): Mark as hidden.
2234         * semaphoreP.h (__sem_mappings_lock): Likewise.
2236 2006-05-10  Ulrich Drepper  <drepper@redhat.com>
2238         * pthread_atfork.c: Mark __dso_handle as hidden.
2240 2006-05-09  Ulrich Drepper  <drepper@redhat.com>
2242         [BZ #2644]
2243         * sysdeps/pthread/unwind-forcedunwind.c: Different solution for
2244         the reload problem.  Change the one path in pthread_cancel_init
2245         which causes the problem.  Force gcc to reload.  Simplify callers.
2246         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c
2247         (_Unwind_GetBSP): Undo last patch.
2249 2006-05-07  Ulrich Drepper  <drepper@redhat.com>
2251         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: Make sure the
2252         function pointer is reloaded after pthread_cancel_init calls.
2254         [BZ #2644]
2255         * sysdeps/pthread/unwind-forcedunwind.c: Make sure functions
2256         pointers are reloaded after pthread_cancel_init calls.
2258 2006-05-01  Ulrich Drepper  <drepper@redhat.com>
2260         * sysdeps/pthread/allocalim.h (__libc_use_alloca): Mark with
2261         __always_inline.
2263 2006-04-27  Ulrich Drepper  <drepper@redhat.com>
2265         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
2266         Allocate new object which is passed to timer_sigev_thread so that
2267         the timer can be deleted before the new thread is scheduled.
2269 2006-04-26  Roland McGrath  <roland@redhat.com>
2271         * sysdeps/x86_64/tls.h: Include <asm/prctl.h> inside [! __ASSEMBLER__].
2273 2006-04-08  Ulrich Drepper  <drepper@redhat.com>
2275         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove branch predicion
2276         suffix for conditional jumps.
2277         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
2278         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
2279         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
2280         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
2281         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
2282         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
2284         * init.c (sigcancel_handler): Compare with correct PID even if the
2285         thread is in the middle of a fork call.
2286         (sighandler_setxid): Likewise.
2287         Reported by Suzuki K P <suzuki@in.ibm.com> .
2289 2006-04-07  Jakub Jelinek  <jakub@redhat.com>
2291         * pthreadP.h (FUTEX_TID_MASK): Sync with kernel.
2293 2006-04-06  Ulrich Drepper  <drepper@redhat.com>
2295         * pthread_getattr_np.c (pthread_getattr_np): Close fp if getrlimit
2296         fails [Coverity CID 105].
2298 2006-04-05  Ulrich Drepper  <drepper@redhat.com>
2300         * sysdeps/pthread/pthread.h: Add nonnull attributes.
2302 2006-04-03  Steven Munroe  <sjmunroe@us.ibm.com>
2304         [BZ #2505]
2305         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h [_ARCH_PWR4]:
2306         Define __lll_rel_instr using lwsync.
2308 2006-03-27  Ulrich Drepper  <drepper@redhat.com>
2310         * allocatestack.c (allocate_stack): Always initialize robust_head.
2311         * descr.h: Define struct robust_list_head.
2312         (struct pthread): Use robust_list_head in robust mutex list definition.
2313         Adjust ENQUEUE_MUTEX and DEQUEUE_MUTEX.
2314         * init.c [!__ASSUME_SET_ROBUST_LIST] (__set_robust_list_avail): Define.
2315         (__pthread_initialize_minimal_internal): Register robust_list with
2316         the kernel.
2317         * pthreadP.h: Remove PRIVATE_ from PTHREAD_MUTEX_ROBUST_* names.
2318         Declare __set_robust_list_avail.
2319         * pthread_create.c (start_thread): Register robust_list of new thread.
2320         [!__ASSUME_SET_ROBUST_LIST]: If robust_list is not empty wake up
2321         waiters.
2322         * pthread_mutex_destroy.c: For robust mutexes don't look at the
2323         number of users, it's unreliable.
2324         * pthread_mutex_init.c: Allow use of pshared robust mutexes if
2325         set_robust_list syscall is available.
2326         * pthread_mutex_consistent.c: Adjust for PTHREAD_MUTEX_ROBUST_* rename.
2327         * pthread_mutex_lock.c: Simplify robust mutex code a bit.
2328         Set robust_head.list_op_pending before trying to lock a robust mutex.
2329         * pthread_mutex_timedlock.c: Likewise.
2330         * pthread_mutex_trylock.c: Likewise.
2331         * pthread_mutex_unlock.c: Likewise for unlocking.
2332         * Makefile (tests): Add tst-robust8.
2333         * tst-robust8.c: New file.
2335 2006-03-08  Andreas Schwab  <schwab@suse.de>
2337         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h
2338         (DL_SYSINFO_IMPLEMENTATION): Add missing newline.
2340 2006-03-05  Roland McGrath  <roland@redhat.com>
2342         * configure (libc_add_on): Disable add-on when $add_ons_automatic = yes
2343         and $config_os doesn't match *linux*.
2345 2006-03-05  David S. Miller  <davem@sunset.davemloft.net>
2347         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S:
2348         Use __syscall_error.
2349         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
2350         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: Likewise.
2351         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: Likewise.
2352         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
2353         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: Likewise.
2354         * sysdeps/unix/sysv/linux/sparc/Makefile: New file.
2356 2006-03-02  Ulrich Drepper  <drepper@redhat.com>
2358         * sysdeps/unix/sysv/linux/aio_misc.h: Various cleanups.
2360 2006-03-01  Ulrich Drepper  <drepper@redhat.com>
2362         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S
2363         (__lll_robust_lock_wait): Also set FUTEX_WAITERS bit if we got the
2364         mutex.
2365         (__lll_robust_timedlock_wait): Likewise.
2366         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S
2367         (__lll_robust_lock_wait): Likewise.
2368         (__lll_robust_timedlock_wait): Likewise.
2369         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c
2370         (__lll_robust_lock_wait): Likewise.
2371         (__lll_robust_timedlock_wait): Likewise.
2373 2006-03-01  Jakub Jelinek  <jakub@redhat.com>
2375         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (lll_robust_mutex_dead,
2376         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2377         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2378         lll_robust_mutex_unlock): Define.
2379         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2381 2006-02-28  H.J. Lu  <hongjiu.lu@intel.com>
2383         * sysdeps/unix/sysv/linux/ia64/clone2.S: Include <clone2.S>
2384         instead of <clone.S>.
2386 2006-02-27  Jakub Jelinek  <jakub@redhat.com>
2388         * Makefile (libpthread-routines): Add
2389         pthread_mutexattr_[sg]etprotocol, pthread_mutexattr_[sg]etprioceiling
2390         and pthread_mutex_[sg]etprioceiling.
2391         * Versions (GLIBC_2.4): Export pthread_mutexattr_getprotocol,
2392         pthread_mutexattr_setprotocol, pthread_mutexattr_getprioceiling,
2393         pthread_mutexattr_setprioceiling, pthread_mutex_getprioceiling and
2394         pthread_mutex_setprioceiling.
2395         * sysdeps/pthread/pthread.h (PTHREAD_PRIO_NONE, PTHREAD_PRIO_INHERIT,
2396         PTHREAD_PRIO_PROTECT): New enum values.
2397         (pthread_mutexattr_getprotocol, pthread_mutexattr_setprotocol,
2398         pthread_mutexattr_getprioceiling, pthread_mutexattr_setprioceiling,
2399         pthread_mutex_getprioceiling, pthread_mutex_setprioceiling): New
2400         prototypes.
2401         * pthreadP.h (PTHREAD_MUTEX_PRIO_INHERIT_PRIVATE_NP,
2402         PTHREAD_MUTEX_PRIO_PROTECT_PRIVATE_NP): New enum values.
2403         (PTHREAD_MUTEX_PRIO_CEILING_SHIFT, PTHREAD_MUTEX_PRIO_CEILING_MASK):
2404         Define.
2405         (PTHREAD_MUTEXATTR_PROTOCOL_SHIFT, PTHREAD_MUTEXATTR_PROTOCOL_MASK,
2406         PTHREAD_MUTEXATTR_PRIO_CEILING_SHIFT,
2407         PTHREAD_MUTEXATTR_PRIO_CEILING_MASK): Define.
2408         (PTHREAD_MUTEXATTR_FLAG_BITS): Or in PTHREAD_MUTEXATTR_PROTOCOL_MASK
2409         and PTHREAD_MUTEXATTR_PRIO_CEILING_MASK.
2410         * pthread_mutex_init.c (__pthread_mutex_init): For the time being
2411         return ENOTSUP for PTHREAD_PRIO_INHERIT or PTHREAD_PRIO_PROTECT
2412         protocol mutexes.
2413         * pthread_mutex_getprioceiling.c: New file.
2414         * pthread_mutex_setprioceiling.c: New file.
2415         * pthread_mutexattr_getprioceiling.c: New file.
2416         * pthread_mutexattr_setprioceiling.c: New file.
2417         * pthread_mutexattr_getprotocol.c: New file.
2418         * pthread_mutexattr_setprotocol.c: New file.
2420 2006-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
2422         * sysdeps/unix/sysv/linux/aio_misc.h: Include <limits.h>.
2424 2006-02-27  Roland McGrath  <roland@redhat.com>
2426         * sysdeps/pthread/Subdirs: List nptl here too.
2427         * configure (libc_add_on_canonical): New variable.
2429         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: Use #include_next.
2431         * sysdeps/unix/sysv/linux/sleep.c: Use #include_next after #include of
2432         self to get main source tree's file.
2433         * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
2434         * sysdeps/unix/sysv/linux/i386/clone.S: Likewise.
2435         * sysdeps/unix/sysv/linux/i386/vfork.S: Likewise.
2436         * sysdeps/unix/sysv/linux/ia64/clone2.S: Likewise.
2437         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Likewise.
2438         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise.
2439         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: Likewise.
2440         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: Likewise.
2441         * sysdeps/unix/sysv/linux/sh/clone.S: Likewise.
2442         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: Likewise.
2443         * sysdeps/unix/sysv/linux/sparc/sparc64/clone.S: Likewise.
2444         * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise.
2445         * sysdeps/unix/sysv/linux/x86_64/vfork.S: Likewise.
2447         * Makefile: Use $(sysdirs) in vpath directive.
2449         * sysdeps/pthread/Makefile (CFLAGS-libc-start.c): Variable removed.
2450         (CPPFLAGS-timer_routines.c): Likewise.
2452         * Makeconfig (includes): Variable removed.
2454 2006-02-26  Roland McGrath  <roland@redhat.com>
2456         * sysdeps/generic/pt-raise.c: Moved to ...
2457         * pt-raise.c: ... here.
2458         * sysdeps/generic/lowlevellock.h: Moved to ...
2459         * lowlevellock.h: ... here.
2461 2006-02-23  Roland McGrath  <roland@redhat.com>
2463         * descr.h (struct pthread): Add final member `end_padding'.
2464         (PTHREAD_STRUCT_END_PADDING): Use it.
2466 2006-02-20  Roland McGrath  <roland@redhat.com>
2468         * sysdeps/mips: Directory removed, saved in ports repository.
2469         * sysdeps/unix/sysv/linux/mips: Likewise.
2471 2006-02-18  Ulrich Drepper  <drepper@redhat.com>
2473         * tst-robust1.c: Add second mutex to check that the mutex list is
2474         handled correctly.
2476 2006-02-17  Jakub Jelinek  <jakub@redhat.com>
2478         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_robust_mutex_dead,
2479         lll_robust_mutex_trylock, lll_robust_mutex_lock,
2480         lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock,
2481         lll_robust_mutex_unlock): New macros.
2482         (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes.
2483         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
2484         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
2485         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
2486         * sysdeps/unix/sysv/linux/lowlevelrobustlock.c: New file.
2488 2006-02-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2490         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Add lll_robust_mutex_*
2491         definitions.
2492         * sysdeps/unix/sysv/linux/sh/lowlevelrobustlock.S: New file.
2494 2006-02-17  Ulrich Drepper  <drepper@redhat.com>
2496         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
2497         (lll_robust_mutex_unlock): Avoid unnecessary wakeups.
2498         * sysdeps/unix/sysv/linux/i386/lowlevellock.h
2499         (lll_robust_mutex_unlock): Likewise.
2501 2006-02-13  Jakub Jelinek  <jakub@redhat.com>
2503         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX):
2504         Set robust_list.__next rather than robust_list.
2505         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
2506         (__pthread_list_t): New typedef.
2507         (pthread_mutex_t): Replace __next and __prev fields with __list.
2508         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
2509         (__pthread_list_t): New typedef.
2510         (pthread_mutex_t): Replace __next and __prev fields with __list.
2511         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
2512         (__pthread_list_t, __pthread_slist_t): New typedefs.
2513         (pthread_mutex_t): Replace __next and __prev fields with __list.
2514         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h
2515         (__pthread_list_t, __pthread_slist_t): New typedefs.
2516         (pthread_mutex_t): Replace __next and __prev fields with __list.
2517         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h
2518         (__pthread_list_t, __pthread_slist_t): New typedefs.
2519         (pthread_mutex_t): Replace __next and __prev fields with __list.
2520         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h
2521         (__pthread_slist_t): New typedef.
2522         (pthread_mutex_t): Replace __next field with __list.
2524 2006-02-15  Ulrich Drepper  <drepper@redhat.com>
2526         * pthreadP.h: Define PTHREAD_MUTEX_INCONSISTENT instead of
2527         PTHREAD_MUTEX_OWNERDEAD.
2528         (PTHREAD_MUTEX_ROBUST_PRIVATE_NP): Define as 16, not 256.
2529         Define FUTEX_WAITERS, FUTEX_OWNER_DIED, FUTEX_TID_MASK.
2530         * Makefile (libpthread-routines): Add lowlevelrobustlock.
2531         * pthread_create.c (start_thread): Very much simplify robust_list loop.
2532         * pthread_mutex_consistent.c: Inconsistent mutex have __owner now set
2533         to PTHREAD_MUTEX_INCONSISTENT.
2534         * pthread_mutex_destroy.c: Allow destroying of inconsistent mutexes.
2535         * pthread_mutex_lock.c: Reimplement robust mutex handling.
2536         * pthread_mutex_trylock.c: Likewise.
2537         * pthread_mutex_timedlock.c: Likewise.
2538         * pthread_mutex_unlock.c: Likewise.
2539         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
2540         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
2541         lowlevelrobustlock.sym.
2542         * sysdeps/unix/sysv/linux/lowlevelrobustlock.sym: New file.
2543         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add lll_robust_mutex_*
2544         definitions.
2545         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2546         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrobustlock.S: New file.
2547         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrobustlock.S: New file.
2548         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrobustlock.S: New file.
2549         * sysdeps/unix/sysv/linux/x86_64/lowlevelrobustlock.S: New file.
2551 2006-02-12  Ulrich Drepper  <drepper@redhat.com>
2553         * allocatestack.c (allocate_stack): Initialize robust_list.
2554         * init.c (__pthread_initialize_minimal_internal): Likewise.
2555         * descr.h (struct xid_command): Pretty printing.
2556         (struct pthread): Use __pthread_list_t or __pthread_slist_t for
2557         robust_list.  Adjust macros.
2558         * pthread_create.c (start_thread): Adjust robust_list handling.
2559         * phtread_mutex_unlock.c: Don't allow unlocking from any thread
2560         but the owner for all robust mutex types.
2561         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
2562         __pthread_list_t and __pthread_slist_t.  Use them in pthread_mutex_t.
2563         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2564         * sysdeps/pthread/pthread.h: Adjust mutex initializers.
2566         * sysdeps/unix/sysv/linux/i386/not-cancel.h: Define openat_not_cancel,
2567         openat_not_cancel_3, openat64_not_cancel, and openat64_not_cancel_3.
2569 2006-02-08  Jakub Jelinek  <jakub@redhat.com>
2571         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait,
2572         lll_futex_timedwait, lll_wait_tid): Add "memory" clobber.
2574 2006-01-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2576         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_futex_wait):
2577         Return status.
2578         (lll_futex_timed_wait): Define.
2580 2006-01-19  Ulrich Drepper  <drepper@redhat.com>
2582         * tst-cancel4.c: Test ppoll.
2584 2006-01-18  Andreas Jaeger  <aj@suse.de>
2586         [BZ #2167]
2587         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h
2588         (pthread_mutex_t): Follow changes for other archs.  Based on patch
2589         by Jim Gifford <patches@jg555.com>.
2591 2006-01-13  Richard Henderson  <rth@redhat.com>
2593         * sysdeps/alpha/tls.h (tcbhead_t): Rename member to __private.
2595 2006-01-10  Roland McGrath  <roland@redhat.com>
2597         * sysdeps/alpha/jmpbuf-unwind.h: File moved to main source tree.
2598         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2599         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2600         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2601         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2602         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2603         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2604         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2605         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
2606         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2608 2006-01-09  Roland McGrath  <roland@redhat.com>
2610         * tst-initializers1-c89.c: New file.
2611         * tst-initializers1-c99.c: New file.
2612         * tst-initializers1-gnu89.c: New file.
2613         * tst-initializers1-gnu99.c: New file.
2614         * Makefile (tests): Add them.
2615         (CFLAGS-tst-initializers1-c89.c): New variable.
2616         (CFLAGS-tst-initializers1-c99.c): New variable.
2617         (CFLAGS-tst-initializers1-gnu89.c): New variable.
2618         (CFLAGS-tst-initializers1-gnu99.c): New variable.
2620         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2621         Use __extension__ on anonymous union definition.
2622         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2623         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
2624         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2625         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2626         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2628 2006-01-08  Jakub Jelinek  <jakub@redhat.com>
2630         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
2631         Don't give the union a name because it changes the mangled name.
2632         Instead name the struct for __data.
2633         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_mutex_t):
2634         Likewise.
2635         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_mutex_t):
2636         Likewise.
2638 2006-01-09  Jakub Jelinek  <jakub@redhat.com>
2640         * sysdeps/sparc/sparc64/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Add
2641         stack bias to mc_ftp field.
2643 2006-01-07  Ulrich Drepper  <drepper@redhat.com>
2645         * sysdeps/pthread/aio_misc.h (AIO_MISC_WAIT): Work around gcc
2646         being too clever and reloading the futex value where it shouldn't.
2648 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2650         * descr.h [!__PTHREAD_MUTEX_HAVE_PREV] (DEQUEUE_MUTEX): Use
2651         correct type.
2653 2006-01-06  Jakub Jelinek  <jakub@redhat.com>
2655         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
2656         Add cfi directives.
2658 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
2660         * sysdeps/ia64/tls.h (tcbhead_t): Rename private member to __private.
2661         * sysdeps/ia64/tcb-offsets.sym: Adjust for private->__private
2662         rename in tcbhead_t.
2664         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
2665         Don't give the union a name because it changes the mangled name.
2666         Instead name the struct for __data.
2667         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2668         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2669         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2670         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
2671         * pthread_create.c (start_thread): Adjust robust mutex free loop.
2672         * descr.h (ENQUEUE_MUTEX, DEQUEUE_MUTEX): Adjust.
2674 2006-01-05  Ulrich Drepper  <drepper@redhat.com>
2676         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
2677         Return status.
2678         (lll_futex_timed_wait): Define.
2679         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
2680         * sysdeps/pthread/aio_misc.h: New file.
2682 2006-01-03  Joseph S. Myers  <joseph@codesourcery.com>
2684         * Makefile ($(objpfx)$(multidir)): Use mkdir -p.
2686 2006-01-03  Steven Munroe  <sjmunroe@us.ibm.com>
2688         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
2689         (PSEUDO): Remove redundant cfi_startproc and cfi_endproc directives.
2690         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
2692 2006-01-04  Ulrich Drepper  <drepper@redhat.com>
2694         * tst-cancel24.cc: Use C headers instead of C++ headers.
2696 2006-01-03  Jakub Jelinek  <jakub@redhat.com>
2698         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Remove #error for
2699         sparc-linux configured glibc.
2700         (lll_futex_wake_unlock): Define to 1 for sparc-linux configured glibc.
2701         (__lll_mutex_trylock, __lll_mutex_cond_trylock, __lll_mutex_lock,
2702         __lll_mutex_cond_lock, __lll_mutex_timedlock): Use
2703         atomic_compare_and_exchange_val_24_acq instead of
2704         atomic_compare_and_exchange_val_acq.
2705         (lll_mutex_unlock, lll_mutex_unlock_force): Use atomic_exchange_24_rel
2706         instead of atomic_exchange_rel.
2707         * sysdeps/unix/sysv/linux/sparc/sparc32/lowlevellock.c: New file.
2708         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_init.c: New
2709         file.
2710         * sysdeps/unix/sysv/linux/sparc/sparc32/pthread_barrier_wait.c: New
2711         file.
2712         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_init.c: New file.
2713         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_post.c: New file.
2714         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_timedwait.c: New file.
2715         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_trywait.c: New file.
2716         * sysdeps/unix/sysv/linux/sparc/sparc32/sem_wait.c: New file.
2717         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_init.c:
2718         New file.
2719         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/pthread_barrier_wait.c:
2720         New file.
2721         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_init.c: New file.
2722         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_post.c: New file.
2723         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_timedwait.c: New
2724         file.
2725         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_trywait.c: New
2726         file.
2727         * sysdeps/unix/sysv/linux/sparc/sparc32/sparcv9/sem_wait.c: New file.
2729 2006-01-03  Ulrich Drepper  <drepper@redhat.com>
2731         * sysdeps/pthread/pthread.h [__WORDSIZE==64]: Don't use cast in
2732         mutex initializers.
2734 2006-01-02  Jakub Jelinek  <jakub@redhat.com>
2736         * sysdeps/sparc/tls.h (tcbhead_t): Add pointer_guard field.
2737         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2738         THREAD_COPY_POINTER_GUARD): Define.
2739         * sysdeps/sparc/tcb-offsets.sym (POINTER_GUARD): Define.
2740         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Revert 2005-12-27 changes.
2742 2006-01-01  Ulrich Drepper  <drepper@redhat.com>
2744         * version.c: Update copyright year.
2746 2005-12-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2748         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Remove explicit
2749         .eh_frame section, use cfi_* directives.
2750         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Add cfi instrumentation.
2752 2005-12-30  Ulrich Drepper  <drepper@redhat.com>
2754         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Undo last change for
2755         now.
2757 2005-12-29  Ulrich Drepper  <drepper@redhat.com>
2759         * sysdeps/pthread/sigaction.c: Removed.
2760         * sigaction.c: New file.
2761         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-sigaction.c.
2763 2005-12-28  Ulrich Drepper  <drepper@redhat.com>
2765         * Makefile (tests): Add tst-signal7.
2766         * tst-signal7.c: New file.
2768 2005-12-27  Roland McGrath  <roland@redhat.com>
2770         * sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function.
2771         (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison.
2772         * sysdeps/alpha/jmpbuf-unwind.h: Likewise.
2773         * sysdeps/i386/jmpbuf-unwind.h: Likewise.
2774         * sysdeps/mips/jmpbuf-unwind.h: Likewise.
2775         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
2776         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
2777         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
2778         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
2779         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise.
2780         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
2782 2005-12-27  Jakub Jelinek  <jakub@redhat.com>
2784         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Add __next
2785         and __prev field to pthread_mutex_t.
2786         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
2787         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
2788         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
2789         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
2790         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Add __next field
2791         to pthread_mutex_t.
2793 2005-12-26  Ulrich Drepper  <drepper@redhat.com>
2795         * pthreadP.h: Define PTHREAD_MUTEX_ROBUST_PRIVATE_NP,
2796         PTHREAD_MUTEX_ROBUST_PRIVATE_RECURSIVE_NP,
2797         PTHREAD_MUTEX_ROBUST_PRIVATE_ERRORCHECK_NP,
2798         PTHREAD_MUTEX_ROBUST_PRIVATE_ADAPTIVE_NP,
2799         PTHREAD_MUTEXATTR_FLAG_ROBUST, PTHREAD_MUTEXATTR_FLAG_PSHARED,
2800         and PTHREAD_MUTEXATTR_FLAG_BITS.
2801         * descr.h (struct pthread): Add robust_list field and define
2802         ENQUEUE_MUTEX and DEQUEUE_MUTEX macros.
2803         * pthread_mutexattr_getrobust.c: New file.
2804         * pthread_mutexattr_setrobust.c: New file.
2805         * pthread_mutex_consistent.c: New file.
2806         * sysdeps/pthread/pthread.h: Declare pthread_mutexattr_getrobust,
2807         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2808         Define PTHREAD_MUTEX_STALLED_NP and PTHREAD_MUTEX_ROBUST_NP.
2809         Adjust pthread_mutex_t initializers.
2810         * nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Add __next
2811         field to pthread_mutex_t.
2812         * nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Add __next
2813         and __prev field to pthread_mutex_t.
2814         * Versions [GLIBC_2.4]: Export pthread_mutexattr_getrobust_np,
2815         pthread_mutexattr_setrobust_np, and pthread_mutex_consistent_np.
2816         * pthread_mutexattr_getpshared.c: Use PTHREAD_MUTEXATTR_FLAG_PSHARED
2817         and PTHREAD_MUTEXATTR_FLAG_BITS macros instead of magic numbers.
2818         * pthread_mutexattr_gettype.c: Likewise.
2819         * pthread_mutexattr_setpshared.c: Likewise.
2820         * pthread_mutexattr_settype.c: Likewise.
2821         * pthread_mutex_init.c: Reject robust+pshared attribute for now.
2822         Initialize mutex kind according to robust flag.
2823         * pthread_mutex_lock.c: Implement local robust mutex.
2824         * pthread_mutex_timedlock.c: Likewise.
2825         * pthread_mutex_trylock.c: Likewise.
2826         * pthread_mutex_unlock.c: Likewise.
2827         * pthread_create.c (start_thread): Mark robust mutexes which remained
2828         locked as dead.
2829         * tst-robust1.c: New file.
2830         * tst-robust2.c: New file.
2831         * tst-robust3.c: New file.
2832         * tst-robust4.c: New file.
2833         * tst-robust5.c: New file.
2834         * tst-robust6.c: New file.
2835         * tst-robust7.c: New file.
2836         * Makefile (libpthread-routines): Add pthread_mutexattr_getrobust,
2837         pthread_mutexattr_setrobust, and pthread_mutex_consistent.
2838         (tests): Add tst-robust1, tst-robust2, tst-robust3, tst-robust4,
2839         tst-robust5, tst-robust6, and tst-robust7.
2841         * tst-typesizes.c: New file.
2842         * Makefile (tests): Add tst-typesizes.
2844         * tst-once3.c: More debug output.
2846 2005-12-24  Ulrich Drepper  <drepper@redhat.com>
2848         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Add break
2849         missing after last change.
2851         * version.c: Update copyright year.
2853 2005-12-23  Ulrich Drepper  <drepper@redhat.com>
2855         * pthread_mutex_destroy.c: Set mutex type to an invalid value.
2856         * pthread_mutex_lock.c: Return EINVAL for invalid mutex type.
2857         * pthread_mutex_trylock.c: Likewise.
2858         * pthread_mutex_timedlock.c: Likewise.
2859         * pthread_mutex_unlock.c: Likewise.
2861 2005-12-22  Roland McGrath  <roland@redhat.com>
2863         * sysdeps/pthread/sigaction.c: Use "" instead of <> to include self,
2864         so that #include_next's search location is not reset to the -I..
2865         directory where <nptl/...> can be found.
2867 2005-12-22  Ulrich Drepper  <drepper@redhat.com>
2869         [BZ #1913]
2870         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
2871         Fix unwind info.  Remove useless branch prediction prefix.
2872         * tst-cancel24.cc: New file.
2873         * Makefile: Add rules to build and run tst-cancel24.
2875 2005-12-21  Roland McGrath  <roland@redhat.com>
2877         * libc-cancellation.c: Use <> rather than "" #includes.
2878         * pt-cleanup.c: Likewise.
2879         * pthread_create.c: Likewise.
2880         * pthread_join.c: Likewise.
2881         * pthread_timedjoin.c: Likewise.
2882         * pthread_tryjoin.c: Likewise.
2883         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Likewise.
2884         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
2885         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
2886         * unwind.c: Likewise.
2888 2005-12-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
2890         * sysdeps/sh/tcb-offsets.sym: Add POINTER_GUARD.
2891         * sysdeps/sh/tls.h (tcbhead_t): Remove private and add pointer_guard.
2892         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2893         THREAD_COPY_POINTER_GUARD): Define.
2895 2005-12-19  Jakub Jelinek  <jakub@redhat.com>
2897         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): Make room for 2 uintptr_t's
2898         rather than one.
2899         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2900         THREAD_COPY_POINTER_GUARD): Define.
2901         * sysdeps/powerpc/tcb-offsets.sym (POINTER_GUARD): Add.
2902         * sysdeps/powerpc/tls.h (tcbhead_t): Add pointer_guard field.
2903         (THREAD_GET_POINTER_GUARD, THREAD_SET_POINTER_GUARD,
2904         THREAD_COPY_POINTER_GUARD): Define.
2905         * sysdeps/s390/tcb-offsets.sym (STACK_GUARD): Add.
2906         * sysdeps/s390/tls.h (THREAD_GET_POINTER_GUARD,
2907         THREAD_SET_POINTER_GUARD, THREAD_COPY_POINTER_GUARD): Define.
2908         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S (__ia64_longjmp):
2909         Use PTR_DEMANGLE for B0 if defined.
2911 2005-12-17  Ulrich Drepper  <drepper@redhat.com>
2913         * pthread_create.c (__pthread_create_2_1): Use
2914         THREAD_COPY_POINTER_GUARD if available.
2915         * sysdeps/i386/tcb-offsets.sym: Add POINTER_GUARD.
2916         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
2917         * sysdeps/i386/tls.h (tcbhead_t): Add pointer_guard.
2918         Define THREAD_SET_POINTER_GUARD and THREAD_COPY_POINTER_GUARD.
2919         * sysdeps/x86_64/tls.h: Likewise.
2921 2005-12-15  Roland McGrath  <roland@redhat.com>
2923         * sysdeps/unix/sysv/linux/mq_notify.c: Don't use sysdeps/generic.
2925 2005-12-13  Ulrich Drepper  <drepper@redhat.com>
2927         * sysdeps/pthread/sigfillset.c: Adjust for files moved out of
2928         sysdeps/generic.
2929         * errno-loc.c: New file.
2931 2005-12-12  Roland McGrath  <roland@redhat.com>
2933         * init.c (__pthread_initialize_minimal_internal): Do __static_tls_size
2934         adjustments before choosing stack size.  Update minimum stack size
2935         calculation to match allocate_stack change.
2937 2005-12-12  Ulrich Drepper  <drepper@redhat.com>
2939         * allocatestack.c (allocate_stack): Don't demand that there is an
2940         additional full page available on the stack beside guard, TLS, the
2941         minimum stack.
2943 2005-11-24  Ulrich Drepper  <drepper@redhat.com>
2945         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2946         (__cleanup_fct_attribute): Use __regparm__ not regparm.
2948         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: When
2949         compiling 32-bit code we must define __cleanup_fct_attribute.
2951 005-11-24  Jakub Jelinek  <jakub@redhat.com>
2953         [BZ #1920]
2954         * sysdeps/pthread/pthread.h (__pthread_unwind_next): Use
2955         __attribute__ instead of __attribute.
2956         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
2957         (__cleanup_fct_attribute): Likewise.
2959 2005-11-17  Jakub Jelinek  <jakub@redhat.com>
2961         * sysdeps/pthread/unwind-forcedunwind.c (pthread_cancel_init): Put
2962         a write barrier before writing libgcc_s_getcfa.
2964 2005-11-06  Ulrich Drepper  <drepper@redhat.com>
2966         * sysdeps/unix/sysv/linux/configure: Removed.
2968 2005-11-05  Ulrich Drepper  <drepper@redhat.com>
2970         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Remove trace of
2971         optional init_array/fini_array support.
2973 2005-10-24  Roland McGrath  <roland@redhat.com>
2975         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Remove unnecessary
2976         versioned_symbol use.
2978 2005-10-16  Roland McGrath  <roland@redhat.com>
2980         * init.c (__pthread_initialize_minimal_internal): Even when using a
2981         compile-time default stack size, apply the minimum that allocate_stack
2982         will require, and round up to page size.
2984 2005-10-10  Daniel Jacobowitz  <dan@codesourcery.com>
2986         * Makefile ($(test-modules)): Remove static pattern rule.
2988 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
2989             Ulrich Drepper  <drepper@redhat.com>
2991         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix stack
2992         alignment in callback function.
2993         * Makefile: Add rules to build and run tst-align3.
2994         * tst-align3.c: New file.
2996 2005-10-03  Jakub Jelinek  <jakub@redhat.com>
2998         * allocatestack.c (setxid_signal_thread): Add
2999         INTERNAL_SYSCALL_DECL (err).
3001 2005-10-02  Jakub Jelinek  <jakub@redhat.com>
3003         * allocatestack.c (setxid_signal_thread): Need to use
3004         atomic_compare_and_exchange_bool_acq.
3006 2005-10-01  Ulrich Drepper  <drepper@redhat.com>
3007             Jakub Jelinek  <jakub@redhat.com>
3009         * descr.h: Define SETXID_BIT and SETXID_BITMASK.  Adjust
3010         CANCEL_RESTMASK.
3011         (struct pthread): Move specific_used field to avoid padding.
3012         Add setxid_futex field.
3013         * init.c (sighandler_setxid): Reset setxid flag and release the
3014         setxid futex.
3015         * allocatestack.c (setxid_signal_thread): New function.  Broken
3016         out of the bodies of the two loops in __nptl_setxid.  For undetached
3017         threads check whether they are exiting and if yes, don't send a signal.
3018         (__nptl_setxid): Simplify loops by using setxid_signal_thread.
3019         * pthread_create.c (start_thread): For undetached threads, check
3020         whether setxid bit is set.  If yes, wait until signal has been
3021         processed.
3023         * allocatestack.c (STACK_VARIABLES): Initialize them.
3024         * pthread_create.c (__pthread_create_2_1): Initialize pd.
3026 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3028         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3029         waiters, awake all waiters on the associated mutex.
3031 2005-09-22  Roland McGrath  <roland@redhat.com>
3033         * perf.c [__x86_64__] (HP_TIMING_NOW): New macro (copied from
3034         ../sysdeps/x86_64/hp-timing.h).
3036 2005-08-29  Jakub Jelinek  <jakub@redhat.com>
3038         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_WAKE_OP,
3039         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3040         (lll_futex_wake_unlock): Define.
3041         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_WAKE_OP,
3042         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3043         (lll_futex_wake_unlock): Define.
3044         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_WAKE_OP,
3045         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3046         (lll_futex_wake_unlock): Define.
3047         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_WAKE_OP,
3048         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3049         (lll_futex_wake_unlock): Define.
3050         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_WAKE_OP,
3051         FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3052         (lll_futex_wake_unlock): Define.
3053         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal): Use
3054         lll_futex_wake_unlock.
3055         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
3056         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3057         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3058         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
3059         (FUTEX_WAKE_OP, FUTEX_OP_CLEAR_WAKE_IF_GT_ONE): Define.
3060         (__pthread_cond_signal): Use FUTEX_WAKE_OP.
3062 2005-09-05  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3064         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
3065         Fix typo in register name.
3067 2005-08-23  Ulrich Drepper  <drepper@redhat.com>
3069         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
3070         Use __sigfillset.  Document that sigfillset does the right thing wrt
3071         to SIGSETXID.
3073 2005-08-08  Jakub Jelinek  <jakub@redhat.com>
3075         * tst-stackguard1.c (do_test): Likewise.
3077 2005-07-29  Jakub Jelinek  <jakub@redhat.com>
3079         * tst-stackguard1.c (do_test): Don't fail if the poor man's
3080         randomization doesn't work well enough.
3082 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3084         [BZ #1102]
3085         * sysdeps/pthread/pthread.h (PTHREAD_MUTEX_INITIALIZER,
3086         PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
3087         PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP,
3088         PTHREAD_MUTEX_ADAPTIVE_NP, PTHREAD_RWLOCK_INITIALIZER,
3089         PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP,
3090         PTHREAD_COND_INITIALIZER): Supply zeros for all fields
3091         in the structure.
3092         * Makefile (tests): Add tst-initializers1.
3093         (CFLAGS-tst-initializers1.c): Set.
3094         * tst-initializers1.c: New test.
3096 2005-07-11  Jakub Jelinek  <jakub@redhat.com>
3098         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_rwlock_t):
3099         Make sure __flags are located at offset 48 from the start of the
3100         structure.
3102 2005-07-02  Roland McGrath  <roland@redhat.com>
3104         * Makeconfig: Comment fix.
3106 2005-07-05  Jakub Jelinek  <jakub@redhat.com>
3108         * descr.h (PTHREAD_STRUCT_END_PADDING): Define.
3109         * sysdeps/ia64/tls.h (TLS_PRE_TCB_SIZE): If PTHREAD_STRUCT_END_PADDING
3110         is smaller than 8 bytes, increase TLS_PRE_TCB_SIZE by 16 bytes.
3111         (THREAD_SYSINFO, THREAD_SELF, DB_THREAD_SELF): Don't assume
3112         TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3113         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3114         * sysdeps/ia64/tcb-offsets.sym (PID, TID, MULTIPLE_THREADS_OFFSET):
3115         Use TLS_PRE_TCB_SIZE instead of sizeof (struct pthread).
3116         * sysdeps/unix/sysv/linux/ia64/createthread.c (TLS_VALUE): Don't
3117         assume TLS_PRE_TCB_SIZE is sizeof (struct pthread).
3119 2005-06-25  Jakub Jelinek  <jakub@redhat.com>
3121         * sysdeps/i386/tls.h (tcbhead_t): Add stack_guard field.
3122         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3123         * sysdeps/x86_64/tls.h (tcbhead_t): Add sysinfo and stack_guard
3124         fields.
3125         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3126         * sysdeps/s390/tls.h (tcbhead_t): Add stack_guard
3127         field.  Put in sysinfo field unconditionally.
3128         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3129         * sysdeps/powerpc/tls.h (tcbhead_t): Add stack_guard field.
3130         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3131         * sysdeps/sparc/tls.h (tcbhead_t): Add sysinfo and stack_guard
3132         fields.
3133         (THREAD_SET_STACK_GUARD, THREAD_COPY_STACK_GUARD): Define.
3134         * pthread_create.c (__pthread_create_2_1): Use
3135         THREAD_COPY_STACK_GUARD macro.
3136         * Makefile: Add rules to build and run tst-stackguard1{,-static}
3137         tests.
3138         * tst-stackguard1.c: New file.
3139         * tst-stackguard1-static.c: New file.
3141 2005-06-14  Alan Modra  <amodra@bigpond.net.au>
3143         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
3144         Invoke CGOTSETUP and CGOTRESTORE.
3145         (CGOTSETUP, CGOTRESTORE): Define.
3147 2005-05-29  Richard Henderson  <rth@redhat.com>
3149         * tst-cancel4.c (WRITE_BUFFER_SIZE): New.
3150         (tf_write, tf_writev): Use it.
3151         (do_test): Use socketpair instead of pipe.  Set SO_SNDBUF to
3152         the system minimum.
3154 2005-05-23  Jakub Jelinek  <jakub@redhat.com>
3156         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
3157         [IS_IN_librt] (CENABLE, CDISABLE): Use JUMPTARGET instead of
3158         __librt_*_asynccancel@local.
3160 2005-05-17  Alan Modra  <amodra@bigpond.net.au>
3162         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Delete
3163         all occurrences of JUMPTARGET.  Instead append @local to labels.
3165 2005-05-20  Jakub Jelinek  <jakub@redhat.com>
3167         * sysdeps/i386/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN): Define to
3168         size/alignment of struct pthread rather than tcbhead_t.
3169         * sysdeps/x86_64/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3170         Likewise.
3171         * sysdeps/s390/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3172         Likewise.
3173         * sysdeps/sparc/tls.h (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN):
3174         Likewise.
3176 2005-05-19  Richard Henderson  <rth@redhat.com>
3178         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use
3179         __sync_val_compare_and_swap, not explicit _si variant.
3180         * sysdeps/ia64/pthread_spin_trylock.c (pthread_spin_trylock): Likewise.
3182 2005-05-03  Ulrich Drepper  <drepper@redhat.com>
3184         [BZ #915]
3185         * sysdeps/pthread/pthread.h: Avoid empty initializers.
3187 2005-05-03  Jakub Jelinek  <jakub@redhat.com>
3189         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Remove explicit
3190         .eh_frame section, use cfi_* directives.
3192 2005-04-27  Jakub Jelinek  <jakub@redhat.com>
3194         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: Use <> instead
3195         of "" includes.
3197 2005-04-27  Ulrich Drepper  <drepper@redhat.com>
3199         [BZ #1075]
3200         * tst-cancel17.c (do_test): Add arbitrary factor to make sure
3201         aio_write blocks.
3203 2005-04-27  Roland McGrath  <roland@redhat.com>
3205         * Makefile (tests): Remove tst-clock2.
3207         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Handle
3208         CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
3209         translating to the kernel clockid_t for our own process/thread clock.
3211         * sysdeps/unix/sysv/linux/pthread_getcpuclockid.c: New file.
3213 2005-04-15  Jakub Jelinek  <jakub@redhat.com>
3215         * old_pthread_cond_init.c: Include <errno.h>.
3216         (__pthread_cond_init_2_0): Fail with EINVAL if COND_ATTR is
3217         process shared or uses clock other than CLOCK_REALTIME.
3218         * pthread_cond_init.c (__pthread_cond_init): Remove bogus comment.
3220 2005-04-13  David S. Miller  <davem@davemloft.net>
3222         * sysdeps/sparc/sparc64/jmpbuf-unwind.h: New file.
3223         * sysdeps/sparc/sparc64/clone.S: New file.
3225 2005-04-05  Jakub Jelinek  <jakub@redhat.com>
3227         [BZ #1102]
3228         * sysdeps/pthread/pthread.h (__pthread_cleanup_routine): Use
3229         __inline instead of inline.
3230         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_routine): Likewise.
3232 2005-03-31  Jakub Jelinek  <jakub@redhat.com>
3234         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Use
3235         functionally equivalent, but shorter instructions.
3236         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
3237         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3238         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
3239         Likewise.
3240         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise.
3241         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
3242         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
3243         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
3244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3245         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
3246         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
3247         Likewise.
3248         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
3249         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
3250         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3251         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
3252         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
3254 2005-03-28  Daniel Jacobowitz  <dan@codesourcery.com>
3256         * sysdeps/mips/Makefile: New file.
3257         * sysdeps/mips/nptl-sysdep.S: New file.
3258         * sysdeps/mips/tcb-offsets.sym: New file.
3259         * sysdeps/mips/pthread_spin_lock.S: New file.
3260         * sysdeps/mips/pthread_spin_trylock.S: New file.
3261         * sysdeps/mips/pthreaddef.h: New file.
3262         * sysdeps/mips/tls.h: New file.
3263         * sysdeps/mips/jmpbuf-unwind.h: New file.
3264         * sysdeps/unix/sysv/linux/mips/lowlevellock.h: New file.
3265         * sysdeps/unix/sysv/linux/mips/bits/pthreadtypes.h: New file.
3266         * sysdeps/unix/sysv/linux/mips/bits/semaphore.h: New file.
3267         * sysdeps/unix/sysv/linux/mips/pthread_once.c: New file.
3268         * sysdeps/unix/sysv/linux/mips/fork.c: New file.
3269         * sysdeps/unix/sysv/linux/mips/pt-vfork.S: New file.
3270         * sysdeps/unix/sysv/linux/mips/vfork.S: New file.
3271         * sysdeps/unix/sysv/linux/mips/clone.S: New file.
3272         * sysdeps/unix/sysv/linux/mips/createthread.c: New file.
3273         * sysdeps/unix/sysv/linux/mips/sysdep-cancel.h: New file.
3275 2005-03-23  Ulrich Drepper  <drepper@redhat.com>
3277         [BZ #1112]
3278         * pthread_create.c (__pthread_create_2_1): Rename syscall error
3279         variable to scerr.
3281 2005-03-10  Jakub Jelinek  <jakub@redhat.com>
3283         * tst-getpid1.c (do_test): Align stack passed to clone{2,}.
3285 2005-02-25  Roland McGrath  <roland@redhat.com>
3287         * alloca_cutoff.c: Correct license text.
3288         * tst-unload.c: Likewise.
3289         * sysdeps/pthread/allocalim.h: Likewise.
3290         * sysdeps/pthread/pt-initfini.c: Likewise.
3291         * sysdeps/pthread/bits/libc-lock.h: Likewise.
3292         * sysdeps/pthread/bits/sigthread.h: Likewise.
3293         * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise.
3294         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
3296 2005-02-16  Roland McGrath  <roland@redhat.com>
3298         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
3299         Use unsigned int * for ptr_nthreads.
3301 2005-02-14  Alan Modra  <amodra@bigpond.net.au>
3303         [BZ #721]
3304         * sysdeps/powerpc/tcb-offsets.sym (thread_offsetof): Redefine to suit
3305         gcc4.
3307 2005-02-07  Richard Henderson  <rth@redhat.com>
3309         [BZ #787]
3310         * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first
3311         argument.
3313 2004-11-03  Marcus Brinkmann  <marcus@gnu.org>
3315         * sysdeps/generic/lowlevellock.h (__generic_mutex_unlock): Fix
3316         order of arguments in invocation of atomic_add_zero.
3318 2005-01-26  Jakub Jelinek  <jakub@redhat.com>
3320         [BZ #737]
3321         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait):
3322         Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS,
3323         at least gotntpoff relocation and addition.
3324         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
3325         Likewise.
3326         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
3327         Likewise.
3328         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
3329         Likewise.
3331 2005-01-06  Ulrich Drepper  <drepper@redhat.com>
3333         * allocatestack.c (init_one_static_tls): Adjust initialization of DTV
3334         entry for static tls deallocation fix.
3335         * sysdeps/alpha/tls.h (dtv_t): Change pointer type to be struct which
3336         also contains information whether the memory pointed to is static
3337         TLS or not.
3338         * sysdeps/i386/tls.h: Likewise.
3339         * sysdeps/ia64/tls.h: Likewise.
3340         * sysdeps/powerpc/tls.h: Likewise.
3341         * sysdeps/s390/tls.h: Likewise.
3342         * sysdeps/sh/tls.h: Likewise.
3343         * sysdeps/sparc/tls.h: Likewise.
3344         * sysdeps/x86_64/tls.h: Likewise.
3346 2004-12-27  Ulrich Drepper  <drepper@redhat.com>
3348         * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset.
3350 2004-12-21  Jakub Jelinek  <jakub@redhat.com>
3352         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of
3353         %esp.
3354         * Makefile (tests): Add tst-align2.
3355         * tst-align2.c: New test.
3356         * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add
3357         -mpreferred-stack-boundary=4.
3359 2004-12-18  Roland McGrath  <roland@redhat.com>
3361         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h:
3362         New file removed withdrawn for the moment.
3364 2004-12-17  Richard Henderson  <rth@redhat.com>
3366         * sysdeps/unix/sysv/linux/alpha/clone.S: New file.
3367         * sysdeps/alpha/tcb-offsets.sym (TID_OFFSET): New.
3369 2004-12-16  Ulrich Drepper  <drepper@redhat.com>
3371         * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: New file.
3372         Increased PTHREAD_STACK_MIN.
3374         * tst-context1.c (stacks): Use bigger stack size.
3376 2004-12-16  Jakub Jelinek  <jakub@redhat.com>
3378         * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S: New file.
3379         * sysdeps/sparc/tcb-offsets.sym: Add TID.
3381 2004-12-15  Jakub Jelinek  <jakub@redhat.com>
3383         * sysdeps/unix/sysv/linux/s390/s390-32/clone.S: New file.
3384         * sysdeps/unix/sysv/linux/s390/s390-64/clone.S: New file.
3385         * sysdeps/s390/tcb-offsets.sym (TID): Add.
3387 2004-12-15  Ulrich Drepper  <drepper@redhat.com>
3389         * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: New file.
3391 2004-12-14  Ulrich Drepper  <drepper@redhat.com>
3393         * sysdeps/powerpc/tcb-offsets.sym: Add TID.
3394         * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: New file.
3396         * tst-getpid1.c: If child crashes, report this first.  Print which
3397         signal.
3399 2004-12-09  Ulrich Drepper  <drepper@redhat.com>
3401         * init.c (__pthread_initialize_minimal_internal): Also unblock
3402         SIGSETXID.
3404 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
3406         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_CPUTIME,
3407         _POSIX_THREAD_CPUTIME): Define to 0.
3408         * sysdeps/pthread/timer_create.c (timer_create): Remove unused code
3409         handling CLOCK_PROCESS_CPUTIME_ID and CLOCK_THREAD_CPUTIME_ID.
3410         * sysdeps/pthread/timer_routines.c (__timer_signal_thread_pclk,
3411         __timer_signal_thread_tclk): Remove.
3412         (init_module): Remove their initialization.
3413         (thread_cleanup): Remove their cleanup assertions.
3414         * sysdeps/pthread/posix-timer.h (__timer_signal_thread_pclk,
3415         __timer_signal_thread_tclk): Remove.
3416         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Removed.
3417         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Removed.
3418         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Removed.
3420 2004-12-07  Jakub Jelinek  <jakub@redhat.com>
3422         * sysdeps/ia64/tcb-offsets.sym (TID): Add.
3423         * sysdeps/unix/sysv/linux/ia64/clone2.S: New file.
3425         * Makefile (tests): Add tst-getpid2.
3426         * tst-getpid1.c (TEST_CLONE_FLAGS): Define.
3427         (do_test): Use it.  Use __clone2 instead of clone on ia64.
3428         * tst-getpid2.c: New test.
3430 2004-12-07  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3432         * sysdeps/unix/sysv/linux/sh/clone.S: New file.
3434 2004-12-04  Ulrich Drepper  <drepper@redhat.com>
3436         * Makefile (tests): Add tst-getpid1.
3437         * tst-getpid1.c: New file.
3438         * sysdeps/unix/sysv/linux/i386/clone.S: New file.
3439         * sysdeps/unix/sysv/linux/x86_64/clone.S: New file.
3441 2004-12-02  Roland McGrath  <roland@redhat.com>
3443         * Makefile (libpthread-nonshared): Variable removed.
3444         ($(objpfx)libpthread_nonshared.a): Target removed.
3445         ($(inst_libdir)/libpthread_nonshared.a): Likewise.
3446         These are now handled by generic magic from
3447         libpthread-static-only-routines being set.
3449 2004-11-27  Ulrich Drepper  <drepper@redhat.com>
3451         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_PRIORITIZED_IO,
3452         _POSIX2_CHAR_TERM, _POSIX_THREAD_PRIO_INHERIT,
3453         _POSIX_THREAD_PRIO_PROTECT): Define.
3454         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3455         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3456         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3458 2004-11-26  Jakub Jelinek  <jakub@redhat.com>
3460         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_ADVISORY_INFO,
3461         _POSIX_SPORADIC_SERVER, _POSIX_THREAD_SPORADIC_SERVER, _POSIX_TRACE,
3462         _POSIX_TRACE_EVENT_FILTER, _POSIX_TRACE_INHERIT, _POSIX_TRACE_LOG,
3463         _POSIX_TYPED_MEMORY_OBJECTS, _POSIX_IPV6, _POSIX_RAW_SOCKETS): Define.
3464         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
3465         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3466         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
3468 2004-11-24  Ulrich Drepper  <drepper@redhat.com>
3470         * sysdeps/x86_64/Makefile [nptl]: Define CFLAGS-pthread_create.c.
3472         * Makefile (libpthread-routines): Add pthread_setschedprio.
3473         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setschedprio.
3474         * sysdeps/pthread/pthread.h: Declare pthread_setschedprio.
3475         * pthread_setschedprio.c: New file.
3477 2004-11-20  Jakub Jelinek  <jakub@redhat.com>
3479         * pthread_create.c (pthread_cancel): Add PTHREAD_STATIC_FN_REQUIRE.
3480         * pthread_cancel.c (pthread_create): Likewise.
3482         * Makefile (libpthread-routines): Add vars.
3483         * sysdeps/pthread/createthread.c (__pthread_multiple_threads): Remove.
3484         * init.c (__default_stacksize, __is_smp): Remove.
3485         * vars.c: New file.
3486         * pthreadP.h (__find_thread_by_id): If !SHARED, add weak_function
3487         and define a wrapper macro.
3488         (PTHREAD_STATIC_FN_REQUIRE): Define.
3489         * allocatestack.c (__find_thread_by_id): Undefine.
3490         * pthread_create (__pthread_keys): Remove.
3491         (pthread_mutex_lock, pthread_mutex_unlock, pthread_once,
3492         pthread_key_create, pthread_setspecific, pthread_getspecific): Add
3493         PTHREAD_STATIC_FN_REQUIRE.
3495 2004-11-18  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3497         * sysdeps/sh/tls.h (DB_THREAD_SELF): Set the correct bias
3498         parameter to REGISTER macro.
3500 2004-11-17  Roland McGrath  <roland@redhat.com>
3502         * sysdeps/unix/sysv/linux/timer_routines.c (__start_helper_thread):
3503         Make sure SIGCANCEL is blocked as well.
3505 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3507         * sysdeps/pthread/setxid.h: New file.
3508         * sysdeps/pthread/pthread-functions.h (HAVE_PTR__NPTL_SETXID): Remove.
3509         (struct xid_command): Add forward decl.
3510         (struct pthread_functions): Change return type of __nptl_setxid hook
3511         to int.
3512         * pthreadP.h (__nptl_setxid): Change return type to int.
3513         * allocatestack.c (__nptl_setxid): Call INTERNAL_SYSCALL_NCS in the
3514         calling thread, return its return value and set errno on failure.
3515         * descr.h (struct xid_command): Change id type to long array.
3517         * Makefile: Add rules to build and test tst-setuid1 and
3518         tst-setuid1-static.
3519         * tst-setuid1.c: New test.
3520         * tst-setuid1-static.c: New test.
3522 2004-11-10  Jakub Jelinek  <jakub@redhat.com>
3524         * Makefile (tests): Add tst-exit3.
3525         * tst-exit3.c: New test.
3527 2004-11-09  Ulrich Drepper  <drepper@redhat.com>
3529         * Makefile (tests): Add tst-exit2.
3530         * tst-exit2.c: New file.
3532 2004-11-09  Roland McGrath  <roland@redhat.com>
3534         [BZ #530]
3535         * sysdeps/pthread/createthread.c (do_clone): Increment __nptl_nthreads
3536         here, before calling clone.
3537         * pthread_create.c (start_thread): Don't do it here.
3539 2004-11-02  Jakub Jelinek  <jakub@redhat.com>
3541         * sysdeps/unix/sysv/linux/smp.h: Include <errno.h>.
3543 2004-10-29  Kaz  Kojima  <kkojima@rr.iij4u.or.jp>
3545         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
3546         Set ETIMEDOUT to errno when time is up.  Tweak to avoid
3547         assembler warning.
3549 2004-10-28  Jakub Jelinek  <jakub@redhat.com>
3551         * pthread_create.c (__pthread_create_2_1): Avoid leaking stacks
3552         if sched_priority is not between minprio and maxprio.
3554 2004-10-25  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3556         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3557         (__pthread_cond_timedwait): Use clock_gettime syscall if exists.
3559         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3560         (__lll_mutex_timedlock_wait): Fix a bad branch condition.
3562 2004-10-24  Ulrich Drepper  <drepper@redhat.com>
3564         * sysdeps/unix/sysv/linux/smp.h (is_smp_system): Use
3565         not-cancelable I/O functions.
3567 2004-10-21  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3569         * sysdeps/unix/sysv/linux/sh/lowlevellock.S
3570         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3571         make sure 2 is stored in the futex and we looked at the old value.
3572         Fix a few other problems to return the correct value.
3574 2004-10-14  Richard Henderson  <rth@redhat.com>
3576         * sysdeps/alpha/tcb-offsets.sym (thread_offsetof): Redefine to
3577         make gcc4 happy.
3579 2004-10-06  Jakub Jelinek  <jakub@redhat.com>
3581         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include pthreadP.h instead
3582         of pthread-functions.h and pthreaddef.h.
3583         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Likewise.
3585         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3586         Change __data.__nwaiters from int to unsigned int.
3588         * tst-clock2.c (do_test): Don't fail if _POSIX_THREAD_CPUTIME == 0 and
3589         sysconf (_SC_THREAD_CPUTIME) returns negative value.
3591         * allocatestack.c (__find_thread_by_id): Move attribute_hidden
3592         before return type.
3594         * sysdeps/s390/jmpbuf-unwind.h: Include bits/wordsize.h.
3595         (JMPBUF_CFA_UNWINDS_ADJ): Subtract 96 resp. 160 bytes from CFA.
3597 2004-10-06  Ulrich Drepper  <drepper@redhat.com>
3599         * tst-cancel4.c (tf_msgrcv): Check for failure in msgget.  If the
3600         test fails, remove message queue.
3601         (tf_msgsnd): Likewise.
3603 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3605         * tst-clock1.c: Change #ifdef to #if defined.
3606         * tst-clock2.c: Likewise.
3607         * tst-cond11.c: Likewise.
3609         * sysdeps/pthread/timer_create.c (timer_create): Use
3610         defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 instead of
3611         defined CLOCK_PROCESS_CPUTIME_ID #ifs and similarly for
3612         THREAD_CPUTIME.
3614 2004-10-05  Jakub Jelinek  <jakub@redhat.com>
3616         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h (_POSIX_CPUTIME,
3617         _POSIX_THREAD_CPUTIME): Define to 0.
3619 2004-10-04  Ulrich Drepper  <drepper@redhat.com>
3621         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Define _POSIX_CPUTIME
3622         and _POSIX_THREAD_CPUTIME to zero.
3623         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Likewise.
3624         * tst-barrier2.c: Fix testing for POSIX feature.
3625         * tst-clock1.c: Likewise.
3626         * tst-clock2.c: Likewise.
3627         * tst-cond11.c: Likewise.
3628         * tst-cond4.c: Likewise.
3629         * tst-cond6.c: Likewise.
3630         * tst-flock2.c: Likewise.
3631         * tst-mutex4.c: Likewise.
3632         * tst-mutex9.c: Likewise.
3633         * tst-rwlock12.c: Likewise.
3634         * tst-rwlock4.c: Likewise.
3635         * tst-signal1.c: Likewise.
3636         * tst-spin2.c: Likewise.
3637         * sysdeps/pthread/posix-timer.h: Likewise.
3638         * sysdeps/pthread/timer_create.c: Likewise.
3639         * sysdeps/pthread/timer_routines.c: Likewise.
3641 2004-10-01  Ulrich Drepper  <drepper@redhat.com>
3643         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3644         (__lll_mutex_timedlock_wait): Address futex correctly.
3646         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
3647         (__lll_mutex_timedlock_wait): If woken but cannot get the lock,
3648         make sure 2 is stored in the futex and we looked at the old value.
3649         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
3650         (__lll_mutex_timedlock_wait): Likewise.  Fix a few other problems
3651         which might very well made the code not working at all before.
3652         [BZ #417]
3654 2004-09-28  Ulrich Drepper  <drepper@redhat.com>
3656         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
3657         allow SIGSETXID to be sent.
3658         * sysdeps/pthread/sigaction.c (__sigaction): Don't allow action
3659         for SIGSETXID to be defined.
3660         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
3661         SIGSETXID cannot be blocked.
3663         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3664         Add __extension__ to long long types.
3665         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3666         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3667         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3668         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3669         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
3670         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3671         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3673 2004-09-25  Ulrich Drepper  <drepper@redhat.com>
3675         * descr.h (struct pthread): Add stopped_start field.
3676         * sysdeps/pthread/createthread.c (create_thread): Set
3677         start_stopped flag in descriptor for new thread appropriately.
3678         * pthread_create.c (start_thread): Only take lock to be stopped on
3679         startup if stopped_start flag says so.
3681 2004-09-24  Ulrich Drepper  <drepper@redhat.com>
3683         * pthread_create.c (__pthread_create_2_1): Remember whether thread
3684         is created detached and if yes, do not try to free the stack in case
3685         the thread creation failed.
3686         * sysdeps/pthread/createthread.c (do_clone): Free stack here if clone
3687         call fails.  Don't depend on INTERNAL_SYSCALL_ERRNO return zero in
3688         case there has been no error.  [BZ #405]
3690         * pthread_create.c (start_thread): Don't wait for scheduler data
3691         etc to be set at the beginning of the function.  The cancellation
3692         infrastructure must have been set up.  And enable async
3693         cancellation before potentially going to sleep.  [BZ #401]
3695 2004-09-20  Ulrich Drepper  <drepper@redhat.com>
3697         * Versions: Remove exports for pthread_set*id_np functions.
3698         * sysdeps/pthread/pthread.h: Remove pthread_set*id_np prototypes
3699         for now.
3700         * Makefile: Don't build pthread_set*id code for now.
3702 2004-09-19  Ulrich Drepper  <drepper@redhat.com>
3704         * sysdeps/unix/sysv/linux/allocrtsig.c: Allocate second signal for
3705         internal use.
3706         * allocatestack.c (__nptl_setxid): New function.
3707         * descr.h (struct xid_command): Define type.
3708         * init.c (pthread_functions): Add ptr__nptl_setxid initialization.
3709         (sighandler_setxid): New function.
3710         (__pthread_initialize_minimal): Register sighandler_setxid for
3711         SIGCANCEL.
3712         * pt-allocrtsig.c: Update comment.
3713         * pthreadP.h: Define SIGSETXID.  Declare __xidcmd variable.
3714         Declare __nptl_setxid.
3715         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_setxid.
3716         * sysdeps/pthread/pthread.h: Declare pthread_setgid_np,
3717         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3718         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3719         and pthread_setresuid_np.
3720         * pthread_setgid_np.c: New file.
3721         * pthread_setuid_np.c: New file.
3722         * pthread_setegid_np.c: New file.
3723         * pthread_seteuid_np.c: New file.
3724         * pthread_setregid_np.c: New file.
3725         * pthread_setreuid_np.c: New file.
3726         * pthread_setresgid_np.c: New file.
3727         * pthread_setresuid_np.c: New file.
3728         * Versions [libpthread, GLIBC_2.3.4]: Add pthread_setgid_np,
3729         pthread_setuid_np, pthread_setegid_np, pthread_seteuid_np,
3730         pthread_setregid_np, pthread_setreuid_np, pthread_setresgid_np,
3731         and pthread_setresuid_np.
3732         * Makefile (libpthread-routines): Add pthread_setuid, pthread_seteuid,
3733         pthread_setreuid, pthread_setresuid, pthread_setgid, pthread_setegid,
3734         pthread_setregid, and pthread_setresgid.
3736 2004-09-18  Ulrich Drepper  <drepper@redhat.com>
3738         * allocatestack.c (allocate_stack): Return EAGAIN instead of
3739         ENOMEM when out of memory.
3741 2004-09-10  Roland McGrath  <roland@redhat.com>
3743         [BZ #379]
3744         * allocatestack.c (allocate_stack): Remove [__ASSUME_CLONE_STOPPED]
3745         code, since we don't try to use the broken CLONE_STOPPED any more.
3746         * pthread_create.c (start_thread): Likewise.
3748 2004-09-15  Richard Henderson  <rth@redhat.com>
3750         * sysdeps/unix/sysv/linux/alpha/vfork.S: Use libc_hidden_def.
3752 2004-09-01  David Mosberger  <davidm@hpl.hp.com>
3754         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h
3755         (__libc_unwind_longjmp): Delete macro and declare as function.
3756         * sysdeps/unix/sysv/linux/ia64/Makefile (sysdep_routines): Mention
3757         __ia64_longjmp, sigstack_longjmp, and __sigstack_longjmp for
3758         nptl directory.
3759         * sysdeps/unix/sysv/linux/ia64/__ia64_longjmp.S: New file.
3760         * sysdeps/unix/sysv/linux/ia64/__sigstack_longjmp.c: New file.
3761         * sysdeps/unix/sysv/linux/ia64/unwind_longjmp.c: New file.
3763 2004-09-12  Ulrich Drepper  <drepper@redhat.com>
3765         * sysdeps/pthread/pthread.h: Make rwlock prototypes available also
3766         for __USE_XOPEN2K.
3767         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define rwlock
3768         types also for __USE_XOPEN2K.
3769         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
3770         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
3771         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
3772         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
3773         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
3774         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
3775         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
3776         [BZ #320]
3778 2004-09-08  Ulrich Drepper  <drepper@redhat.com>
3780         * sysdeps/pthread/pthread.h
3781         (PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP): Make safe for C++.
3782         (PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP): Likewise.
3783         (PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP): Likewise.
3784         (PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP): Likewise.
3785         [BZ #375]
3787 2004-09-07  Ulrich Drepper  <drepper@redhat.com>
3789         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Allow
3790         PSEUDO to be used with . prefix.
3792         * sysdeps/unix/sysv/linux/alpha/pthread_once.c (__pthread_once):
3793         Use atomic_increment instead of atomic_exchange_and_add.
3794         * sysdeps/unix/sysv/linux/sparc/pthread_once.c (__pthread_once):
3795         Likewise.
3796         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
3797         Likewise.
3798         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
3799         Likewise.
3801         * allocatestack.c (allocate_stack): Use atomic_increment_val
3802         instead of atomic_exchange_and_add.
3803         * sysdeps/unix/sysv/linux/sem_post.c (__new_sem_post): Likewise.
3804         * sysdeps/unix/sysv/linux/powerpc/sem_post.c (__new_sem_post):
3805         Likewise.
3806         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
3807         Likewise.
3809         * sysdeps/pthread/pthread.h (pthread_once): Remove __THROW since
3810         the initialization function might throw.
3812 2005-09-05  Richard Henderson  <rth@redhat.com>
3814         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
3815         Move definition inside libpthread, libc, librt check.  Provide
3816         definition for rtld.
3818 2004-09-02  Jakub Jelinek  <jakub@redhat.com>
3820         * pthread_cond_destroy.c (__pthread_cond_destroy): If there are
3821         waiters, awake all waiters on the associated mutex.
3823 2004-09-02  Ulrich Drepper  <drepper@redhat.com>
3825         * sysdeps/alpha/jmpbuf-unwind.h: Define __libc_unwind_longjmp.
3826         * sysdeps/i386/jmpbuf-unwind.h: Likewise
3827         * sysdeps/powerpc/jmpbuf-unwind.h: Likewise.
3828         * sysdeps/s390/jmpbuf-unwind.h: Likewise.
3829         * sysdeps/sh/jmpbuf-unwind.h: Likewise.
3830         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise.
3831         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
3832         * sysdeps/x86_64/jmpbuf-unwind.h: Likewise.
3833         * unwind.c: Use it.
3835         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
3836         Rename __data.__clock to __data.__nwaiters, make it unsigned int.
3837         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
3838         Likewise.
3839         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
3840         Decrement __nwaiters.  If pthread_cond_destroy has been called and
3841         this is the last waiter, signal pthread_cond_destroy caller and
3842         avoid using the pthread_cond_t structure after unlock.
3843         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
3844         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
3845         Read clock type from the least significant bits of __nwaiters instead
3846         of __clock.
3847         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
3848         * sysdeps/unix/sysv/linux/internaltypes.h: Define COND_CLOCK_BITS.
3850 2004-08-31  Jakub Jelinek  <jakub@redhat.com>
3852         [BZ #342]
3853         * Makefile (tests): Add tst-cond20 and tst-cond21.
3854         * tst-cond20.c: New test.
3855         * tst-cond21.c: New test.
3856         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h
3857         (pthread_cond_t): Rename __data.__clock to __data.__nwaiters, make
3858         it unsigned int.
3859         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
3860         Likewise.
3861         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
3862         (pthread_cond_t): Likewise.
3863         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
3864         Likewise.
3865         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
3866         Likewise.
3867         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
3868         Likewise.
3869         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_clock): Remove.
3870         (cond_nwaiters): New.
3871         (clock_bits): New.
3872         * pthread_cond_destroy.c (__pthread_cond_destroy): Return EBUSY
3873         if there are waiters not signalled yet.
3874         Wait until all already signalled waiters wake up.
3875         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Decrement
3876         __nwaiters.  If pthread_cond_destroy has been called and this is the
3877         last waiter, signal pthread_cond_destroy caller and avoid using
3878         the pthread_cond_t structure after unlock.
3879         (__pthread_cond_wait): Increment __nwaiters in the beginning,
3880         decrement it when leaving.  If pthread_cond_destroy has been called
3881         and this is the last waiter, signal pthread_cond_destroy caller.
3882         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
3883         Likewise.  Read clock type from the least significant bits of
3884         __nwaiters instead of __clock.
3885         * pthread_condattr_setclock.c (pthread_condattr_setclock): Check
3886         whether clock ID can be encoded in COND_CLOCK_BITS bits.
3887         * pthread_condattr_getclock.c (pthread_condattr_getclock): Decode
3888         clock type just from the last COND_CLOCK_BITS bits of value.
3889         * pthread_cond_init.c (__pthread_cond_init): Initialize __nwaiters
3890         instead of __clock, just from second bit of condattr's value.
3892 2004-08-30  Jakub Jelinek  <jakub@redhat.com>
3894         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Include
3895         bits/wordsize.h.  Make the header match i386 header when __WORDSIZE
3896         != 64.
3897         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
3899 2004-08-15  Roland McGrath  <roland@frob.com>
3901         * pthread_atfork.c: Update copyright terms including special exception
3902         for these trivial files, which are statically linked into executables
3903         that use dynamic linking for the significant library code.
3905 2004-08-09  Jakub Jelinek  <jakub@redhat.com>
3907         * DESIGN-rwlock.txt: Add decreasing of nr_readers_queued to
3908         pthread_rwlock_rdlock.
3909         * sysdeps/pthread/pthread_rwlock_rdlock (__pthread_rwlock_rdlock):
3910         Decrease __nr_readers_queued after reacquiring lock.
3911         * sysdeps/pthread/pthread_rwlock_timedrdlock
3912         (pthread_rwlock_timedrdlock): Likewise.
3913         Reported by Bob Cook <bobcook47@hotmail.com>.
3915 2004-08-11  Jakub Jelinek  <jakub@redhat.com>
3917         * tst-rwlock14.c (tf): Read main thread handle from *ARG
3918         before pthread_barrier_wait.
3920 2004-08-07  Ulrich Drepper  <drepper@redhat.com>
3922         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
3923         Remove unnecessary exception handling data.
3925 2004-07-23  Jakub Jelinek  <jakub@redhat.com>
3927         [BZ #284]
3928         * sysdeps/pthread/pthread.h (pthread_getcpuclockid): Use __clockid_t
3929         instead of clockid_t.
3931 2004-07-21  Roland McGrath  <roland@redhat.com>
3933         * Makefile ($(objpfx)multidir.mk): Use $(make-target-directory).
3935 2004-07-19  Roland McGrath  <roland@redhat.com>
3937         * tst-cancel4.c (tf_waitid): Use WEXITED flag bit if available.
3939 2004-07-02  Roland McGrath  <roland@redhat.com>
3941         * configure: Don't exit.
3943 2004-07-14  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3945         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
3946         (__pthread_cond_timedwait): Check for invalid nanosecond in
3947         timeout value.
3949 2004-07-07  Ulrich Drepper  <drepper@redhat.com>
3951         * Makefile: Add rules to build and run tst-fini1.
3952         * tst-fini1.c: New file.
3953         * tst-fini1mod.c: New file.
3955 2004-07-05  Ulrich Drepper  <drepper@redhat.com>
3957         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define NO_CANCELLATION
3958         if no cancellation support is needed.
3959         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
3960         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
3961         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
3962         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
3963         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
3964         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
3965         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
3966         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: Likewise.
3967         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: Likewise.
3969         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Define __NR_futex
3970         only if not already defined.
3972 2004-07-05  Jakub Jelinek  <jakub@redhat.com>
3974         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_unlock): Use
3975         constraint "m" instead of "0" for futex.
3977         * shlib-versions: Add powerpc64-.*-linux.*.
3979 2004-07-04  Jakub Jelinek  <jakub@redhat.com>
3981         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S
3982         (pthread_rwlock_timedrdlock): Use cmpq instead of cmpl to check
3983         for valid tv_nsec.
3984         * tst-rwlock14.c (do_test): Test for invalid tv_nsec equal to
3985         1 billion and 64-bit tv_nsec which is valid when truncated to 32
3986         bits.
3988 2004-06-29  Roland McGrath  <roland@redhat.com>
3990         * Banner: NPTL no longer has its own version number.
3991         * Makefile (nptl-version): Variable removed.
3992         * sysdeps/pthread/Makefile (CFLAGS-confstr.c): Set LIBPTHREAD_VERSION
3993         using $(version), the glibc version number.
3995 2004-06-29  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
3997         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
3998         Fix branch offset for a PLT entry.
3999         * sysdeps/unix/sysv/linux/sh/sem_post.S (__new_sem_post):
4000         Likewise.
4001         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S (sem_timedwait):
4002         Likewise.
4003         * sysdeps/unix/sysv/linux/sh/sem_trywait.S (__new_sem_trywait):
4004         Likewise.
4005         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait):
4006         Likewise.
4008 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4010         * sysdeps/alpha/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define
4011         unconditionally.
4013 2004-06-28  Jakub Jelinek  <jakub@redhat.com>
4015         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
4016         (pthread_rwlock_timedwrlock): Return EINVAL if tv_nsec is negative,
4017         instead of tv_sec.
4018         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
4019         (pthread_rwlock_timedrdlock): Likewise.
4021 2004-06-22  Jakub Jelinek  <jakub@redhat.com>
4023         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4024         Set __r7 to val, not mutex.
4026 2004-06-27  Ulrich Drepper  <drepper@redhat.com>
4028         * Makefile: Add rules to build tst-rwlock14.
4029         * tst-rwlock14.c: New file.
4031 2004-06-24  Boris Hu  <boris.hu@intel.com>
4033         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Add timeout validation
4034         check.
4035         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
4037 2004-06-19  Andreas Jaeger  <aj@suse.de>
4039         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Fix
4040         assembler in last patch.
4042 2004-06-17  Ulrich Drepper  <drepper@redhat.com>
4044         * sysdeps/pthread/pthread_cond_timedwait.c
4045         (__pthread_cond_timedwait): Also check for negativ nanoseconds.
4046         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4047         (__pthread_cond_timedwait): Check for invalid nanosecond in
4048         timeout value.
4049         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4050         * tst-cond19.c: New file.
4051         * Makefile: Add rules to build and run tst-cond19.
4053 2004-06-15  Steven Munroe  <sjmunroe@us.ibm.com>
4055         * tst-context1.c (GUARD_PATTERN): Defined.
4056         (tst_context_t): Define struct containing ucontext_t & guard words.
4057         (ctx): Declare as an array of tst_context_t.
4058         (fct): Verify uc_link & guard words are still valid.
4059         (tf): Initialize guard words in ctx.  Adjust ctx refs for new struct.
4061 2004-06-13  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4063         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4064         Add __data.__futex field, reshuffle __data.__clock.
4065         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S
4066         (__pthread_cond_signal): Increment __futex at the same time as
4067         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4068         address of low 32-bits of __wakeup_seq to futex syscall.
4069         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4070         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4071         releasing internal lock to FUTEX_WAIT.
4072         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S
4073         (__pthread_cond_timedwait): Likewise.
4074         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4075         (FUTEX_CMP_REQUEUE): Define.
4076         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4077         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4078         Pass __futex value from before the unlock and __futex address instead
4079         of address of low 32-bits of __wakeup_seq to futex syscall.
4080         Fallback to FUTEX_WAKE all on any errors.
4082 2004-06-08  Jakub Jelinek  <jakub@redhat.com>
4084         * pthread_mutexattr_getpshared.c (pthread_mutex_getpshared): Fix
4085         comment typo.
4086         * pthread_mutexattr_gettype.c (pthread_mutexattr_gettype): Likewise.
4087         * pthread_mutexattr_init.c (__pthread_mutexattr_init): Likewise.
4088         * pthread_mutexattr_settype.c (__pthread_mutexattr_settype): Likewise.
4089         * pthread_mutexattr_setpshared.c (pthread_mutexattr_setpshared):
4090         Likewise.  Reported by Bob Cook <bobcook47@hotmail.com>.
4092 2004-06-11  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4094         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_compare_and_swap):
4095         Add memory clobber to inline assembly.
4096         (__lll_mutex_trylock): Likewise.
4097         (__lll_mutex_cond_trylock): Likewise.
4099 2004-06-07  Martin Schwidefsky  <schwidefsky@de.ibm.com>
4101         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (lll_futex_requeue):
4102         Pass val argument as 6th system call argument in %r7.
4104 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4106         * Makefile (tests): Add tst-cond16.
4107         * sysdeps/unix/sysv/linux/lowlevelcond.sym (cond_futex): Add.
4108         * pthread_cond_init.c (__pthread_cond_init): Clear __data.__futex.
4109         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
4110         Add __data.__futex field, reshuffle __data.__clock.
4111         * sysdeps/unix/sysv/linux/i386/pthread_cond_signal.S
4112         (__pthread_cond_signal): Increment __futex at the same time as
4113         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4114         address of low 32-bits of __wakeup_seq to futex syscall.
4115         * sysdeps/unix/sysv/linux/i386/pthread_cond_wait.S
4116         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4117         releasing internal lock to FUTEX_WAIT.
4118         * sysdeps/unix/sysv/linux/i386/pthread_cond_timedwait.S
4119         (__pthread_cond_timedwait): Likewise.
4120         * sysdeps/unix/sysv/linux/i386/pthread_cond_broadcast.S
4121         (FUTEX_CMP_REQUEUE): Define.
4122         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4123         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4124         Pass __futex value from before the unlock and __futex address instead
4125         of address of low 32-bits of __wakeup_seq to futex syscall.
4126         Fallback to FUTEX_WAKE all on any errors.
4127         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (FUTEX_CMP_REQUEUE):
4128         Define.
4129         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4130         internally.  Return non-zero if error, zero if success.
4131         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4132         Add __data.__futex field, reshuffle __data.__clock.
4133         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_CMP_REQUEUE):
4134         Define.
4135         (lll_futex_requeue): Add val argument, return 1 unconditionally
4136         for the time being.
4137         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
4138         Add __data.__futex field, reshuffle __data.__clock.
4139         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4140         Define.
4141         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4142         internally.  Return non-zero if error, zero if success.
4143         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
4144         (pthread_cond_t): Add __data.__futex field, reshuffle __data.__clock.
4145         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h (FUTEX_CMP_REQUEUE):
4146         Define.
4147         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4148         internally.  Return non-zero if error, zero if success.
4149         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h (pthread_cond_t):
4150         Add __data.__futex field, reshuffle __data.__clock.
4151         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (FUTEX_CMP_REQUEUE):
4152         Define.
4153         (lll_futex_requeue): Add val argument, use FUTEX_CMP_REQUEUE
4154         internally.  Return non-zero if error, zero if success.
4155         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h (pthread_cond_t):
4156         Add __data.__futex field, reshuffle __data.__clock.
4157         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h (pthread_cond_t):
4158         Add __data.__futex field, reshuffle __data.__clock.
4159         * sysdeps/pthread/pthread_cond_signal.c (__pthread_cond_signal):
4160         Increment __futex at the same time as __wakeup_seq or __total_seq.
4161         Pass address of __futex instead of address of low 32-bits of
4162         __wakeup_seq to futex syscall.
4163         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4164         Pass __futex value from before releasing internal lock
4165         to FUTEX_WAIT.
4166         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4167         Likewise.  Avoid unnecessary shadowing of variables.
4168         * sysdeps/pthread/pthread_cond_broadcast.c (__pthread_cond_broadcast):
4169         Set __futex to 2 * __total_seq.  Pass __futex value from before the
4170         unlock and __futex address instead of address of low 32-bits of
4171         __wakeup_seq to futex_requeue macro, adjust for new return value
4172         meaning.
4173         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S
4174         (__pthread_cond_signal): Increment __futex at the same time as
4175         __wakeup_seq or __total_seq.  Pass address of __futex instead of
4176         address of low 32-bits of __wakeup_seq to futex syscall.
4177         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
4178         (__pthread_cond_wait): Likewise.  Pass __futex value from before
4179         releasing internal lock to FUTEX_WAIT.
4180         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4181         (__pthread_cond_timedwait): Likewise.
4182         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4183         (FUTEX_CMP_REQUEUE): Define.
4184         (__pthread_cond_broadcast): Set __futex to 2 * __total_seq.
4185         Use FUTEX_CMP_REQUEUE operation instead of FUTEX_REQUEUE.
4186         Pass __futex value from before the unlock and __futex address instead
4187         of address of low 32-bits of __wakeup_seq to futex syscall.
4188         Fallback to FUTEX_WAKE all on any errors.
4190 2004-06-03  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4192         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_mutex_lock):
4193         Add nop to align the end of critical section.
4194         (lll_mutex_cond_lock, lll_mutex_timedlock): Likewise.
4196 2004-06-01  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4198         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
4199         Add __broadcast_seq field.
4200         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Mark
4201         all waiters as woken with woken_seq and bump broadcast counter.
4202         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use new
4203         __broadcast_seq.  Increment __woken_seq correctly when cleanuped.
4204         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4205         Comment typo fixes.  Avoid returning -ETIMEDOUT.
4207 2004-06-01  Ulrich Drepper  <drepper@redhat.com>
4209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4210         (__condvar_tw_cleanup): Fix access to saved broadcast_seq value.
4211         Reported by Kaz Kojima.
4213 2004-05-25  Jakub Jelinek  <jakub@redhat.com>
4215         * sysdeps/unix/sysv/linux/aio_misc.h: New file.
4217 2004-05-21  Jakub Jelinek  <jakub@redhat.com>
4219         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Compare
4220         __broadcast_seq with bc_seq after acquiring internal lock instead of
4221         before it.
4223 2004-05-18  Jakub Jelinek  <jakub@redhat.com>
4225         * Makefile (.NOTPARALLEL): Only serialize make check/xcheck, not
4226         compilation.
4227         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4228         (__pthread_cond_timedwait): Avoid returning -ETIMEDOUT.
4229         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
4230         (pthread_cond_t): Add __data.__broadcast_seq field.
4231         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4232         (FRAME_SIZE): Define.
4233         (__pthread_cond_timedwait): Use it.  Store/check broadcast_seq.
4234         Comment typo fixes.
4235         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S (FRAME_SIZE):
4236         Define.
4237         (__pthread_cond_wait): Use it.  Store/check broadcast_seq.  Comment
4238         typo fixes.
4239         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
4240         (__pthread_cond_broadcast): Increment broadcast_seq.  Comment typo
4241         fixes.
4243 2004-05-18  Ulrich Drepper  <drepper@redhat.com>
4245         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add broadcast_seq entry.
4246         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_cond_t):
4247         Add __broadcast_seq field.
4248         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4249         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4250         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4251         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4252         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4253         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Mark
4254         all waiters as woken with woken_seq and bump broadcast counter.
4255         * sysdeps/pthread/pthread_cond_broadcast.c: Likewise.
4256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use new
4257         __broadcast_seq field.
4258         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4259         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
4260         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
4261         * pthread_cond_init.c: Initialize __broadcast_seq field.
4262         * Makefile (tests): Add tst-cond17 and tst-cond18.
4263         Add .NOTPARALLEL goal.
4264         * tst-cond16.c: New file.  From Jakub.
4265         * tst-cond17.c: New file.  From Jakub.
4266         * tst-cond18.c: New file.  From Jakub.
4268 2004-05-16  Ulrich Drepper  <drepper@redhat.com>
4270         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Correct some
4271         unwind info.
4273         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S:
4274         Parametrize frame size.  Correct some unwind info.
4275         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
4277 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4279         * tst-stack3.c: Note testing functionality beyond POSIX.
4281 2004-05-04  Jakub Jelinek  <jakub@redhat.com>
4283         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (USE___THREAD):
4284         Change conditional from ifdef to if.
4286 2004-04-23  Jakub Jelinek  <jakub@redhat.com>
4288         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SYSDEP_CANCEL_ERRNO,
4289         SYSDEP_CANCEL_ERROR): Define.
4290         (PSEUDO): Use it.
4292 2004-05-01  Jakub Jelinek  <jakub@redhat.com>
4294         * Versions (libpthread): Remove __pthread_cleanup_upto@@GLIBC_PRIVATE.
4296 2004-04-20  Jakub Jelinek  <jakub@redhat.com>
4298         * sem_unlink.c (sem_unlink): Change EPERM into EACCES.
4300 2004-04-19  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4302         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Add frame info.
4303         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4304         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Remove unneeded frame
4305         info.  Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
4307 2004-04-19  Ulrich Drepper  <drepper@redhat.com>
4309         * sysdeps/unix/sysv/linux/timer_routines.c: Make sure helper
4310         thread has all signals blocked.
4312 2004-04-18  Andreas Jaeger  <aj@suse.de>
4314         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h
4315         (SEM_VALUE_MAX): Add missing brace.
4317 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4319         * sysdeps/pthread/Makefile (tests): Add tst-mqueue8x
4320         in rt subdir.
4321         (CFLAGS-tst-mqueue8x.c): Add -fexceptions.
4322         * sysdeps/pthread/tst-mqueue8x.c: New test.
4323         * tst-cancel4.c: Update comment about message queues.
4325         * sysdeps/pthread/timer_gettime.c (timer_gettime): For expired timer
4326         return it_value { 0, 0 }.
4327         * sysdeps/pthread/timer_create.c (timer_create): Handle SIGEV_NONE
4328         like SIGEV_SIGNAL.
4329         * sysdeps/pthread/timer_routines.c (thread_expire_timer): Remove
4330         assertion for SIGEV_NONE.
4331         (thread_attr_compare): Compare all attributes, not just a partial
4332         subset.
4334 2004-04-17  Jakub Jelinek  <jakub@redhat.com>
4336         * sysdeps/unix/sysv/linux/mq_notify.c: Include stdlib.h.
4338 2004-04-17  Ulrich Drepper  <drepper@redhat.com>
4340         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h (SEM_VALUE_MAX):
4341         Just use a plain number.
4342         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h: Likewise.
4343         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: Likewise.
4344         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: Likewise.
4345         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: Likewise.
4346         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: Likewise.
4347         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: Likewise.
4348         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: Likewise.
4350 2004-04-16  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4352         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Remove unneeded
4353         frame info.
4354         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4356 2004-04-15  Jakub Jelinek  <jakub@redhat.com>
4358         * sysdeps/unix/sysv/linux/timer_routines.c: Include errno.h.
4359         (timer_helper_thread): Use inline rt_sigtimedwait syscall instead
4360         of calling sigwaitinfo.
4362 2004-04-16  Ulrich Drepper  <drepper@redhat.com>
4364         * allocatestack.c (allocate_stack): Set reported_guardsize
4365         unconditionally.
4366         * pthread_getattr_np.c (pthread_getattr_np): Use
4367         reported_guardsize instead of guardsize.
4368         * descr.h (struct pthread): Add reported_guardsize field.
4370 2004-04-13  Jakub Jelinek  <jakub@redhat.com>
4372         * sysdeps/unix/sysv/linux/mq_notify.c: Shut up GCC warning.
4374 2004-04-12  Ulrich Drepper  <drepper@redhat.com>
4376         * sysdeps/unix/sysv/linux/mq-notify.c: New file.
4378 2004-04-08  Jakub Jelinek  <jakub@redhat.com>
4380         * sysdeps/unix/sysv/linux/bits/local_lim.h (MQ_PRIO_MAX): Define.
4381         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h (MQ_PRIO_MAX): Define.
4382         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h (MQ_PRIO_MAX): Define.
4383         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h (MQ_PRIO_MAX): Define.
4384         * sysdeps/unix/sysv/linux/bits/posix_opt.h (_POSIX_MESSAGE_PASSING):
4385         Define.
4386         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h
4387         (_POSIX_MESSAGE_PASSING): Define.
4388         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h
4389         (_POSIX_MESSAGE_PASSING): Define.
4390         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h
4391         (_POSIX_MESSAGE_PASSING): Define.
4393 2004-04-04  Ulrich Drepper  <drepper@redhat.com>
4395         * tst-context1.c (fct): Check whether correct stack is used.
4397 2004-04-03  Ulrich Drepper  <drepper@redhat.com>
4399         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Never use
4400         matching constraints for asm mem parameters.
4402         * tst-clock2.c (tf): Don't define unless needed.
4404 2004-03-30  H.J. Lu  <hongjiu.lu@intel.com>
4406         * Makefile (link-libc-static): Use $(static-gnulib) instead of
4407         $(gnulib).
4409 2004-03-30  Ulrich Drepper  <drepper@redhat.com>
4411         * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd.
4412         * init.c (pthread_functions): Add ptr__nptl_deallocate_tsd.
4413         * pthreadP.h: Declare __nptl_deallocate_tsd.
4414         * pthread_create.c (deallocate_tsd): Remove to __nptl_deallocate_tsd.
4415         Adjust caller.
4417         * Makefile (tests): Add tst-tsd5.
4418         * tst-tsd5.c: New file.
4420 2004-03-29  Ulrich Drepper  <drepper@redhat.com>
4422         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4423         (__pthread_attr_setaffinity_old): Prepend GLIBC_ to version names
4424         is SHLIB_COMPAT check.
4425         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
4426         (__pthread_attr_getaffinity_old): Likewise.
4427         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4428         (__pthread_getaffinity_old): Likewise.
4429         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4430         (__pthread_setaffinity_old): Likewise.
4432 2004-03-26  Ulrich Drepper  <drepper@redhat.com>
4434         * allocatestack.c (_make_stacks_executable): Call
4435         _dl_make_stack_executable first.
4437 2004-03-24  Roland McGrath  <roland@redhat.com>
4439         * sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
4440         constraint instead of "0".
4442 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
4444         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
4445         (lll_mutex_cond_trylock): Define as wrapper around __lll_cond_trylock.
4447         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Reorganize
4448         code to avoid warning.
4450 2004-03-24  Andreas Jaeger  <aj@suse.de>
4452         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
4453         (__pthread_attr_setaffinity_old): Remove const.
4455 2004-03-23  Ulrich Drepper  <drepper@redhat.com>
4457         * sysdeps/unix/sysv/linux/smp.h: New file.
4458         * sysdeps/unix/sysv/linux/sh/smp.h: New file.
4459         * init.c: Define __is_smp.
4460         (__pthread_initialize_minimal_internal): Call is_smp_system to
4461         initialize __is_smp.
4462         * pthreadP.h: Declare __is_smp.
4463         Define MAX_ADAPTIVE_COUNT is necessary.
4464         * pthread_mutex_init.c: Add comment regarding __spins field.
4465         * pthread_mutex_lock.c: Implement adaptive mutex type.
4466         * pthread_mutex_timedlock.c: Likewise.
4467         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Likewise.
4468         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h (pthread_mutex_t):
4469         Add __spins field.
4470         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4471         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4472         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4473         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4474         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4475         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4476         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4477         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Define
4478         lll_mutex_cond_trylock.
4479         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
4480         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
4481         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
4482         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
4483         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
4484         Define BUSY_WAIT_NOP.
4485         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
4486         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
4488         * tst-mutex5.c: Add support for testing adaptive mutexes.
4489         * tst-mutex7.c: Likewise.
4490         * tst-mutex5a.c: New file.
4491         * tst-mutex7a.c: New file.
4492         * Makefile (tests): Add tst-mutex5a and tst-mutex7a.
4494         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4495         (__lll_mutex_timedlock_wait): Preserve r8 and r9 since the
4496         vgettimeofday call might destroy the content.
4498         * sysdeps/ia64/pthread_spin_lock.c (pthread_spin_lock): Use hint
4499         @pause in the loop.
4501         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4502         No need to restrict type of ret.  Make it int.  Add comment.
4504         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_mutex_trylock):
4505         Remove unnecessary setne instruction.
4507 2004-03-22  Jakub Jelinek  <jakub@redhat.com>
4509         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4510         (__pthread_getaffinity_new): Use INT_MAX instead of UINT_MAX.
4511         * pthread_getattr_np.c (pthread_getattr_np): Double size every cycle.
4512         If realloc fails, break out of the loop.
4514 2004-03-20  Andreas Jaeger  <aj@suse.de>
4516         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4517         (__pthread_setaffinity_old): Fix interface.
4518         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
4519         (__pthread_getaffinity_old): Likewise.
4521         * sysdeps/unix/sysv/linux/pthread_setaffinity.c
4522         (__pthread_setaffinity_new): Remove duplicate declaration.
4524 2004-03-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4526         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (CENABLE): Save
4527         the return value to a safe register.
4528         (CDISABLE): Set the function argument correctly.
4530 2004-03-17  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4532         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h (XCHG): Define.
4533         * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_mutex_lock_wait):
4534         Rewrite so that only one locked memory operation per round is needed.
4535         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S
4536         (pthread_barrier_wait): After wakeup, release lock only when the
4537         last thread stopped using the barrier object.
4538         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S
4539         (__pthread_cond_wait): Don't store mutex address if the current
4540         value is ~0l.  Add correct cleanup support and unwind info.
4541         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
4542         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S
4543         (__pthread_cond_broadcast): Don't use requeue for pshared condvars.
4544         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Update comment.
4545         * sysdeps/unix/sysv/linux/sh/pthread_once.S (__pthread_once):
4546         Add correct cleanup support and unwind info.
4547         * sysdeps/unix/sysv/linux/sh/sem_wait.S (__new_sem_wait): Likewise.
4548         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Add unwind
4549         information for syscall wrappers.
4551 2004-03-18  Ulrich Drepper  <drepper@redhat.com>
4553         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
4554         cpusetsize field, remove next.
4555         * sysdeps/pthread/pthread.h (pthread_getaffinity_np): Add new second
4556         parameter for size of the CPU set.
4557         (pthread_setaffinity_np): Likewise.
4558         (pthread_attr_getaffinity_np): Likewise.
4559         (pthread_attr_setaffinity_np): Likewise.
4560         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: Implement
4561         interface change, keep compatibility code.
4562         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: Likewise.
4563         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: Likewise.
4564         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: Likewise.
4565         * pthreadP.h: Remove hidden_proto for pthread_getaffinity_np.  Declare
4566         __pthread_getaffinity_np.
4567         * Versions: Add version for changed interfaces.
4568         * tst-attr3.c: Adjust test for interface change.
4569         * pthread_getattr_np.c: Query the kernel about the affinity mask with
4570         increasing buffer sizes.
4571         * pthread_attr_destroy.c: Remove unused list handling.
4572         * pthread_attr_init.c: Likewise.
4574 2004-03-17  Roland McGrath  <roland@redhat.com>
4576         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Pass missing
4577         first argument to clock_getres so we ever enable kernel timers.
4579 2004-03-15  Ulrich Weigand  <uweigand@de.ibm.com>
4581         * init.c (nptl_version): Add __attribute_used__ to nptl_version.
4583 2004-03-12  Richard Henderson  <rth@redhat.com>
4585         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: Propagate
4586         oldvalue from CENABLE to CDISABLE.
4588 2004-03-12  Ulrich Drepper  <drepper@redhat.com>
4590         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define HOST_NAME_MAX.
4591         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: Likewise.
4592         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: Likewise.
4593         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: Likewise.
4595 2004-03-11  Richard Henderson  <rth@redhat.com>
4597         * sysdeps/alpha/tcb-offsets.sym (PID_OFFSET): New.
4598         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: Save/restore PID.
4599         * sysdeps/unix/sysv/linux/alpha/vfork.S: New file.
4601 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4603         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Use jgnl
4604         instead of jnl instruction to jump to SYSCALL_ERROR_LABEL.
4605         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S (__vfork): Likewise.
4607 2004-03-11  Jakub Jelinek  <jakub@redhat.com>
4609         * forward.c (__pthread_cond_broadcast_2_0,
4610         __pthread_cond_destroy_2_0, __pthread_cond_init_2_0,
4611         __pthread_cond_signal_2_0, __pthread_cond_wait_2_0,
4612         __pthread_cond_timedwait_2_0): Use return 0 as defaction instead of 0.
4614 2004-03-11  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4616         * sysdeps/sh/tcb-offsets.sym: Add PID.
4617         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: Properly handle PID cache.
4618         * sysdeps/unix/sysv/linux/sh/vfork.S: New file.
4620 2004-03-10  Ulrich Drepper  <drepper@redhat.com>
4622         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: No need to
4623         include <sysdep-cancel.h>, vfork is no cancellation point.
4624         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise.
4625         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: Likewise.
4626         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: Likewise.
4628 2004-03-10  Jakub Jelinek  <jakub@redhat.com>
4630         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S (__vfork): Add
4631         libc_hidden_def.
4632         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S (__vfork): Likewise.
4633         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S (__vfork):
4634         Likewise.
4635         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S (__vfork):
4636         Likewise.
4637         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S (__vfork): Likewise.
4638         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S (__vfork): Likewise.
4639         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Include tcb-offsets.h.
4640         * sysdeps/unix/sysv/linux/ia64/vfork.S (__vfork): Use DO_CALL instead
4641         of DO_CALL_VIA_BREAK.  Work around a gas problem.
4643         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: Remove.
4644         * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: New file.
4645         * sysdeps/unix/sysv/linux/powerpc/powerpc32/pt-vfork.S: New file.
4646         * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: New file.
4647         * sysdeps/unix/sysv/linux/powerpc/powerpc64/pt-vfork.S: New file.
4648         * sysdeps/powerpc/tcb-offsets.sym: Add PID.
4650         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S (__vfork): Don't use
4651         a local register for saving old PID.  Negate PID in parent upon exit.
4653         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: Include
4654         tcb-offsets.h.
4655         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4656         before syscall, set to the old value in the parent afterwards.
4657         * sysdeps/unix/sysv/linux/s390/s390-32/vfork.S: New file.
4658         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: Include
4659         tcb-offsets.h.
4660         (__vfork): Negate PID if non-zero and set to INT_MIN if zero
4661         before syscall, set to the old value in the parent afterwards.
4662         * sysdeps/unix/sysv/linux/s390/s390-64/vfork.S: New file.
4663         * sysdeps/s390/tcb-offsets.sym: Add PID.
4665         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: Remove.
4666         * sysdeps/unix/sysv/linux/sparc/sparc32/vfork.S: New file.
4667         * sysdeps/unix/sysv/linux/sparc/sparc32/pt-vfork.S: New file.
4668         * sysdeps/unix/sysv/linux/sparc/sparc64/vfork.S: New file.
4669         * sysdeps/unix/sysv/linux/sparc/sparc64/pt-vfork.S: New file.
4670         * sysdeps/sparc/tcb-offsets.sym: Add PID.
4672 2004-03-10  Andreas Schwab  <schwab@suse.de>
4674         * sysdeps/ia64/tcb-offsets.sym: Add PID.
4675         * sysdeps/unix/sysv/linux/ia64/vfork.S: New file.
4676         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Properly handle PID cache.
4678 2004-03-09  Jakub Jelinek  <jakub@redhat.com>
4680         * tst-cancel20.c (do_one_test): Clear in_sh_body first.
4681         * tst-cancel21.c (do_one_test): Likewise.
4682         Reported by Gordon Jin <gordon.jin@intel.com>.
4684 2004-02-09  Jakub Jelinek  <jakub@redhat.com>
4686         * sysdeps/unix/sysv/linux/i386/vfork.S (SAVE_PID): Negate PID
4687         if non-zero and set to INT_MIN if zero.
4688         * sysdeps/unix/sysv/linux/x86_64/vfork.S (SAVE_PID): Likewise.
4689         * sysdeps/unix/sysv/linux/i386/pt-vfork.S: Include tcb-offsets.h.
4690         (SAVE_PID, RESTORE_PID): Define.
4691         (__vfork): Use it.
4692         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: Include tcb-offsets.h.
4693         Use relative path to avoid including NPTL i386/vfork.S.
4694         (SAVE_PID, RESTORE_PID): Define.
4695         * sysdeps/unix/sysv/linux/raise.c: Include limits.h.
4696         (raise): Handle THREAD_SELF->pid INT_MIN the same as 0.
4697         * Makefile (tests): Add tst-vfork1, tst-vfork2, tst-vfork1x and
4698         tst-vfork2x.
4699         (tests-reverse): Add tst-vfork1x and tst-vfork2x.
4700         * tst-vfork1.c: New test.
4701         * tst-vfork2.c: New test.
4702         * tst-vfork1x.c: New test.
4703         * tst-vfork2x.c: New test.
4705 2004-03-08  Ulrich Drepper  <drepper@redhat.com>
4707         * sysdeps/i386/tcb-offsets.sym: Add PID.
4708         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
4709         * sysdeps/unix/sysv/linux/i386/vfork.S: New file.
4710         * sysdeps/unix/sysv/linux/x86_64/vfork.S: New file.
4712 2004-03-08  Steven Munroe  <sjmunroe@us.ibm.com>
4714         * sysdeps/unix/sysv/linux/powerpc/Versions: Remove leading tabs.
4716 2004-03-08  H.J. Lu  <hongjiu.lu@intel.com>
4718         * sysdeps/s390/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4719         _rtld_global_ro.
4721 2004-03-07  Ulrich Drepper  <drepper@redhat.com>
4723         * sysdeps/ia64/tls.h (INIT_SYSINFO): _dl_sysinfo is now in
4724         _rtld_global_ro.
4726         * tst-once4.c: Remove unnecessary macro definition.
4728         * tst-mutex7.c (do_test): Limit thread stack size.
4729         * tst-once2.c (do_test): Likewise.
4730         * tst-tls3.c (do_test): Likewise.
4731         * tst-tls1.c (do_test): Likewise.
4732         * tst-signal3.c (do_test): Likewise.
4733         * tst-kill6.c (do_test): Likewise.
4734         * tst-key4.c (do_test): Likewise.
4735         * tst-join4.c (do_test): Likewise.
4736         * tst-fork1.c (do_test): Likewise.
4737         * tst-context1.c (do_test): Likewise.
4738         * tst-cond2.c (do_test): Likewise.
4739         * tst-cond10.c (do_test): Likewise.
4740         * tst-clock2.c (do_test): Likewise.
4741         * tst-cancel10.c (do_test): Likewise.
4742         * tst-basic2.c (do_test): Likewise.
4743         * tst-barrier4.c (do_test): Likewise.
4745 2004-03-05  Ulrich Drepper  <drepper@redhat.com>
4747         * sysdeps/i386/tls.h: Use GLRO instead of GL where appropriate.
4749 2004-03-01  Ulrich Drepper  <drepper@redhat.com>
4751         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4752         (__pthread_cond_timedwait): Optimize wakeup test.
4753         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
4754         (__pthread_cond_wait): Likewise.
4755         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
4756         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
4757         Likewise.
4759 2004-02-29  Ulrich Drepper  <drepper@redhat.com>
4761         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4762         (__lll_mutex_lock_wait): Optimize a bit more.  Just one copy of
4763         the atomic instruction needed.
4764         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4765         (__lll_mutex_lock_wait): Likewise.
4767 2004-02-28  Ulrich Drepper  <drepper@redhat.com>
4769         * Makefile (tests): Add tst-cond14 and tst-cond15.
4770         * tst-cond14.c: New file.
4771         * tst-cond15.c: New file.
4773 2004-02-27  Ulrich Drepper  <drepper@redhat.com>
4775         * sysdeps/pthread/createthread.c (create_thread): Remove use of
4776         CLONE_STOPPED.  We cannot use SIGCONT which means CLONE_STOPPED
4777         needs to be implemented differently to be useful.
4779 2004-02-26  Ulrich Drepper  <drepper@redhat.com>
4781         * pthread_attr_setschedparam.c: Don't test priority against limits
4782         here.  Set ATTR_FLAG_SCHED_SET flag.
4783         * pthread_attr_setschedpolicy.c: Set ATTR_FLAG_POLICY_SET flag.
4784         * pthread_create.c (__pthread_create_2_1): Copy scheduling attributes
4785         from parent thread to child.  If attribute is used and scheduling
4786         parameters are not inherited, copy parameters from attribute or
4787         compute them.  Check priority value.
4788         * pthread_getschedparam.c: If the parameters aren't known yet get
4789         them from the kernel.
4790         * pthread_setschedparam.c: Set ATTR_FLAG_SCHED_SET and
4791         ATTR_FLAG_POLICY_SET flag for thread.
4792         * sysdeps/unix/sysv/linux/internaltypes.h: Define ATTR_FLAG_SCHED_SET
4793         and ATTR_FLAG_POLICY_SET.
4795         * sysdeps/pthread/createthread.c: Use tgkill if possible.
4797         * pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr): Don't
4798         fail if stack address hasn't been set.  Just return 0.
4800 2004-02-25  Ulrich Drepper  <drepper@redhat.com>
4802         * Makefile (tests-nolibpthread): Add tst-unload.  Don't link with
4803         libpthread for the files in this list.
4804         (CFLAGS-tst-unload): Removed.
4805         * tst-unload.c (do_test): Don't use complete path for
4806         LIBPHREAD_SO.
4808         * Makefile: Define sonames for tst-tls5mod, tst-_res1mod1, and
4809         tst-_res1mod2.
4811 2004-02-22  Ulrich Drepper  <drepper@redhat.com>
4813         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
4814         (__lll_mutex_lock_wait): Rewrite so that only one locked memory
4815         operation per round is needed.
4816         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S
4817         (__lll_mutex_lock_wait): Likewise.
4819 2004-02-20  Ulrich Drepper  <drepper@redhat.com>
4821         * tst-cancel9.c (cleanup): Don't print to stderr.
4823 2004-02-20  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
4825         * sysdeps/sh/jmpbuf-unwind.h (_JMPBUF_UNWINDS_ADJ): Fix variable name.
4827 2004-02-20  Jakub Jelinek  <jakub@redhat.com>
4829         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h
4830         (__syscall_error_handler2): Call CDISABLE.
4831         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h
4832         (__syscall_error_handler2): Call CDISABLE.
4834         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4835         Release lock before the loop, don't reacquire it.
4837         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h (DL_ARGV_NOT_RELRO): Define.
4839 2004-02-19  Andreas Schwab  <schwab@suse.de>
4841         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4842         Fix last change.
4844 2004-02-18  Ulrich Drepper  <drepper@redhat.com>
4846         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
4847         (pthread_barrier_wait): After wakeup, release lock only when the
4848         last thread stopped using the barrier object.
4849         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S
4850         (pthread_barrier_wait): Likewise.
4851         * sysdeps/pthread/pthread_barrier_wait.c (pthread_barrier_wait):
4852         Likewise.
4853         * Makefile (tests): Add tst-barrier4.
4854         * tst-barrier4.c: New file.
4856         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4857         (__pthread_cond_timedwait): Perform timeout test while holding
4858         internal lock to prevent wakeup race.
4859         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4860         * sysdeps/pthread/pthread_cond_timedwait.c
4861         (__pthread_cond_timedwait): Likewise.
4862         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
4863         (__pthread_cond_timedwait): Likewise.
4865 2004-02-18  Jakub Jelinek  <jakub@redhat.com>
4867         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S
4868         (__pthread_rwlock_unlock): Access WRITER as 32-bit value.
4869         * Makefile (tests): Add tst-rwlock13.
4870         * tst-rwlock13.c: New test.
4872 2004-02-16  Ulrich Drepper  <drepper@redhat.com>
4874         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4875         (__condvar_tw_cleanup): Little optimization.
4876         Patch by Dinakar Guniguntala <dgunigun@in.ibm.com>.
4878 2004-02-16  Steven Munroe  <sjmunroe@us.ibm.com>
4880         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: Replace libc with
4881         libpthread as "lib" parameter to SHLIB_COMPAT.
4882         (__novmx_siglongjmp): Fix typo in function name.
4883         (__novmx_longjmp): Fix typo in function name.
4885 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4887         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Add a
4888         __builtin_expect.
4890         * sysdeps/generic/pt-longjmp.c: Moved to...
4891         * sysdeps/pthread/pt-longjmp.c: ...here.  New file.
4893 2004-01-29  Steven Munroe  <sjmunroe@us.ibm.com>
4895         * Makefile (libpthread-routines): Add pt-cleanup.
4896         * pt-longjmp.c: Removed.
4897         * pt-cleanup.c: Copied __pthread_cleanup_upto to here. New file.
4898         * sysdeps/generic/pt-longjmp.c: Copied longjmp to here. New file.
4899         * sysdeps/unix/sysv/linux/powerpc/Versions: New file.
4900         Version longjmp, siglongjmp for GLIBC_2.3.4.
4901         * sysdeps/unix/sysv/linux/powerpc/pt-longjmp.c: New File.
4903 2004-02-13  Ulrich Drepper  <drepper@redhat.com>
4905         * sysdeps/pthread/pthread_cond_timedwait.c
4906         (__pthread_cond_timedwait): Optimize.  Drop internal lock earlier.
4907         Reuse code.  Add __builtin_expects.
4909         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
4910         (__pthread_cond_timedwait): Get internal lock in case timeout has
4911         passed before the futex syscall.
4912         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
4914 2004-01-20  Ulrich Drepper  <drepper@redhat.com>
4916         * allocatestack.c: Pretty printing.
4918         * sysdeps/pthread/createthread.c (create_thread): Don't add
4919         CLONE_DETACHED bit if it is not necessary.
4921 2004-01-16  Ulrich Drepper  <drepper@redhat.com>
4923         * pthread_getattr_np.c: Include ldsodefs.h.
4925 2004-01-16  Richard Henderson  <rth@redhat.com>
4927         * allocatestack.c: Don't declare __libc_stack_end.
4928         * init.c (__pthread_initialize_minimal_internal): Likewise.
4929         * pthread_getattr_np.c (pthread_getattr_np): Likewise.
4931 2004-01-15  Richard Henderson  <rth@redhat.com>
4933         * sysdeps/alpha/tls.h (tcbhead_t): Add private.
4934         (TLS_INIT_TCB_SIZE, TLS_INIT_TCB_ALIGN, TLS_TCB_SIZE,
4935         TLS_PRE_TCB_SIZE, TLS_TCB_ALIGN, INSTALL_DTV, INSTALL_NEW_DTV,
4936         GET_DTV, THREAD_DTV, THREAD_SELF, DB_THREAD_SELF): Match ia64.
4937         (TLS_TCB_OFFSET, THREAD_ID, NO_TLS_OFFSET): Remove.
4938         (THREAD_GETMEM, THREAD_GETMEM_NC): Simplify.
4939         (THREAD_SETMEM, THREAD_SETMEM_NC): Likewise.
4940         * sysdeps/unix/sysv/linux/alpha/createthread.c (TLS_VALUE): Match ia64.
4942 2004-01-14  Ulrich Drepper  <drepper@redhat.com>
4944         * init.c (pthread_functions): Make array const.
4946 2004-01-13  Ulrich Drepper  <drepper@redhat.com>
4948         * allocatestack.c (__make_stacks_executable): Change interface.
4949         Check parameters.  Pass parameter on to libc counterpart.
4950         * pthreadP.h: Change declaration.
4952 2004-01-13  Richard Henderson  <rth@redhat.com>
4954         * pthread_attr_setstack.c (__old_pthread_attr_setstack): Use
4955         prototype form.
4956         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize):
4957         Likewise.
4959         * sysdeps/alpha/Makefile: New file.
4960         * sysdeps/alpha/tcb-offsets.sym: New file.
4961         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h (SINGLE_THREAD_P):
4962         Use MULTIPLE_THREADS_OFFSET to implement !libpthread !libc version.
4964         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: Rewrite based
4965         on powerpc version.
4967 2004-01-08  Jakub Jelinek  <jakub@redhat.com>
4969         * Makefile (tests): Add tst-backtrace1.
4970         * tst-backtrace1.c: New test.
4972 2003-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
4974         * sysdeps/alpha/tls.h (DB_THREAD_SELF): Pass bit size of thread
4975         register as second parameter to the REGISTER macro.
4976         * sysdeps/ia64/tls.h (DB_THREAD_SELF): Likewise.
4977         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): Likewise.
4978         * sysdeps/sh/tls.h (DB_THREAD_SELF): Likewise.
4979         * sysdeps/sparc/tls.h (DB_THREAD_SELF): Likewise.
4980         * sysdeps/s390/tls.h (DB_THREAD_SELF): Pass __WORDSIZE as bit size
4981         of thread register as second parameter to REGISTER macro in 64 case.
4983 2004-01-03  Ulrich Drepper  <drepper@redhat.com>
4985         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Removed.
4986         (CFLAGS-getpid.o): Defined.
4987         (CFLAGS-getpid.os): Defined.
4989 2003-12-31  Ulrich Drepper  <drepper@redhat.com>
4991         * pthread_getattr_np.c (pthread_getattr_np): Make sure stack info
4992         returned for main thread does not overlap with any other VMA.
4993         Patch by Jakub Jelinek.
4995 2003-12-29  Jakub Jelinek  <jakub@redhat.com>
4997         * tst-raise1.c: Include stdio.h.
4999 2003-12-23  Jakub Jelinek  <jakub@redhat.com>
5001         * sysdeps/unix/sysv/linux/raise.c (raise): Protect pid = selftid
5002         setting with __ASSUME_TGKILL || defined __NR_tgkill.
5003         If pid is 0, set it to selftid.
5004         * sysdeps/unix/sysv/linux/getpid.c (really_getpid): Make inline.
5005         Don't set self->pid but self->tid.  If self->pid == 0 and self->tid
5006         != 0, return self->tid without doing a syscall.
5007         * descr.h (struct pthread): Move pid field after tid.
5009         * Makefile (tests): Add tst-raise1.
5010         * tst-raise1.c: New file.
5012 2003-12-23  Roland McGrath  <roland@redhat.com>
5014         * tst-oddstacklimit.c: New file.
5015         * Makefile (tests): Add it.
5016         (tst-oddstacklimit-ENV): New variable.
5018         * init.c (__pthread_initialize_minimal_internal): Round stack rlimit
5019         value up to page size for __default_stacksize.
5021 2003-12-21  Ulrich Drepper  <drepper@redhat.com>
5023         * Makefile (tests): Add tst-eintr5.
5024         * tst-eintr5.c: New file.
5026         * eintr.c (eintr_source): Prevent sending signal to self.
5028         * tst-eintr2.c (tf1): Improve error message.
5030 2003-12-20  Ulrich Drepper  <drepper@redhat.com>
5032         * sysdeps/unix/sysv/linux/Makefile (CFLAGS-getpid.c): Define.
5033         * sysdeps/unix/sysv/linux/getpid.c: New file.
5034         * pthread_cancel.c: Add comment explaining use of PID field.
5035         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
5036         * pthread_getattr_np.c: Use abs() when comparing PID and TID fields.
5037         * sysdeps/unix/sysv/linux/fork.c: Negate PID field of parent
5038         temporarily to signal the field must not be relied on and updated
5039         by getpid().
5040         * sysdeps/unix/sysv/linux/pt-raise.c: Handle case where PID is
5041         temporarily negative.
5042         * sysdeps/unix/sysv/linux/raise.c: Likewise.
5044 2003-12-19  Ulrich Drepper  <drepper@redhat.com>
5046         * eintr.c (setup_eintr): Add new parameter.  Pass to thread function.
5047         (eintr_source): If ARG != NULL, use pthread_kill.
5048         * tst-eintr1.c: Adjust for this change.
5049         * tst-eintr2.c: Likewise.
5050         * Makefile (tests): Add tst-eintr3 and tst-eintr4.
5051         * tst-eintr3.c: New file.
5052         * tst-eintr4.c: New file.
5054 2003-12-19  Jakub Jelinek  <jakub@redhat.com>
5056         * libc-cancellation.c (__libc_enable_asynccancel): Don't cancel
5057         if CANCELSTATE_BITMASK is set.
5058         * sysdeps/pthread/librt-cancellation.c (__librt_enable_asynccancel):
5059         Likewise.
5061         * Makefile (tests): Add tst-cancel22 and tst-cancel23.
5062         (tests-reverse): Add tst-cancel23.
5063         * tst-cancel22.c: New test.
5064         * tst-cancel23.c: New test.
5066 2003-12-18  Ulrich Drepper  <drepper@redhat.com>
5068         * tst-eintr1.c: Better error messages.
5070         * Makefile (tests): Add tst-eintr2.
5071         * tst-eintr2.c: New file.
5073 2003-12-18  Jakub Jelinek  <jakub@redhat.com>
5075         * Makefile (tests): Add tst-cancel21 and tst-cancelx21.
5076         (CFLAGS-tst-cancelx21.c): Set.
5077         * tst-cancel21.c: New test.
5078         * tst-cancelx21.c: New test.
5080         * unwind.c (FRAME_LEFT): Add adj argument.  Subtract it from each
5081         comparison operand.
5082         (unwind_stop): Use _JMPBUF_CFA_UNWINDS_ADJ macro instead of
5083         _JMPBUF_CFA_UNWINDS.  Adjust FRAME_LEFT invocations.
5084         * pt-longjmp.c: Include jmpbuf-unwind.h.
5085         (__pthread_cleanup_upto): Use _JMPBUF_UNWINDS_ADJ macro instead of
5086         _JMPBUF_UNWINDS.  Adjust compared pointers.
5087         * init.c (__pthread_initialize_minimal_internal): Initialize
5088         pd->stackblock_size.
5089         * sysdeps/pthread/jmpbuf-unwind.h: Removed.
5090         * sysdeps/alpha/jmpbuf-unwind.h: New file.
5091         * sysdeps/i386/jmpbuf-unwind.h: New file.
5092         * sysdeps/powerpc/jmpbuf-unwind.h: New file.
5093         * sysdeps/s390/jmpbuf-unwind.h: New file.
5094         * sysdeps/sh/jmpbuf-unwind.h: New file.
5095         * sysdeps/sparc/sparc32/jmpbuf-unwind.h: New file.
5096         * sysdeps/x86_64/jmpbuf-unwind.h: New file.
5097         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Include stdint.h.
5098         (_JMPBUF_CFA_UNWINDS): Remove.
5099         (_JMPBUF_CFA_UNWINDS_ADJ, _JMPBUF_UNWINDS_ADJ): Define.
5101 2003-12-12  Jakub Jelinek  <jakub@redhat.com>
5103         * Makefile (tests): Add tst-cancel20 and tst-cancelx20.
5104         (CFLAGS-tst-cancelx20.c): Set.
5105         * tst-cancel20.c: New test.
5106         * tst-cancelx20.c: New test.
5108 2003-12-17  Ulrich Drepper  <drepper@redhat.com>
5110         * init.c (__pthread_initialize_minimal_internal): Don't treat
5111         architectures with separate register stack special here when
5112         computing default stack size.
5114 2003-12-17  Roland McGrath  <roland@redhat.com>
5116         * Makefile (tst-cancelx7-ARGS): New variable.
5117         Reportd by Greg Schafer <gschafer@zip.com.au>.
5119 2003-12-17  Jakub Jelinek  <jakub@redhat.com>
5121         * Makefile (tests): Add tst-stack3.  Depend on $(objpfx)tst-stack3-mem.
5122         (generated): Add tst-stack3.mtrace and tst-stack3-mem.
5123         (tst-stack3-ENV): Set.
5124         ($(objpfx)tst-stack3-mem): New.
5125         * tst-stack3.c: New test.
5127 2003-12-10  David Mosberger  <davidm@hpl.hp.com>
5129         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c (_init_EPILOG_BEGINS):
5130         Add unwind directives.  Drop unused .regstk directive.
5131         (_fini_EPILOG_BEGINS): Add unwind directives.
5133 2003-12-11  Ulrich Drepper  <drepper@redhat.com>
5135         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_futex_wait):
5136         Assume parameter is a pointer.
5137         (lll_futex_wake): Likewise.
5138         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_futex_wait):
5139         Likewise.
5140         (lll_futex_wake): Likewise.
5141         Reported by Boris Hu.
5142         * sysdeps/unix/sysv/linux/unregister-atfork.c
5143         (__unregister_atfork): Pass pointer to refcntr to lll_futex_wait.
5145         * sysdeps/unix/sysv/linux/sem_wait.c (__new_sem_wait): Simplify a bit.
5147 2003-12-10  Ulrich Drepper  <drepper@redhat.com>
5149         * sysdeps/pthread/bits/libc-lock.h (__rtld_lock_initialize): Define.
5150         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Call
5151         __rtld_lock_initialize for ld.so lock.
5152         Patch in part by Adam Li <adam.li@intel.com>.
5154 2003-12-02  David Mosberger  <davidm@hpl.hp.com>
5156         * Makefile (link-libc-static): Remove -lgcc_eh---it's already mentioned
5157         in $(gnulib).  Also, remove stale comment.
5159 2003-11-12  David Mosberger  <davidm@hpl.hp.com>
5161         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Take
5162         advantage of new syscall stub and optimize accordingly.
5164         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__NR_futex): Rename
5165         from SYS_futex, to match expectations of
5166         sysdep.h:DO_INLINE_SYSCALL.
5167         (lll_futex_clobbers): Remove.
5168         (lll_futex_timed_wait): Rewrite in terms of DO_INLINE_SYSCALL.
5169         (lll_futex_wake): Likewise.
5170         (lll_futex_requeue): Likewise.
5171         (__lll_mutex_trylock): Rewrite to a macro, so we can include this
5172         file before DO_INLINE_SYSCALL is defined (proposed by Jakub
5173         Jelinek).
5174         (__lll_mutex_lock): Likewise.
5175         (__lll_mutex_cond_lock): Likewise.
5176         (__lll_mutex_timed_lock): Likewise.
5177         (__lll_mutex_unlock): Likewise.
5178         (__lll_mutex_unlock_force): Likewise.
5180         * sysdeps/ia64/tls.h: Move declaration of __thread_self up so it
5181         comes before the include of <sysdep.h>.
5182         (THREAD_SELF_SYSINFO): New macro.
5183         (THREAD_SYSINFO): Likewise.
5184         (INIT_SYSINFO): New macro.
5185         (TLS_INIT_TP): Call INIT_SYSINFO.
5187         * sysdeps/ia64/tcb-offsets.sym: Add SYSINFO_OFFSET.
5189         * sysdeps/pthread/createthread.c (create_thread): Use
5190         THREAD_SELF_SYSINFO and THREAD_SYSINFO instead of open code.
5191         * allocatestack.c (allocate_stack): Use THREAD_SYSINFO and
5192         THREAD_SELF_SYSINFO instead of open code.
5193         * sysdeps/i386/tls.h (THREAD_SELF_SYSINFO): New macro.
5194         (THREAD_SYSINFO): Likewise.
5196         * sysdeps/unix/sysv/linux/ia64/dl-sysdep.h: New file.
5198         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: Work around gas problem.
5200 2003-12-06  Ulrich Drepper  <drepper@redhat.com>
5202         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: Use .init_array
5203         instead of .init.  Patch by David Mosberger.
5205 2003-11-30  Thorsten Kukuk  <kukuk@suse.de>
5207         * sysdeps/pthread/configure.in: Remove broken declaration in C
5208         cleanup handling check.
5210 2003-11-30  Andreas Jaeger  <aj@suse.de>
5212         * Makefile (CFLAGS-pt-initfini.s): Add $(fno_unit_at_a_time).
5213         * sysdeps/unix/sysv/linux/x86_64/Makefile (CFLAGS-pt-initfini.s):
5214         Likewise.
5216 2003-11-27  Jakub Jelinek  <jakub@redhat.com>
5218         * sysdeps/unix/sysv/linux/internaltypes.h (ATTR_FLAG_OLDATTR): Define.
5219         * pthread_attr_destroy.c: Include shlib-compat.h.
5220         (__pthread_attr_destroy): Return immediately if ATTR_FLAG_OLDATTR
5221         is set in iattr->flags.
5222         * pthread_attr_init.c (__pthread_attr_init_2_0): Set ATTR_FLAG_OLDATTR.
5224 2003-11-21  Jakub Jelinek  <jakub@redhat.com>
5226         * Makefile (distribute): Add tst-cleanup4aux.c.
5228         * tst-cond12.c (prepare): Add prototype.  Move after test-skeleton.c
5229         include.
5231 2003-11-21  Ulrich Drepper  <drepper@redhat.com>
5233         * tst-cond12.c (do_test): If USE_COND_SIGNAL is defined, use
5234         pthread_cond_signal.
5236         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Don't
5237         store mutex address if the current value is ~0l.
5238         * sysdeps/pthread/pthread_cond_timedwait.c
5239         (__pthread_cond_timedwait): Likewise.
5240         * sysdeps/pthread/pthread_cond_broadcast.c
5241         (__pthread_cond_broadcast): Don't use requeue for pshared
5242         condvars.
5244         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
5245         (__pthread_cond_wait): Don't store mutex address if the current
5246         value is ~0l.
5247         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
5248         (__pthread_cond_timedwait): Likewise.
5249         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S
5250         (__pthread_cond_broadcast): Don't use requeue for pshared
5251         condvars.
5253         * pthread_cond_init.c (__pthread_cond_init): Initialize __mutex
5254         element with ~0l for pshared condvars, with NULL otherwise.
5256         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
5257         (__pthread_cond_wait): Don't store mutex address if the current
5258         value is ~0l.
5259         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5260         (__pthread_cond_timedwait): Likewise.
5261         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
5262         (__pthread_cond_broadcast): Don't use requeue for pshared
5263         condvars.
5265         * Makefile: Add rules to build and run tst-cond12 and tst-cond13.
5266         * tst-cond12.c: New file.
5267         * tst-cond13.c: New file.
5269 2003-11-17  Ulrich Drepper  <drepper@redhat.com>
5271         * sysdeps/pthread/configure.in: Make missing forced unwind support
5272         fatal.
5274 2003-11-11  Ulrich Drepper  <drepper@redhat.com>
5276         * pthreadP.h: Don't declare __pthread_unwind as weak inside libpthread.
5278 2003-11-06  Ulrich Drepper  <drepper@redhat.com>
5280         * Makefile: Add magic to clean up correctly.
5282 2003-11-05  Jakub Jelinek  <jakub@redhat.com>
5284         * unwind.c (FRAME_LEFT): Define.
5285         (unwind_stop): Handle old style cleanups here.
5286         (__pthread_unwind): Handle old style cleanups only if
5287         !HAVE_FORCED_UNWIND.
5288         * Makefile (tests): Add tst-cleanup4 and tst-cleanupx4.
5289         (CFLAGS-tst-cleanupx4.c): Add -fexceptions.
5290         ($(objpfx)tst-cleanup4): Depend on $(objpfx)tst-cleanup4aux.o.
5291         ($(objpfx)tst-cleanupx4): Likewise.
5292         * tst-cleanup4.c: New test.
5293         * tst-cleanup4aux.c: New.
5294         * tst-cleanupx4.c: New test.
5296 2003-11-04  Ulrich Drepper  <drepper@redhat.com>
5298         * sysdeps/pthread/bits/stdio-lock.h: Use lll_*lock instead of
5299         lll_mutex_*lock macros to skip atomic operations on some archs.
5301 2003-11-03  Ulrich Drepper  <drepper@redhat.com>
5303         * sysdeps/pthread/tst-timer.c (main): Initialize
5304         sigev2.sigev_value as well.
5306 2003-10-15  Roland McGrath  <roland@redhat.com>
5308         * sysdeps/pthread/configure.in: Barf if visibility attribute support
5309         is missing.
5310         * sysdeps/pthread/configure: Regenerated.
5312 2003-10-09  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5314         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Completely revamp the
5315         locking macros.  No distinction between normal and mutex locking
5316         anymore.
5317         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Rewrite mutex locking.
5318         Merge bits from lowlevelmutex.S we still need.
5319         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Remove.
5320         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
5321         * sysdeps/unix/sysv/linux/sh/not-cancel.h: New file.
5322         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Adjust for
5323         new mutex implementation.
5324         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Likewise.
5325         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
5326         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5327         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
5328         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
5329         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
5330         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
5331         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
5332         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5333         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h (PSEUDO): Also defined
5334         symbol for entry point to avoid cancellation.
5336 2003-10-07  Jakub Jelinek  <jakub@redhat.com>
5338         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Backout 2003-10-02
5339         changes.
5340         (SAVE_OLDTYPE_0): Fix a typo.
5342 2003-10-03  Ulrich Drepper  <drepper@redhat.com>
5344         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
5345         Check __sigsetjmp return value.  Reported by Daniel Jacobowitz.
5347 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5349         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (DOCARGS_1): Use
5350         correct offset.
5352 2003-10-02  Jakub Jelinek  <jakub@redhat.com>
5354         * Makefile (tests): Add tst-cancel19.
5355         * tst-cancel19.c: New test.
5357 2003-10-02  Ulrich Drepper  <drepper@redhat.com>
5359         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Fix saving and
5360         restoring of the old cancellation type.
5362 2003-09-30  Jakub Jelinek  <jakub@redhat.com>
5364         * sysdeps/pthread/malloc-machine.h: Remove misleading comment.
5366 2003-09-27  Wolfram Gloger  <wg@malloc.de>
5368         * sysdeps/pthread/malloc-machine.h: New file
5370 2003-09-24  Roland McGrath  <roland@redhat.com>
5372         * allocatestack.c (__make_stacks_executable): Don't ignore return
5373         value from _dl_make_stack_executable.
5375 2003-09-24  Ulrich Drepper  <drepper@redhat.com>
5377         * allocatestack.c (__make_stacks_executable): Also change
5378         permission of the currently unused stacks.
5380         * allocatestack.c (change_stack_perm): Split out from
5381         __make_stacks_executable.
5382         (allocate_stack): If the required permission changed between the time
5383         we started preparing the stack and queueing it, change the permission.
5384         (__make_stacks_executable): Call change_stack_perm.
5386         * Makefile: Build tst-execstack-mod locally.
5387         * tst-execstack-mod.c: New file.
5389 2003-09-23  Jakub Jelinek  <jakub@redhat.com>
5391         * Makefile (tests): Only add tst-execstack if have-z-execstack is yes.
5393 2003-09-23  Roland McGrath  <roland@redhat.com>
5395         * tst-execstack.c: New file.
5396         * Makefile (tests): Add it.
5397         ($(objpfx)tst-execstack, $(objpfx)tst-execstack.out): New targets.
5398         (LDFLAGS-tst-execstack): New variable.
5400         * allocatestack.c (allocate_stack): Use GL(dl_stack_flags) to decide
5401         whether to use PROT_EXEC for stack mmap.
5402         (__make_stacks_executable): New function.
5403         * pthreadP.h: Declare it.
5404         * init.c (__pthread_initialize_minimal_internal): Set
5405         GL(dl_make_stack_executable_hook) to that.
5407 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5409         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Adjust for latest
5410         recommendation from AMD re avoidance of lock prefix.
5412 2003-09-22  Jakub Jelinek  <jakub@redhat.com>
5414         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait): Use
5415         lll_futex_timed_wait instead of lll_futex_wait.
5416         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Removed.
5417         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Removed.
5418         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: Removed.
5419         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: Removed.
5420         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Removed.
5421         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Removed.
5422         * sysdeps/unix/sysv/linux/s390/sem_post.c: Removed.
5423         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Removed.
5424         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Include atomic.h.
5425         Completely revamp the locking macros.  No distinction between
5426         normal and mutex locking anymore.
5427         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: Likewise.
5428         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_lock_wait,
5429         __lll_lock_timedwait): Fix prototypes.
5430         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_lock_wait,
5431         __lll_lock_timedwait): Likewise.
5432         (lll_mutex_lock, lll_mutex_cond_lock): Use _val instead of _bool
5433         macros, add __builtin_expect.
5434         (lll_mutex_timedlock): Likewise.  Fix return value.
5435         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Removed.
5436         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: Removed.
5437         * sysdeps/unix/sysv/linux/i386/i586/lowlevelmutex.S: Removed.
5438         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: Removed.
5439         * sysdeps/unix/sysv/linux/i386/i686/lowlevelmutex.S: Removed.
5440         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: Removed.
5441         * sysdeps/unix/sysv/linux/lowlevelmutex.c: Removed.
5442         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: Removed.
5444 2003-09-22  Ulrich Drepper  <drepper@redhat.com>
5446         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
5447         (__lll_mutex_lock_wait): Minor optimization to avoid one atomic
5448         operation if possible.
5450         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Don't play tricks
5451         like jumping over the lock prefix.
5453 2003-09-21  Ulrich Drepper  <drepper@redhat.com>
5455         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Completely revamp the
5456         locking macros.  No distinction between normal and mutex locking
5457         anymore.
5458         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
5459         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
5460         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
5461         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Rewrite mutex
5462         locking.  Merge bits from lowlevelmutex.S we still need.
5463         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
5464         * sysdeps/unix/sysv/linux/lowlevellock.c: Likewise.
5465         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Removed.
5466         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Removed.
5467         * Makefile (routines): Remove libc-lowlevelmutex.
5468         (libpthread-rountines): Remove lowlevelmutex.
5469         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Adjust
5470         for new mutex implementation.
5471         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
5472         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
5473         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
5474         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
5475         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
5476         Likewise.
5477         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
5478         Likewise.
5479         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
5480         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
5481         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: Likewise
5482         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
5483         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
5484         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
5485         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
5486         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
5487         Likewise.
5488         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
5489         Likewise.
5490         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: Likewise.
5491         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
5492         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
5493         Don't use requeue.
5494         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
5495         * sysdeps/pthread/pthread_cond_signal.c: Don't use requeue.
5497 2003-09-20  Ulrich Drepper  <drepper@redhat.com>
5499         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't match memory
5500         in parameters of asm with output parameters.
5502         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Change
5503         type of DECR parameter to int.
5504         * pthreadP.h: Adjust prototype of __pthread_mutex_unlock_usercnt.
5506 2003-09-18  Jakub Jelinek  <jakub@redhat.com>
5508         * tst-attr3.c (tf, do_test): Print stack start/end/size and
5509         guardsize for each thread.
5511 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5513         * sysdeps/pthread/pthread.h (pthread_getattr_np): Clarify usage.
5514         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c
5515         (pthread_attr_setaffinity_np): Handle cpuset == NULL.
5517         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c
5518         (pthread_attr_getaffinity_np): Don't segfault if iattr->cpuset is
5519         NULL.
5520         * pthread_getattr_np.c: Set cpuset using pthread_getaffinity_np.
5521         * pthreadP.h (pthread_getaffinity_np): Add hidden_proto.
5522         * sysdeps/unix/sysv/linux/pthread_getaffinity.c
5523         (pthread_getaffinity_np): Add hidden_def.
5525         * Makefile (tests): Add tst-attr3.
5526         * tst-attr3.c: New test.
5528         * sysdeps/i386/Makefile (CFLAGS-tst-align.c): Remove.
5530 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5532         * sysdeps/i386/Makefile (CFLAGS-pthread_create.c,
5533         CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
5535 2003-09-17  Jakub Jelinek  <jakub@redhat.com>
5537         * Makefile (CFLAGS-tst-align.c): Add $(stack-align-test-flags).
5538         * tst-align.c: Include tst-stack-align.h.
5539         (tf, do_test): Use TEST_STACK_ALIGN macro.
5541 2003-09-17  Ulrich Drepper  <drepper@redhat.com>
5543         * pthread_attr_init.c (__pthread_attr_init_2_0): Remove unused
5544         variable.
5546 2003-09-16  Ulrich Drepper  <drepper@redhat.com>
5548         * pthread_getattr_np.c (pthread_getattr_np): Correctly fill in the
5549         stack-related values for the initial thread.
5551 2003-09-15  Jakub Jelinek  <jakub@redhat.com>
5553         * Makefile (CFLAGS-pthread_once.c): Add $(uses-callbacks).
5555 2003-09-11  Ulrich Drepper  <drepper@redhat.com>
5557         * pthread_mutex_lock.c: Minor code rearrangements.
5559 2003-09-05  Roland McGrath  <roland@redhat.com>
5561         * pthread_create.c (__pthread_pthread_sizeof_descr): Removed.
5562         Instead, include ../nptl_db/db_info.c to do its magic.
5563         * pthread_key_create.c (__pthread_pthread_keys_max): Removed.
5564         (__pthread_pthread_key_2ndlevel_size): Likewise.
5565         * sysdeps/alpha/tls.h (DB_THREAD_SELF): New macro.
5566         * sysdeps/i386/tls.h (DB_THREAD_SELF): New macro.
5567         * sysdeps/ia64/tls.h (DB_THREAD_SELF): New macro.
5568         * sysdeps/powerpc/tls.h (DB_THREAD_SELF): New macro.
5569         * sysdeps/s390/tls.h (DB_THREAD_SELF): New macro.
5570         * sysdeps/sh/tls.h (DB_THREAD_SELF): New macro.
5571         * sysdeps/sparc/tls.h (DB_THREAD_SELF): New macro.
5572         * sysdeps/x86_64/tls.h (DB_THREAD_SELF): New macro.
5573         * sysdeps/alpha/td_ta_map_lwp2thr.c: File removed.
5574         * sysdeps/generic/td_ta_map_lwp2thr.c: File removed.
5575         * sysdeps/i386/td_ta_map_lwp2thr.c: File removed.
5576         * sysdeps/ia64/td_ta_map_lwp2thr.c: File removed.
5577         * sysdeps/powerpc/td_ta_map_lwp2thr.c: File removed.
5578         * sysdeps/s390/td_ta_map_lwp2thr.c: File removed.
5579         * sysdeps/sh/td_ta_map_lwp2thr.c: File removed.
5580         * sysdeps/sparc/td_ta_map_lwp2thr.c: File removed.
5581         * sysdeps/x86_64/td_ta_map_lwp2thr.c: File removed.
5583 2003-09-08  Ulrich Drepper  <drepper@redhat.com>
5585         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Change type
5586         of pthread_t to be compatible with LT.
5587         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: Likewise.
5588         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
5589         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
5590         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
5591         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: Likewise.
5592         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
5593         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Likewise.
5595 2003-09-04  Ulrich Drepper  <drepper@redhat.com>
5597         * sysdeps/unix/sysv/linux/i386/not-cancel.h (fcntl_not_cancel): Define.
5599 2003-09-04  Jakub Jelinek  <jakub@redhat.com>
5601         * unwind-forcedunwind.c: Move to...
5602         * sysdeps/pthread/unwind-forcedunwind.c: ...here.
5603         (pthread_cancel_init): Use ARCH_CANCEL_INIT if defined.
5604         * sysdeps/pthread/jmpbuf-unwind.h: New file.
5605         * sysdeps/unix/sysv/linux/ia64/unwind-forcedunwind.c: New file.
5606         * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: New file.
5607         * unwind.c: Include jmpbuf-unwind.h.
5608         (unwind_stop): Use _JMPBUF_CFA_UNWINDS macro.
5610 2003-09-02  Jakub Jelinek  <jakub@redhat.com>
5612         * sysdeps/unix/sysv/linux/ia64/bits/local_lim.h: New file.
5613         * sysdeps/unix/sysv/linux/ia64/Versions (libpthread): Export
5614         pthread_attr_setstack and pthread_attr_setstacksize @@GLIBC_2.3.3.
5615         * sysdeps/unix/sysv/linux/alpha/bits/local_lim.h: New file.
5616         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5617         * sysdeps/unix/sysv/linux/sparc/bits/local_lim.h: New file.
5618         * sysdeps/unix/sysv/linux/sparc/Versions: New file.
5619         * pthread_attr_setstack.c (__old_pthread_attr_setstack): New function.
5620         (pthread_attr_setstack): If PTHREAD_STACK_MIN != 16384, export
5621         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.2.
5622         * pthread_attr_setstacksize.c (__old_pthread_attr_setstacksize): New
5623         function.
5624         (pthread_attr_setstacksize): If PTHREAD_STACK_MIN != 16384, export
5625         as @@GLIBC_2.3.2 and also export compatibility @GLIBC_2.1.
5626         * Makefile (tests): Add tst-stack2.
5627         * tst-stack2.c: New test.
5628         * tst-stack1.c: Include limits.h and sys/param.h.
5629         (do_test): Set size to MAX (4 * getpagesize (), PTHREAD_STACK_MIN).
5631         * pthread_condattr_setpshared.c: Include errno.h.
5632         (pthread_condattr_setpshared): Return EINVAL if pshared
5633         is neither PTHREAD_PROCESS_PRIVATE nor PTHREAD_PROCESS_SHARED.
5635         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO): Also
5636         defined symbol for entry point to avoid cancellation.
5637         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
5638         Likewise.
5639         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (PSEUDO):
5640         Likewise.
5641         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5642         Likewise.
5643         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h (PSEUDO):
5644         Likewise.
5645         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h (PSEUDO):
5646         Likewise.
5647         * sysdeps/unix/sysv/linux/i386/not-cancel.h (__open_nocancel,
5648         __close_nocancel, __read_nocancel, __write_nocancel,
5649         __waitpid_nocancel): Add attribute_hidden.  If not in libc.so,
5650         libpthread.so or librt.so, define to corresponding function
5651         without _nocancel suffix.
5652         * sysdeps/unix/sysv/linux/s390/not-cancel.h: New file.
5653         * sysdeps/unix/sysv/linux/powerpc/not-cancel.h: New file.
5654         * sysdeps/unix/sysv/linux/sparc/not-cancel.h: New file.
5656         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: Fix a typo.
5658 2003-09-02  Ulrich Drepper  <drepper@redhat.com>
5660         * sysdeps/unix/sysv/linux/i386/not-cancel.h: New file.
5661         * sysdeps/unix/sysv/linux/x86_64/not-cancel.h: New file.
5663         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Make sure the code
5664         in subsections has a symbol associated with it.
5666         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (PSEUDO): Also
5667         defined symbol for entry point to avoid cancellation.
5668         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (PSEUDO): Likewise.
5670 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5672         * Makefile (tests): Add tst-tls5.
5673         (module-names): Add tst-tls5mod{,a,b,c,d,e,f}.
5674         ($(objpfx)tst-tls5mod{,a,b,c,d,e,f}.so-no-z-defs): Set to yes.
5675         ($(objpfx)tst-tls5): New.
5676         ($(objpfx)tst-tls6.out): Likewise.
5677         (tests): Depend on $(objpfx)tst-tls6.out.
5678         * tst-tls3.c: Include stdint.h and pthreaddef.h.
5679         (do_test): Check pthread_self () return value alignment.
5680         * tst-tls3mod.c: Include stdint.h and pthreaddef.h.
5681         (tf): Check pthread_self () return value alignment.
5682         * tst-tls5.c: New test.
5683         * tst-tls5.h: New.
5684         * tst-tls5mod.c: New.
5685         * tst-tls5moda.c: New.
5686         * tst-tls5modb.c: New.
5687         * tst-tls5modc.c: New.
5688         * tst-tls5modd.c: New.
5689         * tst-tls5mode.c: New.
5690         * tst-tls5modf.c: New.
5691         * tst-tls6.sh: New test.
5693         * sysdeps/pthread/pthread-functions.h (struct pthread_functions): Add
5694         ptr___pthread_cond_timedwait and ptr___pthread_cond_timedwait_2_0.
5695         * init.c (pthread_functions): Initialize them.
5696         * forward.c (pthread_cond_timedwait@GLIBC_2.0,
5697         pthread_cond_timedwait@@GLIBC_2.3.2): New forwards.
5698         * Versions (libc): Export pthread_cond_timedwait@GLIBC_2.0,
5699         pthread_cond_timedwait@@GLIBC_2.3.2.
5701 2003-09-01  Jakub Jelinek  <jakub@redhat.com>
5703         * sysdeps/unix/sysv/linux/alpha/timer_create.c: New file.
5704         * sysdeps/unix/sysv/linux/alpha/timer_delete.c: New file.
5705         * sysdeps/unix/sysv/linux/alpha/timer_getoverr.c: New file.
5706         * sysdeps/unix/sysv/linux/alpha/timer_gettime.c: New file.
5707         * sysdeps/unix/sysv/linux/alpha/timer_settime.c: New file.
5708         * sysdeps/unix/sysv/linux/alpha/Versions: New file.
5710         * sysdeps/unix/sysv/linux/alpha/aio_cancel.c: New file.
5712         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: Define
5713         _POSIX_THREAD_PRIORITY_SCHEDULING.
5714         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: Likewise.
5716 2003-08-31  Ulrich Drepper  <drepper@redhat.com>
5718         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock): Avoid
5719         nested function, use static inline function from libio.h.
5720         Code by Richard Henderson.
5722         * sysdeps/pthread/bits/libc-lock.h: Mark pthread_setcancelstate as
5723         weak.
5725 2003-08-30  Jakub Jelinek  <jakub@redhat.com>
5727         * sysdeps/unix/sysv/linux/sparc/sparc64/Versions: New file.
5728         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_create.c: New file.
5729         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_delete.c: New file.
5730         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_getoverr.c: New file.
5731         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_gettime.c: New file.
5732         * sysdeps/unix/sysv/linux/sparc/sparc64/timer_settime.c: New file.
5733         * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep-cancel.h: New file.
5734         * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep-cancel.h: New file.
5735         * sysdeps/unix/sysv/linux/sparc/bits/pthreadtypes.h: New file.
5736         * sysdeps/unix/sysv/linux/sparc/bits/semaphore.h: New file.
5737         * sysdeps/unix/sysv/linux/sparc/lowlevellock.h: New file.
5738         * sysdeps/unix/sysv/linux/sparc/pthread_once.c: New file.
5739         * sysdeps/unix/sysv/linux/sparc/pt-vfork.S: New file.
5740         * sysdeps/unix/sysv/linux/sparc/fork.c: New file.
5741         * sysdeps/unix/sysv/linux/sparc/aio_cancel.c: New file.
5742         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_lock.c: New file.
5743         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_trylock.c: New file.
5744         * sysdeps/sparc/sparc32/sparcv9/pthread_spin_unlock.c: New file.
5745         * sysdeps/sparc/sparc32/pthread_spin_lock.c: New file.
5746         * sysdeps/sparc/sparc32/pthread_spin_trylock.c: New file.
5747         * sysdeps/sparc/sparc32/pthreaddef.h: New file.
5748         * sysdeps/sparc/sparc64/pthread_spin_lock.c: New file.
5749         * sysdeps/sparc/sparc64/pthread_spin_trylock.c: New file.
5750         * sysdeps/sparc/sparc64/pthread_spin_unlock.c: New file.
5751         * sysdeps/sparc/sparc64/pthreaddef.h: New file.
5752         * sysdeps/sparc/tls.h: New file.
5753         * sysdeps/sparc/tcb-offsets.sym: New file.
5754         * sysdeps/sparc/Makefile: New file.
5755         * sysdeps/sparc/td_ta_map_lwp2thr.c: New file.
5756         * init.c [__sparc__] (__NR_set_tid_address): Define.
5758 2003-08-29  Jakub Jelinek  <jakub@redhat.com>
5760         * sysdeps/pthread/bits/stdio-lock.h (_IO_acquire_lock,
5761         _IO_release_lock): Define.
5763 2003-08-29  Jakub Jelinek  <jakuB@redhat.com>
5765         * tst-cancel4.c (tf_sigwait, tf_sigwaitinfo, tf_sigtimedwait): Add
5766         sigemptyset before sigaddset.  Reported by jreiser@BitWagon.com.
5768 2003-08-27  Ulrich Drepper  <drepper@redhat.com>
5770         * sysdeps/pthread/pthread.h (pthread_exit): Remove __THROW.
5771         (__pthread_cleanup_class): Add missing return types of member
5772         functions.
5774 2003-08-26  Steven Munroe <sjmunroe@us.ibm.com>
5776         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
5777         (lll_mutex_unlock_force): Add memory barrier between store and futex
5778         syscall.
5780 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
5782         * tst-cancel4.c (do_test): Also unlink tempfname and remove
5783         tempmsg in first loop.
5785 2003-08-18  Ulrich Drepper  <drepper@redhat.com>
5787         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
5788         _POSIX_THREAD_PRIORITY_SCHEDULING.
5789         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
5791 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5793         * sysdeps/pthread/bits/libc-lock.h [_LIBC && SHARED]
5794         (__rtld_lock_default_lock_recursive,
5795         __rtld_lock_default_unlock_recursive): Define.
5796         [_LIBC && SHARED] (__rtld_lock_lock_recursive,
5797         __rtld_lock_unlock_recursive): Define using
5798         GL(_dl_rtld_*lock_recursive).
5799         * init.c (__pthread_initialize_minimal_internal): Initialize
5800         _dl_rtld_lock_recursive and _dl_rtld_unlock_recursive.
5801         Lock GL(_dl_load_lock) the same number of times as
5802         GL(_dl_load_lock) using non-mt implementation was nested.
5804         * pthreadP.h (__pthread_cleanup_upto): Add hidden_proto.
5805         * pt-longjmp.c (__pthread_cleanup_upto): Add hidden_def.
5807 2003-08-06  Jakub Jelinek  <jakub@redhat.com>
5809         * tst-cancel17.c (do_test): Make len2 maximum of page size and
5810         PIPE_BUF.
5812 2003-08-07  Jakub Jelinek  <jakub@redhat.com>
5814         * pthread_create.c (__pthread_create_2_0): Clear new_attr.cpuset.
5816 2003-08-03  Jakub Jelinek  <jakub@redhat.com>
5818         * sysdeps/pthread/createthread.c (do_clone): Move error handling
5819         to first syscall error check.  Move syscall error check for tkill
5820         into __ASSUME_CLONE_STOPPED #ifdef.
5822 2003-08-02  Ulrich Drepper  <drepper@redhat.com>
5824         * sysdeps/pthread/createthread.c (do_clone): If __ASSUME_CLONE_STOPPED
5825         is not defined, do explicit synchronization.
5826         (create_thread): Do not lock pd->lock here.  If __ASSUME_CLONE_STOPPED
5827         is not defined also unlock pd->lock for non-debugging case in case
5828         it is necessary.
5829         * pthread_create.c (start_thread): Always get and release pd->lock
5830         if __ASSUME_CLONE_STOPPED is not defined.
5831         (start_thread_debug): Removed.  Adjust users.
5832         * allocatestack.c (allocate_stack): Always initialize lock if
5833         __ASSUME_CLONE_STOPPED is not defined.
5834         * Makefile (tests): Add tst-sched1.
5835         * tst-sched1.c: New file.
5837         * sysdeps/pthread/createthread.c (do_clone): Only use
5838         sched_setschduler and pass correct parameters.
5840 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5842         * sysdeps/pthread/pthread.h (pthread_attr_setstackaddr,
5843         pthread_attr_setstacksize): Change PTHREAD_STACK_SIZE to
5844         PTHREAD_STACK_MIN in comments.
5846 2003-07-31  Jakub Jelinek  <jakub@redhat.com>
5848         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
5849         Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
5850         argument.
5851         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
5852         * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
5853         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
5854         (__pthread_cleanup_upto): Fix prototype.
5855         (_longjmp_unwind): Adjust caller.
5856         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
5857         Change second argument to const struct pointer.
5858         * tst-sem8.c (main): Remove unused s2 and s3 variables.
5859         * tst-sem9.c (main): Likewise.
5860         * unwind.c: Include string.h for strlen prototype.
5862 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
5864         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
5865         (__pthread_cond_timedwait): Don't use cmov unless HAVE_CMOV is defined.
5866         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S:
5867         Define HAVE_CMOV.
5868         Patch by Nicholas Miell <nmiell@attbi.com>.
5870 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
5872         * init.c (__pthread_initialize_minimal_internal): Initialize
5873         GL(dl_init_static_tls).
5874         * pthreadP.h (__pthread_init_static_tls): New prototype.
5875         * allocatestack.c (init_one_static_tls, __pthread_init_static_tls):
5876         New functions.
5877         * Makefile (tests): Add tst-tls4.
5878         (modules-names): Add tst-tls4moda and tst-tls4modb.
5879         ($(objpfx)tst-tls4): Link against libdl and libpthread.
5880         ($(objpfx)tst-tls4.out): Depend on tst-tls4moda.so and
5881         tst-tls4modb.so.
5882         * tst-tls4.c: New file.
5883         * tst-tls4moda.c: New file.
5884         * tst-tls4modb.c: New file.
5886 2003-06-19  Daniel Jacobowitz  <drow@mvista.com>
5888         * sysdeps/pthread/timer_create.c (timer_create): Call timer_delref
5889         before __timer_dealloc.
5890         * sysdeps/pthread/timer_routines.c (__timer_thread_find_matching):
5891         Don't call list_unlink.
5893 2003-07-29  Roland McGrath  <roland@redhat.com>
5895         * Makefile [$(build-shared) = yes] (tests): Depend on $(test-modules).
5897 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5899         * descr.h: Don't include lowlevellock.h, pthreaddef.h and dl-sysdep.h
5900         if __need_struct_pthread_size, instead define lll_lock_t.
5902 2003-07-25  Jakub Jelinek  <jakub@redhat.com>
5904         * tst-cancel17.c (do_test): Check if aio_cancel failed.
5905         Don't reuse struct aiocb A if it failed.
5906         Write fpathconf (fds[1], _PC_PIPE_BUF) + 2 bytes using aio_write,
5907         not just one byte, as that does not block.
5909 2003-07-22  Jakub Jelinek  <jakub@redhat.com>
5911         * sysdeps/pthread/unwind-resume.c: New file.
5912         * sysdeps/pthread/Makefile (routines, shared-only-routines): Add
5913         unwind-resume in csu subdir.
5914         (CFLAGS-unwind-resume.c, CFLAGS-rt-unwind-resume.c): Compile with
5915         exceptions.
5916         (librt-sysdep_routines, librt-shared-only-routines): Add
5917         rt-unwind-resume.
5918         * sysdeps/pthread/rt-unwind-resume.c: New file.
5919         * unwind-forcedunwind.c: New file.
5920         * Makefile (libpthread-routines): Add unwind-forcedunwind.
5921         (libpthread-shared-only-routines): Likewise.
5922         (CFLAGS-unwind-forcedunwind.c): Compile with exceptions.
5923         * pthreadP.h (pthread_cancel_init): New prototype.
5924         * pthread_cancel.c (pthread_cancel): Call pthread_cancel_init.
5926         * sysdeps/pthread/createthread.c (do_thread, create_thread): Make
5927         attr argument const struct pthread_attr *.
5929         * res.c (__res_state): Return __resp.
5930         * descr.h: Include resolv.h.
5931         (struct pthread): Add res field.
5932         * pthread_create.c: Include resolv.h.
5933         (start_thread): Initialize __resp.
5934         * Makefile (tests): Add tst-_res1.
5935         (module-names): Add tst-_res1mod1, tst-_res1mod2.
5936         ($(objpfx)tst-_res1mod2.so): Depend on $(objpfx)tst-_res1mod1.so.
5937         ($(objpfx)tst-_res1): Depend on $(objpfx)tst-_res1mod2.so and
5938         libpthread.
5939         * tst-_res1.c: New file.
5940         * tst-_res1mod1.c: New file.
5941         * tst-_res1mod2.c: New file.
5943 2003-07-21  Ulrich Drepper  <drepper@redhat.com>
5945         * sysdeps/pthread/createthread.c: Don't define CLONE_STOPPED.
5947         * Makefile: Define various *-no-z-defs variables for test DSOs
5948         which has undefined symbols.
5950 2003-07-21  Steven Munroe  <sjmunroe@us.ibm.com>
5952         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c (__pthread_once):
5953         Retry if the stwcx fails to store once_control.
5955 2003-07-20  Ulrich Drepper  <drepper@redhat.com>
5957         * Makefile (libpthread-routines): Add pthread_attr_getaffinity and
5958         pthread_attr_setaffinity.
5959         * Versions [libpthread] (GLIBC_2.3.3): Likewise.
5960         * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file.
5961         * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file.
5962         * pthread_attr_destroy.c: Free cpuset element if allocated.
5963         * pthread_create.c: Pass iattr as additional parameter to
5964         create_thread.
5965         * sysdeps/pthread/createthread.c: If attribute is provided and
5966         a new thread is created with affinity set or scheduling parameters,
5967         start thread with CLONE_STOPPED.
5968         * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and
5969         pthread_attr_setaffinity.
5970         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add
5971         cpuset element.
5973 2003-07-15  Ulrich Drepper  <drepper@redhat.com>
5975         * tst-tcancel-wrappers.sh: lseek and llseek are not cancelation points.
5977 2003-07-14  Ulrich Drepper  <drepper@redhat.com>
5979         * sysdeps/pthread/configure.in: Require CFI directives also for
5980         ppc and s390.
5982 2003-07-15  Jakub Jelinek  <jakub@redhat.com>
5984         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (PSEUDO):
5985         Add cfi directives.
5987 2003-07-12  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
5989         * sysdeps/sh/tcb-offsets.sym: Add RESULT, TID, CANCELHANDLING and
5990         CLEANUP_JMP_BUF.
5991         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Use more
5992         registers as variables.  Call __pthread_mutex_unlock_usercnt.
5993         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
5994         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Store TID
5995         not self pointer in __writer.  Compare with TID to determine
5996         deadlocks.
5997         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
5998         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S:
5999         Likewise.
6000         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S:
6001         Likewise.
6002         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Add cancellation support.
6003         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
6004         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Define all the nice
6005         macros also when compiling librt.
6007 2003-07-11  Jakub Jelinek  <jakub@redhat.com>
6009         * Makefile (CFLAGS-pthread_once.c): Add -fexceptions
6010         -fasynchronous-unwind-tables.
6011         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h
6012         (PSEUDO): Add cfi directives.
6013         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (PSEUDO):
6014         Likewise.
6015         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (PSEUDO):
6016         Likewise.
6018 2003-07-08  Jakub Jelinek  <jakub@redhat.com>
6020         * pthreadP.h (__pthread_unwind_next, __pthread_register_cancel,
6021         __pthread_unregister_cancel): Add prototypes and hidden_proto.
6022         * unwind.c (__pthread_unwind_next): Add hidden_def.
6023         * cleanup.c (__pthread_register_cancel, __pthread_unregister_cancel):
6024         Likewise.
6025         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait):
6026         Use HIDDEN_JUMPTARGET to jump to __pthread_unwind.
6027         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait):
6028         Likewise.
6029         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S (sem_wait): Likewise.
6030         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S (sem_timedwait):
6031         Likewise.
6032         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once): Use
6033         HIDDEN_JUMPTARGET to call __pthread_register_cancel,
6034         __pthread_unregister_cancel and __pthread_unwind_next.
6036 2003-07-04  Jakub Jelinek  <jakub@redhat.com>
6038         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (PSEUDO): Use
6039         different symbol for the cancellation syscall wrapper and
6040         non-cancellation syscall wrapper.
6041         (PSEUDO_END): Define.
6043 2003-07-05  Richard Henderson  <rth@redhat.com>
6045         * sysdeps/alpha/elf/pt-initfini.c: Avoid .ent/.end.
6046         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h (lll_futex_wait,
6047         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6048         return actual return value from the syscall, not 0.
6050 2003-07-07  Ulrich Drepper  <drepper@redhat.com>
6052         * descr.h (struct pthread): Add pid field.
6053         * allocatestack.c (allocate_stack): Initialize pid field in descriptor.
6054         (__reclaim_stacks): Likewise.
6055         * init.c (sigcancel_handler): If __ASSUME_CORRECT_SI_PID is defined
6056         also check for PID of the signal source.
6057         (__pthread_initialize_minimal_internal): Also initialize pid field
6058         of initial thread's descriptor.
6059         * pthread_cancel.c: Use tgkill instead of tkill if possible.
6060         * sysdeps/unix/sysv/linux/fork.c: Likewise.
6061         * sysdeps/unix/sysv/linux/pt-raise.c: Likewise.
6062         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
6063         * sysdeps/unix/sysv/linux/raise.c: Likewise.
6065 2003-07-05  Ulrich Drepper  <drepper@redhat.com>
6067         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_push): Renamed.
6068         Fix use of parameter.
6069         (__libc_cleanup_pop): Likewise.
6071 2003-07-04  Ulrich Drepper  <drepper@redhat.com>
6073         * init.c (sigcancel_handler): Change parameters to match handler
6074         for SA_SIGACTION.  Check signal number and code to recognize
6075         invalid invocations.
6077 2003-07-03  Roland McGrath  <roland@redhat.com>
6079         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr):
6080         Apply sizeof (struct pthread) bias to r13 value.
6082 2003-07-03  Ulrich Drepper  <drepper@redhat.com>
6084         * sysdeps/pthread/configure.in: Require CFI directives.
6086         * sysdeps/pthread/librt-cancellation.c (__pthread_unwind): Remove
6087         definition.
6088         * pthreadP.h (__pthread_unwind): Add hidden_proto if used in
6089         libpthread compilation.
6090         * unwind.c (__pthread_unwind): Add hidden_def.
6091         * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_unwind.
6093 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6095         * libc-cancellation.c (__libc_cleanup_routine): Define.
6096         * sysdeps/pthread/bits/libc-lock.h (__pthread_cleanup_push): Define.
6097         (__pthread_cleanup_pop): Define.
6099 2003-07-01  Richard Henderson  <rth@redhat.com>
6101         * sysdeps/alpha/elf/pt-initfini.c: New file.
6102         * sysdeps/alpha/pthread_spin_lock.S: New file.
6103         * sysdeps/alpha/pthread_spin_trylock.S: New file.
6104         * sysdeps/alpha/pthreaddef.h: New file.
6105         * sysdeps/alpha/td_ta_map_lwp2thr.c: New file.
6106         * sysdeps/alpha/tls.h: New file.
6107         * sysdeps/unix/sysv/linux/alpha/Makefile: New file.
6108         * sysdeps/unix/sysv/linux/alpha/bits/pthreadtypes.h: New file.
6109         * sysdeps/unix/sysv/linux/alpha/bits/semaphore.h: New file.
6110         * sysdeps/unix/sysv/linux/alpha/createthread.c: New file.
6111         * sysdeps/unix/sysv/linux/alpha/fork.c: New file.
6112         * sysdeps/unix/sysv/linux/alpha/lowlevellock.h: New file.
6113         * sysdeps/unix/sysv/linux/alpha/pt-vfork.S: New file.
6114         * sysdeps/unix/sysv/linux/alpha/pthread_once.c: New file.
6115         * sysdeps/unix/sysv/linux/alpha/sem_post.c: New file.
6116         * sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h: New file.
6118 2003-07-01  Ulrich Drepper  <drepper@redhat.com>
6120         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Add correct
6121         cleanup support and unwind info.
6123 2003-06-30  Ulrich Drepper  <drepper@redhat.com>
6125         * sysdeps/unix/sysv/linux/i386/pthread_once.S (__pthread_once):
6126         Use correct cleanup handler registration.  Add unwind info.
6127         * sysdeps/unix/sysv/linux/unwindbuf.sym: New file.
6128         * sysdeps/unix/sysv/linux/Makefile: Add rule to build unwindbuf.h.
6129         * tst-once3.c: Add cleanup handler and check it is called.
6130         * tst-once4.c: Likewise.
6131         * tst-oncex3.c: New file.
6132         * tst-oncex4.c: New file.
6133         * Makefile: Add rules to build and run tst-oncex3 and tst-oncex4.
6135 2003-06-29  Ulrich Drepper  <drepper@redhat.com>
6137         * sysdeps/pthread/configure.in: Check for C cleanup handling in gcc.
6139 2003-06-27  Ulrich Drepper  <drepper@redhat.com>
6141         * tst-cancel4.c (tf_msgrcv): Use IPC_PRIVATE in msgget call.
6142         (tf_msgsnd): Likewise.
6144         * tst-cancel4.c (tf_msgrcv): Strengthen test against valid
6145         premature returns a bit more.
6147 2003-06-26  Ulrich Drepper  <drepper@redhat.com>
6149         * sysdeps/pthread/librt-cancellation.c: Move __pthread_unwind
6150         definition to the front.
6152         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rename
6153         the cleanup functions to make the names unique.  Fix dwarf opcode
6154         un unwind table.
6155         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Rename cleanup
6156         functions to make the names unique.  Fix CFA offset for two blocks.
6158 2003-06-25  Ulrich Drepper  <drepper@redhat.com>
6160         * sysdeps/pthread/pthread.h (class __pthread_cleanup_class): Add
6161         missing closing braces.
6162         Patch by Christophe Saout <christophe@saout.de>.
6164 2003-06-24  Roland McGrath  <roland@redhat.com>
6166         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Typo fix.
6168 2003-06-24  Ulrich Drepper  <drepper@redhat.com>
6170         * sysdeps/unix/sysv/linux/ia64/bits/posix_opt.h: New file.
6171         * sysdeps/unix/sysv/linux/x86_64/bits/posix_opt.h: New file.
6173         * pthreadP.h: Declare __find_thread_by_id.
6174         * allocatestack.c [HP_TIMING_AVAIL]: Define __find_thread_by_id.
6175         * pthread_clock_gettime.c: Allow using other thread's clock.
6176         * pthread_clock_settime.c: Likewise.
6177         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
6178         * Makefile: Add rules to build and run tst-clock2.
6179         * tst-clock2.c: New file.
6181 2003-06-23  Ulrich Drepper  <drepper@redhat.com>
6183         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Rewrite
6184         to use exception-based cleanup handler.
6185         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6187         * tst-cond8.c (ch): Announce that we are done.
6189         * pthreadP.h (__pthread_mutex_cond_lock): Mark with internal_function.
6191         * tst-cancel17.c (tf): Retry aio_suspend in case of EINTR.
6192         Also test aio_suspend with timeout value.
6194 2003-06-22  Ulrich Drepper  <drepper@redhat.com>
6196         * pthreadP.h: Mark __pthread_mutex_unlock_usercnt also hidden.
6197         * pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt): Add
6198         attribute_hidden.
6200         * pthreadP.h (__pthread_mutex_init_internal): Mark hidden.
6201         (__pthread_mutex_lock_internal): Likewise.
6202         (__pthread_mutex_unlock_internal): Likewise.
6203         (__pthread_mutex_unlock_usercnt): Declare.
6204         * pthread_mutex_destroy.c: Always fail if used in any way.
6205         * pthread_mutex_init.c: Update comment.
6206         * pthread_mutex_lock.c: If NO_INCR is not defined adjust __nusers.
6207         * pthread_mutex_timedlock.c: Adjust __nusers.
6208         * pthread_mutex_trylock.c: Adjust __nusers.
6209         * pthread_mutex_unlock.c: Old code is in __pthread_mutex_unlock_usercnt
6210         and public interfaces are wrapper with pass additional parameter.
6211         __pthread_mutex_unlock_usercnt does not adjust __nusers if second
6212         parameter zero.
6213         * tst-mutex8.c: New file.
6214         * Makefile (tests): Add tst-mutex8.
6215         * sysdeps/pthread/pthread_cond_timedwait.c: Call
6216         __pthread_mutex_unlock_usercnt.
6217         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6218         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6219         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6220         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6221         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6222         * sysdeps/unix/sysv/linux/pthread_mutex_cond_lock.c: Define NO_INCR.
6223         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6224         Add __nusers.
6225         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6226         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6227         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6228         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6229         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6231         * pthread_mutex_lock.c: Don't store THREAD_ID in __owner, use TID.
6232         * pthread_mutex_timedlock.c: Likewise.
6233         * pthread_mutex_trylock.c: Adjust __nusers.
6234         * pthread_mutex_unlock.c: Compare with TID not THREAD_ID.
6235         * tst-mutex9.c: New file.
6236         * Makefile (tests): Add tst-mutex9.
6237         * sysdeps/i386/tls.h: Remove THREAD_ID definition.
6238         * sysdeps/ia64/tls.h: Likewise.
6239         * sysdeps/powerpc/tls.h: Likewise.
6240         * sysdeps/s390/tls.h: Likewise.
6241         * sysdeps/sh/tls.h: Likewise.
6242         * sysdeps/x86_64/tls.h: Likewise.
6243         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_mutex_t):
6244         Change type of __owner.
6245         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6246         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6247         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6248         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
6249         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6251 2003-06-19  Jakub Jelinek  <jakub@redhat.com>
6253         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Move to...
6254         * sysdeps/unix/sysv/linux/sem_post.c: ...here.
6256         * sysdeps/unix/sysv/linux/sem_post.c: Move to...
6257         * sysdeps/unix/sysv/linux/powerpc/sem_post.c: ... here.  Pass nr + 1
6258         instead of nr to lll_futex_wake.  Only set errno and return -1
6259         if err < 0.
6261         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (lll_futex_wait,
6262         lll_futex_timed_wait, lll_futex_wake, lll_futex_requeue): On success
6263         return actual return value from the syscall, not 0.
6265 2003-06-18  Ulrich Drepper  <drepper@redhat.com>
6267         * tst-cancel4.c (tf_msgsnd): Don't always use 100 as the type,
6268         find a random value.
6269         (tf_msgrcv): Likewise.  Also don't report msgrcv returns if
6270         errno==EIDRM.
6272         * sysdeps/unix/sysv/linux/timer_settime.c: Add prototype for
6273         compat_timer_settime.
6274         * sysdeps/unix/sysv/linux/timer_gettime.c: Add prototype for
6275         compat_timer_gettime.
6276         * sysdeps/unix/sysv/linux/timer_getoverr.c: Add prototype for
6277         compat_timer_getoverrun.
6278         * sysdeps/unix/sysv/linux/timer_delete.c: Add prototype for
6279         compat_timer_delete.
6281         * pthread_mutex_destroy.c (__pthread_mutex_destroy): For
6282         error-checking mutex detect busy mutexes.
6284 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6286         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_mutex_lock):
6287         Add ax to clobber list.
6288         (lll_mutex_cond_lock): Likewise.
6289         (lll_mutex_unlock): Likewise.
6290         (lll_lock): Likewise.
6291         (lll_unlock): Likewise.
6293         * Makefile: Add rules to build and run tst-cancel18 and tst-cancelx18.
6294         * tst-cancel18.c: New file.
6295         * tst-cancelx18.c: New file.
6297         * tst-cancel4.c: Test connect, creat, msgrcv, msgsnd, sendmsg, sendto,
6298         and tcdrain.
6300         * Makefile: Add rules to build and run tst-cancel17 and tst-cancel17x.
6301         * tst-cancel17.c: New file.
6302         * tst-cancelx17.c: New file.
6304         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
6305         * sysdeps/unix/sysv/linux/sigwait.c: New file.
6306         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
6308         * tst-cancel4.c: Test open, close, pread, pwrite, fsync, and msync.
6310 2003-06-16  Jakub Jelinek  <jakub@redhat.com>
6312         * sysdeps/pthread/createthread.c (create_thread): Set
6313         header.multiple_threads unconditionally.
6314         * allocatestack.c (allocate_stack): Likewise.
6315         * descr.h (struct pthread): Add header.multiple_threads
6316         unconditionally.
6317         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (CENABLE, CDISABLE):
6318         Define for librt.  #error if neither libpthread, libc nor librt.
6319         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (CENABLE, CDISABLE):
6320         Likewise.
6321         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h (CENABLE,
6322         CDISABLE): Likewise.
6323         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h (CENABLE,
6324         CDISABLE): Likewise.
6325         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h (CENABLE,
6326         CDISABLE): Likewise.
6327         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h (CENABLE,
6328         CDISABLE): Likewise.  Access header.multiple_threads outside of
6329         libc and libpthread.
6330         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h (CENABLE, CDISABLE):
6331         Likewise.
6332         * sysdeps/x86_64/tls.h (tcbhead_t): Add multiple_threads.
6333         * sysdeps/x86_64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Define.
6335 2003-06-17  Ulrich Drepper  <drepper@redhat.com>
6337         * tst-cancel4.c: Add tests for the socket and signal functions, pause.
6338         Also test early cancellation before the thread reaches the cancellation
6339         point.
6341         * Makefile: Compile forward.c with exceptions.
6343         * sysdeps/unix/sysv/linux/sleep.c: New file.
6345 2003-06-16  Ulrich Drepper  <drepper@redhat.com>
6347         * Makefile: Add CFLAGS definition to compile function wrappers
6348         duplicated from libc with exceptions.
6349         * tst-cancel4.c: Also check cancellation handlers.
6351         * Makefile: Add rules to build and run tst-cancel16 and
6352         tst-cancelx16.  Add missing CFLAGS definitions.
6353         * tst-cancel16.c: New file.
6354         * tst-cancelx16.c: New file.
6356 2003-06-15  Ulrich Drepper  <drepper@redhat.com>
6358         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6359         (DL_SYSINFO_IMPLEMENTATION): Use CFI opcodes.
6360         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
6361         (DL_SYSINFO_IMPLEMENTATION): Likewise.
6363         * pthreadP.h (LIBC_CANCEL_ASYNC): Also define for librt.
6364         (LIBC_CANCEL_RESET): Likewise.
6365         Declare __librt_enable_asynccancel and __librt_disable_asynccancel.
6366         * sysdeps/pthread/Makefile (librt-sysdep_routines): Add
6367         librt-cancellation.
6368         (CFLAGS-libcrt-cancellation.c): Define.
6369         * sysdeps/pthread/librt-cancellation.c: New file.
6370         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define all the nice
6371         macros also when compiling librt.
6372         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: Likewise.
6373         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: Likewise.
6374         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: Likewise.
6375         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: Likewise.
6376         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: Likewise.
6377         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: Likewise.
6378         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
6380         * sysdeps/unix/sysv/linux/timer_create.c: Add prototype for
6381         compat_timer_create.
6383 2003-06-14  Ulrich Drepper  <drepper@redhat.com>
6385         * sysdeps/pthread/posix-timer.h (timespec_compare): Always inline.
6387         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
6388         __register_atfork.
6389         * sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):
6390         Add libc_hidden_def.
6392 2003-06-13  Roland McGrath  <roland@redhat.com>
6394         * sysdeps/x86_64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Pass FS
6395         constant from <sys/reg.h> to ps_get_thread_area, not register contents.
6397 2003-06-11  Ulrich Drepper  <drepper@redhat.com>
6399         * allocatestack.c (queue_stack): Always inline.
6400         * ptreadhP.h (__do_cancel): Likewise.
6402 2003-06-10  Jakub Jelinek  <jakub@redhat.com>
6404         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait): Fix
6405         a typo.
6407 2003-06-10  Ulrich Drepper  <drepper@redhat.com>
6409         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6410         (__pthread_cond_signal): Remove incorrect second addition for
6411         cond_lock!=0.
6413 2003-06-09  Ulrich Drepper  <drepper@redhat.com>
6415         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6416         (__pthread_cond_signal): Use correct futex pointer in
6417         __lll_mutex_lock_wait call.
6419         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6420         (__pthread_cond_signal): Some more tweaks to handle cond_lock!=0.
6422 2003-06-08  Ulrich Drepper  <drepper@redhat.com>
6424         * sysdeps/unix/sysv/linux/s390/sem_wait.c (__new_sem_wait): Make
6425         cancelable.
6426         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6427         Likewise.
6429         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Remove
6430         hand-written CFI generation code.  Since ENTRY/END also initiated
6431         CFI frames this caused two CFI sets to be generated.
6433 2003-06-07  Ulrich Drepper  <drepper@redhat.com>
6435         * cleanup_routine.c: New file.
6436         * Versions (libpthread) [GLIBC_2.3.3]: Add __pthread_cleanup_routine.
6437         * sysdeps/pthread/pthread.h: Add support for fully exception-based
6438         cleanup handling.
6439         * Makefile (libpthread-routines): Add cleanup_routine.
6440         Add more CFLAGS variables to compile with exceptions.  Add comments
6441         why which file needs unwind tables.
6442         (tests) [have-forced-unwind==yes]: Add tst-cancelx* and tst-cleanupx*
6443         tests.
6444         * tst-cancelx1.c: New file.
6445         * tst-cancelx2.c: New file.
6446         * tst-cancelx3.c: New file.
6447         * tst-cancelx4.c: New file.
6448         * tst-cancelx5.c: New file.
6449         * tst-cancelx6.c: New file.
6450         * tst-cancelx7.c: New file.
6451         * tst-cancelx8.c: New file.
6452         * tst-cancelx9.c: New file.
6453         * tst-cancelx10.c: New file.
6454         * tst-cancelx11.c: New file.
6455         * tst-cancelx12.c: New file.
6456         * tst-cancelx13.c: New file.
6457         * tst-cancelx14.c: New file.
6458         * tst-cancelx15.c: New file.
6459         * tst-cleanupx0.c: New file.
6460         * tst-cleanupx0.expect: New file.
6461         * tst-cleanupx1.c: New file.
6462         * tst-cleanupx2.c: New file.
6463         * tst-cleanupx3.c: New file.
6465         * tst-cleanup0.c: Make standard compliant.
6466         * tst-cleanup1.c: Likewise.
6468         * sysdeps/unix/sysv/linux/sem_timedwait.c: Add cancellation support.
6469         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
6470         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
6471         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
6472         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
6473         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
6474         * sysdeps/i386/tcb-offsets.sym: Add RESULT, CANCELHANDLING, and
6475         CLEANUP_JMP_BUF.
6476         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6477         * tst-cancel12.c: New file.
6478         * tst-cancel13.c: New file.
6479         * tst-cancel14.c: New file.
6480         * tst-cancel15.c: New file.
6481         * Makefile (tests): Add tst-cancel12, tst-cancel13, tst-cancel14,
6482         and tst-cancel15.
6484         * tst-cancel1.c: Add some comments.
6486         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Compute relative
6487         timeout correctly.
6489 2003-06-06  Ulrich Drepper  <drepper@redhat.com>
6491         * Makefile (CFLAGS-pthread_cancel.c): Define.
6493 2003-06-05  Ulrich Drepper  <drepper@redhat.com>
6495         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_rwlock_t):
6496         Change type of __writer element to int.
6497         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6498         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6499         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
6500         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6501         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6502         * sysdeps/i386/tcb-offsets.sym: Replace SELF entry with TID entry.
6503         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6504         * pthread_rwlock_trywrlock.c: Store TID not self pointer in __writer.
6505         Compare with TID to determine deadlocks.
6506         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
6507         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6508         * sysdeps/pthread/pthread_rwlock_timedwrlock.: Likewise.
6509         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6510         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
6511         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
6512         Likewise.
6513         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
6514         Likewise.
6515         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
6516         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
6517         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S:
6518         Likewise.
6519         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S:
6520         Likewise.
6521         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
6522         * Makefile (tests): Add tst-rwlock12.
6523         * tst-rwlock12.c: New file.
6525 2003-06-05  Jakub Jelinek  <jakub@redhat.com>
6527         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait,
6528         __lll_timedlock_wait, lll_unlock_wake_cb, __lll_timedwait_tid):
6529         Remove bogus hidden_proto.
6530         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
6531         Likewise.
6532         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_lock,
6533         lll_unlock_wake_cb, ___lll_timedwait_tid): Likewise.
6534         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (___lll_mutex_lock,
6535         ___lll_mutex_timedlock): Likewise.
6537 2003-06-04  Ulrich Drepper  <drepper@redhat.com>
6539         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
6540         (__pthread_cond_signal): Add some code to eventually handle
6541         cond_lock!=0.
6543 2003-06-01  Ulrich Drepper  <drepper@redhat.com>
6545         * Makefile (tests): Add tst-exec4.
6546         (tst-exec4-ARGS): Define.
6547         * tst-exec4.c: New file.
6549 2003-05-31  Ulrich Drepper  <drepper@redhat.com>
6551         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
6552         Also fail if tv_nsec < 0.
6553         (__lll_timedwait_tid): Likewise.
6554         * sysdeps/unix/sysv/linux/sem_timedwait.c (sem_timedwait): Likewise.
6555         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_timedwait_tid):
6556         Likewise.
6557         * sysdeps/unix/sysv/linux/s390/lowlevellock.c (___lll_timedwait_tid):
6558         Likewise.
6559         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c (__lll_mutex_timedlock):
6560         Likewise.
6561         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c (sem_timedwait):
6562         Likewise.
6563         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_timedwait_tid):
6564         Likewise.
6565         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (lll_timedwait_tid):
6566         Likewise.
6568         * Makefile (tests): Add tst-sem8 and tst-sem9.
6569         * tst-sem8.c: New file.
6570         * tst-sem9.c: New file.
6571         * sem_open.c: Fix creation of in_use record if the file exists but
6572         no internal record.
6574         * posix-timer.h: Remove old, unused timer_id2ptr and timer_ptr2id
6575         definitions.
6577         * sysdeps/pthread/timer_create.c (timer_create): In case
6578         evp==NULL, assign timer ID to sival_ptr.
6580         * descr.h (struct pthread_unwind_buf): Change type of prev element to
6581         struct pthread_unwind_buf *.
6582         (struct pthread): Likewise for cleanup_jmp_buf element.
6584         * cleanup.c (__pthread_register_cancel): Add cast to avoid warning.
6585         * cleanup_defer.c (__pthread_register_cancel_defer): Likewise.
6586         * unwind.c (__pthread_unwind_next): Likewise.
6588 2003-05-30  Ulrich Drepper  <drepper@redhat.com>
6590         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6591         (lll_futex_timed_wait): Use int for futex value parameter.
6592         (lll_futex_wake): Likewise.
6593         (lll_futex_requeue): Likewise.
6595         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
6596         Replace one memory operation with one register operation.
6598         * tst-join4.c (do_test): Fix error message.
6600         * tst-rwlock6.c (do_test): Use correct format specifier.
6602         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
6603         (__lll_mutex_lock_wait): Replace one memory operation with one
6604         register operation.
6605         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S
6606         (__lll_mutex_lock_wait): Likewise.
6608         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6609         (__lll_mutex_cond_lock): Add one to value parameter of
6610         __lll_lock_wait to reflect reality in the futex syscall.
6611         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6612         (lll_mutex_cond_lock): Likewise.
6614 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6616         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_cond_lock):
6617         New function.
6618         (lll_mutex_cond_lock): Define.
6620 2003-05-29  Ulrich Drepper  <drepper@redhat.com>
6622         * Makefile (tests): Add tst-signal6.
6623         * tst-signal6.c: New file.
6625         * sysdeps/unix/sysv/linux/s390/lowlevellock.h
6626         (__lll_mutex_unlock_force): New function
6627         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6629         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
6630         (__lll_mutex_unlock_force): New function.
6631         (lll_mutex_unlock_force): Use __lll_mutex_unlock_force.
6633         * tst-rwlock7.c (do_test): Use correct format specifier.
6635         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_requeue):
6636         Find break parameter in correct asm argument.
6638 2003-05-27  Jakub Jelinek  <jakub@redhat.com>
6640         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_clobbers):
6641         Remove out4.
6642         (lll_futex_requeue): Fix __o3 constraint, return negative errno if
6643         error occured.
6644         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6645         Add __mutex.
6646         * sysdeps/unix/sysv/linux/s390/lowlevellock.h (FUTEX_REQUEUE,
6647         lll_futex_requeue, lll_mutex_unlock_force): Define.
6649 2003-05-30  Jakub Jelinek  <jakub@redhat.com>
6651         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6652         (pthread_cond_t): Add __mutex.
6653         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (FUTEX_REQUEUE,
6654         lll_futex_requeue, lll_mutex_unlock_force): Define.
6656 2003-05-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
6658         * sysdeps/sh/tcb-offsets.sym: Define MUTEX_FUTEX.
6659         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h (pthread_cond_t):
6660         Add __mutex field.
6661         * sysdeps/unix/sysv/linux/sh/lowlevellock.h (SYSCALL_WITH_INST_PAD):
6662         Define.
6663         (lll_futex_wait, lll_futex_wake): Define.
6664         * sysdeps/unix/sysv/linux/sh/sh4/lowlevellock.h: New file.
6665         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: Try using
6666         FUTEX_REQUEUE instead of FUTEX_WAIT.
6667         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: Likewise.
6668         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Remember
6669         mutex which was used in condvar structure.  Call
6670         __pthread_mutex_cond_lock instead of __pthread_mutex_lock_internal.
6671         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Likewise.
6673         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Don't
6674         include tcb-offsets.h.  Read wakeup value in locked region.
6675         Use the value of gbr register as THREAD_ID.
6676         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
6677         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
6678         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
6680         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Remove futex related
6681         macros.
6683 2003-05-28  Ulrich Drepper  <drepper@redhat.com>
6685         * sysdeps/pthread/pthread_cond_broadcast.c
6686         (__pthread_cond_broadcast): Fix typo: MAX_INT -> INT_MAX.
6688 2003-05-26  Ulrich Drepper  <drepper@redhat.com>
6690         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Fix
6691         typo in register name.
6692         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Use parameters
6693         correctly.  Actually use requeue.  Little optimization.
6694         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Store
6695         mutex address early.  Handle cancellation state as 32-bit value.
6696         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6697         Remove unnecessary label.
6699 2003-05-25  Ulrich Drepper  <drepper@redhat.com>
6701         * sysdeps/pthread/pthread_cond_broadcast.c: Try using FUTEX_REQUEUE
6702         instead of FUTEX_WAIT.
6703         * sysdeps/pthread/pthread_cond_signal.c: Likewise.
6704         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
6705         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
6706         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: Likewise.
6707         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
6708         * sysdeps/pthread/pthread_cond_timedwait.c: Remember mutex which was
6709         used in condvar structure.  Call __pthread_mutex_cond_lock instead
6710         of __pthread_mutex_lock_internal.
6711         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6712         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6713         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6714         (__condvar_cleanup): Always call __pthread_mutex_cond_lock.
6715         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6716         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6717         * sysdeps/unix/sysv/linux/Makefile (libpthread-sysdep_routines):
6718         Add pthread_mutex_cond_lock.
6719         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add dep_mutex.
6720         * sysdeps/unix/sysv/linux/pthread_cond_mutex_lock.c: New file.
6721         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define
6722         lll_mutex_cond_lock.
6723         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Likewise.
6724         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6725         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
6726         Add __mutex field.
6727         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6728         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6730         * sysdeps/i386/tcb-offsets.sym: Define MUTEX_FUTEX.
6731         * sysdeps/x86_64/tcb-offsets.sym: Likewise.
6733         * pthreadP.h: Declare __pthread_mutex_cond_lock.
6734         * pthread_mutex_lock.c: Define LLL_MUTEX_LOCK if not already defined.
6735         Use it instead of lll_mutex_lock.  If __pthread_mutex_lock is a
6736         macro don't define aliases.
6738         * cancellation.c: Remove __pthread_enable_asynccancel_2.
6739         * pthreadP.h: Remove declaration of __pthread_enable_asynccancel_2.
6740         * sysdeps/pthread/pthread_cond_timedwait.c: Use
6741         __pthread_enable_asynccancel instead of __pthread_enable_asynccancel_2.
6742         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
6743         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
6744         * sysdeps/pthread/pthread_cond_wait.c: Likewise.
6745         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
6746         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
6748 2003-05-17  Ulrich Drepper  <drepper@redhat.com>
6750         * sem_open.c: Fix one endless loop.  Implement correct semantics
6751         wrt opening the same semaphore more then once.
6752         * sem_close.c: Adjust for sem_open change.
6753         * semaphoreP.h: Include <semaphore.h>.  Define struct inuse_sem.
6754         Declare __sem_mappings, __sem_mappings_lock, __sem_search.
6755         * Makefile (tests): Add tst-sem7.
6756         * tst-sem7.c: New file.
6758 2003-05-16  Roland McGrath  <roland@redhat.com>
6760         * sysdeps/unix/sysv/linux/register-atfork.c (libc_freeres_fn): Fix
6761         uninitialized variable braino.
6763 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
6765         * sysdeps/unix/sysv/linux/timer_gettime.c (timer_gettime): Correct
6766         test for syscall availability.
6768         * sysdeps/unix/sysv/linux/timer_settime.c (timer_settime): Set
6769         __no_posix_timers to -1 if the syscalls don't exist.
6771         * pthread_join.c (pthread_join): Set tid field of the joined
6772         thread to -1.  This isn't necessary but helps to recognize some
6773         error conditions with almost no cost.
6775         * allocatestack.c (FREE_P): Also negative values indicate an
6776         unused stack.
6778         * unwind.c: Include <unistd.h>.
6780 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
6782         * Makefile ($(objpfx)$(multidir)): Add rule to create the directory.
6784 2003-05-14  Jakub Jelinek  <jakub@redhat.com>
6786         * Makefile (crti-objs, crtn-objs): New variables.
6787         (omit-deps, extra-objs): Add crtn.
6788         ($(objpfx)libpthread.so): Depend on both crti and crtn
6789         and links to them in multidir.
6790         ($(objpfx)crtn.S, $(objpfx)crtn.o): New rules.
6792 2003-05-12  Steven Munroe  <sjmunroe@us.ibm.com>
6794         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
6795         (lll_mutex_unlock): Use atomic_exchange_rel.
6797 2003-05-11  Ulrich Drepper  <drepper@redhat.com>
6799         * cond-perf.c (cons): Add missing locking around setting of alldone.
6801 2003-05-10  Ulrich Drepper  <drepper@redhat.com>
6803         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Remove futex
6804         related macros.
6805         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
6807 2003-05-09  Ulrich Drepper  <drepper@redhat.com>
6809         * tst-sem6.c: New file.
6810         * Makefile (tests): Add tst-sem6.
6812         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (___lll_mutex_unlock):
6813         Use atomic_exchange_rel instead of atomic_exchange.
6814         * sysdeps/unix/sysv/linux/lowlevellock.c (lll_unlock_wake_cb):
6815         Likewise.
6817         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Improve quality of
6818         code for lll_futex_wait and lll_futex_wake in static apps.  Use
6819         vsyscall is possible.
6821         * sysdeps/unix/sysv/linux/pthread_getaffinity.c: New file.
6822         * sysdeps/unix/sysv/linux/pthread_setaffinity.c: New file.
6823         * sysdeps/pthread/pthread.h: Declare pthread_getaffinity_np and
6824         pthread_setaffinity_np.
6825         * Versions [libpthread] (GLIBC_2.3.3): Add pthread_getaffinity_np
6826         and pthread_setaffinity_np.
6827         * Makefile (libpthread-routines): Add pthread_getaffinity and
6828         pthread_setaffinity.
6830         * allocatestack.c (allocate_stack): If ARCH_RETRY_MMAP is defined,
6831         use it in case mmap to allocate the stack fails.
6832         * sysdeps/unix/sysv/linux/x86_64/Makefile: Don't define
6833         ARCH_MAP_FLAGS here.
6834         * sysdeps/x86_64/pthreaddef.h: Define ARCH_MAP_FLAGS and
6835         ARCH_RETRY_MMAP.
6837 2003-05-08  Ulrich Drepper  <drepper@redhat.com>
6839         * sysdeps/unix/sysv/linux/fork.c: Complete rewrite of the atfork
6840         handler implementation.  It is now lockless in fork().
6841         * sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
6842         * sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.
6843         * sysdeps/unix/sysv/linux/fork.h: Don't include <link.h>.  Don't
6844         declare the __fork_*_lists.
6845         (struct fork_handler): Include pointers to all three functions.
6846         Add next, refcntr and need_signal elements.
6847         (__fork_handlers): New declaration.
6848         (__register_atfork_malloc): Remove declaration.
6849         (HAVE_register_atfork_malloc): Remove definition.
6850         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove
6851         __pthread_child_handler variable.
6852         (__libc_pthread_init): Use __register_atfork instead of explicitly
6853         adding to the list.
6854         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Define lll_futex_wait
6855         and lll_futex_wake.
6856         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
6858         * unwind.c (unwind_cleanup): Print error message and then abort.  This
6859         function must never be reached.
6861         * cond-perf.c: New file.
6863 2003-05-05  Ulrich Drepper  <drepper@redhat.com>
6865         * sysdeps/i386/tls.h (TLS_INIT_TP): Include \n in error message.
6867 2003-05-04  Roland McGrath  <roland@redhat.com>
6869         * Makefile ($(objpfx)../libc.so): New target.
6871 2003-05-02  Ulrich Drepper  <drepper@redhat.com>
6873         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6874         (pthread_condattr_t): Size is only an int, don't use long for
6875         alignment.
6876         (pthread_mutexattr_t): Likewise.
6877         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
6878         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
6879         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
6881 2003-05-01  Ulrich Drepper  <drepper@redhat.com>
6883         * sysdeps/i386/tls.h: Define THREAD_ID.
6884         * sysdeps/ia64/tls.h: Likewise.
6885         * sysdeps/powerpc/tls.h: Likewise.
6886         * sysdeps/s390/tls.h: Likewise.
6887         * sysdeps/sh/tls.h: Likewise.
6888         * sysdeps/x86_64/tls.h: Likewise.
6889         * pthread_mutex_lock.c: Use THREAD_ID instead of THREAD_SELF to
6890         record ownership.
6891         * pthread_mutex_timedlock.c: Likewise.
6892         * pthread_mutex_trylock.c: Likewise.
6893         * pthread_mutex_unlock.c: Likewise.
6894         * pthread_rwlock_trywrlock.c: Likewise.
6895         * sysdeps/pthread/pthread_rwlocklock_rdlock.c: Likewise.
6896         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
6897         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
6898         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
6900         * sysdeps/pthread/createthread.c (create_thread): Use CLONE_SYSVSEM
6901         flag.
6903 2003-04-29  Jakub Jelinek  <jakub@redhat.com>
6905         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
6906         (__SIZEOF_PTHREAD_COND_T): Define to 48.
6907         (pthread_rwlock_t): Add 16 bytes of pad instead of 8 before __flags.
6908         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h (pthread_cond_t):
6909         Make __align long long instead of long.
6910         (pthread_rwlock_t): Formatting.
6911         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h
6912         (pthread_rwlock_t): Formatting.
6913         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h
6914         (pthread_cond_t): Make __align long long instead of long.
6915         (pthread_rwlock_t): Move __flags field to the same position as in
6916         linuxthreads.
6918 2003-04-30  Ulrich Drepper  <drepper@redhat.com>
6920         * tst-rwlock6.c (do_test): Use correct printf format specifiers.
6921         * tst-rwlock7.c (do_test): Likewise.
6923 2003-04-26  Roland McGrath  <roland@redhat.com>
6925         * Makefile ($(test-modules)): Depend on $(common-objpfx)shlib.lds.
6927 2003-04-22  Jakub Jelinek  <jakub@redhat.com>
6929         * allocatestack.c (TLS_TPADJ): Add TLS_PRE_TCB_SIZE instead of
6930         sizeof (struct pthread).
6931         (allocate_stack): Subtract TLS_PRE_TCB_SIZE bytes instead of
6932         1 struct pthread.
6933         * sysdeps/powerpc/tls.h (TLS_INIT_TCB_SIZE, TLS_TCB_SIZE): Define
6934         to 0.
6935         (TLS_INIT_TCB_ALIGN, TLS_TCB_ALIGN): Define to alignment of
6936         struct pthread.
6937         (TLS_PRE_TCB_SIZE): Increase to cover tcbhead_t preceeded by pad
6938         to 32-bit bytes.
6939         (INSTALL_DTV, GET_DTV, THREAD_DTV): tcbhead_t is immediately before
6940         tcbp.
6941         (TLS_INIT_TP, THREAD_SELF, INIT_THREAD_SELF): Don't add TLS_TCB_SIZE
6942         unneccessarily.
6943         (NO_TLS_OFFSET): Define.
6944         * sysdeps/unix/sysv/linux/powerpc/createthread.c (TLS_VALUE): Don't
6945         add TLS_TCB_SIZE unnecessarily.
6947 2003-04-22  Roland McGrath  <roland@redhat.com>
6949         * Makeconfig (shared-thread-library): Reverse link order to work
6950         around linker bug.
6952 2003-04-22  Ulrich Drepper  <drepper@redhat.com>
6954         * semaphore.h: Fix typo in comment.
6956 2003-04-21  Ulrich Drepper  <drepper@redhat.com>
6958         * sysdeps/pthread/sigfillset.c: New file.
6960         * init.c (__pthread_initialize_minimal): Don't block SIGTIMER.
6961         * pthreadP.h: Make SIGTIMER and SIGCANCEL the same.
6962         * sysdeps/pthread/pthread_sigmask.c: Remove handling of SIGTIMER.
6963         * sysdeps/pthread/sigaction.c: Likewise.
6964         * sysdeps/pthread/sigprocmask.c: New file.
6965         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): Define as
6966         __SIGRTMIN+1.
6967         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
6968         Block SIGTIMER.  Also handle SI_TKILL events and terminate thread
6969         in this case.
6971 2003-04-19  Ulrich Drepper  <drepper@redhat.com>
6973         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
6974         (DL_SYSINFO_IMPLEMENTATION): Add .eh_frame information.
6976         * sysdeps/unix/sysv/linux/unregister-atfork.c
6977         (__unregister_atfork): Don't free memory not allocated dynamically.
6979         * semaphore.h: Remove __THROW marker from cancellation points.
6980         * nptl/sysdeps/pthread/pthread.h: Likewise.
6982 2003-04-18  Ulrich Drepper  <drepper@redhat.com>
6984         * sysdeps/pthread/pthread.h: Don't mark pthread_testcancel,
6985         pthread_cancel, pthread_setcancelstate, and pthread_setcanceltype with
6986         __THROW.
6988 2003-04-16  Jakub Jelinek  <jakub@redhat.com>
6990         * tst-cancel4.c (do_test): Use %zd instead of %d when printing cnt.
6992 2003-04-15  Roland McGrath  <roland@redhat.com>
6994         * forward.c (__pthread_unwind): Tweak to avoid warning.
6996 2003-04-15  Ulrich Drepper  <drepper@redhat.com>
6998         * pthreadP.h: Move THREAD_ATOMIC_* replacements to the top.
7000 2003-04-14  Ulrich Drepper  <drepper@redhat.com>
7002         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Don't
7003         overflow CFA advance instructions.
7004         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7006 2003-04-14  Jakub Jelinek  <jakub@redhat.com>
7008         * sysdeps/i386/tls.h: Rename LOCK to LOCK_PREFIX.
7009         * sysdeps/i386/pthread_spin_lock.c: Likewise.
7010         * sysdeps/x86_64/tls.h: Likewise.  Define LOCK_PREFIX if not already
7011         defined.
7013         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Use
7014         DW_CFA_advance_loc2 for .Laddl-.Lsubl.
7015         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Use
7016         DW_CFA_advance_loc for .Laddl-.Lsubl.
7018 2003-04-13  Ulrich Drepper  <drepper@redhat.com>
7020         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Don't use
7021         position-independent unwind data for static libraries.
7022         Add missing unwind info.  Add comments.
7024         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Add unwind info.
7025         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7026         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7027         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7029 2003-04-12  Ulrich Drepper  <drepper@redhat.com>
7031         * Makefile: Make sure all cancellation points are compiled with
7032         exception and asynchronous unwind tables.
7034         * sysdeps/x86_64/tls.h (THREAD_SETMEM): Word around compiler bug
7035         which mishandles loading of global object addresses in PIC.
7036         (THREAD_SETMEM_NC): Likewise.
7038 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7040         * pthread.h: Define new data structure for cleanup buffer.  Declare
7041         new cleanup handler interfaces.
7042         * descr.h: Include <unwind.h> if necessary.  Define pthread_unwind_buf.
7043         (struct pthread): Add cleanup_jmp_buf pointer.  Define
7044         HAVE_CLEANUP_JMP_BUF and not HAVE_CANCELBUF.
7045         * pthreadP.h: Declare __pthread_unwind.  Define __do_cancel to use
7046         it.  Declare old cleanup handler installation functions.
7047         * cleanup.c: Rewrite.  Install handler for unwind-based cleanup
7048         handling.
7049         * cleanup_defer.c: Likewise.
7050         * cleanup_compat.c: New file.  Old cleanup code.
7051         * cleanup_def_compat.c: New file.  Old cleanup code.
7052         * pthread_create.c (start_thread): Initialize cleanup_jmp_buf element
7053         if own thread descriptor.
7054         * unwind.c: New file.
7055         * forward.c: Add __pthread_unwind.
7056         * init.c (pthread_functions): Add __pthread_unwind.
7057         * sysdeps/pthread/pthread-functions.s (struct pthread_functions):
7058         Add ptr___pthread_unwind.
7059         * Versions [GLIBC_2.3.3] (libpthread): Export new cleanup handling
7060         and unwind function.
7061         * Makefile (libpthread-routines): Add cleanup_compat,
7062         cleanup_def_compat, and unwind.  Define CFLAGS to enable unwind
7063         table generation if necessary.
7064         * version.c: Record whether unwind support is compiled in.
7065         * sysdeps/pthread/configure.in: Add checks for unwind unterfaces.
7066         * sysdeps/pthread/bits/libc-lock.h: Add prototypes of the old cleanup
7067         handler interfaces.
7068         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Add quite a bit of
7069         complication to generate unwind information for syscall wrappers.
7070         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: Likewise.
7071         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Define
7072         __cleanup_fct_attribute.
7074         * Makefile: Add rules to build and run tst-cleanup0.
7075         * tst-cleanup0.c: New file.
7076         * tst-cleanup0.expect: New file.
7078         * pthread_create.c (deallocate_tsd): Don't take parameter.  Adjust
7079         caller.  Optimize to avoid often unecessary local variable.
7081 2003-04-11  Roland McGrath  <roland@redhat.com>
7083         * Makefile ($(objpfx)multidir.mk): New target, generated makefile that
7084         sets variable `multidir'; include that.
7085         (generated): Add it.
7086         ($(objpfx)$(multidir)/crti.o): New target.
7087         [$(multidir) != .] (generated-dirs, extra-objs, omit-deps): Add it.
7089 2003-04-11  Ulrich Drepper  <drepper@redhat.com>
7091         * tst-attr2.c (do_test): Add cast to avoid warning.
7092         * tst-mutex4.c (do_test): Likewise.
7094 2003-04-10  Ulrich Drepper  <drepper@redhat.com>
7096         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
7097         in child.
7099 2003-04-09  Ulrich Drepper  <drepper@redhat.com>
7101         * Makefile (tests): Add tst-detach1.
7102         * tst-detach1.c: New file.
7104 2003-04-08  Ulrich Drepper  <drepper@redhat.com>
7106         * sysdeps/pthread/pthread.h: Remove duplicate
7107         pthread_cleanup_{push,pop} definitions.
7109         * tst-barrier2.c: Eliminate warnings.
7110         * tst-cancel4.c: Likewise.
7111         * tst-cond4.c: Likewise.
7112         * tst-cond6.c: Likewise.
7113         * tst-detach1.c: Likewise.
7114         * tst-rwlock4.c: Likewise.
7115         * tst-rwlock6.c: Likewise.
7116         * tst-rwlock7.c: Likewise.
7117         * tst-sem3.c: Likewise.
7118         * tst-spin2.c: Likewise.
7119         * tst-umask1.c: Likewise.
7121 2003-04-07  Ulrich Drepper  <drepper@redhat.com>
7123         * pthread_detach.c (pthread_detach): Fix test for invalid TID.
7125 2003-04-06  Ulrich Drepper  <drepper@redhat.com>
7127         * descr.h (struct pthread): Move cancelhandling member to the front.
7129 2003-04-05  Ulrich Drepper  <drepper@redhat.com>
7131         * sysdeps/unix/sysv/linux/register-atfork.c: Define malloc_prepare,
7132         malloc_parent, and malloc_child statically.
7133         (__register_atfork_malloc): New function.
7134         (free_mem): Don't free any of the malloc_* variables on the list.
7135         * sysdeps/unix/sysv/linux/fork.h: Declare __register_atfork_malloc.
7136         Define HAVE_register_atfork_malloc.
7138 2003-04-04  Ulrich Drepper  <drepper@redhat.com>
7140         * sysdeps/pthread/createthread.c (create_thread): Add some more
7141         comments explaining when to set multiple_threads and when not.
7143         * pthreadP.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7144         THREAD_ATOMIC_BIT_SET if not already defined.
7145         * sysdeps/i386/tls.h: Define THREAD_ATOMIC_CMPXCHG_VAL and
7146         THREAD_ATOMIC_BIT_SET:
7147         * sysdeps/x86_64/tls.h: Likewise.
7148         * cleanup_defer.c (_pthread_cleanup_push_defer): Rewrite to use
7149         THREAD_ATOMIC_CMPXCHG_VAL.
7150         (_pthread_cleanup_pop_restore): Likewise.
7151         * cancellation.c (__pthread_enable_asynccancel): Likewise.
7152         (__pthread_enable_asynccancel_2): Likewise.
7153         (__pthread_disable_asynccancel): Likewise.
7154         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7155         (__libc_disable_asynccancel): Likewise.
7156         * init.c (sigcancel_handler): Likewise.
7157         * pthread_setcancelstate.c (__pthread_setcancelstate): Likewise.
7158         * pthread_setcanceltype.c (__pthread_setcanceltype): Likewise.
7160 2003-04-03  Ulrich Drepper  <drepper@redhat.com>
7162         * init.c (sigcancel_handler): Don't set EXITING_BIT here.
7163         * libc-cancellation.c (__libc_enable_asynccancel): Likewise.
7164         * pthreadP.h (__do_cancel): Set EXITING_BIT here.
7165         * Makefile (tests): Add tst-cancel11.
7166         * tst-cancel11.c: New file.
7168 2003-04-01  Ulrich Drepper  <drepper@redhat.com>
7170         * pthread_create.c (deallocate_tsd): Clear/free memory after the last
7171         round, not the first.  Use specific_used flag instead of local
7172         found_nonzero variable.  Use THREAD_[SG]ETMEM where possible.
7173         (__free_tcb): Don't call deallocate_tsd here.
7174         (start_thread): Call deallocate_tsd here.
7175         * pthread_setspecific.c: Set specific_used flag really only when
7176         needed.
7177         * Makefile (tests): Add tst-tsd3.c and tst-tsd4.
7178         * tst-tsd3.c: New file.
7179         * tst-tsd4.c: New file.
7181 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7183         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_mutex_lock):
7184         Use atomic_exchange_and_add instead of __lll_add.
7185         (__lll_mutex_timedlock): Likewise.
7186         Patch by Ian Wienand.
7188 2003-03-24  Steven Munroe  <sjmunroe@us.ibm.com>
7190         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7191         (SINGLE_THREAD_P): Fix typo.
7192         * tst-cancel-wrappers.sh: Handle '.'ed symbols.
7194 2003-03-31  Ulrich Drepper  <drepper@redhat.com>
7196         * Makefile (tests): Add tst-align.
7197         * tst-align.c: New file.
7198         * sysdeps/i386/Makefile: Define CFLAGS-tst-align.
7200         * sysdeps/i386/tls.h (CALL_THREAD_FCT): Align stack of called
7201         function correctly.
7203         * tst-tsd2.c: Add casts to avoid warnings.
7205 2003-03-30  Ulrich Drepper  <drepper@redhat.com>
7207         * descr.h (struct pthread): Move most often used elements to the front.
7209 2003-03-29  Ulrich Drepper  <drepper@redhat.com>
7211         * Makefile (libpthread-routines): Add pthread_atfork.
7212         (libpthread-static-only-routines): Add pthread_atfork.
7214 2003-03-28  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
7216         * sysdeps/sh/tls.h: Include nptl/descr.h after the definition
7217         of TLS_DTV_AT_TP.
7218         (INSTALL_DTV): Add parens.
7219         (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM, THREAD_SETMEM_NC):
7220         Use passed descr instead of THREAD_SELF.
7221         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S
7222         (__lll_mutex_timedlock_wait): Correct expected value after
7223         spurious wakeup.
7224         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S:
7225         Release lock before waking up the waiters.
7226         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Correct exit
7227         criteria.  Reorderstruct passed to cleanup handler.  Fix
7228         handling of cancellation and failung pthread_mutex_unlock call.
7229         Use __pthread_enable_asynccancel_2 instead of
7230         __pthread_enable_asynccancel.
7231         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7232         Return result of lock re-get if it fails.
7233         * sysdeps/unix/sysv/linux/sh/pthread_once.S: Fix wrong argument
7234         for __pthread_cleanup_push.
7235         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Fix
7236         completely broken rwlock implementation.
7237         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7238         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7239         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7240         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: Likewise.
7241         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7242         * sysdeps/unix/sysv/linux/sh/sem_post.S: Fix error value.  Use
7243         versioned_symbol macro.
7244         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Use versioned_symbol macro.
7245         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7247 2003-03-27  Ulrich Drepper  <drepper@redhat.com>
7249         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: Don't declare
7250         __timer_helper_thread.  Declare __start_helper_thread, __helper_once,
7251         and __helper_tid.
7252         (struct timer): Remove th and bar field.
7253         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Remove
7254         debugging code.  Create only one helper thread.
7255         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Don't kill
7256         helper thread.
7257         * sysdeps/unix/sysv/linux/timer_routines.c (timer_helper_thread):
7258         Renamed.  Define statically.  Use thread info from siginfo.
7259         (__helper_once): New variable.
7260         (__helper_tid): New variable.
7261         (__reset_helper_control): New function.
7262         (__start_helper_thread): New function.
7264         * pthread_create.c (start_thread): Don't use setjmp inside
7265         __builtin_expect to work around gcc bug.
7267         * sysdeps/unix/sysv/linux/timer_delete.c (timer_delete): Even if
7268         timer_delete syscall fails, but not with ENOSYS, set
7269         __no_posix_timers.
7271         * sysdeps/unix/sysv/linux/timer_settime.c [!__ASSUME_POSIX_TIMERS]
7272         (timer_settime): Fix typo.
7273         * sysdeps/unix/sysv/linux/timer_getoverr.c
7274         [!__ASSUME_POSIX_TIMERS] (timer_getoverrun): Likewise.
7276 2003-03-27  Jakub Jelinek  <jakub@redhat.com>
7278         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Fix
7279         offset of cleanupbuf.__prev.
7281 2003-03-26  Jakub Jelinek  <jakub@redhat.com>
7283         * sysdeps/unix/sysv/linux/timer_getoverr.c: Fix typo in name
7284         of included file.
7286 2003-03-26  Ulrich Drepper  <drepper@redhat.com>
7288         * sysdeps/unix/sysv/linux/timer_create.c (timer_create): If EVP ==
7289         NULL provide default definition to syscall.
7291 2003-03-25  Roland McGrath  <roland@redhat.com>
7293         * sysdeps/pthread/posix-timer.h (TIMER_MAX): Define if not defined.
7294         (timer_id2ptr): Fix typo.
7296 2003-03-25  Ulrich Drepper  <drepper@redhat.com>
7298         * pthreadP.h: Define SIGCANCEL and SIGTIMER.
7299         * sysdeps/i386/pthreaddef.h: Remove SIGCANCEL definition.
7300         * sysdeps/ia64/pthreaddef.h: Likewise.
7301         * sysdeps/powerpc/pthreaddef.h: Likewise.
7302         * sysdeps/s390/pthreaddef.h: Likewise.
7303         * sysdeps/sh/pthreaddef.h: Likewise.
7304         * sysdeps/x86_64/pthreaddef.h: Likewise.
7305         * init.c (__pthread_initialize_minimal): Block SIGTIMER.
7306         * sysdeps/pthread/sigaction.c: Also prevent SIGTIMER handler from
7307         being changed.
7308         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Make sure
7309         SIGTIMER is not unblocked.
7310         * sysdeps/unix/sysv/linux/allocrtsig.c (current_rtmin): One more
7311         RT signal taken.
7312         * sysdeps/unix/sysv/linux/pthread_kill.c: Do not allow SIGTIMER to
7313         be send.
7314         * sysdeps/pthread/posix-timer.h (timer_id2ptr, timer_ptr2id): Just
7315         pass pointer through as ID.
7316         * sysdeps/unix/sysv/linux/bits/local_lim.h (TIMER_MAX): Removed.
7317         * sysdeps/unix/sysv/linux/kernel-posix-timers.h: New file.
7318         * sysdeps/unix/sysv/linux/timer_create.c: New file.
7319         * sysdeps/unix/sysv/linux/timer_delete.c: New file.
7320         * sysdeps/unix/sysv/linux/timer_getoverr.c: New file.
7321         * sysdeps/unix/sysv/linux/timer_gettime.c: New file.
7322         * sysdeps/unix/sysv/linux/timer_routines.c: New file.
7323         * sysdeps/unix/sysv/linux/timer_settime.c: New file.
7324         * sysdeps/unix/sysv/linux/ia64/Versions: New file.
7325         * sysdeps/unix/sysv/linux/ia64/timer_create.c: New file.
7326         * sysdeps/unix/sysv/linux/ia64/timer_delete.c: New file.
7327         * sysdeps/unix/sysv/linux/ia64/timer_getoverr.c: New file.
7328         * sysdeps/unix/sysv/linux/ia64/timer_gettime.c: New file.
7329         * sysdeps/unix/sysv/linux/ia64/timer_settime.c: New file.
7330         * sysdeps/unix/sysv/linux/powerpc/powerpc64/Versions: New file.
7331         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_create.c: New file.
7332         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_delete.c: New file.
7333         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_getoverr.c: New file.
7334         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_gettime.c: New file.
7335         * sysdeps/unix/sysv/linux/powerpc/powerpc64/timer_settime.c: New file.
7336         * sysdeps/unix/sysv/linux/s390/s390-64/Versions: New file.
7337         * sysdeps/unix/sysv/linux/s390/s390-64/timer_create.c: New file.
7338         * sysdeps/unix/sysv/linux/s390/s390-64/timer_delete.c: New file.
7339         * sysdeps/unix/sysv/linux/s390/s390-64/timer_getoverr.c: New file.
7340         * sysdeps/unix/sysv/linux/s390/s390-64/timer_gettime.c: New file.
7341         * sysdeps/unix/sysv/linux/s390/s390-64/timer_settime.c: New file.
7342         * sysdeps/unix/sysv/linux/x86_64/Versions: New file.
7343         * sysdeps/unix/sysv/linux/x86_64/compat-timer.h: New file.
7344         * sysdeps/unix/sysv/linux/x86_64/timer_create.c: New file.
7345         * sysdeps/unix/sysv/linux/x86_64/timer_delete.c: New file.
7346         * sysdeps/unix/sysv/linux/x86_64/timer_getoverr.c: New file.
7347         * sysdeps/unix/sysv/linux/x86_64/timer_gettime.c: New file.
7348         * sysdeps/unix/sysv/linux/x86_64/timer_settime.c: New file.
7350         * pthreadP.h: Remove FRAME_LEFT definition.
7351         * cleanup.c (_pthread_cleanup_push): Don't check for reference to
7352         already left frame.  Programs which have this problem are not POSIX
7353         compliant.
7354         * cleanup_defer.c (_pthread_cleanup_push_defer): Likewise.
7356 2003-03-24  Ulrich Drepper  <drepper@redhat.com>
7358         * sysdeps/pthread/tst-timer.c: Check return values of the
7359         functions we test.
7361 2003-03-23  Roland McGrath  <roland@redhat.com>
7363         * tst-tls3.c (do_test) [! HAVE___THREAD]: Don't test anything.
7364         * tst-tls3mod.c: Likewise.
7365         * tst-tls1.c: Likewise.
7366         * tst-tls2.c: Likewise.
7368         * tst-mutex5.c (do_test): Unlock before destroy, otherwise we invoke
7369         undefined behavior.
7371         * tst-join5.c (tf1, tf2): Add a cast.
7373         * Makeconfig (includes): Append -I$(..)nptl to this variable.
7375         * tst-barrier2.c (do_test) [! _POSIX_THREAD_PROCESS_SHARED]:
7376         Don't test anything.
7377         * tst-cond4.c: Likewise.
7378         * tst-cond6.c: Likewise.
7379         * tst-flock2.c: Likewise.
7380         * tst-mutex4.c: Likewise.
7381         * tst-rwlock4.c: Likewise.
7382         * tst-signal1.c: Likewise.
7383         * tst-spin2.c: Likewise.
7384         * tst-cond11.c [! _POSIX_CLOCK_SELECTION]: Likewise.
7386         * tst-mutex4.c: Use test-skeleton.c.
7387         * tst-spin2.c: Likewise.
7388         * tst-sysconf.c: Likewise.
7389         * tst-barrier2.c: Likewise.
7390         * tst-cond4.c: Likewise.
7391         * tst-cond6.c: Likewise.
7392         * tst-rwlock4.c: Likewise.
7393         * tst-unload.c: Likewise.
7394         * tst-flock2.c (do_test): Use return instead of exit.
7396 2003-03-22  Jakub Jelinek  <jakub@redhat.com>
7398         * sysdeps/unix/sysv/linux/fork.c (__fork): Add libc_hidden_def.
7400 2003-03-21  Ulrich Drepper  <drepper@redhat.com>
7402         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h
7403         (__lll_mutex_trylock): Use atomic_compare_and_exchange_val_acq
7404         instead of __lll_compare_and_swap.
7405         * sysdeps/unix/sysv/linux/ia64/pthread_once.c (__pthread_once):
7406         Likewise.
7407         Removed definition if __lll_compare_and_swap.
7409         * cancellation.c: Adjust for new form of compare&exchange macros.
7410         * cleanup_defer.c: Likewise.
7411         * init.c: Likewise.
7412         * libc-cancellation.c: Likewise.
7413         * old_pthread_cond_broadcast.c: Likewise.
7414         * old_pthread_cond_signal.c: Likewise.
7415         * old_pthread_cond_timedwait.c: Likewise.
7416         * old_pthread_cond_wait.c: Likewise.
7417         * pthread_cancel.c: Likewise.
7418         * pthread_create.c: Likewise.
7419         * pthread_detach.c: Likewise.
7420         * pthread_join.c: Likewise.
7421         * pthread_key_delete.c: Likewise.
7422         * pthread_setcancelstate.c: Likewise.
7423         * pthread_setcanceltype.c: Likewise.
7424         * pthread_timedjoin.c: Likewise.
7425         * pthread_tryjoin.c: Likewise.
7426         * sysdeps/pthread/createthread.c: Likewise.
7428 2003-03-20  Ulrich Drepper  <drepper@redhat.com>
7430         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: Include <atomic.h>.
7431         Remove __lll_add, __lll_dec_if_positive, and __lll_test_and_set
7432         definitions.  Replace uses with calls to atomic_* functions.
7433         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Likewise.
7434         * sysdeps/unix/sysv/linux/lowlevellock.c: Replace __lll_add and
7435         __lll_test_and_set calls with atomic_exchange_and_add and
7436         atomic_exchange calls respectively.
7437         * sysdeps/unix/sysv/linux/sem_post.c: Likewise.
7438         * sysdeps/unix/sysv/linux/sem_timedwait.c: Likewise.
7439         * sysdeps/unix/sysv/linux/sem_trywait.c: Likewise.
7440         * sysdeps/unix/sysv/linux/sem_wait.c: Likewise.
7441         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Likewise.
7442         * sysdeps/unix/sysv/linux/ia64/sem_port.c: Likewise.
7443         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: Likewise.
7445         * allocatestack.c (allocate_stack): Assume atomic_exchange_and_add
7446         returns the old value.
7448 2003-03-20  Martin Schwidefsky  <sky@mschwid3.boeblingen.de.ibm.com>
7450         * sysdeps/s390/pthread_spin_lock.c (pthread_spin_lock): Use type
7451         int for variable OLDVAL and correct inline assembler contraint.
7452         * sysdeps/s390/pthread_spin_trylock.c (pthread_spin_trylock): Use
7453         type int for variable OLD.
7455         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it
7456         only for s390-32.
7457         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7458         (SINGLE_THREAD_P): Use global variable __local_multiple_threads
7459         instead of multiple_threads field in the TCB.
7461 2003-03-19  Ulrich Drepper  <drepper@redhat.com>
7463         * sysdeps/i386/i686/bits/atomic.h: Removed.
7464         * sysdeps/i386/i586/bits/atomic.h: Removed.
7465         * sysdeps/i386/i486/bits/atomic.h: Removed.  Moved to glibc.
7466         * sysdeps/x86_64/bits/atomic.h: Removed.  Moved to glibc.
7467         * sysdeps/s390/bits/atomic.h: Removed.  Moved to glibc.
7468         * sysdeps/sh/bits/atomic.h: Removed.  Moved to glibc.
7469         * sysdeps/ia64/bits/atomic.h: Removed.  Moved to glibc.
7470         * sysdeps/powerpc/bits/atomic.h: Removed.  Moved to glibc.
7471         * atomic.h: Removed.  Moved to glibc.
7473         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Add
7474         support for clock selection.
7476         * sysdeps/pthread/pthread_cond_broadcast.c: Release lock before
7477         signalling waiters.
7479 2003-03-18  Roland McGrath  <roland@redhat.com>
7481         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7482         Add __lll_rel_instr first.  Add memory clobber.
7483         (lll_mutex_unlock): Use __lll_test_and_set.
7484         From Paul Mackerras <paulus@samba.org>.
7486         * sysdeps/powerpc/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define
7487         unconditionally.
7488         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h
7489         (SINGLE_THREAD_P):  Add `header.' prefix.
7490         From Paul Mackerras <paulus@samba.org>.
7492         * Versions (libpthread: GLIBC_2.3.2): Move pthread_tryjoin_np and
7493         pthread_timedjoin_np to ...
7494         (libpthread: GLIBC_2.3.3): ... here.
7495         (libpthread: GLIBC_2.2): Move pthread_barrierattr_getpshared there too.
7497         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
7498         Avoid shadowing VAL variable.
7500         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h (__lll_test_and_set):
7501         New macro.
7503 2003-03-18  Ulrich Drepper  <drepper@redhat.com>
7505         * Makefile (tests): Add tst-cond11.
7506         * tst-cond11.c: New file.
7508         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Reorder
7509         struct passed to cleanup handler to eliminate one more
7510         instruction.
7511         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7513         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7514         (pthrad_cond_t): Replace __unused field with __clock.
7516         * sysdeps/pthread/pthread_cond_wait.c: Release condvar lock before
7517         waken all waiters in cleanup handler.
7518         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7519         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7521         * pthread_condattr_getclock.c: New file.
7522         * pthread_condattr_setclock.c: New file.
7523         * sysdeps/pthread/pthread.h: Declare these new functions.
7524         * Versions [GLIBC_2.3.3] (libpthread): Add the new functions.
7525         * Makefile (libpthread-routines): Add the new functions.
7526         * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_condattr):
7527         Renamed field to value.  Document use of the bits.
7528         * pthread_condattr_getpshared.c: Adjust for struct pthread_condattr
7529         change.
7530         * pthread_condattr_setpshared.c: Likewise.
7531         * pthread_cond_init.c (__pthread_cond_init): Initialized __clock field.
7532         * sysdeps/unix/sysv/linux/lowlevelcond.sym: Add cond_clock symbol.
7533         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
7534         Add __clock field.
7535         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: Likewise.
7536         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: Likewise.
7537         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: Likewise.
7538         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: Likewise.
7539         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S:
7540         Implement clock selection.
7541         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7542         * pthread-errnos.sym: Add ENOSYS.
7543         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
7544         _POSIX_CLOCK_SELECTION.
7545         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
7547         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Remove
7548         invalid .size directive.
7550 2003-03-17  Roland McGrath  <roland@redhat.com>
7552         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_lock_wait):
7553         Formatting tweaks.
7555 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7557         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: Use __builtin_expect.
7558         Use __lll_add instead of spelling it out.  Use protected symbol names.
7559         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Use __builtin_expect.
7560         Use __lll_add.
7561         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (__lll_compare_and_swap):
7562         Renamed from lll_compare_and_swap.  Use new name where necessary.
7563         (__lll_add): Defined.
7564         (__lll_dec_if_positive): Defined.
7565         (__lll_test_and_set): Defined.
7566         * sysdeps/ia64/pthread_spin_init.c: Removed.
7567         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Removed.
7568         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Removed.
7569         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Removed.
7570         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Removed.
7571         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: Removed.
7572         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: Removed.
7573         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Removed.
7574         * sysdeps/ia64/bits/atomic.h: Add __builtin_expect where appropriate.
7575         * sysdeps/ia64/pthread_spin_unlock.c (pthread_spin_unlock): Use
7576         __sync_lock_release_si.
7577         Patch by Jakub Jelinek.
7579         * sysdeps/unix/sysv/linux/lowlevellock.c (__lll_timedlock_wait):
7580         Fix timeout handling.
7581         (__lll_timedwait_tid): Likewise.
7582         (lll_unlock_wake_cb): Wake up other waiters if necessary.
7583         Patch by Jakub Jelinek.
7585         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: Pretty printing.
7587 2003-03-17  Roland McGrath  <roland@redhat.com>
7589         PowerPC port contributed by Paul Mackerras <paulus@samba.org>.
7590         * sysdeps/pthread/pthread_spin_init.c: New file.
7591         * sysdeps/pthread/pthread_spin_unlock.c: New file.
7592         * sysdeps/powerpc/Makefile: New file.
7593         * sysdeps/powerpc/pthread_spin_lock.c: New file.
7594         * sysdeps/powerpc/pthread_spin_trylock.c: New file.
7595         * sysdeps/powerpc/pthreaddef.h: New file.
7596         * sysdeps/powerpc/tcb-offsets.sym: New file.
7597         * sysdeps/powerpc/td_ta_map_lwp2thr.c: New file.
7598         * sysdeps/powerpc/tls.h: New file.
7599         * sysdeps/powerpc/bits/atomic.h: New file.
7600         * sysdeps/unix/sysv/linux/libc-lowlevelmutex.c: New file.
7601         * sysdeps/unix/sysv/linux/libc-lowlevellock.c: New file.
7602         * sysdeps/unix/sysv/linux/lowlevellock.c: New file.
7604         * sysdeps/unix/sysv/linux/lowlevelmutex.c: New file.
7605         * sysdeps/unix/sysv/linux/sem_post.c: New file.
7606         * sysdeps/unix/sysv/linux/sem_timedwait.c: New file.
7607         * sysdeps/unix/sysv/linux/sem_trywait.c: New file.
7608         * sysdeps/unix/sysv/linux/sem_wait.c: New file.
7609         * sysdeps/unix/sysv/linux/powerpc/Makefile: New file.
7610         * sysdeps/unix/sysv/linux/powerpc/createthread.c: New file.
7611         * sysdeps/unix/sysv/linux/powerpc/fork.c: New file.
7612         * sysdeps/unix/sysv/linux/powerpc/lowlevellock.h: New file.
7613         * sysdeps/unix/sysv/linux/powerpc/pt-vfork.S: New file.
7614         * sysdeps/unix/sysv/linux/powerpc/pthread_once.c: New file.
7615         * sysdeps/unix/sysv/linux/powerpc/bits/pthreadtypes.h: New file.
7616         * sysdeps/unix/sysv/linux/powerpc/bits/semaphore.h: New file.
7617         * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep-cancel.h: New file.
7618         * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep-cancel.h: New file.
7620         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: Use __gettimeofday,
7621         not gettimeofday.
7622         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: Likewise.
7623         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7624         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Likewise.
7625         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: Likewise.
7626         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7628 2003-03-17  Ulrich Drepper  <drepper@redhat.com>
7630         * sysdeps/pthread/pthread_cond_wait.c: Correct exit criteria.
7631         * sysdeps/pthread/pthread_cond_timedwait.c: Likewise.
7632         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7633         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
7634         Patch by Ewald Snel <ewald@rambo.its.tudelft.nl>.
7636 2003-03-16  Roland McGrath  <roland@redhat.com>
7638         * tst-fork4.c: Include <string.h>.
7639         * tst-signal2.c: Likewise.
7640         * tst-mutex5.c (do_test): exit -> return.
7641         * tst-mutex2.c: Include <stdlib.h>.
7643 2003-03-16  Ulrich Drepper  <drepper@redhat.com>
7645         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
7646         (__lll_mutex_timedlock_wait): Correct expected value after
7647         spurious wakeup.  Otherwise we would never wait again.
7649         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Work around red
7650         zone versus inline asm stupidity.  Use correct instructions.
7652         * tst-rwlock6.c: Add some more status output.
7654 2003-03-15  Roland McGrath  <roland@redhat.com>
7656         * sysdeps/pthread/configure.in: New file.
7657         * sysdeps/pthread/configure: New file (generated).
7659 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7661         * allocatestack.c (allocate_stack): Store the exact stack size of
7662         user allocated stacks.
7664 2003-03-15  Jakub Jelinek  <jakub@redhat.com>
7666         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h
7667         (SINGLE_THREAD): Use `header' prefix instead of `header.data'.
7668         * sysdeps/sh/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7669         * sysdeps/sh/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define.
7670         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h (SINGLE_THREAD_P):
7671         Use `header.' prefix.
7672         * sysdeps/ia64/tcb-offsets.sym (MULTIPLE_THREADS_OFFSET): Likewise.
7674 2003-03-15  Ulrich Drepper  <drepper@redhat.com>
7676         * sysdeps/x86_64/pthreaddef.h (CURRENT_STACK_FRAME): Don't use
7677         __builtin_frame_address, use stack pointer.
7679         * sysdeps/unix/sysv/linux/jmp-unwind.c: Use CURRENT_STACK_FRAME
7680         instead of __builtin_frame_pointer.
7682 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7684         * tst-basic1.c (do_test): Add cast to avoid warning.
7685         * tst-basic2.c (do_test): Likewise.
7687         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Use correct
7688         amount of stack correction.
7690         * tst-fork4.c: Use test-skeleton.c.
7692 2003-03-14  Roland McGrath  <roland@redhat.com>
7694         * init.c: Fix typo "#eli" for "#else".
7696 2003-03-14  Steven Munroe  <sjmunroe@us.ibm.com>
7698         * allocatestack.c (__stack_user): Use hidden_data_def.
7699         * pthread_create.c (__pthread_keys): Likewise.
7701         * init.c [__powerpc__] (__NR_set_tid_address): Define it.
7703 2003-03-14  Roland McGrath  <roland@redhat.com>
7705         * tst-fork4.c: New file.
7706         * Makefile (tests): Add it.
7708         * descr.h (struct pthread): Move the union out of [!TLS_DTV_AT_TP], so
7709         we always define the padding space.
7710         [!TLS_DTV_AT_TP]: Give tcbhead_t field a name, `header', since GCC
7711         stopped supporting its own extensions fully.
7712         [TLS_MULTIPLE_THREADS_IN_TCB]: Put `multiple_threads' inside a wrapper
7713         struct also called `header', so `header.multiple_threads' is the field
7714         name to use on all machines.
7715         * allocatestack.c (allocate_stack): Use `header.' prefix.
7716         * sysdeps/pthread/createthread.c (create_thread): Likewise.
7717         * pthread_create.c (__pthread_create_2_1): Likewise.
7718         * sysdeps/i386/tls.h (INSTALL_NEW_DTV, THREAD_DTV): Likewise.
7719         (THREAD_SELF): Likewise.
7720         * sysdeps/x86_64/tls.h: Likewise.
7721         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
7722         (SINGLE_THREAD_P): Likewise.
7723         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
7724         (SINGLE_THREAD_P): Likewise.
7725         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h
7726         (SINGLE_THREAD_P): Likewise.
7728         * sysdeps/s390/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Use REGS[18]
7729         value directly.
7731 2003-03-14  Ulrich Drepper  <drepper@redhat.com>
7733         * pthread_create.c (start_thread): Use CALL_THREAD_FCT if defined.
7734         * sysdeps/i386/tls.h: Define CALL_THREAD_FCT.
7736         * pthread_create.c (start_thread): setjmp is expected to return 0.
7738         * sysdeps/x86_64/tls.h (THREAD_GETMEM): Mark asms volatile.
7739         (THREAD_GETMEM_NC): Likewise.
7741 2003-03-13  Ulrich Drepper  <drepper@redhat.com>
7743         * allocatestack.c (allocate_stack): If MULTI_PAGE_ALIASING is defined
7744         and the size of the stack which must be allocated is a multiple,
7745         allocate one more page.
7746         * sysdeps/i386/i686/Makefile: Don't define COLORING_INCREMENT, but
7747         MULTI_PAGE_ALIASING.
7749 2003-03-13  Roland McGrath  <roland@redhat.com>
7751         * pthread_create.c (start_thread): Set EXITING_BIT after the
7752         event-reporting (and destructors), not before.
7754 2003-03-13  Jakub Jelinek  <jakub@redhat.com>
7756         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h (lll_futex_timed_wait,
7757         lll_futex_wake): Declare register variables as long int instead of
7758         unsigned long int.  Patch by Ian Wienand <ianw@gelato.unsw.edu.au>.
7759         Make syscall arguments clobbered by the syscall.
7760         (lll_futex_wait): Define using lll_futex_timed_wait.
7762         * sysdeps/ia64/td_ta_map_lwp2thr.c (td_ta_map_lwp2thr): Cast regs[13]
7763         to void *.
7765         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Only declare and set
7766         PPID if [! NDEBUG].
7768         * allocatestack.c (nptl_ncreated): Only declare if
7769         COLORING_INCREMENT != 0.
7771         * pthreadP.h (__pthread_enable_asynccancel_2): New prototype.
7772         (__libc_enable_asynccancel_2): Remove prototype.
7774         * sysdeps/unix/sysv/linux/ia64/fork.c (ARCH_FORK): Swap ptid and
7775         ctid to match kernel.
7777 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7779         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add
7780         libc_multiple_threads.
7781         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Move definition of
7782         __libc_multiple_threads to...
7783         * sysdeps/unix/sysv/linux/libc_multiple_threads.c: ...here.  New file.
7785         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Remove unnecessary
7786         versioning.
7787         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7788         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7790         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S
7791         (__pthread_once_internal): Define.
7793         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Use shlib-compat.h
7794         macros instead of .symver directly.
7795         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7796         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Likewise.
7798         * sysdeps/x86_64/tls.h [__ASSEMBLER__]: Include tcb-offsets.h.
7799         * sysdeps/x86_64/tcb-offsets.sym: New file.
7800         * sysdeps/x86_64/Makefile: New file.
7802         * sysdeps/i386/tcb-offsets.sym: Add SELF.
7803         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Use SELF
7804         to access own pthread_t in TCB.
7805         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7806         Likewise.
7807         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7808         Likewise.
7809         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7811 2003-03-12  Roland McGrath  <roland@redhat.com>
7813         * pthread-errnos.sym: New file.
7814         * Makefile (gen-as-const-headers): New variable, list that file.
7815         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: Include generated
7816         header <pthread-errnos.h> instead of defining errno values here.
7817         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: Likewise.
7818         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
7819         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
7820         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
7821         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
7822         Likewise.
7823         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
7824         Likewise.
7825         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
7826         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
7827         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
7828         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
7829         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7830         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7831         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7832         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7833         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
7834         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7835         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Likewise.
7836         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: Likewise.
7837         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: Likewise.
7838         * sysdeps/unix/sysv/linux/sh/sem_post.S: Likewise.
7839         * sysdeps/unix/sysv/linux/sh/sem_wait.S: Likewise.
7840         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: Likewise.
7841         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: Likewise.
7842         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: Likewise.
7843         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise.
7844         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: Likewise.
7845         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
7846         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Likewise.
7847         * sysdeps/i386/i486/pthread_spin_trylock.S: Likewise.
7848         * sysdeps/x86_64/pthread_spin_trylock.S: Likewise.
7849         * sysdeps/sh/pthread_spin_trylock.S: Likewise.
7850         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: Likewise.
7851         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: Likewise.
7853         * sysdeps/unix/sysv/linux/fork.c: Add an assert to check that
7854         CLONE_CHILD_SETTID worked.
7856 2003-03-12  Ulrich Drepper  <drepper@redhat.com>
7858         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S: New
7859         file.
7860         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S: New
7861         file.
7863         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h
7864         (pthread_cond_t): Add padding.
7866         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_rdlock.S: New file.
7867         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_wrlock.S: New file.
7868         * sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_unlock.S: New file.
7870         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S
7871         (__pthread_rwlock_timedwrlock): Add missing opcode suffix.
7872         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S
7873         (__pthread_rwlock_timedrdlock): Likewise.
7874         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S
7875         (__pthread_rwlock_wrlock): Likewise.
7876         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S
7877         (__pthread_rwlock_rdlock): Likewise.
7879         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: New file.
7881         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Return
7882         result of lock re-get if it fails.
7884 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7886         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: Fix asm syntax.
7887         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: Likewise.
7888         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: Likewise.
7889         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: Likewise.
7890         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
7891         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
7892         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: Likewise.
7893         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: Likewise.
7894         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: Likewise.
7895         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Likewise.
7897         * sysdeps/x86_64/tls.h (THREAD_SELF, THREAD_GETMEM, THREAD_GETMEM_NC,
7898         THREAD_SETMEM, THREAD_SETMEM_NC): Correct asm syntax.
7900         * allocatestack.c [! TLS_MULTIPLE_THREADS_IN_TCB] (allocate_stack):
7901         Initialize *__libc_multiple_threads_ptr not __libc_multiple_threads.
7902         * sysdeps/pthread/createthread.c [! TLS_MULTIPLE_THREADS_IN_TCB]
7903         (create_thread): Likewise.
7904         Define __pthread_multiple_threads and __libc_multiple_threads_ptr.
7905         * init.c (__pthread_initialize_minimal_internal): Initialize
7906         __libc_multiple_threads_ptr if necessary.
7907         * pthreadP.h: Adjust prototype for __libc_pthread_init.  Declare
7908         __pthread_multiple_threads and __libc_multiple_threads_ptr.
7909         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Define
7910         __libc_multiple_threads.
7911         (__libc_pthread_init): Return pointer to __libc_pthread_init if
7912         necessary.
7914         * sysdeps/i386/tls.h (THREAD_SETMEM): Fix one-byte variant.
7915         (THREAD_SETMEM_NC): Likewise.
7917         * sysdeps/x86_64/pthread_spin_trylock.c: Removed.
7918         * sysdeps/x86_64/pthread_spin_trylock.S: New file.
7919         * sysdeps/x86_64/pthread_spin_unlock.c: Removed.
7920         * sysdeps/x86_64/pthread_spin_unlock.S: New file.
7922         * sysdeps/i386/i486/pthread_spin_trylock.S (pthread_spin_trylock):
7923         Eliminate one entire instruction.
7925         * cancellation.c (__pthread_enable_asynccancel_2): New function.
7926         * pthreadP.h: Declare __pthread_enable_asynccancel_2.
7927         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
7928         (__pthread_cond_timedwait): Use __pthread_enable_asynccancel_2
7929         instead of __pthread_enable_asynccancel.
7930         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7931         (__pthread_cond_wait): Likewise.
7932         * sysdeps/pthread/pthread_cond_timedwait.c
7933         (__pthread_cond_timedwait): Likewise.
7934         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait): Likewise.
7936         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
7937         (__condvar_cleanup): Wake up all waiters in case we got signaled
7938         after being woken up but before disabling asynchronous
7939         cancellation.
7940         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
7941         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
7942         (__condvar_cleanup): Likewise.
7944         * init.c (__NR_set_tid_address): If already defined, don't redefine.
7945         Make it an error if architecture has no #if case.  Add x86-64.
7947         * sysdeps/unix/sysv/linux/x86_64/Makefile: Add flags for
7948         pt-initfini.s generation.
7950         * sysdeps/x86_64/tls.h: Include <asm/prctl.h>.
7951         (TLS_INIT_TP): Fix typo.
7953 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7955         * sysdeps/ia64/bits/atomic.h (atomic_exchange_and_add): Swap 2nd and
7956         3rd argument of __arch_compare_and_exchange_{32,64}_val_acq.
7958         * sysdeps/unix/sysv/linux/ia64/sem_post.c: Include semaphore.h.
7959         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: Likewise.
7960         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: Likewise.
7961         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: Likewise.
7962         * sysdeps/unix/sysv/linux/s390/sem_post.c: Likewise.
7963         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
7964         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
7965         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
7967 2003-03-11  Ulrich Drepper  <drepper@redhat.com>
7969         * sysdeps/pthread/pthread_cond_timedwait.c
7970         (__pthread_cond_timedwait): Return the result of the final
7971         locking.  If it succeeds, the regular function return value.
7973         * sysdeps/pthread/pthread_cond_wait.c (__pthread_cond_wait):
7974         Return result of the final locking.
7975         * version.c (__nptl_main): Work around problems with the strange
7976         INTERNAL_SYSCALL macro on ppc32.
7977         * init.c (__pthread_initialize_minimal_internal): Unblock
7978         SIGCANCEL in case the parent blocked it.
7979         Reported by Paul Mackerras <paulus@samba.org>.
7981         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_broadcast.S: New file.
7982         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_signal.S: New file.
7983         * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: New file.
7985 2003-03-11  Jakub Jelinek  <jakub@redhat.com>
7987         * sysdeps/pthread/pthread_cond_timedwait.c
7988         (__pthread_cond_timedwait): Unlock and fail if
7989         __pthread_mutex_unlock_internal failed.
7991         * sysdeps/pthread/createthread.c (ARCH_CLONE): Define if not defined.
7992         (create_thread): Only assert PD->tcb != NULL under [TLS_TCB_AT_TP].
7993         Use ARCH_CLONE.
7994         * allocatestack.c (ALLOCATE_STACK_PARMS): New macro.
7995         [NEED_SEPARATE_REGISTER_STACK] (STACK_VARIABLES,
7996         STACK_VARIABLES_ARGS, STACK_VARIABLES_PARMS, ALLOCATE_STACK_PARMS,
7997         ALLOCATE_STACK): New macros.
7998         (TLS_TPADJ): New macro.
7999         (get_cached_stack, queue_stack, __deallocate_stack): Use TLS_TPADJ.
8000         (allocate_stack): Handle TLS_DTV_AT_TP and
8001         NEED_SEPARATE_REGISTER_STACK.  Use TLS_TPADJ.
8002         * pthread_create.c (__pthread_create_2_1) [! TLS_TCB_AT_TP]:
8003         Don't set PD->self.
8004         * init.c [__ia64__] (__NR_set_tid_address): Define.
8006         * sysdeps/unix/sysv/linux/ia64/bits/pthreadtypes.h: New file.
8007         * sysdeps/unix/sysv/linux/ia64/bits/semaphore.h: New file.
8008         * sysdeps/unix/sysv/linux/ia64/fork.c: New file.
8009         * sysdeps/unix/sysv/linux/ia64/createthread.c: New file.
8010         * sysdeps/unix/sysv/linux/ia64/libc-lowlevellock.c: New file.
8011         * sysdeps/unix/sysv/linux/ia64/libc-lowlevelmutex.c: New file.
8012         * sysdeps/unix/sysv/linux/ia64/lowlevellock.c: New file.
8013         * sysdeps/unix/sysv/linux/ia64/lowlevellock.h: New file.
8014         * sysdeps/unix/sysv/linux/ia64/lowlevelmutex.c: New file.
8015         * sysdeps/unix/sysv/linux/ia64/pt-initfini.c: New file.
8016         * sysdeps/unix/sysv/linux/ia64/pt-vfork.S: New file.
8017         * sysdeps/unix/sysv/linux/ia64/pthread_once.c: New file.
8018         * sysdeps/unix/sysv/linux/ia64/sem_post.c: New file.
8019         * sysdeps/unix/sysv/linux/ia64/sem_timedwait.c: New file.
8020         * sysdeps/unix/sysv/linux/ia64/sem_trywait.c: New file.
8021         * sysdeps/unix/sysv/linux/ia64/sem_wait.c: New file.
8022         * sysdeps/unix/sysv/linux/ia64/sysdep-cancel.h: New file.
8023         * sysdeps/ia64/bits/atomic.h: New file.
8024         * sysdeps/ia64/Makefile: New file.
8025         * sysdeps/ia64/pthread_spin_init.c: New file.
8026         * sysdeps/ia64/pthread_spin_lock.c: New file.
8027         * sysdeps/ia64/pthread_spin_trylock.c: New file.
8028         * sysdeps/ia64/pthread_spin_unlock.c: New file.
8029         * sysdeps/ia64/pthreaddef.h: New file.
8030         * sysdeps/ia64/tcb-offsets.sym: New file.
8031         * sysdeps/ia64/td_ta_map_lwp2thr.c: New file.
8032         * sysdeps/ia64/tls.h: New file.
8034         * sysdeps/s390/pthreaddef.h (__exit_thread_inline): Pass 1 argument
8035         to syscall instead of no arguments.
8037 2003-03-10  Ulrich Drepper  <drepper@redhat.com>
8039         * sysdeps/unix/sysv/linux/x86_64/sem_post.S: New file.
8040         * sysdeps/unix/sysv/linux/x86_64/sem_trywait.S: New file.
8041         * sysdeps/unix/sysv/linux/x86_64/sem_wait.S: New file.
8042         * sysdeps/unix/sysv/linux/x86_64/sem_timedwait.S: New file.
8044         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Fix error value in
8045         unused code.
8047         * sysdeps/unix/sysv/linux/x86_64/pthread_barrier_wait.S: New file
8049         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8050         lowlevelbarrier.sym.
8051         * sysdeps/unix/sysv/linux/lowlevelbarrier.sym: New file.
8052         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S:
8053         Include lowlevelbarrier.h and don't define offsets locally.
8054         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: Likewise.
8056         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
8057         (__lll_mutex_lock_wait): Reverse order of first two parameters.
8058         (__lll_mutex_timedlock_wait): Likewise.
8059         (lll_mutex_lock): Adjust asm for that.
8060         (lll_mutex_timedlock): Likewise.  Mark cx, cc, r10 as clobbered.
8061         (lll_lock): Adjust asm for operand order change.
8062         * sysdeps/unix/sysv/linux/x86_64/lowlevelmutex.S: New file.
8063         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevelmutex.S: New file.
8065         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (__lll_lock_wait):
8066         Reverse order of parameters.
8067         (__lll_timedwait_tid): Remove regparms attribute.
8068         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S: New file.
8069         * sysdeps/unix/sysv/linux/x86_64/libc-lowlevellock.S: New file.
8071         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8072         (__lll_timedwait_tid): Remove one unnecessary instruction.
8074         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: Define
8075         __lll_mutex_timedlock_wait only for NOT_IN_libc.
8076         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: Include
8077         lowlevelmutex.S.
8079         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Define
8080         lll_unlock_wake_cb, __lll_wait_tid, and __lll_timedwait_tid only
8081         for NOT_IN_libc.
8082         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Include
8083         lowlevellock.S.
8085         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Don't define
8086         LOCK is already defined.  Don't define __lll_mutex_timedlock_wait
8087         for libc.so.
8088         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Only
8089         define LOCK here (if UP is not defined).  The actual code is in
8090         lowlevelmutex.S.
8092         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Don't define
8093         LOCK is already defined.  Don't define lll_unlock_wake_cb and
8094         __lll_timedwait_tid for libc.so.
8095         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Only
8096         define LOCK here (if UP is not defined).  The actual code is in
8097         lowlevellock.S.
8099         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Not needed anymore.
8100         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: Likewise.
8101         * sysdeps/unix/sysv/linux/s390/sem_post.c: Include lowlevellock.h
8102         instead of lowlevelsem.h.
8103         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: Likewise.
8104         * sysdeps/unix/sysv/linux/s390/sem_trywait.c: Likewise.
8105         * sysdeps/unix/sysv/linux/s390/sem_wait.c: Likewise.
8107         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add
8108         lowlevelrwlock.sym.
8109         * sysdeps/unix/sysv/linux/lowlevelrwlock.sym: New file.
8110         * sysdeps/unix/sysv/linux/i386/lowlevelrwlock.h: Removed.
8111         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: Removed.
8113         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h (lll_trylock): Fix
8114         register loading.
8115         * sysdeps/unix/sysv/linux/i386/lowlevellock.h (lll_trylock): Undo
8116         last changed.  D'oh.
8118         * sysdeps/unix/sysv/linux/x86_64/lowlevellock.h: New file.
8120         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove declaration
8121         of __libc_locking_needed.
8122         (lll_trylock): Initialize %eax to zero.
8124         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Update
8125         pthread_cond_t definition.
8127 2003-03-10  Roland McGrath  <roland@redhat.com>
8129         * sysdeps/unix/sysv/linux/lowlevelcond.sym: New file.
8130         * sysdeps/unix/sysv/linux/Makefile (gen-as-const-headers): Add it.
8131         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: File removed.
8132         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: Likewise.
8133         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: Likewise.
8135         * allocatestack.c (allocate_stack) [!TLS_MULTIPLE_THREADS_IN_TCB]:
8136         Instead of setting PD->multiple_threads, set globals
8137         __pthread_multiple_threads and __libc_multiple_threads.
8138         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8139         * sysdeps/i386/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Define it.
8140         * sysdeps/s390/tls.h (TLS_MULTIPLE_THREADS_IN_TCB): Likewise.
8142         * descr.h (struct pthread): Conditionalize first member on
8143         [!TLS_DTV_AT_TP].  Replace the `header' member with an anonymous union
8144         containing an anonymous tcbhead_t.  Move `list' member out.
8145         [TLS_MULTIPLE_THREADS_IN_TCB]: Define a `multiple_threads' member.
8146         * allocatestack.c: Remove use of `header.data.' prefix.
8147         * pthread_create.c: Likewise.
8148         * init.c (__pthread_initialize_minimal_internal): Likewise.
8149         * sysdeps/pthread/createthread.c (create_thread): Likewise.
8150         * sysdeps/i386/tls.h (INSTALL_DTV): Add parens.
8151         (THREAD_SELF, THREAD_DTV, INSTALL_NEW_DTV): No `header.data.' prefix.
8152         * sysdeps/x86_64/tls.h: Likewise.
8153         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h
8154         (SINGLE_THREAD_P): Likewise.
8155         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h
8156         (SINGLE_THREAD_P): Likewise.
8157         * sysdeps/i386/tls.h (tcbhead_t): Remove `list' member.
8158         * sysdeps/s390/tls.h (tcbhead_t): Likewise.
8160 2003-03-09  Ulrich Drepper  <drepper@redhat.com>
8162         * sysdeps/unix/sysv/linux/x86_64/lowlevelcond.h: New file.
8164         * sysdeps/unix/sysv/linux/x86_64/sysdep-cancel.h: New file.
8165         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8167         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Fix many
8168         leftovers from the ia32 code.
8170         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Remove unneccessary
8171         memory load.
8172         (clear_once_control): Don't load %esi.
8174         * sysdeps/x86_64/tls.h: Remove all traces of segment descriptor
8175         handling.
8177         * sysdeps/unix/sysv/linux/x86_64/fork.c: New file.
8179         * sysdeps/unix/sysv/linux/s390/createthread.c: Moved to...
8180         * sysdeps/unix/sysv/linux/createthread.c: ...here.
8182         * Makefile (tests): Add tst-cond10.
8183         * tst-cond10.c: New file.
8185 2003-03-08  Ulrich Drepper  <drepper@redhat.com>
8187         * tst-tls2.c (do_test): Add TEMP_FAILURE_RETRY around sem_wait call.
8188         * tst-signal3.c (do_test): Likewise.
8189         * tst-sem5.c (do_test): Likewise.
8190         * tst-kill6.c (do_test): Likewise.
8191         * tst-tls3.c (do_test): Likewise.  Include <errno.h>.
8193         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use add/sub instead
8194         of inc/dec.
8195         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
8196         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise
8197         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: Likewise.
8198         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: Likewise.
8199         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8200         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8201         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8202         Likewise.
8203         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8204         Likewise.
8205         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Likewise.
8206         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Likewise.
8207         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8208         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8209         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8210         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
8211         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
8212         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
8214         * allocatestack.c (allocate_stack): If mprotect() fails free the
8215         TLS memory.
8217 2003-03-07  Ulrich Drepper  <drepper@redhat.com>
8219         * sysdeps/i386/i486/bits/atomic.h: Fix a few unused definitions.
8221         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Remove all trace of
8222         lll_wake_tid.  This was used only to work around kernel limits in
8223         the early days.
8224         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: Likewise.
8225         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: Likewise.
8226         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: Likewise.
8227         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: Likewise.
8229         * init.c (__static_tls_align_m1): Renamed from __static_tls_align.
8230         (__pthread_initialize_minimal_internal): Change initialization of
8231         __static_tls_align_m1 appropriately.
8232         * pthreadP.h (__static_tls_align_m1): Renamed from
8233         __static_tls_align.
8234         * allocatestack.c (allocate_stack): Use __static_tls_align_m1
8235         instead of __static_tls_align-1.
8237 2003-03-04  Ulrich Drepper  <drepper@redhat.com>
8239         * sysdeps/unix/sysv/linux/x86_64/Makefile: New file.
8241         * pthread_create.c: Define __pthread_keys using nocommon
8242         attribute, not by placing it explicitly in bss.
8243         Remove DEFINE_DEALLOC definition.  Not needed anymore.
8245         * allocatestack.c: Define ARCH_MAP_FLAGS if not already defined.
8246         Use it in mmap call to allocate stacks.
8248         * sysdeps/pthread/createthread.c (create_thread): Fix comment.
8250         * pthread_create.c (start_thread): Use THREAD_SETMEM to store
8251         result of the thread function.
8253 2003-03-03  Ulrich Drepper  <drepper@redhat.com>
8255         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: Removed.  The generic
8256         version is just fine.
8258         * sysdeps/unix/sysv/linux/libc_pthread_init.c
8259         (__pthread_child_handler): Renamed from pthread_child_handler,
8260         exported, and marked hidden.  Change all users.
8261         * sysdeps/unix/sysv/linux/register-atfork.c (free_mem): Do not
8262         free __pthread_child_handler from child list.
8264 2003-03-03  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8266         * atomic.h (atomic_exchange_and_add): Return newval, not oldval.
8268         * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
8269         Fix handling of cancellation and failing pthread_mutex_unlock call.
8270         * sysdeps/pthread/pthread_cond_wait.c (__condvar_cleanup): Likewise.
8271         (__pthread_cond_wait): Likewise.
8273         * sysdeps/pthread/pthread_rwlock_timedrdlock.c
8274         (pthread_rwlock_timedrdlock): Fix clobber of result variable by
8275         lll_futex_timed_wait call.
8276         * sysdeps/pthread/pthread_rwlock_timedwrlock.c
8277         (pthread_rwlock_timedwrlock): Likewise.
8279         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c (___lll_lock):
8280         Don't define lll_unlock_wake_cb and ___lll_timedwait_tid in libc.so.
8281         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Remove XXX comments.
8283         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Fix
8284         check of lll_futex_wake return value.
8286 2003-03-03  Roland McGrath  <roland@redhat.com>
8288         * forward.c: Fix typo in __pthread_attr_init_2_0 compat_symbol decl.
8290         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8291         Argument to ptr___pthread_cleanup_upto is __jmp_buf, not jmp_buf.
8292         * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise.
8294 2003-03-02  Ulrich Drepper  <drepper@redhat.com>
8296         * sysdeps/pthread/timer_create.c (timer_create): Return correct
8297         error for CPU clocks.
8299         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
8300         _POSIX_MONOTONIC_CLOCK.
8301         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Likewise.
8303         * tst-cancel4.c (tf_sleep): Lower sleep time a bit to not upset
8304         recent kernels.
8306 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8308         * descr.h (struct pthread): Move cleanup field to the front.
8310 2003-03-01  Roland McGrath  <roland@redhat.com>
8312         * sem_open.c (sem_open): Braino fix.
8314 2003-03-01  Ulrich Drepper  <drepper@redhat.com>
8316         * sysdeps/i386/tcb-offsets.sym: Add CLEANUP and CLEANUP_PREV.
8317         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Inline
8318         __pthread_cleanup_pop functionality.
8319         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8321         * descr.h (struct pthread): Move tid field to the front now that
8322         it is often used.
8324         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S
8325         (__lll_mutex_timedlock_wait): Remove.
8326         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8327         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S
8328         (__lll_mutex_unlock_wake): Don't save, load, and restore %esi.
8329         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8330         (lll_unlock_wake_cb): Don't save and restore %esi.
8331         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8332         %esi.
8333         (__lll_timedwait_tid): Add alignment.
8334         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8335         (__lll_unlock_wake): Add alignment.  Don't save, load, and restore
8336         %esi.
8337         (__lll_timedwait_tid): Removed.
8338         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
8339         (__pthread_cond_broadcast): Don't save, load, and restore %esi.
8340         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S
8341         (pthread_barrier_wait): Don't save, load, and restore %esi for
8342         last thread.
8343         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
8344         (__pthread_cond_signal): Don't save, load, and restore %esi.
8345         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S
8346         (__pthread_rwlock_unlock): Don't save, load, and restore %esi.
8347         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post):
8348         Don't save, load, and restore %esi.
8350 2003-02-27  Ulrich Drepper  <drepper@redhat.com>
8352         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S:
8353         Release lock before waking up the waiters.
8355         * tst-exit1.c (do_test): Don't start more than one thread in parallel.
8357         * tst-rwlock9.c (writer_thread): Correct adding TIMEOUT.
8358         (reader_thread): Likewise.
8360         * sysdeps/pthread/pthread_rwlock_unlock.c
8361         (__pthread_rwlock_unlock): Release internal lock early.  Don't try
8362         to wake up readers if there are none.
8364         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
8365         Release internal lock before wake threads.
8367 2003-02-26  Ulrich Drepper  <drepper@redhat.com>
8369         * Makefile (tests): Add tst-rwlock10 and tst-rwlock11.
8370         * tst-rwlock8.c: Initialize lock with INIT.  Allow INIT to be
8371         predefined.
8372         * tst-rwlock9.c: Likewise.
8373         * tst-rwlock10.c: New file.
8374         * tst-rwlock11.c: New file.
8376         * Makefile (tests): Add tst-dlsym1.
8377         * tst-dlsym1.c: New file.
8379         * init.c (__pthread_initialize_minimal_internal): Set
8380         GL(dl_error_catch_tsd) to __libc_dl_error_tsd.
8381         * Versions (libc:GLIBC_PRIVATE): Export __libc_dl_error_tsd.
8383 2003-02-24  Ulrich Drepper  <drepper@redhat.com>
8385         * sem_open.c (sem_open): Fix handling of O_CREAT without O_EXCL.
8387         * tst-cond2.c: Fix sychronization with child.
8389         * tst-rwlock8.c (reader_thread): Remove unused variable.
8391         * Makefile: Add rules to build and run tst-tls3.
8392         * tst-tls3.c: New file.
8393         * tst-tls3mod.c: New file.
8395         * Makefile (tests): Add tst-rwlock8 and tst-rwlock9.
8396         * tst-rwlock8.c: New file.
8397         * tst-rwlock9.c: New file.
8398         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Fix
8399         complete broken rwlock implementation.
8400         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8401         Likewise.
8402         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8403         Likewise.
8404         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: Likewise.
8405         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: Likewise.
8406         * sysdeps/pthread/pthread_rwlock_rdlock.c: Likewise.
8407         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: Likewise.
8408         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: Likewise.
8409         * sysdeps/pthread/pthread_rwlock_unlock.c: Likewise.
8410         * sysdeps/pthread/pthread_rwlock_wrlock.c: Likewise.
8412 2003-02-23  Roland McGrath  <roland@redhat.com>
8414         * Makefile (nptl-version): Change regexp so case sensitivity is ok.
8416 2003-02-23  Ulrich Drepper  <drepper@redhat.com>
8418         * Makefile (tests): Add tst-context1.
8419         * tst-context1.c: New file.
8421         * Makefile (tests): Add tst-tls1 and tst-tls2.
8422         * tst-tls1.c: New file.
8423         * tst-tls2.c: New file.
8425         * libc-cancellation.c (__libc_enable_asynccancel): Correct test
8426         for failed cmpxchg.
8428         * pthread_create.c (start_thread): Set EXITING_BIT early.
8430         * sysdeps/i386/tls.h (THREAD_GETMEM): Mark asm as volatile.
8431         (THREAD_GETMEM_NC): Likewise.
8433 2003-02-22  Ulrich Drepper  <drepper@redhat.com>
8435         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Shave
8436         off 3 more bytes by using offset-less instructions when possible.
8438         * Makefile: Add dependency for $(objpfx)version.d.
8440         * eintr.c (eintr_source): Add unnecessary return but the compiler
8441         insists.
8443         * tst-kill3.c: Include <unistd.h>.
8445 2003-02-21  Roland McGrath  <roland@redhat.com>
8447         * pthread_create.c (start_thread): Call __libc_thread_freeres.
8449 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8451         * Makefile (tests): Add tst-eintr1.
8452         (distribute): Add eintr.c.
8453         * tst-eintr1.c: New file.
8454         * eintr.c: New file.
8456         * pthread_cancel.c (pthread_cancel): Use tkill directly.
8458         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill):
8459         Disallow sending SIGCANCEL.
8461         * Makefile (tests): Remove tst-basic7.  Add tst-kill1, tst-kill2,
8462         tst-kill3, tst-kill4, tst-kill5, tst-kill6.
8463         * tst-kill1.c: New file.
8464         * tst-kill2.c: New file.
8465         * tst-kill3.c: New file.
8466         * tst-kill5.c: New file.
8467         * tst-kill6.c: New file.
8468         * tst-basic7.c: Renamed to...
8469         * tst-kill4.c: ...this.
8471 2003-02-21  Roland McGrath  <roland@redhat.com>
8473         * Makefile (install-lib-ldscripts): New variable.
8475 2003-02-21  Ulrich Drepper  <drepper@redhat.com>
8477         * pthreadP.h: Define INVALID_TD_P and INVALID_NOT_TERMINATED_TD_P.
8478         * pthread_cancel.c: Use INVALID_TD_P.
8479         * pthread_detach.c: Likewise.
8480         * pthread_getschedparam.c: Likewise.
8481         * pthread_setschedparam.c: Likewise.
8482         * sysdeps/pthread/pthread_getcpuclockid.c: Likewise.
8483         * sysdeps/unix/sysv/linux/pthread_kill.c: Likewise.
8484         * pthread_join.c: Use INVALID_NOT_TERMINATED_TD_P.
8485         * pthread_timedjoin.c: Likewise.
8487         * tst-basic7.c: Include <signal.h>.
8489         * pthread_join.c (pthread_join): Limited checking for invalid
8490         descriptors.
8491         * pthread_timedjoin.c (pthread_timedjoin_np): Likewise.
8493 2003-02-20  Ulrich Drepper  <drepper@redhat.com>
8495         * pthread_create.c (deallocate_tsd): Reset found_nonzero at the
8496         beginning of the loop.  Clear the entire first block of TSD.
8497         * Makefile (tests): Add tst-key4.
8498         * tst-key4.c: New file.
8500 2003-02-18  Ulrich Drepper  <drepper@redhat.com>
8502         * Makefile (tests): Add tst-basic7.
8503         * tst-basic7.c: New file.
8505         * pthread_create.c (deallocate_tsd): Mark as internal_function.
8506         Add some more __builtin_expect.
8508         * pthreadP.h: Define dummy version of DEBUGGING_P.
8510 2003-02-17  Ulrich Drepper  <drepper@redhat.com>
8512         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remnove
8513         _POSIX_THREAD_PRIORITY_SCHEDULING.
8514         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: Remove
8515         _XOPEN_REALTIME_THREADS.
8516         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
8518         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): The
8519         kernel returns EINVAL for PID <= 0, work around it.
8521         * Makefile (tests): Add tst-signal5.
8522         * tst-signal5.c: New file.
8524         * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX
8525         and LOGIN_NAME_MAX.
8527         * tst-cancel1.c (tf): Block all signals.
8529         * Makefile (tests): Add tst-basic6.
8530         * tst-basic6.c: New file.
8532         * tst-basic1.c: Add test for process ID.
8534         * Makefile (tests): Add tst-cancel10.
8535         * tst-cancel10.c: New file.
8537         * Makefile (tests): Add tst-signal4.
8538         * tst-signal4.c: New file.
8540         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use
8541         __sigismember instead of sigismember.  Add __builtin_expect.
8543 2003-02-16  Ulrich Drepper  <drepper@redhat.com>
8545         * tst-attr1.c (do_test): Add tests for pthread_setcanceltype,
8546         pthread_setcancelstate, and pthread_rwlock_setpshared.
8548         * tst-cancel7.c (do_test): Make sure the pid file exists before
8549         canceling the thread.
8551         * tst-rwlock6.c: More pthread_rwlock_timedwrlock and
8552         pthread_rwlock_timedrdlock tests.
8553         * tst-rwlock7.c: More pthread_rwlock_timedwrlock tests.
8554         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8555         Check for invalid tv_nsec field.
8556         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8557         Likewise.
8559         * pthread_mutex_trylock.c (__pthread_mutex_trylock): Protect
8560         recursive mutex of overflow.
8562         * tst-attr1.c (do_test): Add test for pthread_mutexattr_setpshared.
8564         * libc-cancellation.c (__libc_enable_asynccancel): Rewrite to avoid
8565         going into an endless loop.
8566         * Makefile (tests): Add tst-cancel9.
8567         * tst-cancel9.c: New file.
8569         * pthread_cancel.c (pthread_cancel): Use the result of __pthread_kill.
8571 2003-02-15  Ulrich Drepper  <drepper@redhat.com>
8573         * tst-mutex5.c (do_test): Add more timedlock tests.
8575         * tst-mutex2.c: Tests of trylock and unlock with ERROR mutexes.
8576         * tst-mutex3.c (do_test): Add tests for trylock with RECURSIVE mutexes.
8578         * sysdeps/unix/sysv/linux/pthread_kill.c (__pthread_kill): Don't
8579         use INLINE_SYSCALL.  Error number is returned, not -1.
8581         * pthreadP.h: Mark declarations of __find_in_stack_list, __free_tcb,
8582         and __deallocate_stack with internal_function.
8583         * pthread_create.c: Adjust definitions appropriately.
8584         * allocatestack.c: Likewise.
8586         * pthread_join.c: Add one more __builtin_expect.
8587         * pthread_timedjoin.c: Likewise.
8589         * pthread_getspecific.c (__pthread_getspecific): Clear data->data
8590         not data of sequence number does not match.
8591         Add one __builtin_expect.
8593         * Makefile (tests): Add tst-clock1.
8594         * tst-clock1.c: New file.
8596         * pthread_setconcurrency.c (pthread_setconcurrency): Fail for
8597         negative arguments.
8598         * Makefile (tests): Add tst-basic5.
8599         * tst-basic5.c: New file.
8601 2003-02-14  Ulrich Drepper  <drepper@redhat.com>
8603         * Makefile (tests): Add tst-basic4.
8604         * tst-basic4.c: New file.
8606         * pthreadP.h: Add declaraction for __nptl_nthreads.
8607         * pthread_create.c: Define __nptl_nthreads
8608         (start_thread): Increment __nptl_nthreads at beginning.  Decrement
8609         after thread is done.  If then zero, call exit(0).
8610         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8611         Add ptr_nthreads.  Define HAVE_PTR_NTHREADS.
8612         * init.c (pthread_functions): Initialize ptr_nthreads.
8613         * allocatestack.c (nptl_nthreads): Remove definition and all uses.
8614         (__reclaim_stacks): Decrement __nptl_nthreads.
8615         * sysdeps/pthread/Makefile [$(subdir)==csu] (CFLAGS-libc-start.c):
8616         Define.
8617         * Makefile (tests): Add tst-basic3.
8618         * tst-basic3.c: New file.
8620         * descr.h: Define CANCELING_BIT and CANCELING_BITMASK.  Introduce
8621         after CANCELTYPE_BIT, move the other bits up.  Update CANCEL_RESTMASK.
8622         * init.c (sigcancel_handler): Also set CANCELING_BITMASK bit in newval.
8623         * pthread_cancel.c (pthread_cancel): Likewise.  Also set CANCELING_BIT
8624         if asynchronous canceling is enabled.
8625         * pthread_join.c (pthread_join): When recognizing circular joins,
8626         take into account the other thread might be already canceled.
8627         * Makefile (tests): Add tst-join5.
8628         * tst-join5.c: New file.
8630         * Makefile (tests): Add tst-join4.
8631         * tst-join4.c: New file.
8633 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8635         * tst-cond4.c (main): Add test of pthread_attr_getpshared.
8637 2003-02-13  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8639         * sysdeps/s390/tls.h (THREAD_GETMEM, THREAD_GETMEM_NC, THREAD_SETMEM,
8640         THREAD_SETMEM_NC): Use passed descr instead of THREAD_SELF.
8641         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c (_longjmp_unwind): Avoid
8642         warning.
8643         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: Include <sys/time.h>
8644         to avoid warning.
8645         * sysdeps/unix/sysv/linux/s390/sem_post.c (__new_sem_post): Return
8646         error if lll_futex_wake failed.
8648 2003-02-13  Ulrich Drepper  <drepper@redhat.com>
8650         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Fix
8651         handling of cancellation and failung pthread_mutex_unlock call.
8652         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8653         * Makefile (tests): Add tst-cond8 and tst-cond9.
8654         * tst-cond8.c: New file.
8655         * tst-cond9.c: New file.
8657         * tst-cond7.c (do_test): Unlock the mutex before canceling the thread.
8659         * sysdeps/pthread/pthread.h: Add missing initializers.  Protect
8660         non-standard initializers with __USE_GNU.
8662         * Makefile (tests): Add tst-cleanup3.
8663         * tst-cleanup3.c: New file.
8665 2003-02-12  Ulrich Drepper  <drepper@redhat.com>
8667         * Makefile (tests): Add tst-attr1 and tst-attr2.
8668         * tst-attr1.c: New file.
8669         * tst-attr2.c: New file.
8671         * Makefile: Add rules to build and run tst-atfork2 test.
8672         * tst-atfork2.c: New file.
8673         * tst-atfork2mod.c: New file.
8675         * sysdeps/unix/sysv/linux/unregister-atfork.c
8676         (__unregister_atfork): Free the memory allocated for the handlers
8677         after removing them from the lists.
8679         * sysdeps/unix/sysv/linux/register-atfork.c: Define memeory
8680         cleanup function.
8682         * tst-atfork1.c (do_test): Wait for the child we forked.
8683         Report error in child.
8685         * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Fix comment.
8687         * sysdeps/pthread/Makefile: Define CFLAGS-confstr.c.
8689 2003-02-10  Ulrich Drepper  <drepper@redhat.com>
8691         * Makefile (tests): Add tst-cancel8.
8692         * tst-cancel8.c: New file.
8694         * sysdeps/unix/sysv/linux/i386/pthread_once.S (clear_once_control): Fix
8695         clearing of control variable.
8696         * Makefile (tests): Add tst-once3 and tst-once4.
8697         * tst-once3.c: New file.
8698         * tst-once4.c: New file.
8700 2003-02-08  kaz Kojima  <kkojima@rr.iij4u.or.jp>
8702         * sysdeps/sh/Makefile: New file.
8703         * sysdeps/sh/bits/atomic.h: New file.
8704         * sysdeps/sh/pthread_spin_init.c: New file.
8705         * sysdeps/sh/pthread_spin_lock.c: New file.
8706         * sysdeps/sh/pthread_spin_trylock.S: New file.
8707         * sysdeps/sh/pthread_spin_unlock.S: New file.
8708         * sysdeps/sh/pthreaddef.h: New file.
8709         * sysdeps/sh/tcb-offsets.sym: New file.
8710         * sysdeps/sh/td_ta_map_lwp2thr.c: New file.
8711         * sysdeps/sh/tls.h: New file.
8712         * sysdeps/unix/sysv/linux/sh/bits/pthreadtypes.h: New file.
8713         * sysdeps/unix/sysv/linux/sh/bits/semaphore.h: New file.
8714         * sysdeps/unix/sysv/linux/sh/createthread.c: New file.
8715         * sysdeps/unix/sysv/linux/sh/fork.c: New file.
8716         * sysdeps/unix/sysv/linux/sh/libc-lowlevellock.S: New file.
8717         * sysdeps/unix/sysv/linux/sh/libc-lowlevelmutex.S: New file.
8718         * sysdeps/unix/sysv/linux/sh/lowlevel-atomic.h: New file.
8719         * sysdeps/unix/sysv/linux/sh/lowlevelcond.h: New file.
8720         * sysdeps/unix/sysv/linux/sh/lowlevellock.S: New file.
8721         * sysdeps/unix/sysv/linux/sh/lowlevellock.h: New file.
8722         * sysdeps/unix/sysv/linux/sh/lowlevelmutex.S: New file.
8723         * sysdeps/unix/sysv/linux/sh/lowlevelrwlock.h: New file.
8724         * sysdeps/unix/sysv/linux/sh/pt-initfini.c: New file.
8725         * sysdeps/unix/sysv/linux/sh/pt-vfork.S: New file.
8726         * sysdeps/unix/sysv/linux/sh/pthread_barrier_wait.S: New file.
8727         * sysdeps/unix/sysv/linux/sh/pthread_cond_broadcast.S: New file.
8728         * sysdeps/unix/sysv/linux/sh/pthread_cond_signal.S: New file.
8729         * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: New file.
8730         * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: New file.
8731         * sysdeps/unix/sysv/linux/sh/pthread_once.S: New file.
8732         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_rdlock.S: New file.
8733         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedrdlock.S: New file.
8734         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_timedwrlock.S: New file.
8735         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_unlock.S: New file.
8736         * sysdeps/unix/sysv/linux/sh/pthread_rwlock_wrlock.S: New file.
8737         * sysdeps/unix/sysv/linux/sh/sem_post.S: New file.
8738         * sysdeps/unix/sysv/linux/sh/sem_timedwait.S: New file.
8739         * sysdeps/unix/sysv/linux/sh/sem_trywait.S: New file.
8740         * sysdeps/unix/sysv/linux/sh/sem_wait.S: New file.
8741         * sysdeps/unix/sysv/linux/sh/sysdep-cancel.h: New file.
8743 2003-02-08  Ulrich Drepper  <drepper@redhat.com>
8745         * tst-cond2.c: Rearrange code to not rely on behavior undefined
8746         according to POSIX.
8748         * tst-basic2.c (do_test): Lock mutex before creating the thread.
8750 2003-02-07  Ulrich Drepper  <drepper@redhat.com>
8752         * sysdeps/x86_64/tls.h: Remove unnecessary macros, left over from x86.
8753         (TLS_GET_FS): New #define.
8754         (TLS_SET_FS): New #define.
8755         Correct value of __NR_set_thread_area.
8757         * sysdeps/x86_64/td_ta_map_lwp2thr.c: New file.
8759 2003-02-06  Ulrich Drepper  <drepper@redhat.com>
8761         * Makefile (tests): Add tst-popen1.
8762         * tst-popen1.c: New file.
8764         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Remove wrong
8765         but inactive generalization.
8766         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: Likewise.
8767         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: Likewise.
8768         Minor optimization, remove one instruction.
8769         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: Likewise.
8771 2003-02-04  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8773         * sysdeps/unix/sysv/linux/s390/fork.c: Correct order of parameters.
8775 2003-01-31  Martin Schwidefsky  <schwidefsky@de.ibm.com>
8777         * init.c (__NR_set_tid_address): Add #ifdef for s390.
8778         * sysdeps/pthread/pthread_barrier_wait.c: New file.
8779         * sysdeps/pthread/pthread_cond_broadcast.c: New file.
8780         * sysdeps/pthread/pthread_cond_signal.c: New file.
8781         * sysdeps/pthread/pthread_cond_timedwait.c: New file.
8782         * sysdeps/pthread/pthread_cond_wait.c: New file.
8783         * sysdeps/pthread/pthread_rwlock_rdlock.c: New file.
8784         * sysdeps/pthread/pthread_rwlock_timedrdlock.c: New file.
8785         * sysdeps/pthread/pthread_rwlock_timedwrlock.c: New file.
8786         * sysdeps/pthread/pthread_rwlock_unlock.c: New file.
8787         * sysdeps/pthread/pthread_rwlock_wrlock.c: New file.
8788         * sysdeps/s390/Makefile: New file.
8789         * sysdeps/s390/bits/atomic.h: New file.
8790         * sysdeps/s390/pthread_spin_init.c: New file.
8791         * sysdeps/s390/pthread_spin_lock.c: New file.
8792         * sysdeps/s390/pthread_spin_trylock.c: New file.
8793         * sysdeps/s390/pthread_spin_unlock.c: New file.
8794         * sysdeps/s390/pthreaddef.h: New file.
8795         * sysdeps/s390/tcb-offsets.sym: New file.
8796         * sysdeps/s390/td_ta_map_lwp2thr.c: New file.
8797         * sysdeps/s390/tls.h: New file.
8798         * sysdeps/unix/sysv/linux/s390/bits/pthreadtypes.h: New file.
8799         * sysdeps/unix/sysv/linux/s390/bits/semaphore.h: New file.
8800         * sysdeps/unix/sysv/linux/s390/createthread.c: New file.
8801         * sysdeps/unix/sysv/linux/s390/dl-sysdep.h: New file.
8802         * sysdeps/unix/sysv/linux/s390/fork.c: New file.
8803         * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: New file.
8804         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8805         * sysdeps/unix/sysv/linux/s390/libc-lowlevelmutex.c: New file.
8806         * sysdeps/unix/sysv/linux/s390/lowlevellock.c: New file.
8807         * sysdeps/unix/sysv/linux/s390/lowlevellock.h: New file.
8808         * sysdeps/unix/sysv/linux/s390/lowlevelmutex.c: New file.
8809         * sysdeps/unix/sysv/linux/s390/lowlevelsem.h: New file.
8810         * sysdeps/unix/sysv/linux/s390/pthread_once.c: New file.
8811         * sysdeps/unix/sysv/linux/s390/s390-32/pt-initfini.c: New file.
8812         * sysdeps/unix/sysv/linux/s390/s390-32/pt-vfork.S: New file.
8813         * sysdeps/unix/sysv/linux/s390/s390-32/sysdep-cancel.h: New file.
8814         * sysdeps/unix/sysv/linux/s390/s390-64/pt-initfini.c: New file.
8815         * sysdeps/unix/sysv/linux/s390/s390-64/pt-vfork.S: New file.
8816         * sysdeps/unix/sysv/linux/s390/s390-64/sysdep-cancel.h: New file.
8817         * sysdeps/unix/sysv/linux/s390/sem_post.c: New file.
8818         * sysdeps/unix/sysv/linux/s390/sem_timedwait.c: New file.
8819         * sysdeps/unix/sysv/linux/s390/libc-lowlevellock.c: New file.
8820         * sysdeps/unix/sysv/linux/s390/sem_wait.c: New file.
8822 2003-02-04  Ulrich Drepper  <drepper@redhat.com>
8824         * atomic.h: Add a couple more default implementations.
8825         (atomic_compare_and_exchange_acq): Use
8826         __arch_compare_and_exchange_32_acq in return value definition.  It
8827         always exists.
8828         (atomic_bit_set): Renamed from atomic_set_bit.
8829         Add missing atomic_ prefixes.
8831         * sysdeps/pthread/bits/libc-lock.h (__libc_once): In case no
8832         thread library is available, use correct value to mark initialized
8833         once variable.
8835 2003-02-03  Ulrich Drepper  <drepper@redhat.com>
8837         * allocatestack.c (allocate_stack): Use __getpagesize instead of
8838         __sysconf to determine pagesize.
8840         * pthread_create.c: Include <atomic.h>.
8841         * allocatestack.c (allocate_stack): Implement coloring of the
8842         allocated stack memory.  Rename pagesize to pagesize_m1.  It's the
8843         size minus one.  Adjust users.
8844         * sysdeps/i386/i686/Makefile: New file.
8846 2003-02-02  Ulrich Drepper  <drepper@redhat.com>
8848         * allocatestack.c: Improve comment throughout the file.
8850         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S
8851         (__lll_lock_wait): Add branch prediction.
8852         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S
8853         (__lll_lock_wait): Likewise.
8854         (lll_unlock_wake_cb): Removed.
8856 2003-01-31  Ulrich Drepper  <drepper@redhat.com>
8858         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Remove
8859         _POSIX_THREAD_PRIORITY_SCHEDULING.
8861 2003-01-30  Jakub Jelinek  <jakub@redhat.com>
8863         * sysdeps/pthread/pthread-functions.h (struct pthread_functions):
8864         Fix return type of ptr___pthread_getspecific.
8866 2003-01-29  Ulrich Drepper  <drepper@redhat.com>
8868         * Makefile (tests): Add tst-umask1.
8869         (tst-umask1-ARGS): Define.
8870         * tst-umask1.c: New file.
8872 2003-01-28  Ulrich Drepper  <drepper@redhat.com>
8874         * Makefile (libpthread-routines): Remove lowlevelrwlock.  Add
8875         pthread_rwlock_rdlock, pthread_rwlock_timedrdlock,
8876         pthread_rwlock_wrlock, pthread_rwlock_timedwrlock, and
8877         pthread_rwlock_unlock.
8878         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Removed
8879         * sysdeps/unix/sysv/linux/i386/i586/lowlevelrwlock.S: Removed
8880         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Removed
8881         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: New file.
8882         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
8883         New file.
8884         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S: New file.
8885         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
8886         New file.
8887         * sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S: New file.
8888         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_rdlock.S: New file.
8889         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedrdlock.S:
8890         New file.
8891         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_wrlock.S: New file.
8892         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_timedwrlock.S:
8893         New file.
8894         * sysdeps/unix/sysv/linux/i386/i586/pthread_rwlock_unlock.S: New file.
8895         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_rdlock.S: New file.
8896         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedrdlock.S:
8897         New file.
8898         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_wrlock.S: New file.
8899         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_timedwrlock.S:
8900         New file.
8901         * sysdeps/unix/sysv/linux/i386/i686/pthread_rwlock_unlock.S: New file.
8903         * Makefile (libpthread-routines): Remove lowlevelcond and
8904         lowlevelsem.  Add sem_wait, sem_trywait, sem_timedwait, sem_post,
8905         pthread_cond_wait, pthread_cond_timedwait, pthread_cond_signal,
8906         and pthread_cond_broadcast.
8907         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Removed
8908         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Removed
8909         * sysdeps/unix/sysv/linux/i386/i586/lowlevelsem.S: Removed
8910         * sysdeps/unix/sysv/linux/i386/i586/lowlevelcond.S: Removed
8911         * sysdeps/unix/sysv/linux/i386/i686/lowlevelsem.S: Removed
8912         * sysdeps/unix/sysv/linux/i386/i686/lowlevelcond.S: Removed
8913         * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S: New file.
8914         * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S: New file.
8915         * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S: New file.
8916         * sysdeps/unix/sysv/linux/i386/i486/sem_post.S: New file.
8917         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: New file.
8918         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S: New file.
8919         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S: New file.
8920         * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S: New file.
8921         * sysdeps/unix/sysv/linux/i386/i586/sem_wait.S: New file.
8922         * sysdeps/unix/sysv/linux/i386/i586/sem_trywait.S: New file.
8923         * sysdeps/unix/sysv/linux/i386/i586/sem_timedwait.S: New file.
8924         * sysdeps/unix/sysv/linux/i386/i586/sem_post.S: New file.
8925         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_wait.S: New file.
8926         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_timedwait.S: New file.
8927         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_signal.S: New file.
8928         * sysdeps/unix/sysv/linux/i386/i586/pthread_cond_broadcast.S: New file.
8929         * sysdeps/unix/sysv/linux/i386/i686/sem_wait.S: New file.
8930         * sysdeps/unix/sysv/linux/i386/i686/sem_trywait.S: New file.
8931         * sysdeps/unix/sysv/linux/i386/i686/sem_timedwait.S: New file.
8932         * sysdeps/unix/sysv/linux/i386/i686/sem_post.S: New file.
8933         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_wait.S: New file.
8934         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_timedwait.S: New file.
8935         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_signal.S: New file.
8936         * sysdeps/unix/sysv/linux/i386/i686/pthread_cond_broadcast.S: New file.
8937         * sysdeps/unix/sysv/linux/i386/lowlevelcond.h: New file.
8939         * sysdeps/unix/sysv/linux/i386/createthread.c: Define
8940         PREPARE_CREATE and TLS_VALUE with x86-specific bits.  All the rest
8941         of the code is moved to ...
8942         * sysdeps/pthread/createthread.c: ...here.  New file.
8944 2003-01-27  Ulrich Drepper  <drepper@redhat.com>
8946         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S
8947         (__new_sem_post): Clear %eax before returning.
8948         Reported by MAEDA Naoaki <maeda.naoaki@jp.fujitsu.com>.
8950         * Makefile (tests): Add tst-cleanup2.
8951         * tst-cleanup2.c: New file.
8953         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
8954         Interpret first parameter correctly.
8956 2003-01-17  Ulrich Drepper  <drepper@redhat.com>
8958         * Makefile (headers): Add bits/semaphore.h.
8960 2003-01-16  Jakub Jelinek  <jakub@redhat.com>
8962         * sysdeps/i386/tls.h (INIT_SYSINFO): Initialize _head->sysinfo even
8963         if not SHARED.
8965 2003-01-14  Ulrich Drepper  <drepper@redhat.com>
8967         * sem_open.c (sem_open): Return SEM_FAILED if existing semaphore
8968         must be used and mapping failed.
8969         Reported by Luke Elliott <luke.elliott@activfinancial.com>.
8971         * Makefile (CFLAGS-pthread_self.os): Define this, not
8972         CFLAGS-pthread_self.c.
8974 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8976         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Don't export
8977         lll_unlock_wake_cb.
8979         * Makefile (libpthread-routines): Add version.  Add rules to build
8980         version.os and banner.h.
8981         * version.c: New file.
8983 2003-01-13  Jakub Jelinek  <jakub@redhat.com>
8985         * pthread_mutex_lock.c (__pthread_mutex_lock_internal): Make
8986         the alias unconditional.
8987         * pthread_mutex_unlock.c  (__pthread_mutex_unlock_internal): Likewise.
8989 2003-01-13  Ulrich Drepper  <drepper@redhat.com>
8991         * Makefile (CFLAGS-pthread_self.c): New definition.
8993 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
8995         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Add
8996         INTERNAL_SYSCALL_DECL, add err argument to INTERNAL_SYSCALL* macros.
8997         * sysdeps/unix/sysv/linux/raise.c (raise): Likewise.
8998         * init.c (__pthread_initialize_minimal_internal): Likewise.
9000 2003-01-07  Jakub Jelinek  <jakub@redhat.com>
9002         * pthreadP.h (__pthread_cond_timedwait): Add prototype.
9004         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h
9005         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9006         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9007         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h
9008         (RTLD_CORRECT_DYNAMIC_WEAK): Remove.
9009         (DL_SYSINFO_IMPLEMENTATION): Change into .text section and back.
9011 2003-01-06  Jakub Jelinek  <jakub@redhat.com>
9013         * pthreadP.h (LIBC_CANCEL_HANDLED): Define.
9014         * pt-system.c (LIBC_CANCEL_HANDLED): Add.
9015         * tst-cancel-wrappers.sh: Remove all exceptions.
9017 2003-01-05  Ulrich Drepper  <drepper@redhat.com>
9019         * tst-cancel-wrappers.sh: Invoke gawk not awk since we use GNU awk
9020         features.  Reported by Marijn Ros <marijn@mad.scientist.com>.
9022         * sysdeps/unix/sysv/linux/jmp-unwind.c: Include <pthread-functions.h>.
9023         Use __libc_pthread_functions array if SHARED.
9025         * pthreadP.h: Move pthread_cond_2_0_t definition to...
9026         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.
9028         * sysdeps/pthread/bits/libc-lock.h (__libc_ptf_call): New #define.
9029         (__libc_rwlock_rdlock, __libc_rwlock_wrlock, __libc_rwlock_unlock,
9030         __libc_key_create, __libc_getspecific, __libc_setspecific): Use
9031         __libc_ptf_call instead of __libc_maybe_call.
9032         (PTF): New #define.
9033         (__libc_cleanup_region_start): Wrap function name with PTF call.
9034         (__libc_cleanup_region_end): Likewise.
9035         (__libc_cleanup_end): Likewise.
9037         * pthread_getspecific.c: Add __pthread_getspecific_internal alias.
9038         * pthread_setspecific.c: Add __pthread_setspecific_internal alias.
9039         * pthread_key_create.c: Add __pthread_key_create_internal alias.
9040         * pthreadP.h: Add prototypes.
9042         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Add
9043         __pthread_rwlock_rdlock, __pthread_rwlock_wrlock, and
9044         __pthread_rwlock_unlock aliases.
9045         * pthreadP.h: Add prototypes for new aliases.
9047         * pthreadP.h (struct pthead_functions): Moved to...
9048         * sysdeps/pthread/pthread-functions.h: ...here.  New file.
9049         * init.c (pthread_functions): Add initializers for new elements.
9051         * cleanup_defer.c: Add __pthread_cleanup_push_defer and
9052         __pthread_cleanup_pop_restore aliases.
9053         * pthreadP.h: Add prototypes.
9055         * cleanup.c: Rename _GI_pthread_cleanup_push to __pthread_cleanup_push
9056         and _GI_pthread_cleanup_pop to __pthread_cleanup_pop.
9057         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Adjust caller.
9058         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Likewise.
9059         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: Likewise.
9060         * pthreadP.h: Adjust prototypes and callers.
9062 2003-01-04  Ulrich Drepper  <drepper@redhat.com>
9064         * Makefile (tests): Add tst-cancel7.
9065         (tst-cancel7-ARGS): New variable.
9066         * tst-cancel7.c: New file.
9068         * old_pthread_cond_broadcast.c: Optimize initialization a bit to work
9069         around gcc defficiencies.
9070         * old_pthread_cond_signal.c: Likewise.
9071         * old_pthread_cond_timedwait.c: Likewise.
9072         * old_pthread_cond_wait.c: Likewise.
9074         * pthreadP.h (pthread_cond_2_0_t): Remove unneeded lock element.
9076 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9078         * Makefile (tests): Add tst-cond7.
9079         * tst-cond7.c: New file.
9081         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9082         (condvar_cleanup): Get condvar address from the right place.
9084         * atomic.h: Correct definitions of atomic_full_barrier,
9085         atomic_read_barrier, atomic_write_barrier.
9087         * old_pthread_cond_broadcast.c: Make memory allocate and initialization
9088         race-free.
9089         * old_pthread_cond_signal.c: Likewise.
9090         * old_pthread_cond_timedwait.c: Likewise.
9091         * old_pthread_cond_wait.c: Likewise.
9093 2003-01-03  Jakub Jelinek  <jakub@redhat.com>
9095         * Makefile ($(objpfx)libpthread.so): Depend on ld.so.
9097 2003-01-03  Ulrich Drepper  <drepper@redhat.com>
9099         * pthreadP.h (pthread_cond_2_0_t): New type.
9100         (struct pthread_functions): Use new type for 2.0 condvar callbacks.
9101         Use new type for the 2.0 condvar function prototypes.
9102         * forward.c: Use pthread_cond_2_0_t for 2.0 condvar functions.
9103         * old_pthread_cond_init.c: Use pthread_cond_2_0_t for condvar
9104         parameter.
9105         * old_pthread_cond_destroy.c: Likewise.
9106         * old_pthread_cond_broadcast.c: Likewise.  Lock appropriately.
9107         * old_pthread_cond_signal.c: Likewise.
9108         * old_pthread_cond_timedwait.c: Likewise.
9109         * old_pthread_cond_wait.c: Likewise.
9111         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S
9112         (__pthread_cond_wait): Don't save cancellation mode and seq value
9113         in same location.
9115         * herrno.c (__h_errno_location): Don't define as weak.
9117 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9119         * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast,
9120         pthread_cond_destroy, pthread_cond_init, pthread_cond_signal
9121         and pthread_cond_wait.
9122         * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast):
9123         Renamed to...
9124         (__pthread_cond_broadcast_2_0): ... this.
9125         * old_pthread_cond_destroy.c (__old_pthread_cond_destroy):
9126         Renamed to...
9127         (__pthread_cond_destroy_2_0): ... this.
9128         * old_pthread_cond_init.c (__old_pthread_cond_init):
9129         Renamed to...
9130         (__pthread_cond_init_2_0): ... this.
9131         * old_pthread_cond_signal.c (__old_pthread_cond_signal):
9132         Renamed to...
9133         (__pthread_cond_signal_2_0): ... this.
9134         * old_pthread_cond_wait.c (__old_pthread_cond_wait):
9135         Renamed to...
9136         (__pthread_cond_wait_2_0): ... this.
9137         * pthread_cond_destroy.c: Include shlib-compat.h.
9138         (pthread_cond_destroy): Change strong_alias into versioned_symbol.
9139         * pthread_cond_init.c: Include shlib-compat.h.
9140         (pthread_cond_init): Change strong_alias into versioned_symbol.
9141         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_*
9142         fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0
9143         fields.
9144         (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0,
9145         __pthread_cond_init_2_0, __pthread_cond_signal_2_0,
9146         __pthread_cond_wait_2_0): New prototypes.
9147         (__old_pthread_cond_broadcast, __old_pthread_cond_destroy,
9148         __old_pthread_cond_init, __old_pthread_cond_signal,
9149         __old_pthread_cond_wait): Removed.
9150         * init.c: Include shlib-compat.h.
9151         (pthread_functions): Guard ptr___pthread_attr_init_2_0
9152         initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1).
9153         Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize
9154         ptr___pthread_cond_*_2_0 fields.
9155         * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and
9156         pthread_cond_*@GLIBC_2.0 compatibility symbols.
9158         * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if
9159         LIBC_SIGACTION was not yet defined.
9160         [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self.
9161         [!defined LIBC_SIGACTION] (__sigaction): New function and
9162         libc_hidden_weak.
9163         [!defined LIBC_SIGACTION] (sigaction): New weak_alias.
9164         [defined LIBC_SIGACTION]: #include_next <sigaction.c>.
9166 2003-01-02  Jakub Jelinek  <jakub@redhat.com>
9168         * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc.
9170 2003-01-02  Ulrich Drepper  <drepper@redhat.com>
9172         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t):
9173         New, larger type definition.
9174         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: New condvar
9175         implementation.
9176         * Versions [libpthread]: Add definitions for new pthread_cond_*
9177         interfaces for version GLIBC_2.3.2.
9178         * pthread_cond_init.c: Update initialization for new type definition.
9179         * Makefile (libpthread-routines): Remove pthread_cond_wait,
9180         pthread_cond_timedwait, pthread_cond_signal, and
9181         pthread_cond_broadcast.  Add old_pthread_cond_init,
9182         old_pthread_cond_destroy, old_pthread_cond_wait,
9183         old_pthread_cond_timedwait, old_pthread_cond_signal, and
9184         old_pthread_cond_broadcast.
9185         * old_pthread_cond_broadcast.c: New file.
9186         * old_pthread_cond_destroy.c: New file.
9187         * old_pthread_cond_init.c: New file.
9188         * old_pthread_cond_signal.c: New file.
9189         * old_pthread_cond_timedwait.c: New file.
9190         * old_pthread_cond_wait.c: New file.
9191         * pthreadP.h: Add prototypes for the compatibility interfaces.
9193         * pthread_cond_destroy.c: Don't include <errno.h>.
9195 2003-01-01  Ulrich Drepper  <drepper@redhat.com>
9197         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Avoid
9198         unnecessary zero offset when addressing MUTEX.
9200 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9202         * sysdeps/unix/sysv/linux/fork.h: Add libc_hidden_proto for
9203         __register_atfork.
9204         * sysdeps/unix/sysv/linux/register-atfork.c: Add libc_hidden_def
9205         for __register_atfork.
9207 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9209         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use __ASSEMBLER__
9210         instead of ASSEMBLER test macro.
9212         * sysdeps/unix/sysv/linux/allocrtsig.c (__libc_current_sigrtmin,
9213         __libc_current_sigrtmax): Add libc_hidden_def.
9215         * sysdeps/pthread/list.h: Remove assert.h include.
9217 2002-12-31  Ulrich Drepper  <drepper@redhat.com>
9219         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Use
9220         __pthread_initialize_minimal_internal not
9221         __pthread_initialize_minimal.
9223 2002-12-30  Ulrich Drepper  <drepper@redhat.com>
9225         * sysdeps/pthread/pt-initfini.c (call_initialize_minimal): Mark
9226         __pthread_initialize_minimal as hidden.
9228         * init.c (__pthread_initialize_minimal_internal): Don't mark as
9229         constructor.
9231 2002-12-31  Jakub Jelinek  <jakub@redhat.com>
9233         * Makefile ($(inst_libdir)/libpthread.so): Depend on
9234         $(common-objpfx)format.lds, include that into the output script.
9235         Fix comment.
9236         (extra-B-pthread.so): Change linuxthreads/ into nptl/.
9238 2002-12-28  Andreas Jaeger  <aj@suse.de>
9240         * sysdeps/unix/sysv/linux/xstatconv.c (xstat_conv): Adjust for
9241         nsec resolution changes.
9242         (xstat64_conv): Likewise.
9243         (xstat32_conv): Likewise.
9244         * sysdeps/unix/sysv/linux/kernel_stat.h: Add nsec resolution for
9245         struct kernel_stat.
9246         * sysdeps/unix/sysv/linux/bits/stat.h: Add nsec resolution for
9247         structs stat and stat64.
9248         * time/time.h (__timespec_defined): Define for __USE_MISC.
9249         * io/sys/stat.h [__USE_MISC]: Define __need_timespec for struct stat.
9251 2002-12-30  Jakub Jelinek  <jakub@redhat.com>
9253         * forward.c (FORWARD2): Renamed from FORWARD3.  Remove unused export
9254         argument.
9255         (pthread_attr_init_2_0, pthread_attr_init_2_1): Use FORWARD macro.
9256         (pthread_exit): Use strong_alias to avoid warnings.
9257         * pthreadP.h (struct pthread_functions): Rename ptr_pthread_exit
9258         and ptr_pthread_attr_init_2_* to ptr___pthread_exit and
9259         ptr___pthread_attr_init_2_*.
9260         * init.c (pthread_functions): Adjust.
9262 2002-12-29  Ulrich Drepper  <drepper@redhat.com>
9264         * forward.c: Make all functions available by default again.  It
9265         caused too much trouble.
9267         * pt-siglongjmp.c: Removed.
9269 2002-12-28  Jakub Jelinek  <jakub@redhat.com>
9271         * sysdeps/i386/tls.h: Include tcb-offsets.h in assembler.
9272         (SYSINFO_OFFSET, MULTIPLE_THREADS_OFFSET): Remove.
9273         * sysdeps/i386/Makefile: New file.
9274         * sysdeps/i386/tcb-offsets.sym: New file.
9275         * sysdeps/pthread/tcb-offsets.h: New file.
9276         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9277         Remove MULTIPLE_THREADS_OFFSET and SYSINFO_OFFSET checks.
9279         * sysdeps/unix/sysv/linux/Versions [libc] (GLIBC_PRIVATE): Move
9280         __register_atfork...
9281         (GLIBC_2.3.2): ...here.
9283 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9285         * sysdeps/pthread/pthread.h: Mark pthread_attr_getstackaddr and
9286         pthread_attr_setstackaddr with __attribute_deprecated__.
9288 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9290         * pt-system.c (system): Remove cancellation handling.
9291         * tst-cancel-wrappers.sh: Allow pt-system.o* to not use the
9292         cancellation routines.
9294 2002-12-28  Ulrich Drepper  <drepper@redhat.com>
9296         * descr.h: Include <dl-sysdep.h>.
9297         (struct pthread): Move header.data.list to the back of the struct.
9298         * sysdeps/i386/tls.h (tcbhead_t): Move list to the back of the struct.
9299         (MULTIPLE_THREADS_OFFSET): Adjust offset.
9300         (SYSINFO_OFFSEET): Likewise.
9302 2002-12-27  Jakub Jelinek  <jakub@redhat.com>
9304         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h (USE_DL_SYSINFO):
9305         Define.
9306         (DL_SYSINFO_DEFAULT): Cast to uintptr_t to avoid warnings.
9307         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h (NEED_DL_SYSINFO,
9308         DL_SYSINFO_DEFAULT, DL_SYSINFO_IMPLEMENTATION): Define.
9309         (USE_DL_SYSINFO): Undef.
9311 2002-12-22  Jakub Jelinek  <jakub@redhat.com>
9313         * Makefile (tests-reverse): Use $(objpfx)../libc.so instead of
9314         $(common-objpfx)libc.so.
9315         * tst-cancel4.c (tf_write, tf_writev): Increase buf sizes so that
9316         it is bigger than pipe buffer size even on arches with bigger
9317         page size.
9318         (tf_usleep): Cast usleep argument to useconds_t to avoid warnings.
9320 2002-12-25  Ulrich Drepper  <drepper@redhat.com>
9322         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Implement
9323         correct errno access for case that USE___THREAD is not defined.
9325 2002-12-24  Ulrich Drepper  <drepper@redhat.com>
9327         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Add missing #endif.
9328         Patch by Marijn Ros <marijn@mad.scientist.com>.
9330 2002-12-22  Roland McGrath  <roland@redhat.com>
9332         * Makefile (omit-deps): Add $(unix-syscalls:%=ptw-%).
9334 2002-12-20  Ulrich Drepper  <drepper@redhat.com>
9336         * sysdeps/pthread/bits/stdio-lock.h (_IO_lock_inexpensive): Define.
9338 2002-12-19  Ulrich Drepper  <drepper@redhat.com>
9340         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Don't define
9341         NEED_DL_SYSINFO since no processor < i686 had the sysenter opcode.
9342         * sysdeps/unix/sysv/linux/i386/i686/dl-sysdep.h: New file.
9344         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Use ENTER_KERNEL instead
9345         of int $0x80.
9346         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9347         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: Likewise.
9348         * sysdeps/unix/sysv/linux/i386/i486/lowlevelcond.S: Likewise.
9349         * sysdeps/unix/sysv/linux/i386/i486/lowlevellock.S: Likewise.
9350         * sysdeps/unix/sysv/linux/i386/i486/lowlevelmutex.S: Likewise.
9351         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Likewise.
9352         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Likewise.
9353         * sysdeps/unix/sysv/linux/i386/i486/pthread_barrier_wait.S: Likewise.
9355         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Add support for using
9356         sysenter.
9357         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Likewise.
9359         * sysdeps/i386/tls.h: Unconditionally include <dl-sysdep.h>.
9361         * allocatestack.c (allocate_stack) [NEED_DL_SYSINFO]: Set sysinfo
9362         in new TCB.
9363         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Check
9364         that sysinfo is properly initialized.
9365         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define RTLD_PRIVATE_ERRNO
9366         to 1 only for ld.so.
9368         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: Define
9369         RTLD_CORRECT_DYNAMIC_WEAK.
9371 2002-12-19  Jakub Jelinek  <jakub@redhat.com>
9373         * forward.c (pthread_attr_init_2_0, pthread_attr_init_2_1):
9374         Use return 0 as 6th argument to FORWARD4.
9375         * pthread_equal.c: Include pthreadP.h instead of pthread.h.
9377 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9379         * descr.h (struct pthread) [NEED_DL_SYSINFO]: Add sysinfo member.
9380         * sysdeps/i386/tls.h (tcbhead_t): Add sysinfo member.
9381         Define SYSINFO_OFFSEET if NEED_DL_SYSINFO is defined.
9382         (INIT_SYSINFO): New #define.
9383         (TLS_TP_INIT): Use INIT_SYSINFO.
9384         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9385         At test to make sure SYSINFO_OFFSET value is correct.
9386         * sysdeps/unix/sysv/linux/i386/dl-sysdep.h: New file.
9388 2002-12-18  Jakub Jelinek  <jakub@redhat.com>
9390         * sysdeps/pthread/flockfile.c (flockfile): Change into weak alias.
9391         * sysdeps/unix/sysv/linux/raise.c (gsignal): Add weak alias to raise.
9392         * Versions [libc: GLIBC_2.0]: Add pthread_attr_init.
9393         [libpthread: GLIBC_2.1]: Remove __pthread_rwlock_init,
9394         __pthread_rwlock_destroy, __pthread_rwlock_rdlock,
9395         __pthread_rwlock_wrlock, __pthread_rwlock_unlock,
9396         __pthread_rwlock_tryrdlock and __pthread_rwlock_trywrlock.
9398 2002-12-18  Ulrich Drepper  <drepper@redhat.com>
9400         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Use ENTER_KERNEL
9401         macro instead of using int $0x80 directly.
9403         * sysdeps/pthread/bits/stdio-lock.h: New file.
9404         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevelmutex.S: New file.
9405         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevelmutex.S: New file.
9406         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevelmutex.S: New file.
9407         * Makefile (routines): Add libc-lowlevelmutex.
9409         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Remove
9410         __i686.get_pc_thunk.dx.
9412 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9414         * Makefile (libpthread-shared-only-routines): Add pt-allocrtsig.
9415         (tests): Depend on $(objpfx)tst-cancel-wrappers.out.
9416         ($(objpfx)tst-cancel-wrappers.out): New rule.
9417         * tst-cancel-wrappers.sh: New test.
9418         * tst-locale1.c: Include signal.h.
9419         (uselocale): Test static linking of __libc_current_sigrt*.
9421 2002-12-17  Ulrich Drepper  <drepper@redhat.com>
9423         * Makefile (tests): Add tst-cancel6.
9424         * tst-cancel6.c: New file
9426 2002-12-17  Jakub Jelinek  <jakub@redhat.com>
9428         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h (SINGLE_THREAD_P):
9429         Define meaningfully for assembler as well.
9430         * pthreadP.h (struct pthread_functions): Remove
9431         ptr_pthread_attr_init field.  Add ptr_pthread_attr_init_2_0
9432         and ptr_pthread_attr_init_2_1 fields.
9433         * init.c (pthread_functions): Initialize ptr_pthread_attr_init_2_0
9434         and ptr_pthread_attr_init_2_1 instead of ptr_pthread_attr_init.
9435         * forward.c (FORWARD4): Renamed from FORWARD3. Add export argument.
9436         (FORWARD3): Define using FORWARD4.
9437         (pthread_attr_init): Provide both @GLIBC_2.0 and @@GLIBC_2.1
9438         versions.
9439         * pt-system.c: Remove duplicate stdlib.h include.
9441 2002-12-16  Ulrich Drepper  <drepper@redhat.com>
9443         * sem_init.c: Define sem_init@GLIBC_2.0.
9444         * sem_destroy.c: Define sem_destroy@GLIBC_2.0.
9445         * sem_getvalue.c: Define sem_getvalue@GLIBC_2.0.
9447         * flockfile.c: Moved to...
9448         * sysdeps/pthread/flockfile.c: ...here.  New file.
9449         * funlockfile.c: Moved to...
9450         * sysdeps/pthread/funlockfile.c: ...here.  New file.
9451         * ftrylockfile.c: Moved to...
9452         * sysdeps/pthread/ftrylockfile.c: ...here.  New file.
9454 2002-12-16  Jakub Jelinek  <jakub@redhat.com>
9456         * libc-cancellation.c: Guard both function with
9457         #if !defined NOT_IN_libc.
9458         * Makefile (libpthread-routines): Use ptw-, not pt- prefix for the
9459         automatically provided pthread wrappers.
9460         * pthreadP.h (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): Define to
9461         CANCEL_* if IS_IN_libpthread and to dummy versions if not in libc
9462         nor in libpthread.
9463         * pt-open.c: Removed.
9464         * pt-fcntl.c: Removed.
9465         * pt-fsync.c: Removed.
9466         * pt-lseek.c: Removed.
9467         * pt-msgrcv.c: Removed.
9468         * pt-msgsnd.c: Removed.
9469         * pt-msync.c: Removed.
9470         * pt-nanosleep.c: Removed.
9471         * pt-open64.c: Removed.
9472         * pt-pause.c: Removed.
9473         * pt-pread.c: Removed.
9474         * pt-pread64.c: Removed.
9475         * pt-pwrite.c: Removed.
9476         * pt-pwrite64.c: Removed.
9477         * pt-read.c: Removed.
9478         * pt-recv.c: Removed.
9479         * pt-recvfrom.c: Removed.
9480         * pt-recvmsg.c: Removed.
9481         * pt-send.c: Removed.
9482         * pt-sendto.c: Removed.
9483         * pt-sigtimedwait.c: Removed.
9484         * pt-sigwait.c: Removed.
9485         * pt-wait.c: Removed.
9486         * pt-waitpid.c: Removed.
9487         * pt-write.c: Removed.
9488         * pt-accept.c: Removed.
9489         * pt-close.c: Removed.
9490         * pt-connect.c: Removed.
9491         * pt-lseek64.c: Removed.
9492         * pt-sendmsg.c: Removed.
9493         * pt-tcdrain.c: Removed.
9495 2002-12-15  Ulrich Drepper  <drepper@redhat.com>
9497         * init.c (__pthread_initialize_minimal_internal): Renamed from
9498         __pthread_initialize_minimal.  Make old name an alias.  This
9499         converts a normal relocation into a relative relocation.
9501         * pt-fcntl.c (__fcntl): Use fcntl64 syscall, not fcntl.
9503         * Versions [libpthread: GLIBC_2.3.2]: Remove creat, poll, pselect,
9504         readv, select, sigpause, sigsuspend, sigwaitinfo, waitid, writev.
9505         * Makefile (libpthread-routines): Remove pt-creat, pt-poll,
9506         pt-pselect, pt-readv, pt-select, pt-sigpause, pt-sigsuspend,
9507         pt-sigwaitinfo, pt-waitid, and pt-writev.
9508         * pt-creat.c: Removed.
9509         * pt-poll.c: Removed.
9510         * pt-pselect.c: Removed.
9511         * pt-readv.c: Removed.
9512         * pt-select.c: Removed.
9513         * pt-sigpause.c: Removed.
9514         * pt-sigsuspend.c: Removed.
9515         * pt-sigwaitinfo.c: Removed.
9516         * pt-waitid.c: Removed.
9517         * pt-writev.c: Removed.
9519         * init.c (pthread_functions): New variable.
9520         (__pthread_initialize_minimal): Pass pointer to pthread_functions
9521         (or NULL) to __libc_pthread_init.
9522         * forward.c: Rewrite to use __libc:pthread_functions array to get
9523         function addresses.
9524         * sysdeps/unix/sysv/linux/fork.h: Remove __libc_pthread_init
9525         prototype.
9526         * sysdeps/unix/sysv/linux/libc_pthread_init.c (__libc_pthread_init):
9527         Take new parameter.  Copy content of variable pointed to by it
9528         to __libc_pthread_init.
9530         * pthreadP.h (struct pthread_functions): New type.
9531         (__libc_pthread_init): Declare.
9533         * pthread_attr_destroy.c: Add namespace protected alias.
9534         * pthread_attr_getdetachstate.c: Likewise.
9535         * pthread_attr_getinheritsched.c: Likewise.
9536         * pthread_attr_getschedparam.c: Likewise.
9537         * pthread_attr_getschedpolicy.c: Likewise.
9538         * pthread_attr_getscope.c: Likewise.
9539         * pthread_attr_setdetachstate.c: Likewise.
9540         * pthread_attr_setinheritsched.c: Likewise.
9541         * pthread_attr_setschedparam.c: Likewise.
9542         * pthread_attr_setschedpolicy.c: Likewise.
9543         * pthread_attr_setscope.c: Likewise.
9544         * pthread_cond_broadcast.c: Likewise.
9545         * pthread_cond_destroy.c: Likewise.
9546         * pthread_cond_init.c: Likewise.
9547         * pthread_cond_signal.c: Likewise.
9548         * pthread_cond_wait.c: Likewise.
9549         * pthread_condattr_destroy.c: Likewise.
9550         * pthread_condattr_init.c: Likewise.
9551         * pthread_equal.c: Likewise.
9552         * pthread_exit.c: Likewise.
9553         * pthread_getschedparam.c: Likewise.
9554         * pthread_self.c: Likewise.
9555         * pthread_setcancelstate.c: Likewise.
9556         * pthread_setschedparam.c: Likewise.
9557         * pthread_mutex_destroy.c: Likewise.
9558         * pthread_mutex_init.c: Likewise.
9559         * pthreadP.h: Add prototypes for the aliases.
9561         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Set
9562         multiple_threads member in correct TCB to 1.
9564         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: Define
9565         SINGLE_THREAD_P.  If in libc or libpthread examine multiple_thread
9566         member of thread decriptor, otherwise return unconditionally 1.
9568 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9570         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Changes folded into the
9571         regular Linux version.  Remove file.
9572         * sysdeps/unix/sysv/linux/connect.S: Likewise.  Remove file.
9573         * sysdeps/unix/sysv/linux/llseek.c: Likewise.  Remove file.
9574         * sysdeps/unix/sysv/linux/msgrcv.c: Likewise.  Remove file.
9575         * sysdeps/unix/sysv/linux/msgsnd.c: Likewise.  Remove file.
9576         * sysdeps/unix/sysv/linux/open64.c: Likewise.  Remove file.
9577         * sysdeps/unix/sysv/linux/poll.c: Likewise.  Remove file.
9578         * sysdeps/unix/sysv/linux/pread.c: Likewise.  Remove file.
9579         * sysdeps/unix/sysv/linux/pread64.c: Likewise.  Remove file.
9580         * sysdeps/unix/sysv/linux/pselect.c: Likewise.  Remove file.
9581         * sysdeps/unix/sysv/linux/pwrite.c: Likewise.  Remove file.
9582         * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.  Remove file.
9583         * sysdeps/unix/sysv/linux/readv.c: Likewise.  Remove file.
9584         * sysdeps/unix/sysv/linux/recv.S: Likewise.  Remove file.
9585         * sysdeps/unix/sysv/linux/recvfrom.S: Likewise.  Remove file.
9586         * sysdeps/unix/sysv/linux/recvmsg.S: Likewise.  Remove file.
9587         * sysdeps/unix/sysv/linux/send.S: Likewise.  Remove file.
9588         * sysdeps/unix/sysv/linux/sendmsg.S: Likewise.  Remove file.
9589         * sysdeps/unix/sysv/linux/sendto.S: Likewise.  Remove file.
9590         * sysdeps/unix/sysv/linux/sigpause.c: Likewise.  Remove file.
9591         * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise.  Remove file.
9592         * sysdeps/unix/sysv/linux/sigtimedwait.c: Likewise.  Remove file.
9593         * sysdeps/unix/sysv/linux/sigwait.c: Likewise.  Remove file.
9594         * sysdeps/unix/sysv/linux/sigwaitinfo.c: Likewise.  Remove file.
9595         * sysdeps/unix/sysv/linux/system.c: Likewise.  Remove file.
9596         * sysdeps/unix/sysv/linux/tcdrain.c: Likewise.  Remove file.
9597         * sysdeps/unix/sysv/linux/wait.c: Likewise.  Remove file.
9598         * sysdeps/unix/sysv/linux/waitid.c: Likewise.  Remove file.
9599         * sysdeps/unix/sysv/linux/waitpid.c: Likewise.  Remove file.
9600         * sysdeps/unix/sysv/linux/writev.c: Likewise.  Remove file.
9601         * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise.  Remove file.
9603 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9605         * sysdeps/unix/sysv/linux/i386/sysdep-cancel.h: New file.
9606         * sysdeps/unix/sysv/linux/open.c: Removed.
9607         * sysdeps/unix/sysv/linux/fsync.c: Removed.
9608         * sysdeps/unix/sysv/linux/lseek.c: Removed.
9609         * sysdeps/unix/sysv/linux/msync.c: Removed.
9610         * sysdeps/unix/sysv/linux/read.c: Removed.
9611         * sysdeps/unix/sysv/linux/close.c: Removed.
9612         * sysdeps/unix/sysv/linux/creat.c: Removed.
9613         * sysdeps/unix/sysv/linux/nanosleep.c: Removed.
9614         * sysdeps/unix/sysv/linux/pause.c: Removed.
9615         * sysdeps/unix/sysv/linux/select.c: Removed.
9616         * sysdeps/unix/sysv/linux/write.c: Removed.
9618 2002-12-14  Ulrich Drepper  <drepper@redhat.com>
9620         * sysdeps/unix/sysv/linux/i386/pt-socket.S: Check multiple_threads
9621         element in TCB to see whether locking is needed.
9623         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Check that
9624         MULTIPLE_THREADS_OFFSET value is correct.
9626         * sysdeps/unix/sysv/linux/close.c: New file.
9627         * sysdeps/unix/sysv/linux/connect.S: New file.
9628         * sysdeps/unix/sysv/linux/creat.c: New file.
9629         * sysdeps/unix/sysv/linux/fsync.c: New file.
9630         * sysdeps/unix/sysv/linux/llseek.c: New file.
9631         * sysdeps/unix/sysv/linux/lseek.c: New file.
9632         * sysdeps/unix/sysv/linux/msgrcv.c: New file.
9633         * sysdeps/unix/sysv/linux/msgsnd.c: New file.
9634         * sysdeps/unix/sysv/linux/msync.c: New file.
9635         * sysdeps/unix/sysv/linux/nanosleep.c: New file.
9636         * sysdeps/unix/sysv/linux/open.c: New file.
9637         * sysdeps/unix/sysv/linux/open64.c: New file.
9638         * sysdeps/unix/sysv/linux/pause.c: New file.
9639         * sysdeps/unix/sysv/linux/poll.c: New file.
9640         * sysdeps/unix/sysv/linux/pread.c: New file.
9641         * sysdeps/unix/sysv/linux/pread64.c: New file.
9642         * sysdeps/unix/sysv/linux/pselect.c: New file.
9643         * sysdeps/unix/sysv/linux/pwrite.c: New file.
9644         * sysdeps/unix/sysv/linux/pwrite64.c: New file.
9645         * sysdeps/unix/sysv/linux/readv.c: New file.
9646         * sysdeps/unix/sysv/linux/recv.S: New file.
9647         * sysdeps/unix/sysv/linux/recvfrom.S: New file.
9648         * sysdeps/unix/sysv/linux/recvmsg.S: New file.
9649         * sysdeps/unix/sysv/linux/select.c: New file.
9650         * sysdeps/unix/sysv/linux/send.S: New file.
9651         * sysdeps/unix/sysv/linux/sendmsg.S: New file.
9652         * sysdeps/unix/sysv/linux/sendto.S: New file.
9653         * sysdeps/unix/sysv/linux/sigpause.c: New file.
9654         * sysdeps/unix/sysv/linux/sigsuspend.c: New file.
9655         * sysdeps/unix/sysv/linux/sigtimedwait.c: New file.
9656         * sysdeps/unix/sysv/linux/sigwait.c: New file.
9657         * sysdeps/unix/sysv/linux/sigwaitinfo.c: New file.
9658         * sysdeps/unix/sysv/linux/system.c: New file.
9659         * sysdeps/unix/sysv/linux/tcdrain.c: New file.
9660         * sysdeps/unix/sysv/linux/wait.c: New file.
9661         * sysdeps/unix/sysv/linux/waitid.c: New file.
9662         * sysdeps/unix/sysv/linux/waitpid.c: New file.
9663         * sysdeps/unix/sysv/linux/writev.c: New file.
9664         * sysdeps/unix/sysv/linux/i386/fcntl.c: New file.
9666         * pt-readv.c: Fix comment.
9668 2002-12-14  Jakub Jelinek  <jakub@redhat.com>
9670         * tst-cleanup1.c: Include stdlib.h.
9672         * tst-cancel5.c: New test.
9673         * Makefile (tests): Add tst-cancel5.
9674         (tst-cancel5): Link against libc.so libpthread.so in that order.
9676 2002-12-13  Ulrich Drepper  <drepper@redhat.com>
9678         * forward.c (test_loaded): Prevent recursive calls.
9680         * Makefile (routines): Add libc-cancellation.
9681         * libc-cancellation.c: New file.
9682         * descr.h (struct pthread): Add multiple_threads field.
9683         * allocatestack.c (allocate_stack): Initialize multiple_header field of
9684         new thread descriptor to 1.
9685         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread):
9686         Initialize multiple_thread field after successful thread creation.
9687         * cancellation.c (__do_cancel): Move to pthreadP.h.
9688         (__pthread_enable_asynccancel): Remove parameter from __do_cancel call.
9689         (__pthread_disable_asynccancel): Add internal_function attribute.
9690         * init.c (sigcancel_handler): Remove parameter from __do_cancel call.
9691         * pthread_setcancelstate.c: Likewise.
9692         * pthread_setcanceltype.c: Likewise.
9693         * pthread_exit.c: Likewise.
9694         * pthreadP.h (CANCELLATION_P): Likewise.
9695         (__do_cancel): Define as static inline.
9696         (LIBC_CANCEL_ASYNC, LIBC_CANCEL_RESET): New #defines.
9697         (__libc_enable_asynccancel, __libc_disable_asynccancel): New
9698         declarations.
9699         * sysdeps/i386/tls.h (tcbhead_t): Add list and multiple_threads
9700         fields.  Define MULTIPLE_THREADS_OFFSET.
9701         * sysdeps/pthread/bits/libc-lock.h: Remove __libc_locking_needed
9702         declaration.
9703         * sysdeps/unix/sysv/linux/accept.S: New file.
9704         * sysdeps/unix/sysv/linux/read.c: New file.
9705         * sysdeps/unix/sysv/linux/write.c: New file.
9706         * sysdeps/unix/sysv/linux/i386/pt-socket.S: New file.
9707         * sysdeps/unix/sysv/linux/libc_pthread_init.c: Remove definition and
9708         initialization of __libc_locking_needed.
9709         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Don't use
9710         __libc_locking_needed, use multiple_threads field in TCB.
9711         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9713 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9715         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: Use i486
9716         version.
9717         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: Likewise.
9719         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Correct
9720         access to __libc_locking_needed for PIC.
9722 2002-12-12  Jakub Jelinek  <jakub@redhat.com>
9724         * sysdeps/pthread/bits/libc-lock.h (__libc_locking_needed): Only
9725         declare for libc.so.
9726         (__libc_lock_init, __libc_lock_init_recursive): Change into comma
9727         expression.
9728         (__libc_lock_lock): Put into statement expression.
9729         (__libc_lock_unlock): Remove trailing semicolon.
9730         * sysdeps/unix/sysv/linux/fork.h (__libc_pthread_init): Fix typo.
9732 2002-12-12  Roland McGrath  <roland@redhat.com>
9734         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use asm operand with
9735         "m" constraint to refer to __libc_locking_needed.  Declare it here.
9737 2002-12-12  Ulrich Drepper  <drepper@redhat.com>
9739         * sysdeps/unix/sysv/linux/fork-gen.c: Renamed to...
9740         * sysdeps/unix/sysv/linux/libc_pthread_init.c: ...this.
9741         Initialize __libc_locking_needed.
9742         * init.c (__pthread_initialize_minimal): Call __libc_pthread_init
9743         instead of __register_pthread_fork_handler.
9744         * sysdeps/pthread/bits/libc-lock.h: Declare __libc_locking_needed.
9745         * sysdeps/unix/sysv/linux/Makefile (sysdep_routimes): Replace
9746         fork-gen with libc_pthread_init.
9747         * sysdeps/unix/sysv/linux/Versions: Use __libc_pthread_init instead
9748         of __register_pthread_fork_handler.
9749         * sysdeps/unix/sysv/linux/fork.h: Declare __libc_pthread_init instead
9750         of __register_pthread_fork_handler.
9751         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Use
9752         __libc_locking_needed to determine whether lock prefix can be avoided.
9753         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: Likewise.
9755 2002-12-11  Ulrich Drepper  <drepper@redhat.com>
9757         * Makefile (tests): Add tst-cleanup1.
9758         * tst-cleanup1.c: New file.
9759         * cancellation.c (__cleanup_thread): Removed.
9760         (__do_cancel): Remove call to __cleanup_thread.
9761         * pthreadP.h: Remove __cleanup_thread prorotype.
9763         * sysdeps/pthread/bits/libc-lock.h (__libc_cleanup_region_start):
9764         Remember function and argument even if cancellation handler
9765         function is not available.
9766         (__libc_cleanup_region_end): Execute registered function directly if
9767         pthread functions are not available.
9768         (__libc_cleanup_end): Likewise.
9770         * init.c (__pthread_initialize_minimal): Fix initialization in
9771         static lib by preventing gcc from being too clever.
9773 2002-12-10  Ulrich Drepper  <drepper@redhat.com>
9775         * init.c (__pthread_initialize_minimal): Remove unneccesary
9776         sigaddset call.
9778         * Makefile (tests): We can run tst-locale2 now.
9780 2002-12-09  Ulrich Drepper  <drepper@redhat.com>
9782         * Versions: Remove duplicated sigwait entry.
9784 2002-12-08  Ulrich Drepper  <drepper@redhat.com>
9786         * pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only
9787         inside libpthread.
9789         * pt-fcntl.c (__fcntl): Initialize oldtype to avoid warning.
9791         * pthreadP.h: Declare __pthread_enable_asynccancel and
9792         __pthread_disable_asynccancel.
9793         (CANCEL_ASYNC): Use __pthread_enable_asynccancel.
9794         (CANCEL_RESET): Use __pthread_disable_asynccancel.
9795         * cancellation.c (__pthread_enable_asynccancel): New function.
9796         (__pthread_disable_asynccancel): New function.
9797         * pt-accept.c: Adjust for CANCEL_ASYNC and CANCEL_RESET change.
9798         * pt-close.c: Likewise.
9799         * pt-connect.c: Likewise.
9800         * pt-creat.c: Likewise.
9801         * pt-fcntl.c: Likewise.
9802         * pt-fsync.c: Likewise.
9803         * pt-lseek.c: Likewise.
9804         * pt-lseek64.c: Likewise.
9805         * pt-msgrcv.c: Likewise.
9806         * pt-msgsnd.c: Likewise.
9807         * pt-msync.c: Likewise.
9808         * pt-nanosleep.c: Likewise.
9809         * pt-open.c: Likewise.
9810         * pt-open64.c: Likewise.
9811         * pt-pause.c: Likewise.
9812         * pt-poll.c: Likewise.
9813         * pt-pread.c: Likewise.
9814         * pt-pread64.c: Likewise.
9815         * pt-pselect.c: Likewise.
9816         * pt-pwrite.c: Likewise.
9817         * pt-pwrite64.c: Likewise.
9818         * pt-read.c: Likewise.
9819         * pt-readv.c: Likewise.
9820         * pt-recv.c: Likewise.
9821         * pt-recvfrom.c: Likewise.
9822         * pt-recvmsg.c: Likewise.
9823         * pt-select.c: Likewise.
9824         * pt-send.c: Likewise.
9825         * pt-sendmsg.c: Likewise.
9826         * pt-sendto.c: Likewise.
9827         * pt-sigpause.c: Likewise.
9828         * pt-sigsuspend.c: Likewise.
9829         * pt-sigtimedwait.c: Likewise.
9830         * pt-sigwait.c: Likewise.
9831         * pt-sigwaitinfo.c: Likewise.
9832         * pt-system.c: Likewise.
9833         * pt-tcdrain.c: Likewise.
9834         * pt-wait.c: Likewise.
9835         * pt-waitid.c: Likewise.
9836         * pt-waitpid.c: Likewise.
9837         * pt-write.c: Likewise.
9838         * pt-writev.c: Likewise.
9839         * pthread_join.c: Likewise.
9840         * pthread_timedjoin.c: Likewise.
9842         * pt-sigpause.c (sigsuspend): Call __sigsuspend.
9843         (__xpg_sigpause): New function.
9844         * Versions (libpthread:GLIBC_2.3.2): Add __xpg_sigpause.
9846 2002-12-07  Ulrich Drepper  <drepper@redhat.com>
9848         * Makefile (CFLAGS-ftrylockfile.c): Add -D_IO_MTSAFE_IO.
9850         * cleanup.c: Move declarations of _GI_pthread_cleanup_push and
9851         _GI_pthread_cleanup_pop to pthreadP.h.
9853         * ftrylockfile.c: Use _IO_lock_trylock instead of
9854         pthread_mutex_trylock.
9856         * pthreadP.h (CANCEL_ASYNC): Use __pthread_setcanceltype.
9857         (CANCEL_RESET): Likewise.
9858         (__pthread_setcanceltype_): Declare.
9859         (__pthread_mutex_lock_internal): Declare.
9860         (__pthread_mutex_unlock_internal): Declare.
9861         (__pthread_once_internal): Declare.
9862         (pthread_cleanup_push): Redefine using _GI_pthread_cleanup_push.
9863         (pthread_cleanup_pop): Redefine using _GI_pthread_cleanup_pop.
9865         * pthread_cond_timedwait.c: Use INTUSE is calls to pthread_mutex_lock
9866         and pthread_mutex_unlock.
9867         * pthread_cond_wait.c: Likewise.
9868         * pthread_mutex_lock.c: Use INTDEF to define alias if needed.
9869         * pthread_mutex_unlock.c: Likewise.
9871         * pthread_setcanceltype.c: Add additional alias
9872         __pthread_setcanceltype.
9874         * sem_unlink.c (sem_unlink): Use __pthread_once with INTDEF.
9875         * sem_open.c (sem_open): Likewise.
9876         Use __libc_open, __libc_write, and __libc_close instead of
9877         open, write, and close respectively.
9879         * sysdeps/pthread/bits/libc-lock.h (__libc_lock_trylock_internal):
9880         Rewrite as statement expression since it must return a value.
9882         * pthread_cancel.c: Use __pthread_kill instead of pthread_kill.
9883         * sysdeps/unix/sysv/linux/pthread_kill.c: Define additional alias
9884         __pthread_kill.
9886         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Define additional
9887         alias __pthread_once_internal.
9889         * sysdeps/unix/sysv/linux/raise.c: Use libc_hidden_def for raise.
9891 2002-12-06  Ulrich Drepper  <drepper@redhat.com>
9893         * Makefile (tests): Add tst-stdio1 and tst-stdio2.
9894         * tst-stdio1.c: New file.
9895         * tst-stdio2.c: New file.
9897         * init.c (__pthread_initialize_minimal): Correct INIT_LIST_HEAD use.
9899         * Makefile (tests): Comment out tst-locale2 for now.
9900         (CFLAGS-flockfile.c, CFLAGS-funlockfile.c): Define to -D_IO_MTSAFE_IO.
9902         * sysdeps/unix/sysv/linux/Makefile: Define CFLAGS-fork.c to
9903         -D_IO_MTSAFE_IO.
9904         * sysdeps/unix/sysv/linux/fork.c: Include <bits/stdio-lock.h>.
9905         Use _IO_lock_init instead of explicit assignment.
9907         * sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.
9908         Define __libc_lock_* and __libc_lock_recursive macros with
9909         lowlevellock macros, not pthread mutexes.
9911         * flockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_lock instead
9912         of pthread_mutex_lock.
9913         * funlockfile.c: Include <bits/stdio-lock.h>.  Use _IO_lock_unlock
9914         instead of pthread_mutex_unlock.
9916 2002-12-06  Roland McGrath  <roland@redhat.com>
9918         * allocatestack.c (__stack_user): Use uninitialized defn.
9919         * init.c (__pthread_initialize_minimal): Initialize it here.
9921 2002-12-05  Roland McGrath  <roland@redhat.com>
9923         * sysdeps/i386/tls.h (TLS_INIT_TP): Make it return zero or an error
9924         string.
9925         * sysdeps/x86_64/tls.h (TLS_INIT_TP): Likewise.
9927         * sysdeps/unix/sysv/linux/i386/createthread.c (create_thread): Add
9928         missing & here too.
9930 2002-12-05  Ulrich Drepper  <drepper@redhat.com>
9932         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
9933         lowlevellock.
9934         * sysdeps/unix/sysv/linux/i386/i486/libc-lowlevellock.S: New file.
9935         * sysdeps/unix/sysv/linux/i386/i586/libc-lowlevellock.S: New file.
9936         * sysdeps/unix/sysv/linux/i386/i686/libc-lowlevellock.S: New file.
9937         * sysdeps/pthread/bits/libc-lock.h: Use lowlevellock implementation
9938         for __libc_lock_* macros.
9939         * Makefile (routines): Add libc-lowlevellock.
9941 2002-10-09  Roland McGrath  <roland@redhat.com>
9943         * sysdeps/pthread/bits/libc-lock.h (__libc_maybe_call): New macro.
9944         Under [__PIC__], call the function via the pointer fetched for
9945         comparison rather than a call by name that uses the PLT.
9946         (__libc_lock_init, __libc_rwlock_init, __libc_lock_fini)
9947         (__libc_rwlock_fini, __libc_lock_lock, __libc_rwlock_rdlock)
9948         (__libc_rwlock_wrlock, __libc_lock_trylock, __libc_rwlock_tryrdlock)
9949         (__libc_rwlock_trywrlock, __libc_lock_unlock, __libc_rwlock_unlock)
9950         (__libc_key_create, __libc_getspecific, __libc_setspecific): Use it.
9952 2002-12-04  Roland McGrath  <roland@redhat.com>
9954         * forward.c (pthread_self): Use FORWARD3 macro to correct return type.
9956         * sysdeps/i386/td_ta_map_lwp2thr.c: Moved from ../nptl_db.
9957         * sysdeps/generic/td_ta_map_lwp2thr.c: New file.
9959         * pthread_create.c (start_thread): Add missing & on __nptl_last_event.
9961 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9963         * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h: Make pthread_t
9964         a completely opaque, non-integer type.
9965         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: Likewise.
9967 2002-12-05  Jakub Jelinek  <jakub@redhat.com>
9969         * sysdeps/i386/tls.h: Include stdlib.h.
9970         * sysdeps/x86_64/tls.h: Likewise.
9972 2002-12-04  Ulrich Drepper  <drepper@redhat.com>
9974         * Makefile (tests): Add tst-locale2.
9975         (tests-static): Likewise.
9976         * tst-locale2.c: New file.
9978         * sysdeps/unix/sysv/linux/i386/lowlevellock.h: Mark asms as
9979         volatile and add memory clobbers to lock operations.
9981 2002-12-03  Ulrich Drepper  <drepper@redhat.com>
9983         * sysdeps/i386/i686/bits/atomic.h: Use i486 version.
9984         * sysdeps/i386/i486/bits/atomic.h: New file.
9985         * sysdeps/i386/i586/bits/atomic.h: New file.
9986         * sysdeps/i386/i686/pthread_spin_trylock.S: Define HAVE_CMOV and
9987         include i486 version.
9988         * sysdeps/i386/i486/pthread_spin_trylock.S: New file.
9989         * sysdeps/i386/i586/pthread_spin_trylock.S: New file.
9990         Patch by Marijn Ros <marijn@mad.scientist.com>.
9992         * allocatestack.c (get_cached_stack): Don't crash if we first
9993         found a stack with a larger size then needed.
9994         Reported by Hui Huang <hui.huang@sun.com>.
9996         * Makefile (tests): Add tst-sysconf.
9997         * tst-sysconf.c: New file.
9999         * sysdeps/unix/sysv/linux/bits/local_lim.h: Undefine
10000         PTHREAD_THREADS_MAX.
10002 2002-12-02  Roland McGrath  <roland@redhat.com>
10004         * pthreadP.h (__stack_user, __nptl_create_event, __nptl_death_event):
10005         Declare using hidden_proto instead of attribute_hidden, so there are
10006         non-.hidden static symbols for gdb to find.
10007         (__pthread_keys): Likewise.
10008         * events.c (__nptl_create_event, __nptl_death_event): Add hidden_def.
10009         * allocatestack.c (__stack_user): Likewise.
10010         * pthread_create.c (__pthread_keys): Likewise.
10011         (__nptl_threads_events, __nptl_last_event): Make these static instead
10012         of hidden.
10013         * pthread_key_create.c (__pthread_pthread_keys_max,
10014         __pthread_pthread_key_2ndlevel_size): Renamed from __linuxthreads_*.
10016 2002-12-02  Ulrich Drepper  <drepper@redhat.com>
10018         * Makefile (tests): Add tst-locale1.  If buid-static is yes link
10019         statically.
10020         * tst-locale1.c: New file.
10022         * pthread_cond_timedwait.c: Include <stdlib.h>.
10024         * Makefile (tests): Add tst-fork2 and tst-fork3.
10025         * tst-fork2.c: New file.
10026         * tst-fork3.c: New file.
10028 2002-11-28  Ulrich Drepper  <drepper@redhat.com>
10030         * sysdeps/unix/sysv/linux/i386/bits/posix_opt.h: New file.
10032         * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define macros which
10033         require it to 200112L.
10035         * sysdeps/unix/sysv/linux/i386/i486/lowlevelrwlock.S: Use cmov
10036         instruction only if HAVE_CMOV is defined.
10037         * sysdeps/unix/sysv/linux/i386/i686/lowlevelrwlock.S: Define HAVE_CMOV.
10039         * sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h: New file.
10041         * sysdeps/unix/sysv/linux/x86_64/pthread_once.S: New file.
10043         * sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h: New file.
10045         * sysdeps/unix/sysv/linux/x86_64/pt-vfork.S: New file.
10047 2002-11-27  Ulrich Drepper  <drepper@redhat.com>
10049         * sysdeps/x86_64/bits/atomic.h: New file.
10051         * sysdeps/i386/i686/bits/atomic.h: Fix asm syntax for 8- and
10052         16-bit operations.
10054         * sysdeps/unix/sysv/linux/raise.c (raise): Use INTERNAL_SYSCALL if
10055         possible since gettid cannot fail.
10057         * sysdeps/x86_64/pthreaddef.h: New file.
10059         * sysdeps/i386/pthreaddef.h (gettid): Removed.
10061         * sysdeps/x86_64/pthread_spin_init.c: New file.
10062         * sysdeps/x86_64/pthread_spin_lock.c: New file.
10063         * sysdeps/x86_64/pthread_spin_trylock.c: New file.
10064         * sysdeps/x86_64/pthread_spin_unlock.c: New file.
10066         * sysdeps/i386/i686/pthread_spin_trylock.S (pthread_spin_trylock):
10067         Add missing lock prefix.  Minute optimization.
10069         * tst-spin2.c (main): Also check successful trylock call.
10071         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Use correct
10072         syscall.  Fix typo in case INTERNAL_SYSCALL is not used.
10074         * sysdeps/i386/pthread_spin_destroy.c: Moved to...
10075         * sysdeps/pthread/pthread_spin_destroy.c: ...here.  New file.
10077         * sysdeps/i386/pthread_sigmask.c: Removed.  Use the generic code.
10078         * sysdeps/pthread/pthread_sigmask.c (pthread_sigmask): Return correct
10079         value in case of an error.  Add support for INTERNAL_SYSCALL.
10081         * sysdeps/i386/pthread_sigmask.c (pthread_sigmask): Return correct
10082         value in case of an error.
10084         * sysdeps/x86_64/tls.h: New file.
10086 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10088         * sysdeps/i386/tls.h (THREAD_GETMEM_NC): Change interface.  It now
10089         takes the array member name and the index as parameters.
10090         (THREAD_SETMEM_NC): Likewise.
10091         * pthread_getspecific.c: Use new THREAD_GETMEM_NC interface.
10092         * pthread_setspecific.c: Use new THREAD_GETMEM_NC and THREAD_SETMEM_NC
10093         interfaces.
10095         * sysdeps/i386/tls.h (THREAD_SETMEM): Use size of member element
10096         to decide which code to use.
10097         (THREAD_SETMEM_NC): Likewise.
10099         * allocatestack.c (queue_stack): Don't remove stack from list here.
10100         Do it in the caller.  Correct condition to prematurely terminate
10101         loop to free stacks.
10102         (__deallocate_stack): Remove stack from list here.
10104 2002-11-26  Ulrich Drepper  <drepper@redhat.com>
10106         * Makefile (tests): Add tst-stack1.
10107         * tst-stack1.c: New file.
10109         * allocatestack.c (allocate_stack): Initialize the TCB on a user
10110         provided stack.
10112         * pthread_attr_getstack.c: Return bottom of the thread area.
10114 2002-11-25  Ulrich Drepper  <drepper@redhat.com>
10116         * Makefile (libpthread-routines): Add pt-allocrtsig and
10117         pthread_kill_other_threads.
10118         * pt-allocrtsig.c: New file.
10119         * pthread_kill_other_threads.c: New file.
10120         * sysdeps/unix/sysv/linux/allocrtsig.c: Add additional aliases for
10121         all three functions.
10122         * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Remove
10123         allocrtsig.
10124         * sysdeps/unix/sysv/linux/Versions (libc:GLIBC_PRIVATE): Export
10125         __libc_current_sigrtmin_private, __libc_current_sigrtmax_private,
10126         and __libc_allocate_rtsig_private.
10127         * Versions (libpthread): Export pthread_kill_other_threads_np,
10128         __libc_current_sigrtmin, and __libc_current_sigrtmax.
10130 2002-11-24  Ulrich Drepper  <drepper@redhat.com>
10132         * allocatestack.c (allocate_stack): stackaddr in attribute points to
10133         the end of the stack.  Adjust computations.
10134         When mprotect call fails dequeue stack and free it.
10135         * pthread_attr_setstack.c: Store top of the stack in stackaddr
10136         attribute.
10137         * pthread_getattr_np.c: Likewise.
10139         * descr.h (IS_DETACHED): Add some more parenthesis to prevent
10140         surprises.
10142 2002-11-23  Ulrich Drepper  <drepper@redhat.com>
10144         * sysdeps/pthread/pthread.h (pthread_self): __THROW must come before
10145         attribute definitions.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10147 2002-11-22  Ulrich Drepper  <drepper@redhat.com>
10149         * pthread_getspecific.c: Optimize access to first 2nd-level array.
10150         * pthread_setspecific.c: Likewise.
10152 2002-11-21  Ulrich Drepper  <drepper@redhat.com>
10154         * sysdeps/unix/sysv/linux/i386/createthread.c: Remove CLONE_ flags
10155         definitions.  Get them from the official place.
10156         * sysdeps/unix/sysv/linux/i386/fork.c: Likewise.
10158         * sysdeps/unix/sysv/linux/i386/createthread.c: Update CLONE_* flags.
10159         Use new CLONE_ flags in clone() calls.
10161         * sysdeps/unix/sysv/linux/fork.c: Use ARCH_FORK to actually fork.
10162         * sysdeps/unix/sysv/linux/i386/fork.c: New file.
10164         * Versions: Add pthread_* functions for libc.
10165         * forward.c: New file.
10167         * sysdeps/pthread/Makefile (libpthread-sysdeps_routines): Add
10168         errno-loc.
10169         * herrno.c: New file.
10170         * res.c: New file.
10172         * Makefile (libpthread-routines): Remove sem_post, sem_wait,
10173         sem_trywait, and sem_timedwait.  Add herrno and res.
10174         * sem_init.c: Don't initialize lock and waiters members.
10175         * sem_open.c: Likewise.
10176         * sem_post.c: Removed.
10177         * sem_wait.c: Removed.
10178         * sem_trywait.c: Removed.
10179         * sem_timedwait.c: Removed.
10180         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Complete rewrite.
10181         Includes full implementations of sem_post, sem_wait, sem_trywait,
10182         and sem_timedwait.
10183         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Adjust
10184         for new implementation.
10185         * sysdeps/unix/sysv/linux/internaltypes.h (struct sem): Remove lock
10186         and waiters fields.
10188         * tst-sem3.c: Improve error message.
10189         * tst-signal3.c: Likewise.
10191         * init.c (__pthread_initialize_minimal): Use set_tid_address syscall
10192         to tell the kernel about the termination futex and to initialize tid
10193         member.  Don't initialize main_thread.
10194         * descr.h (struct pthread): Remove main_thread member.
10195         * cancelllation.c (__do_cancel): Remove code handling main thread.
10196         The main thread is not special anymore.
10198         * allocatestack.c (__reclaim_stacks): Mark stacks as unused.  Add
10199         size of the stacks to stack_cache_actsize.
10201         * pt-readv.c: Add missing "defined".
10202         * pt-sigwait.c: Likewise.
10203         * pt-writev.c: Likewise.
10205 2002-11-09  Ulrich Drepper  <drepper@redhat.com>
10207         * Versions: Export __connect from libpthread.
10208         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10210         * Makefile (libpthread-routines): Add pt-raise.
10211         * sysdeps/unix/sysv/linux/raise.c: New file.
10212         * sysdeps/unix/sysv/linux/pt-raise.c: New file.
10213         * sysdeps/generic/pt-raise.c: New file.
10215         * pthread_cond_init.c: Initialize all data elements of the condvar
10216         structure.  Patch by Luca Barbieri <ldb@ldb.ods.org>.
10218         * pthread_attr_init.c: Actually implement 2.0 compatibility version.
10219         * pthread_create.c: Likewise.
10221         * Makefile (tests): Add tst-key1, tst-key2, tst-key3.
10222         * tst-key1.c: New file.
10223         * tst-key2.c: New file.
10224         * tst-key3.c: New file.
10226         * Versions: Export pthread_detach for version GLIBC_2.0.
10227         Reported by Saurabh Desai <sdesai@austin.ibm.com>.
10229 2002-11-08  Ulrich Drepper  <drepper@redhat.com>
10231         * pthread_key_create.c: Terminate search after an unused key was found.
10232         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10234         * sysdeps/unix/sysv/linux/i386/pthread_once.S: Return zero.
10235         Patch by Luca Barbieri <ldb@ldb.ods.org>.
10237 2002-10-10  Ulrich Drepper  <drepper@redhat.com>
10239         * sysdeps/unix/sysv/linux/i386/i486/lowlevelsem.S: Use slow generic
10240         dynamic lookup for errno in PIC.
10242         * allocatestack.c (get_cached_stack): Rearrange code slightly to
10243         release the stack lock as soon as possible.
10244         Call _dl_allocate_tls_init for TCB from the cache to re-initialize
10245         the static TLS block.
10246         (allocate_stack): Call _dl_allocate_tls_init for user-provided stack.
10248         * cancellation.c: Renamed from cancelation.c.
10249         * Makefile: Adjust accordingly.
10250         * pthreadP.h (CANCELLATION_P): Renamed from CANCELATION_P.
10251         * cleanup_defer.c: Use CANCELLATION_P.
10252         * pthread_testcancel.c: Likewise.
10253         * descr.h: Fix spelling in comments.
10254         * init.c: Likewise.
10255         * pthread_getattr_np.c: Likewise.
10256         * pthread_getschedparam.c: Likewise.
10257         * pthread_setschedparam.c: Likewise.
10258         * Versions: Likewise.
10260         * pt-pselect.c: New file.
10261         * Makefile (libpthread-routines): Add pt-pselect.
10262         * Versions: Add pselect.
10264         * tst-cancel4.c: New file.
10265         * Makefile (tests): Add tst-cancel4.
10267 2002-10-09  Ulrich Drepper  <drepper@redhat.com>
10269         * pthread_mutex_lock.c: Always record lock ownership.
10270         * pthread_mutex_timedlock.c: Likewise.
10271         * pthread_mutex_trylock.c: Likewise.
10273         * pt-readv.c: New file.
10274         * pt-writev.c: New file.
10275         * pt-creat.c: New file.
10276         * pt-msgrcv.c: New file.
10277         * pt-msgsnd.c: New file.
10278         * pt-poll.c: New file.
10279         * pt-select.c: New file.
10280         * pt-sigpause.c: New file.
10281         * pt-sigsuspend.c: New file.
10282         * pt-sigwait.c: New file.
10283         * pt-sigwaitinfo.c: New file.
10284         * pt-waitid.c: New file.
10285         * Makefile (libpthread-routines): Add pt-readv, pt-writev, pt-creat,
10286         pt-msgrcv, pt-msgsnd, pt-poll, pt-select, pt-sigpause, pt-sigsuspend,
10287         pt-sigwait, pt-sigwaitinfo, and pt-waitid.
10288         * Versions: Add all the new functions.
10290         * tst-exit1.c: New file.
10291         * Makefile (tests): Add tst-exit1.
10293         * sem_timedwait.c: Minor optimization for more optimal fastpath.
10295 2002-10-08  Ulrich Drepper  <drepper@redhat.com>
10297         * pt-fcntl.c: Only enable asynchronous cancellation for F_SETLKW.
10299         * pthread_join.c: Enable asynchronous cancellation around lll_wait_tid
10300         call.  pthread_join is an official cancellation point.
10301         * pthread_timedjoin.c: Likewise.
10303         * pthread_cond_wait.c: Revert order in which internal lock are dropped
10304         and the condvar's mutex are retrieved.
10305         * pthread_cond_timedwait.c: Likewise.
10306         Reported by dice@saros.East.Sun.COM.
10308 2002-10-07  Ulrich Drepper  <drepper@redhat.com>
10310         * pthreadP.h: Cut out all type definitions and move them...
10311         * sysdeps/unix/sysv/linux/internaltypes.h: ...here.  New file.
10312         * pthreadP.h: Include <internaltypes.h>.
10314         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h (lll_sem_post): Little
10315         performance tweaks.
10317         * sem_trywait.c: Shuffle #includes around to get right order.
10318         * sem_timedwait.c: Likewise.
10319         * sem_post.c: Likewise.
10320         * sem_wait.c: Likewise.
10322         * nptl 0.3 released.
10324         * Makefile (tests): Add tst-signal3.
10325         * tst-signal3.c: New file.
10327 2002-10-05  Ulrich Drepper  <drepper@redhat.com>
10329         * sysdeps/unix/sysv/linux/i386/lowlevelsem.h: Tell the compiler that
10330         the asms modify the sem object.
10331         (__lll_sem_timedwait): Now takes struct sem* as first parameter.
10333         * sysdeps/unix/sysv/linux/i386/bits/semaphore.h (sem_t): Don't expose
10334         the actual members.
10335         * pthreadP.h (struct sem): New type.  Actual semaphore type.
10336         * semaphoreP.h: Include pthreadP.h.
10337         * sem_getvalue.c: Adjust to sem_t change.
10338         * sem_init.c: Likewise.
10339         * sem_open.c: Likewise.
10340         * sem_post.c: Likewise.
10341         * sem_timedwait.c: Likewise.
10342         * sem_trywait.c: Likewise.
10343         * sem_wait.c: Likewise.
10345 2002-10-04  Ulrich Drepper  <drepper@redhat.com>
10347         * Makefile (tests): Add tst-basic2, tst-exec1, tst-exec3, tst-exec3.
10348         * tst-basic2.c: New file.
10349         * tst-exec1.c: New file.
10350         * tst-exec2.c: New file.
10351         * tst-exec3.c: New file.
10353         * tst-fork1.c: Remove extra */.
10355         * nptl 0.2 released.  The API for IA-32 is complete.